:root {
    --estate-sidebar-width: 252px;
    --estate-sidebar-collapsed-width: 76px;
    --estate-topbar-height: 64px;
    --estate-right-panel-width: 420px;

    --estate-color-background: #f5f7fa;
    --estate-color-surface: #ffffff;
    --estate-color-surface-muted: #f8fafc;
    --estate-color-border: #e4e9f0;
    --estate-color-border-strong: #d8dee8;

    --estate-color-text: #182230;
    --estate-color-text-secondary: #526173;
    --estate-color-text-muted: #8692a3;

    --estate-color-primary: #2563eb;
    --estate-color-primary-hover: #1d4ed8;
    --estate-color-primary-soft: #eff6ff;

    --estate-color-sidebar: #111827;
    --estate-color-sidebar-surface: #1b2534;
    --estate-color-sidebar-text: #d7deea;
    --estate-color-sidebar-muted: #8491a3;

    --estate-shadow-small:
        0 1px 2px rgba(15, 23, 42, 0.05);
    --estate-shadow-panel:
        -12px 0 32px rgba(15, 23, 42, 0.12);

    --estate-radius-small: 8px;
    --estate-radius-medium: 12px;
    --estate-radius-large: 18px;

    --estate-transition-fast: 160ms ease;
    --estate-transition-default: 220ms ease;
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    background: var(--estate-color-background);
}

body {
    margin: 0;
    color: var(--estate-color-text);
    background: var(--estate-color-background);
    font-family:
        Pretendard,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        "Noto Sans KR",
        sans-serif;
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

button {
    color: inherit;
}

a {
    color: inherit;
    text-decoration: none;
}

[hidden] {
    display: none !important;
}

.estate-skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 9999;
    padding: 10px 14px;
    color: #ffffff;
    background: var(--estate-color-primary);
    border-radius: var(--estate-radius-small);
    transform: translateY(-160%);
    transition: transform var(--estate-transition-fast);
}

.estate-skip-link:focus {
    transform: translateY(0);
}

.estate-shell {
    min-height: 100vh;
}

.estate-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 60;
    display: flex;
    width: var(--estate-sidebar-width);
    min-height: 100vh;
    flex-direction: column;
    color: var(--estate-color-sidebar-text);
    background: var(--estate-color-sidebar);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    transition:
        width var(--estate-transition-default),
        transform var(--estate-transition-default);
}

.estate-sidebar__header {
    display: flex;
    min-height: var(--estate-topbar-height);
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.estate-brand {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 11px;
}

.estate-brand__mark {
    display: inline-flex;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: var(--estate-color-primary);
    border-radius: 11px;
    font-size: 17px;
    font-weight: 800;
}

.estate-brand__text {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.estate-brand__text strong {
    overflow: hidden;
    color: #ffffff;
    font-size: 15px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.estate-brand__text small {
    overflow: hidden;
    margin-top: 2px;
    color: var(--estate-color-sidebar-muted);
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.estate-sidebar__office {
    margin: 16px 14px 4px;
    padding: 12px 14px;
    background: var(--estate-color-sidebar-surface);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--estate-radius-medium);
}

.estate-sidebar__office-label {
    display: block;
    margin-bottom: 3px;
    color: var(--estate-color-sidebar-muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.estate-sidebar__office-name {
    display: block;
    overflow: hidden;
    color: #ffffff;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.estate-sidebar__navigation {
    flex: 1;
    overflow-y: auto;
    padding: 12px 12px 20px;
}

.estate-nav-group + .estate-nav-group {
    margin-top: 24px;
}

.estate-nav-group__title {
    display: block;
    padding: 0 12px 8px;
    color: var(--estate-color-sidebar-muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.estate-nav-item {
    display: flex;
    width: 100%;
    min-height: 43px;
    align-items: center;
    gap: 12px;
    margin: 2px 0;
    padding: 0 12px;
    color: var(--estate-color-sidebar-text);
    background: transparent;
    border: 0;
    border-radius: 10px;
    cursor: pointer;
    text-align: left;
    transition:
        color var(--estate-transition-fast),
        background var(--estate-transition-fast);
}

.estate-nav-item:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.07);
}

.estate-nav-item:focus-visible {
    outline: 2px solid #60a5fa;
    outline-offset: 1px;
}

.estate-nav-item.is-active {
    color: #ffffff;
    background: var(--estate-color-primary);
}

.estate-nav-item__icon {
    display: inline-flex;
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    align-items: center;
    justify-content: center;
    font-size: 17px;
}

.estate-nav-item__label {
    overflow: hidden;
    font-size: 13px;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.estate-sidebar__footer {
    padding: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.estate-sidebar-collapse {
    display: flex;
    width: 100%;
    min-height: 42px;
    align-items: center;
    gap: 12px;
    padding: 0 12px;
    color: var(--estate-color-sidebar-text);
    background: transparent;
    border: 0;
    border-radius: 10px;
    cursor: pointer;
}

.estate-sidebar-collapse:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.07);
}

.estate-sidebar-collapse__icon {
    display: inline-flex;
    width: 22px;
    flex: 0 0 22px;
    justify-content: center;
    font-size: 22px;
    transition: transform var(--estate-transition-default);
}

.estate-sidebar-collapse__label {
    font-size: 13px;
    font-weight: 650;
    white-space: nowrap;
}

.estate-sidebar__mobile-close {
    display: none;
    color: #ffffff;
}

.estate-shell__workspace {
    min-height: 100vh;
    margin-left: var(--estate-sidebar-width);
    transition: margin-left var(--estate-transition-default);
}

.estate-topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    display: grid;
    min-height: var(--estate-topbar-height);
    grid-template-columns: minmax(180px, 1fr) minmax(280px, 520px) minmax(180px, 1fr);
    align-items: center;
    gap: 20px;
    padding: 0 24px;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid var(--estate-color-border);
    backdrop-filter: blur(14px);
}

.estate-topbar__left,
.estate-topbar__right {
    display: flex;
    min-width: 0;
    align-items: center;
}

.estate-topbar__right {
    justify-content: flex-end;
    gap: 6px;
}

.estate-topbar__menu-button {
    display: none;
}

.estate-topbar__page-name {
    overflow: hidden;
    color: var(--estate-color-text-secondary);
    font-size: 13px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.estate-icon-button {
    display: inline-flex;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    align-items: center;
    justify-content: center;
    color: var(--estate-color-text-secondary);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    transition:
        color var(--estate-transition-fast),
        background var(--estate-transition-fast),
        border-color var(--estate-transition-fast);
}

.estate-icon-button:hover {
    color: var(--estate-color-text);
    background: var(--estate-color-surface-muted);
    border-color: var(--estate-color-border);
}

.estate-icon-button:focus-visible,
.estate-button:focus-visible,
.estate-global-search:focus-visible,
.estate-profile-button:focus-visible {
    outline: 2px solid var(--estate-color-primary);
    outline-offset: 2px;
}

.estate-global-search {
    display: flex;
    width: 100%;
    min-height: 40px;
    align-items: center;
    gap: 10px;
    padding: 0 12px;
    color: var(--estate-color-text-muted);
    background: var(--estate-color-surface-muted);
    border: 1px solid var(--estate-color-border);
    border-radius: 11px;
    cursor: pointer;
    text-align: left;
}

.estate-global-search:hover {
    border-color: var(--estate-color-border-strong);
    background: #ffffff;
}

.estate-global-search__icon {
    font-size: 18px;
}

.estate-global-search__placeholder {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.estate-global-search__shortcut {
    display: inline-flex;
    min-width: 24px;
    height: 24px;
    align-items: center;
    justify-content: center;
    color: var(--estate-color-text-muted);
    background: #ffffff;
    border: 1px solid var(--estate-color-border);
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
}

.estate-profile-button {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 9px;
    margin-left: 5px;
    padding: 4px 6px;
    background: transparent;
    border: 0;
    border-radius: 10px;
    cursor: pointer;
}

.estate-profile-button:hover {
    background: var(--estate-color-surface-muted);
}

.estate-profile-button__avatar {
    display: inline-flex;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: #334155;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 800;
}

.estate-profile-button__text {
    display: flex;
    min-width: 0;
    flex-direction: column;
    text-align: left;
}

.estate-profile-button__text strong,
.estate-profile-button__text small {
    overflow: hidden;
    max-width: 110px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.estate-profile-button__text strong {
    font-size: 12px;
}

.estate-profile-button__text small {
    color: var(--estate-color-text-muted);
    font-size: 10px;
}

.estate-shell__body {
    min-height: calc(100vh - var(--estate-topbar-height));
}

.estate-main {
    min-width: 0;
}

.estate-main__inner {
    width: 100%;
    max-width: 1720px;
    margin: 0 auto;
    padding: 26px 28px 48px;
}

.estate-page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
}

.estate-breadcrumb__list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 8px;
    padding: 0;
    list-style: none;
}

.estate-breadcrumb__item {
    color: var(--estate-color-text-muted);
    font-size: 11px;
    font-weight: 650;
}

.estate-breadcrumb__item + .estate-breadcrumb__item::before {
    margin-right: 8px;
    content: "/";
}

.estate-page-heading__title {
    margin: 0;
    color: var(--estate-color-text);
    font-size: clamp(24px, 2vw, 32px);
    line-height: 1.22;
    letter-spacing: -0.035em;
}

.estate-page-heading__description {
    margin: 7px 0 0;
    color: var(--estate-color-text-secondary);
    font-size: 13px;
}

.estate-page-header__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.estate-button {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    padding: 0 15px;
    border: 1px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 750;
    transition:
        background var(--estate-transition-fast),
        border-color var(--estate-transition-fast),
        color var(--estate-transition-fast),
        transform var(--estate-transition-fast);
}

.estate-button:active {
    transform: translateY(1px);
}

.estate-button--primary {
    color: #ffffff;
    background: var(--estate-color-primary);
}

.estate-button--primary:hover {
    background: var(--estate-color-primary-hover);
}

.estate-button--secondary {
    color: var(--estate-color-text);
    background: var(--estate-color-surface);
    border-color: var(--estate-color-border);
}

.estate-button--secondary:hover {
    background: var(--estate-color-surface-muted);
    border-color: var(--estate-color-border-strong);
}

.estate-messages {
    display: grid;
    gap: 8px;
    margin-bottom: 18px;
}

.estate-message {
    padding: 12px 14px;
    color: var(--estate-color-text-secondary);
    background: var(--estate-color-surface);
    border: 1px solid var(--estate-color-border);
    border-radius: var(--estate-radius-medium);
}

.estate-welcome-card {
    display: flex;
    min-height: 180px;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    padding: 32px;
    color: #ffffff;
    background:
        radial-gradient(
            circle at top right,
            rgba(96, 165, 250, 0.4),
            transparent 42%
        ),
        linear-gradient(
            135deg,
            #111827 0%,
            #1e3a8a 100%
        );
    border-radius: var(--estate-radius-large);
    box-shadow: var(--estate-shadow-small);
}

.estate-eyebrow {
    display: inline-block;
    margin-bottom: 8px;
    color: var(--estate-color-primary);
    font-size: 10px;
    font-weight: 850;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.estate-welcome-card .estate-eyebrow {
    color: #93c5fd;
}

.estate-welcome-card h2 {
    margin: 0;
    font-size: clamp(24px, 3vw, 36px);
    line-height: 1.2;
    letter-spacing: -0.035em;
}

.estate-welcome-card p {
    max-width: 680px;
    margin: 12px 0 0;
    color: rgba(255, 255, 255, 0.74);
    font-size: 14px;
}

.estate-welcome-card__badge {
    display: inline-flex;
    min-width: 116px;
    min-height: 116px;
    flex: 0 0 116px;
    align-items: center;
    justify-content: center;
    padding: 16px;
    color: #dbeafe;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    font-size: 12px;
    font-weight: 850;
    letter-spacing: 0.05em;
    text-align: center;
}

.estate-preview-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: 16px;
}

.estate-preview-card {
    position: relative;
    min-width: 0;
    min-height: 190px;
    padding: 22px;
    background: var(--estate-color-surface);
    border: 1px solid var(--estate-color-border);
    border-radius: var(--estate-radius-medium);
    box-shadow: var(--estate-shadow-small);
}

.estate-preview-card__number {
    color: var(--estate-color-primary);
    font-size: 11px;
    font-weight: 850;
    letter-spacing: 0.1em;
}

.estate-preview-card h3 {
    margin: 16px 0 8px;
    font-size: 17px;
    letter-spacing: -0.02em;
}

.estate-preview-card p {
    min-height: 42px;
    margin: 0;
    color: var(--estate-color-text-secondary);
    font-size: 12px;
}

.estate-status-badge {
    display: inline-flex;
    margin-top: 20px;
    padding: 5px 8px;
    color: #166534;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 750;
}

.estate-placeholder-section {
    margin-top: 16px;
    padding: 24px;
    background: var(--estate-color-surface);
    border: 1px solid var(--estate-color-border);
    border-radius: var(--estate-radius-medium);
    box-shadow: var(--estate-shadow-small);
}

.estate-section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.estate-section-heading h2 {
    margin: 0;
    font-size: 18px;
    letter-spacing: -0.025em;
}

.estate-section-heading__meta {
    color: var(--estate-color-text-muted);
    font-size: 11px;
    font-weight: 650;
}

.estate-placeholder-table {
    overflow: hidden;
    border: 1px solid var(--estate-color-border);
    border-radius: 10px;
}

.estate-placeholder-table__header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 12px;
    padding: 11px 15px;
    color: var(--estate-color-text-secondary);
    background: var(--estate-color-surface-muted);
    border-bottom: 1px solid var(--estate-color-border);
    font-size: 11px;
    font-weight: 750;
}

.estate-placeholder-table__empty {
    display: flex;
    min-height: 130px;
    align-items: center;
    justify-content: center;
    padding: 24px;
    color: var(--estate-color-text-muted);
    font-size: 12px;
    text-align: center;
}

.estate-right-panel {
    position: fixed;
    inset: var(--estate-topbar-height) 0 0 auto;
    z-index: 70;
    display: flex;
    width: min(
        var(--estate-right-panel-width),
        calc(100vw - 32px)
    );
    flex-direction: column;
    background: var(--estate-color-surface);
    border-left: 1px solid var(--estate-color-border);
    box-shadow: var(--estate-shadow-panel);
    transform: translateX(105%);
    visibility: hidden;
    transition:
        transform var(--estate-transition-default),
        visibility var(--estate-transition-default);
}

.estate-right-panel.is-open {
    transform: translateX(0);
    visibility: visible;
}

.estate-right-panel__header {
    display: flex;
    min-height: 72px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0 20px;
    border-bottom: 1px solid var(--estate-color-border);
}

.estate-right-panel__eyebrow {
    color: var(--estate-color-primary);
    font-size: 9px;
    font-weight: 850;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.estate-right-panel__title {
    margin: 2px 0 0;
    font-size: 17px;
}

.estate-right-panel__body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.estate-right-panel__empty {
    display: flex;
    min-height: 320px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 28px;
    color: var(--estate-color-text-secondary);
    background: var(--estate-color-surface-muted);
    border: 1px dashed var(--estate-color-border-strong);
    border-radius: var(--estate-radius-medium);
    text-align: center;
}

.estate-right-panel__empty-icon {
    display: inline-flex;
    width: 48px;
    height: 48px;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    color: var(--estate-color-primary);
    background: var(--estate-color-primary-soft);
    border-radius: 14px;
    font-size: 21px;
}

.estate-right-panel__empty strong {
    color: var(--estate-color-text);
    font-size: 14px;
}

.estate-right-panel__empty p {
    max-width: 280px;
    margin: 8px 0 0;
    color: var(--estate-color-text-muted);
    font-size: 12px;
}

.estate-shell-overlay {
    position: fixed;
    inset: 0;
    z-index: 50;
    background: rgba(15, 23, 42, 0.44);
    backdrop-filter: blur(2px);
}

.estate-shell.is-sidebar-collapsed .estate-sidebar {
    width: var(--estate-sidebar-collapsed-width);
}

.estate-shell.is-sidebar-collapsed .estate-shell__workspace {
    margin-left: var(--estate-sidebar-collapsed-width);
}

.estate-shell.is-sidebar-collapsed .estate-brand__text,
.estate-shell.is-sidebar-collapsed .estate-sidebar__office,
.estate-shell.is-sidebar-collapsed .estate-nav-group__title,
.estate-shell.is-sidebar-collapsed .estate-nav-item__label,
.estate-shell.is-sidebar-collapsed .estate-sidebar-collapse__label {
    display: none;
}

.estate-shell.is-sidebar-collapsed .estate-sidebar__header,
.estate-shell.is-sidebar-collapsed .estate-sidebar__footer {
    justify-content: center;
    padding-right: 10px;
    padding-left: 10px;
}

.estate-shell.is-sidebar-collapsed .estate-sidebar__navigation {
    padding-right: 10px;
    padding-left: 10px;
}

.estate-shell.is-sidebar-collapsed .estate-nav-item,
.estate-shell.is-sidebar-collapsed .estate-sidebar-collapse {
    justify-content: center;
    padding-right: 0;
    padding-left: 0;
}

.estate-shell.is-sidebar-collapsed .estate-sidebar-collapse__icon {
    transform: rotate(180deg);
}

@media (max-width: 1180px) {
    .estate-preview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .estate-topbar {
        grid-template-columns: minmax(160px, 1fr) minmax(240px, 420px) minmax(160px, 1fr);
    }
}

@media (max-width: 900px) {
    .estate-sidebar {
        width: min(
            var(--estate-sidebar-width),
            calc(100vw - 48px)
        );
        transform: translateX(-105%);
    }

    .estate-sidebar.is-mobile-open {
        transform: translateX(0);
    }

    .estate-shell__workspace,
    .estate-shell.is-sidebar-collapsed .estate-shell__workspace {
        margin-left: 0;
    }

    .estate-topbar {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 12px;
        padding-right: 16px;
        padding-left: 16px;
    }

    .estate-topbar__menu-button,
    .estate-sidebar__mobile-close {
        display: inline-flex;
    }

    .estate-topbar__center {
        display: none;
    }

    .estate-profile-button__text {
        display: none;
    }

    .estate-main__inner {
        padding-right: 18px;
        padding-left: 18px;
    }

    .estate-page-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .estate-page-header__actions {
        width: 100%;
        justify-content: flex-start;
    }

    .estate-shell.is-sidebar-collapsed .estate-sidebar {
        width: min(
            var(--estate-sidebar-width),
            calc(100vw - 48px)
        );
    }

    .estate-shell.is-sidebar-collapsed .estate-brand__text,
    .estate-shell.is-sidebar-collapsed .estate-sidebar__office,
    .estate-shell.is-sidebar-collapsed .estate-nav-group__title,
    .estate-shell.is-sidebar-collapsed .estate-nav-item__label,
    .estate-shell.is-sidebar-collapsed .estate-sidebar-collapse__label {
        display: initial;
    }

    .estate-shell.is-sidebar-collapsed .estate-sidebar__header,
    .estate-shell.is-sidebar-collapsed .estate-sidebar__footer,
    .estate-shell.is-sidebar-collapsed .estate-sidebar__navigation {
        padding-right: initial;
        padding-left: initial;
    }

    .estate-shell.is-sidebar-collapsed .estate-sidebar__header {
        padding-right: 18px;
        padding-left: 18px;
    }

    .estate-shell.is-sidebar-collapsed .estate-sidebar__navigation,
    .estate-shell.is-sidebar-collapsed .estate-sidebar__footer {
        padding-right: 12px;
        padding-left: 12px;
    }

    .estate-shell.is-sidebar-collapsed .estate-nav-item,
    .estate-shell.is-sidebar-collapsed .estate-sidebar-collapse {
        justify-content: flex-start;
        padding-right: 12px;
        padding-left: 12px;
    }
}

@media (max-width: 640px) {
    .estate-main__inner {
        padding-top: 20px;
        padding-right: 14px;
        padding-left: 14px;
    }

    .estate-page-heading__title {
        font-size: 24px;
    }

    .estate-page-header__actions,
    .estate-page-header__actions .estate-button {
        width: 100%;
    }

    .estate-welcome-card {
        min-height: 0;
        align-items: flex-start;
        flex-direction: column;
        padding: 24px;
    }

    .estate-welcome-card__badge {
        min-width: auto;
        min-height: auto;
        width: auto;
        height: auto;
        padding: 7px 10px;
        border-radius: 999px;
    }

    .estate-preview-grid {
        grid-template-columns: 1fr;
    }

    .estate-preview-card {
        min-height: 0;
    }

    .estate-placeholder-table__header {
        grid-template-columns: 1fr 1fr;
    }

    .estate-placeholder-table__header span:nth-child(n + 3) {
        display: none;
    }

    .estate-topbar__right > .estate-icon-button {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}


/* =========================================================
   STEP-04B Authentication
   ========================================================= */

.estate-sidebar__office-role {
    display: block;
    overflow: hidden;
    margin-top: 4px;
    color: var(--estate-color-sidebar-muted);
    font-size: 10px;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.estate-topbar-user {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 2px;
}

.estate-logout-form {
    margin: 0;
}

.estate-auth-body {
    min-height: 100vh;
    background: #f4f7fb;
}

.estate-auth-layout {
    display: grid;
    min-height: 100vh;
    grid-template-columns:
        minmax(420px, 0.95fr)
        minmax(480px, 1.05fr);
}

.estate-auth-visual {
    position: relative;
    overflow: hidden;
    padding: 46px;
    color: #ffffff;
    background:
        radial-gradient(
            circle at 80% 15%,
            rgba(96, 165, 250, 0.38),
            transparent 34%
        ),
        radial-gradient(
            circle at 15% 85%,
            rgba(37, 99, 235, 0.3),
            transparent 36%
        ),
        linear-gradient(
            145deg,
            #111827 0%,
            #172554 58%,
            #1e3a8a 100%
        );
}

.estate-auth-visual::before {
    position: absolute;
    top: 14%;
    right: -110px;
    width: 320px;
    height: 320px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 50%;
    content: "";
}

.estate-auth-visual::after {
    position: absolute;
    right: 80px;
    bottom: -180px;
    width: 410px;
    height: 410px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 50%;
    content: "";
}

.estate-auth-visual__inner {
    position: relative;
    z-index: 1;
    display: flex;
    width: 100%;
    max-width: 720px;
    min-height: calc(100vh - 92px);
    margin: 0 auto;
    flex-direction: column;
}

.estate-auth-brand {
    display: inline-flex;
    align-self: flex-start;
    align-items: center;
    gap: 12px;
}

.estate-auth-brand > span:last-child {
    display: flex;
    flex-direction: column;
}

.estate-auth-brand strong {
    color: #ffffff;
    font-size: 16px;
}

.estate-auth-brand small {
    margin-top: 2px;
    color: rgba(255, 255, 255, 0.56);
    font-size: 11px;
}

.estate-auth-visual__content {
    margin: auto 0;
}

.estate-auth-eyebrow {
    display: block;
    margin-bottom: 18px;
    color: #93c5fd;
    font-size: 10px;
    font-weight: 850;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.estate-auth-visual__content h1 {
    max-width: 620px;
    margin: 0;
    font-size: clamp(42px, 5vw, 72px);
    line-height: 1.1;
    letter-spacing: -0.055em;
}

.estate-auth-visual__content p {
    max-width: 520px;
    margin: 26px 0 0;
    color: rgba(255, 255, 255, 0.66);
    font-size: 15px;
    line-height: 1.8;
}

.estate-auth-visual__footer {
    color: rgba(255, 255, 255, 0.42);
    font-size: 11px;
    font-weight: 650;
    letter-spacing: 0.08em;
}

.estate-auth-form-section {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
}

.estate-auth-card {
    width: 100%;
    max-width: 430px;
}

.estate-auth-card__header {
    margin-bottom: 32px;
}

.estate-auth-card__eyebrow {
    display: block;
    margin-bottom: 10px;
    color: var(--estate-color-primary);
    font-size: 10px;
    font-weight: 850;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.estate-auth-card__header h2 {
    margin: 0;
    color: var(--estate-color-text);
    font-size: 34px;
    line-height: 1.2;
    letter-spacing: -0.04em;
}

.estate-auth-card__header p {
    margin: 10px 0 0;
    color: var(--estate-color-text-secondary);
    font-size: 13px;
}

.estate-auth-form {
    display: grid;
    gap: 20px;
}

.estate-auth-field {
    display: grid;
    gap: 8px;
}

.estate-auth-field__label {
    color: var(--estate-color-text);
    font-size: 12px;
    font-weight: 750;
}

.estate-auth-field__input {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    color: var(--estate-color-text);
    background: #ffffff;
    border: 1px solid var(--estate-color-border-strong);
    border-radius: 11px;
    outline: none;
    transition:
        border-color var(--estate-transition-fast),
        box-shadow var(--estate-transition-fast);
}

.estate-auth-field__input::placeholder {
    color: #a0aaba;
}

.estate-auth-field__input:focus {
    border-color: var(--estate-color-primary);
    box-shadow:
        0 0 0 3px rgba(37, 99, 235, 0.11);
}

.estate-auth-password {
    position: relative;
}

.estate-auth-password .estate-auth-field__input {
    padding-right: 68px;
}

.estate-auth-password__toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    min-width: 50px;
    height: 34px;
    color: var(--estate-color-text-secondary);
    background: transparent;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 750;
    transform: translateY(-50%);
}

.estate-auth-password__toggle:hover {
    color: var(--estate-color-primary);
    background: var(--estate-color-primary-soft);
}

.estate-auth-field__error {
    color: #dc2626;
    font-size: 11px;
}

.estate-auth-error {
    margin-bottom: 20px;
    padding: 12px 14px;
    color: #991b1b;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 10px;
    font-size: 12px;
}

.estate-auth-error p {
    margin: 0;
}

.estate-auth-error p + p {
    margin-top: 4px;
}

.estate-auth-messages {
    margin-bottom: 20px;
}

.estate-auth-message {
    padding: 12px 14px;
    color: #166534;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    font-size: 12px;
}

.estate-auth-submit {
    display: inline-flex;
    width: 100%;
    height: 50px;
    align-items: center;
    justify-content: center;
    margin-top: 4px;
    color: #ffffff;
    background: var(--estate-color-primary);
    border: 0;
    border-radius: 11px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 800;
    transition:
        background var(--estate-transition-fast),
        transform var(--estate-transition-fast);
}

.estate-auth-submit:hover {
    background: var(--estate-color-primary-hover);
}

.estate-auth-submit:active {
    transform: translateY(1px);
}

.estate-auth-submit:focus-visible,
.estate-auth-password__toggle:focus-visible {
    outline: 2px solid var(--estate-color-primary);
    outline-offset: 2px;
}

.estate-auth-card__notice {
    margin: 24px 0 0;
    color: var(--estate-color-text-muted);
    font-size: 11px;
    line-height: 1.7;
    text-align: center;
}

@media (max-width: 940px) {
    .estate-auth-layout {
        grid-template-columns: 1fr;
    }

    .estate-auth-visual {
        display: none;
    }

    .estate-auth-form-section {
        min-height: 100vh;
        padding: 32px 20px;
    }
}

@media (max-width: 640px) {
    .estate-topbar-user .estate-profile-button__text {
        display: none;
    }

    .estate-auth-card__header h2 {
        font-size: 30px;
    }
}


/* =========================================================
   STEP-04E Sidebar
   ========================================================= */

.estate-shell.is-sidebar-collapsed
.estate-nav-item[data-sidebar-label] {
    position: relative;
    overflow: visible;
}

.estate-shell.is-sidebar-collapsed
.estate-nav-item[data-sidebar-label]::after {
    position: absolute;
    top: 50%;
    left: calc(100% + 12px);
    z-index: 150;
    display: block;
    padding: 7px 10px;
    color: #ffffff;
    background: #111827;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    box-shadow:
        0 8px 24px rgba(15, 23, 42, 0.24);
    content: attr(data-sidebar-label);
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    opacity: 0;
    pointer-events: none;
    transform:
        translateY(-50%)
        translateX(-4px);
    transition:
        opacity var(--estate-transition-fast),
        transform var(--estate-transition-fast);
    white-space: nowrap;
}

.estate-shell.is-sidebar-collapsed
.estate-nav-item[data-sidebar-label]:hover::after,
.estate-shell.is-sidebar-collapsed
.estate-nav-item[data-sidebar-label]:focus-visible::after {
    opacity: 1;
    transform:
        translateY(-50%)
        translateX(0);
}

.estate-shell.is-sidebar-collapsed
.estate-sidebar__navigation {
    overflow: visible;
}

.estate-shell.is-sidebar-collapsed
.estate-nav-group {
    position: relative;
}

@media (max-width: 900px) {
    .estate-shell.is-sidebar-collapsed
    .estate-nav-item[data-sidebar-label]::after {
        display: none;
    }

    .estate-shell.is-sidebar-collapsed
    .estate-sidebar__navigation {
        overflow-y: auto;
    }
}


/* =========================================================
   STEP-04F Top Navigation
   ========================================================= */

.estate-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    padding: 0;
    margin: -1px;
    white-space: nowrap;
    border: 0;
    clip: rect(0, 0, 0, 0);
}

.estate-topbar-popover-control,
.estate-topbar-user {
    position: relative;
}

.estate-topbar-popover {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 130;
    width: 340px;
    overflow: hidden;
    color: var(--estate-color-text);
    background: var(--estate-color-surface);
    border: 1px solid var(--estate-color-border);
    border-radius: 14px;
    box-shadow:
        0 20px 48px rgba(15, 23, 42, 0.18);
}

.estate-topbar-popover--compact {
    width: 300px;
}

.estate-topbar-popover__header {
    display: flex;
    min-height: 64px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 13px 16px;
    border-bottom: 1px solid var(--estate-color-border);
}

.estate-topbar-popover__header > div {
    display: flex;
    flex-direction: column;
}

.estate-topbar-popover__header strong {
    font-size: 13px;
}

.estate-topbar-popover__eyebrow {
    margin-bottom: 2px;
    color: var(--estate-color-primary);
    font-size: 8px;
    font-weight: 850;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.estate-topbar-popover__text-button {
    color: var(--estate-color-text-secondary);
    background: transparent;
    border: 0;
    cursor: pointer;
    font-size: 10px;
    font-weight: 700;
}

.estate-topbar-popover__text-button:hover {
    color: var(--estate-color-primary);
}

.estate-topbar-empty {
    display: flex;
    min-height: 190px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 24px;
    text-align: center;
}

.estate-topbar-empty > span {
    display: inline-flex;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    color: var(--estate-color-primary);
    background: var(--estate-color-primary-soft);
    border-radius: 12px;
    font-size: 18px;
}

.estate-topbar-empty strong {
    font-size: 12px;
}

.estate-topbar-empty p {
    max-width: 260px;
    margin: 6px 0 0;
    color: var(--estate-color-text-muted);
    font-size: 10px;
    line-height: 1.6;
}

.estate-quick-create-list {
    display: grid;
    padding: 7px;
}

.estate-quick-create-item {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 11px;
    padding: 10px;
    color: var(--estate-color-text);
    background: transparent;
    border: 0;
    border-radius: 9px;
    cursor: pointer;
    text-align: left;
}

.estate-quick-create-item:hover {
    background: var(--estate-color-surface-muted);
}

.estate-quick-create-item__icon {
    display: inline-flex;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    align-items: center;
    justify-content: center;
    color: var(--estate-color-primary);
    background: var(--estate-color-primary-soft);
    border-radius: 10px;
    font-size: 15px;
}

.estate-quick-create-item > span:last-child {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.estate-quick-create-item strong {
    font-size: 11px;
}

.estate-quick-create-item small {
    overflow: hidden;
    margin-top: 2px;
    color: var(--estate-color-text-muted);
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.estate-notification-button {
    position: relative;
}

.estate-notification-button__dot {
    position: absolute;
    top: 7px;
    right: 7px;
    width: 6px;
    height: 6px;
    background: #ef4444;
    border: 2px solid var(--estate-color-surface);
    border-radius: 50%;
}

.estate-profile-button__chevron {
    color: var(--estate-color-text-muted);
    font-size: 9px;
}

.estate-profile-menu {
    width: 290px;
}

.estate-profile-menu__identity {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 16px;
    border-bottom: 1px solid var(--estate-color-border);
}

.estate-profile-menu__avatar {
    display: inline-flex;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: #334155;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 800;
}

.estate-profile-menu__identity > span:last-child {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.estate-profile-menu__identity strong,
.estate-profile-menu__identity small {
    overflow: hidden;
    max-width: 195px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.estate-profile-menu__identity strong {
    font-size: 12px;
}

.estate-profile-menu__identity small {
    margin-top: 3px;
    color: var(--estate-color-text-muted);
    font-size: 9px;
}

.estate-profile-menu__office {
    display: flex;
    flex-direction: column;
    padding: 12px 16px;
    background: var(--estate-color-surface-muted);
    border-bottom: 1px solid var(--estate-color-border);
}

.estate-profile-menu__office span {
    color: var(--estate-color-text-muted);
    font-size: 8px;
    font-weight: 750;
}

.estate-profile-menu__office strong {
    overflow: hidden;
    margin-top: 3px;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.estate-profile-menu__items {
    display: grid;
    padding: 7px;
}

.estate-profile-menu__item,
.estate-profile-menu__logout button {
    display: flex;
    width: 100%;
    min-height: 39px;
    align-items: center;
    gap: 10px;
    padding: 0 10px;
    color: var(--estate-color-text-secondary);
    background: transparent;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 10px;
    font-weight: 700;
    text-align: left;
}

.estate-profile-menu__item:hover,
.estate-profile-menu__logout button:hover {
    color: var(--estate-color-text);
    background: var(--estate-color-surface-muted);
}

.estate-profile-menu__item > span,
.estate-profile-menu__logout button > span {
    display: inline-flex;
    width: 20px;
    justify-content: center;
}

.estate-profile-menu__logout {
    margin: 0;
    padding: 7px;
    border-top: 1px solid var(--estate-color-border);
}

.estate-profile-menu__logout button {
    color: #dc2626;
}

.estate-command-open {
    overflow: hidden;
}

.estate-command-backdrop {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: min(12vh, 110px) 20px 20px;
    background: rgba(15, 23, 42, 0.56);
    backdrop-filter: blur(5px);
}

.estate-command-palette {
    width: min(680px, 100%);
    max-height: min(680px, calc(100vh - 80px));
    overflow: hidden;
    color: var(--estate-color-text);
    background: var(--estate-color-surface);
    border: 1px solid var(--estate-color-border);
    border-radius: 17px;
    box-shadow:
        0 28px 80px rgba(15, 23, 42, 0.32);
    opacity: 0;
    transform: translateY(-12px) scale(0.985);
    transition:
        opacity var(--estate-transition-fast),
        transform var(--estate-transition-fast);
}

.estate-command-palette.is-open {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.estate-command-search {
    display: flex;
    min-height: 66px;
    align-items: center;
    gap: 12px;
    padding: 0 15px;
    border-bottom: 1px solid var(--estate-color-border);
}

.estate-command-search__icon {
    color: var(--estate-color-text-muted);
    font-size: 21px;
}

.estate-command-search__input {
    min-width: 0;
    flex: 1;
    color: var(--estate-color-text);
    background: transparent;
    border: 0;
    outline: none;
    font-size: 14px;
}

.estate-command-search__input::placeholder {
    color: var(--estate-color-text-muted);
}

.estate-command-search__close {
    min-width: 42px;
    height: 28px;
    color: var(--estate-color-text-muted);
    background: var(--estate-color-surface-muted);
    border: 1px solid var(--estate-color-border);
    border-radius: 7px;
    cursor: pointer;
    font-size: 8px;
    font-weight: 800;
}

.estate-command-body {
    max-height: min(520px, calc(100vh - 220px));
    overflow-y: auto;
    padding: 8px;
}

.estate-command-section {
    padding: 7px 0;
}

.estate-command-section + .estate-command-section {
    border-top: 1px solid var(--estate-color-border);
}

.estate-command-section__title {
    display: block;
    padding: 7px 11px;
    color: var(--estate-color-text-muted);
    font-size: 8px;
    font-weight: 850;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.estate-command-list {
    display: grid;
    gap: 2px;
}

.estate-command-item {
    display: flex;
    width: 100%;
    min-height: 55px;
    align-items: center;
    gap: 12px;
    padding: 8px 11px;
    color: var(--estate-color-text);
    background: transparent;
    border: 0;
    border-radius: 10px;
    cursor: pointer;
    text-align: left;
}

.estate-command-item:hover,
.estate-command-item.is-active {
    background: var(--estate-color-primary-soft);
}

.estate-command-item__icon {
    display: inline-flex;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    align-items: center;
    justify-content: center;
    color: var(--estate-color-primary);
    background: var(--estate-color-surface-muted);
    border-radius: 10px;
    font-size: 16px;
}

.estate-command-item__content {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
}

.estate-command-item__content strong {
    font-size: 11px;
}

.estate-command-item__content small {
    overflow: hidden;
    margin-top: 2px;
    color: var(--estate-color-text-muted);
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.estate-command-item__type {
    color: var(--estate-color-text-muted);
    font-size: 8px;
    font-weight: 750;
}

.estate-command-empty {
    display: flex;
    min-height: 260px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 30px;
    text-align: center;
}

.estate-command-empty > span {
    display: inline-flex;
    width: 48px;
    height: 48px;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    color: var(--estate-color-primary);
    background: var(--estate-color-primary-soft);
    border-radius: 14px;
    font-size: 20px;
}

.estate-command-empty strong {
    font-size: 12px;
}

.estate-command-empty p {
    max-width: 310px;
    margin: 7px 0 0;
    color: var(--estate-color-text-muted);
    font-size: 10px;
    line-height: 1.6;
}

.estate-command-footer {
    display: flex;
    min-height: 42px;
    align-items: center;
    gap: 17px;
    padding: 0 15px;
    color: var(--estate-color-text-muted);
    background: var(--estate-color-surface-muted);
    border-top: 1px solid var(--estate-color-border);
    font-size: 8px;
}

.estate-command-footer span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.estate-command-footer kbd {
    display: inline-flex;
    min-width: 20px;
    height: 20px;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    color: var(--estate-color-text-secondary);
    background: var(--estate-color-surface);
    border: 1px solid var(--estate-color-border);
    border-radius: 5px;
    font-family: inherit;
    font-size: 8px;
    box-shadow:
        0 1px 0 var(--estate-color-border-strong);
}

@media (max-width: 900px) {
    .estate-topbar__right {
        gap: 2px;
    }

    .estate-profile-button__chevron {
        display: none;
    }
}

@media (max-width: 640px) {
    .estate-topbar__right
    .estate-topbar-popover-control:first-child,
    .estate-topbar__right
    .estate-theme-control {
        display: none;
    }

    .estate-topbar-popover {
        position: fixed;
        top: calc(var(--estate-topbar-height) + 8px);
        right: 10px;
        left: 10px;
        width: auto;
    }

    .estate-command-backdrop {
        align-items: flex-end;
        padding: 12px;
    }

    .estate-command-palette {
        width: 100%;
        max-height: calc(100vh - 24px);
        border-radius: 17px;
        transform: translateY(20px);
    }

    .estate-command-palette.is-open {
        transform: translateY(0);
    }

    .estate-command-footer {
        overflow-x: auto;
    }
}


/* =========================================================
   STEP-04G Right Panel Framework
   ========================================================= */

.estate-panel-open {
    overflow: hidden;
}

.estate-right-panel {
    --estate-current-panel-width: 540px;

    position: fixed;
    inset: 0 0 0 auto;
    z-index: 80;
    display: grid;
    width: min(
        var(--estate-current-panel-width),
        calc(100vw - 32px)
    );
    min-width: 0;
    height: 100vh;
    grid-template-rows:
        auto
        auto
        minmax(0, 1fr)
        auto;
    color: var(--estate-color-text);
    background: var(--estate-color-surface);
    border-left: 1px solid var(--estate-color-border);
    box-shadow: var(--estate-shadow-panel);
    transform: translateX(105%);
    visibility: hidden;
    transition:
        width var(--estate-transition-default),
        transform var(--estate-transition-default),
        visibility var(--estate-transition-default);
}

.estate-right-panel[data-panel-size="wide"] {
    --estate-current-panel-width: 720px;
}

.estate-right-panel[data-panel-size="full"] {
    --estate-current-panel-width: min(
        1040px,
        calc(100vw - 72px)
    );
}

.estate-right-panel.is-open {
    transform: translateX(0);
    visibility: visible;
}

.estate-right-panel.is-pinned {
    box-shadow:
        -10px 0 26px rgba(15, 23, 42, 0.1);
}

.estate-right-panel.is-pinned::before {
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: var(--estate-color-primary);
    content: "";
}

.estate-right-panel__header {
    position: relative;
    z-index: 3;
    display: flex;
    min-height: var(--estate-topbar-height);
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 14px 16px 14px 20px;
    background: var(--estate-color-surface);
    border-bottom: 1px solid var(--estate-color-border);
}

.estate-right-panel__heading {
    min-width: 0;
    flex: 1;
}

.estate-right-panel__eyebrow {
    display: block;
    overflow: hidden;
    margin-bottom: 3px;
    color: var(--estate-color-primary);
    font-size: 8px;
    font-weight: 850;
    letter-spacing: 0.13em;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.estate-right-panel__title {
    overflow: hidden;
    margin: 0;
    color: var(--estate-color-text);
    font-size: 17px;
    line-height: 1.25;
    letter-spacing: -0.025em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.estate-right-panel__subtitle {
    overflow: hidden;
    margin: 4px 0 0;
    color: var(--estate-color-text-muted);
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.estate-right-panel__tools {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 2px;
}

.estate-right-panel__tool[disabled] {
    opacity: 0.35;
    cursor: not-allowed;
}

.estate-right-panel__tool[disabled]:hover {
    color: var(--estate-color-text-secondary);
    background: transparent;
    border-color: transparent;
}

.estate-right-panel__tool[aria-pressed="true"] {
    color: var(--estate-color-primary);
    background: var(--estate-color-primary-soft);
    border-color: rgba(37, 99, 235, 0.22);
}

.estate-right-panel__close {
    margin-left: 2px;
}

.estate-right-panel__progress {
    position: relative;
    z-index: 2;
    height: 3px;
    overflow: hidden;
    background: var(--estate-color-primary-soft);
}

.estate-right-panel__progress span {
    position: absolute;
    inset: 0 auto 0 0;
    width: 38%;
    background: var(--estate-color-primary);
    animation:
        estate-panel-progress
        1.1s
        ease-in-out
        infinite;
}

@keyframes estate-panel-progress {
    0% {
        left: -40%;
    }

    100% {
        left: 110%;
    }
}

.estate-right-panel__body {
    position: relative;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--estate-color-background);
    scrollbar-gutter: stable;
}

.estate-right-panel__content {
    min-height: 100%;
}

.estate-panel-state {
    display: flex;
    min-height: 100%;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 40px 26px;
    color: var(--estate-color-text-secondary);
    text-align: center;
}

.estate-panel-state__icon {
    display: inline-flex;
    width: 54px;
    height: 54px;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    color: var(--estate-color-primary);
    background: var(--estate-color-primary-soft);
    border: 1px solid rgba(37, 99, 235, 0.13);
    border-radius: 16px;
    font-size: 21px;
    font-weight: 800;
}

.estate-panel-state strong {
    color: var(--estate-color-text);
    font-size: 13px;
}

.estate-panel-state p {
    max-width: 310px;
    margin: 7px 0 0;
    color: var(--estate-color-text-muted);
    font-size: 10px;
    line-height: 1.7;
}

.estate-panel-state--error
.estate-panel-state__icon {
    color: #dc2626;
    background: #fef2f2;
    border-color: #fecaca;
}

.estate-panel-state--error
.estate-button {
    margin-top: 18px;
}

.estate-panel-loading {
    min-height: 100%;
    padding: 22px;
}

.estate-panel-loading__header {
    display: grid;
    gap: 9px;
    margin-bottom: 20px;
}

.estate-panel-loading__header span,
.estate-panel-loading__cards span,
.estate-panel-loading__rows span {
    position: relative;
    display: block;
    overflow: hidden;
    background: var(--estate-color-surface-muted);
    border: 1px solid var(--estate-color-border);
    border-radius: 8px;
}

.estate-panel-loading__header span::after,
.estate-panel-loading__cards span::after,
.estate-panel-loading__rows span::after {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(255, 255, 255, 0.58),
            transparent
        );
    content: "";
    transform: translateX(-100%);
    animation:
        estate-panel-skeleton
        1.25s
        ease-in-out
        infinite;
}

.estate-panel-loading__header span:first-child {
    width: 46%;
    height: 20px;
}

.estate-panel-loading__header span:last-child {
    width: 72%;
    height: 12px;
}

.estate-panel-loading__cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 22px;
}

.estate-panel-loading__cards span {
    height: 88px;
    border-radius: 11px;
}

.estate-panel-loading__rows {
    display: grid;
    gap: 9px;
}

.estate-panel-loading__rows span {
    width: 100%;
    height: 48px;
    border-radius: 10px;
}

.estate-panel-loading__rows span:nth-child(2) {
    width: 92%;
}

.estate-panel-loading__rows span:nth-child(3) {
    width: 96%;
}

.estate-panel-loading__rows span:nth-child(4) {
    width: 84%;
}

.estate-panel-loading__rows span:nth-child(5) {
    width: 90%;
}

@keyframes estate-panel-skeleton {
    100% {
        transform: translateX(100%);
    }
}

.estate-right-panel__footer {
    position: relative;
    z-index: 3;
    display: flex;
    min-height: 64px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 11px 15px;
    background: var(--estate-color-surface);
    border-top: 1px solid var(--estate-color-border);
}

.estate-right-panel__footer-status {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 8px;
    color: var(--estate-color-text-muted);
    font-size: 9px;
}

.estate-right-panel__footer-status > span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.estate-right-panel__footer-dot {
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    background: #22c55e;
    border-radius: 50%;
    box-shadow:
        0 0 0 3px rgba(34, 197, 94, 0.12);
}

.estate-right-panel__footer-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 7px;
}

/* ---------------------------------------------------------
   Panel Fragment
   --------------------------------------------------------- */

.estate-panel-fragment {
    display: grid;
    gap: 14px;
    padding: 16px;
}

.estate-panel-summary,
.estate-panel-section {
    background: var(--estate-color-surface);
    border: 1px solid var(--estate-color-border);
    border-radius: 13px;
    box-shadow: var(--estate-shadow-small);
}

.estate-panel-summary {
    padding: 18px;
}

.estate-panel-summary__heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.estate-panel-summary__heading > div {
    min-width: 0;
}

.estate-panel-summary__eyebrow,
.estate-panel-section__eyebrow {
    display: block;
    margin-bottom: 5px;
    color: var(--estate-color-primary);
    font-size: 8px;
    font-weight: 850;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.estate-panel-summary h3 {
    margin: 0;
    color: var(--estate-color-text);
    font-size: 18px;
    line-height: 1.3;
    letter-spacing: -0.03em;
}

.estate-panel-summary__heading p {
    margin: 6px 0 0;
    color: var(--estate-color-text-muted);
    font-size: 10px;
}

.estate-panel-status {
    display: inline-flex;
    min-height: 26px;
    flex: 0 0 auto;
    align-items: center;
    padding: 0 9px;
    color: #166534;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 750;
}

.estate-panel-kpi-grid {
    display: grid;
    grid-template-columns:
        repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-top: 18px;
}

.estate-panel-kpi {
    min-width: 0;
    padding: 12px;
    background: var(--estate-color-surface-muted);
    border: 1px solid var(--estate-color-border);
    border-radius: 10px;
}

.estate-panel-kpi span {
    display: block;
    overflow: hidden;
    color: var(--estate-color-text-muted);
    font-size: 8px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.estate-panel-kpi strong {
    display: block;
    overflow: hidden;
    margin-top: 5px;
    color: var(--estate-color-text);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.estate-panel-section {
    overflow: hidden;
}

.estate-panel-section__header {
    display: flex;
    min-height: 62px;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 13px 16px;
    border-bottom: 1px solid var(--estate-color-border);
}

.estate-panel-section__header h3 {
    margin: 0;
    color: var(--estate-color-text);
    font-size: 13px;
    letter-spacing: -0.02em;
}

.estate-panel-section__action {
    min-height: 30px;
    padding: 0 10px;
    color: var(--estate-color-primary);
    background: var(--estate-color-primary-soft);
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    font-size: 9px;
    font-weight: 750;
}

.estate-panel-section__action:hover {
    border-color: rgba(37, 99, 235, 0.22);
}

.estate-panel-detail-list {
    margin: 0;
}

.estate-panel-detail-list > div {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 14px;
    padding: 13px 16px;
}

.estate-panel-detail-list > div + div {
    border-top: 1px solid var(--estate-color-border);
}

.estate-panel-detail-list dt {
    color: var(--estate-color-text-muted);
    font-size: 10px;
}

.estate-panel-detail-list dd {
    min-width: 0;
    margin: 0;
    color: var(--estate-color-text);
    font-size: 10px;
    font-weight: 650;
    word-break: break-word;
}

.estate-panel-person {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
}

.estate-panel-person__avatar {
    display: inline-flex;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: #334155;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 800;
}

.estate-panel-person > div {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.estate-panel-person strong {
    color: var(--estate-color-text);
    font-size: 11px;
}

.estate-panel-person div span {
    margin-top: 3px;
    color: var(--estate-color-text-muted);
    font-size: 9px;
}

.estate-panel-history {
    padding: 6px 16px 12px;
}

.estate-panel-history article {
    display: flex;
    gap: 11px;
    padding: 11px 0;
}

.estate-panel-history article + article {
    border-top: 1px solid var(--estate-color-border);
}

.estate-panel-history article > span {
    width: 8px;
    height: 8px;
    flex: 0 0 8px;
    margin-top: 4px;
    background: var(--estate-color-primary);
    border-radius: 50%;
    box-shadow:
        0 0 0 4px var(--estate-color-primary-soft);
}

.estate-panel-history article > div {
    min-width: 0;
}

.estate-panel-history strong {
    display: block;
    color: var(--estate-color-text);
    font-size: 10px;
}

.estate-panel-history p {
    margin: 4px 0 0;
    color: var(--estate-color-text-muted);
    font-size: 8px;
}

/* ---------------------------------------------------------
   Responsive Right Panel
   --------------------------------------------------------- */

@media (max-width: 1180px) {
    .estate-right-panel[data-panel-size="full"] {
        --estate-current-panel-width:
            calc(100vw - 64px);
    }

    .estate-panel-kpi-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .estate-right-panel,
    .estate-right-panel[data-panel-size="wide"],
    .estate-right-panel[data-panel-size="full"] {
        --estate-current-panel-width: 100vw;

        inset: auto 0 0 0;
        width: 100vw;
        max-width: none;
        height: min(86vh, 780px);
        border-top: 1px solid var(--estate-color-border);
        border-left: 0;
        border-radius: 20px 20px 0 0;
        transform: translateY(105%);
    }

    .estate-right-panel.is-open {
        transform: translateY(0);
    }

    .estate-right-panel::after {
        position: absolute;
        top: 7px;
        left: 50%;
        width: 38px;
        height: 4px;
        background: var(--estate-color-border-strong);
        border-radius: 999px;
        content: "";
        transform: translateX(-50%);
    }

    .estate-right-panel__header {
        min-height: 82px;
        padding-top: 19px;
    }

    .estate-right-panel__body {
        overscroll-behavior-y: contain;
    }

    .estate-panel-open {
        position: fixed;
        width: 100%;
    }
}

@media (max-width: 640px) {
    .estate-right-panel__header {
        align-items: flex-start;
        padding-right: 10px;
        padding-left: 15px;
    }

    .estate-right-panel__tools {
        max-width: 190px;
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .estate-right-panel__tool {
        width: 34px;
        height: 34px;
        flex-basis: 34px;
    }

    .estate-right-panel__title {
        font-size: 15px;
    }

    .estate-right-panel__subtitle {
        max-width: 210px;
    }

    .estate-panel-fragment {
        gap: 11px;
        padding: 11px;
    }

    .estate-panel-summary {
        padding: 15px;
    }

    .estate-panel-summary__heading {
        flex-direction: column;
    }

    .estate-panel-kpi-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .estate-panel-detail-list > div {
        grid-template-columns: 90px minmax(0, 1fr);
        padding-right: 14px;
        padding-left: 14px;
    }

    .estate-right-panel__footer {
        align-items: stretch;
        flex-direction: column;
    }

    .estate-right-panel__footer-actions {
        width: 100%;
    }

    .estate-right-panel__footer-actions
    .estate-button {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .estate-right-panel,
    .estate-right-panel__progress span,
    .estate-panel-loading__header span::after,
    .estate-panel-loading__cards span::after,
    .estate-panel-loading__rows span::after {
        animation: none !important;
        transition: none !important;
    }
}

