/*
 * Ordelya · Faz 35
 * One application shell and a compact, consistent component language.
 * Legacy module structures stay in site.css; shared appearance is owned here.
 */
:root {
    --bg: #f5f6fa;
    --surface: #ffffff;
    --surface-soft: #f8f9fc;
    --surface-raised: #ffffff;
    --surface-strong: #182235;
    --ink: #182235;
    --text: #182235;
    --muted: #667085;
    --muted-color: #667085;
    --line: #e4e7ef;
    --line-strong: #d2d7e2;
    --brand: #635bff;
    --brand-strong: #5146d8;
    --brand-soft: #efedff;
    --accent: #b77912;
    --warning: #b77912;
    --danger: #cf4755;
    --success: #17815d;
    --info: #356cdb;
    --purple: #7f56d9;
    --shadow-xs: 0 1px 2px rgba(16, 24, 40, .035);
    --shadow-sm: 0 1px 3px rgba(16, 24, 40, .04);
    --shadow-md: 0 6px 20px rgba(16, 24, 40, .07);
    --shadow-lg: 0 16px 48px rgba(16, 24, 40, .14);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 14px;
    --sidebar-width: 232px;
    --sidebar-collapsed-width: 72px;
    --topbar-height: 64px;
    --content-width: none;
    --sidebar-bg: #111827;
    --sidebar-text: #a9b3c7;
    color-scheme: light;
}

[data-theme="dark"] {
    --bg: #0f1420;
    --surface: #171e2c;
    --surface-soft: #1d2637;
    --surface-raised: #222d40;
    --surface-strong: #e7ebf5;
    --ink: #e7ebf5;
    --text: #e7ebf5;
    --muted: #a1acc0;
    --muted-color: #a1acc0;
    --line: #2b3549;
    --line-strong: #3b4860;
    --brand: #a59bff;
    --brand-strong: #beb5ff;
    --brand-soft: #2e2850;
    --accent: #e8b663;
    --warning: #e8b663;
    --danger: #ff8d99;
    --success: #5dd3a4;
    --info: #91b1fa;
    --purple: #b99af5;
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, .12);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, .15);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, .2);
    --shadow-lg: 0 18px 54px rgba(0, 0, 0, .3);
    --sidebar-bg: #0c111d;
    color-scheme: dark;
}

html {
    font-size: clamp(17px, calc(16px + .22vw), 19px);
    background: var(--bg);
    text-rendering: optimizeLegibility;
    scroll-padding-top: 84px;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    min-width: 320px;
    background: var(--bg);
    color: var(--ink);
    font-family: "Segoe UI Variable", "Segoe UI", Inter, system-ui, -apple-system, sans-serif;
    font-size: 1rem;
    line-height: 1.55;
    letter-spacing: -.008em;
}

h1, h2, h3, h4, .brand strong {
    font-family: inherit;
    letter-spacing: -.025em;
}

h1, h2, h3, p, td, th, label {
    overflow-wrap: break-word;
}

button, input, select, textarea {
    font-family: inherit;
}

[hidden] {
    display: none !important;
}

.ui-icon {
    display: inline-block;
    width: 19px;
    height: 19px;
    flex: 0 0 19px;
    vertical-align: middle;
    pointer-events: none;
}

:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--brand) 68%, transparent);
    outline-offset: 3px;
}

.route-progress span {
    background: var(--brand);
    box-shadow: none;
}

.ui-reveal, .ui-reveal.is-visible {
    opacity: 1;
    transform: none;
    transition: none;
}

.app-page .empty-symbol {
    animation: none;
}

.button-ripple {
    display: none;
}

/* Navigation shell: fixed 232px sidebar, no centered content width cap. */
.app-stage {
    min-width: 0;
    margin-left: var(--sidebar-width);
    background: var(--bg);
    transition: margin-left .18s ease;
}

.app-page .main-content {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 24px;
}

.sidebar {
    width: var(--sidebar-width);
    padding: 22px 12px 14px;
    overflow-x: hidden;
    background: var(--sidebar-bg);
    border-right: 1px solid rgba(255,255,255,.06);
    box-shadow: none;
    color: var(--sidebar-text);
    transition: width .18s ease, transform .18s ease;
    scrollbar-width: thin;
    scrollbar-color: #384256 transparent;
}

.sidebar-brand-row {
    display: flex;
    min-height: 42px;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
}

.brand {
    gap: 10px;
    padding: 0;
}

.brand-mark {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border: 0;
    border-radius: 10px;
    background: #635bff;
    color: #fff;
    box-shadow: none;
}

    .brand-mark::after {
        display: none;
    }

    .brand-mark .ui-icon {
        width: 24px;
        height: 24px;
        stroke-width: 1.8;
    }

.brand strong {
    color: var(--ink);
    font-size: 1.3rem;
    font-weight: 750;
    letter-spacing: -.055em;
    line-height: 1.05;
}

.brand small {
    display: block;
    margin: 4px 0 0;
    color: var(--muted);
    font-size: .65rem;
    letter-spacing: 0;
}

.sidebar .brand strong {
    color: #f8f9ff;
}

.sidebar .brand small {
    color: #8c97ad;
}

.brand-period {
    color: #aaa3ff;
}

.sidebar-mobile-close {
    display: none;
}

.sidebar-quick-create {
    display: flex;
    min-height: 39px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 22px 4px 8px;
    padding: 8px;
    border: 1px solid #4a456e;
    border-radius: 8px;
    background: #2a254c;
    color: #eeeaff;
    text-decoration: none;
    font-size: .79rem;
    font-weight: 650;
}

    .sidebar-quick-create:hover {
        background: #383163;
        border-color: #7a70bc;
    }

.primary-nav {
    display: grid;
    gap: 3px;
    margin-top: 6px;
}

.nav-eyebrow {
    margin: 16px 12px 5px;
    color: #77839b;
    font-size: .625rem;
    font-weight: 700;
    letter-spacing: .085em;
    text-transform: uppercase;
}

.nav-item {
    display: flex;
    min-height: 39px;
    gap: 11px;
    padding: 8px 12px;
    border: 1px solid transparent;
    border-radius: 7px;
    color: var(--sidebar-text);
    font-size: .8rem;
    font-weight: 550;
    line-height: 1.35;
    text-decoration: none;
    transition: color .12s, background .12s;
}

    .nav-item:hover {
        background: #1d2638;
        color: #fff;
        transform: none;
        translate: none;
    }

    .nav-item > span:first-child {
        display: grid;
        width: 19px;
        height: 20px;
        flex: 0 0 19px;
        place-items: center;
        border: 0;
        border-radius: 0;
        background: transparent;
        color: #8b99b4;
    }

    .nav-item.active {
        border-color: #363150;
        background: #292442;
        color: #f3efff;
        box-shadow: none;
    }

        .nav-item.active > span:first-child {
            border: 0;
            background: none;
            color: #b6adff;
        }

    .nav-item.nav-subitem {
        min-height: 34px;
        margin-left: 13px;
        padding-block: 6px;
        border-left: 1px solid #30394c;
        border-radius: 0 7px 7px 0;
        color: #9ba8bd;
        font-size: .73rem;
    }

        .nav-item.nav-subitem > span:first-child {
            width: 16px;
            flex-basis: 16px;
        }

.nav-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-bottom {
    display: grid;
    gap: 4px;
    margin-top: auto;
    padding-top: 22px;
}

.sidebar-collapse {
    display: flex;
    min-height: 34px;
    align-items: center;
    gap: 11px;
    margin: 0;
    padding: 7px 12px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #8996ad;
    cursor: pointer;
    text-align: left;
    font-size: .74rem;
}

    .sidebar-collapse:hover {
        background: #1d2638;
        color: #fff;
    }

    .sidebar-collapse > span:first-child {
        display: grid;
        width: 19px;
        place-items: center;
    }

.sidebar-footer {
    min-width: 0;
    gap: 10px;
    margin-top: 10px;
    padding: 13px 12px 0;
    border-top: 1px solid #273044;
}

    .sidebar-footer .status-dot {
        width: 6px;
        height: 6px;
        flex: 0 0 6px;
        box-shadow: 0 0 0 3px rgba(85,197,159,.1);
    }

    .sidebar-footer strong {
        color: #b4c0d5;
        font-size: .64rem;
        font-weight: 500;
    }

    .sidebar-footer small {
        margin-top: 2px;
        color: #7f8ba3;
        font-size: .59rem;
    }

.topbar {
    min-width: 0;
    height: var(--topbar-height);
    gap: 14px;
    padding: 0 24px;
    border-bottom: 1px solid var(--line);
    background: var(--surface);
    box-shadow: none;
    backdrop-filter: none;
}

    .topbar.is-scrolled {
        background: var(--surface);
        box-shadow: var(--shadow-sm);
    }

.topbar-context {
    min-width: 0;
    flex: 1 1 auto;
    gap: 10px;
}

.workspace-switcher {
    display: flex;
    min-width: 0;
    gap: 10px;
}

.workspace-breadcrumb {
    color: var(--muted);
    font-size: .75rem;
    white-space: nowrap;
}

.workspace-switcher > .ui-icon {
    width: 13px;
    height: 13px;
    flex-basis: 13px;
    color: #aab2c3;
}

.workspace-switcher strong {
    display: block;
    min-width: 0;
    max-width: 260px;
    overflow: hidden;
    color: var(--ink);
    font-size: .8rem;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.topbar-actions {
    min-width: 0;
    flex: 0 0 auto;
    gap: 8px;
}

.icon-button, .notification-button {
    width: 36px;
    height: 36px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    box-shadow: none;
}

    .icon-button:hover, .notification-button:hover {
        border-color: var(--line);
        background: var(--surface-soft);
        color: var(--ink);
    }

.realtime-state {
    display: inline-flex;
    min-height: 27px;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface-soft);
    color: var(--muted);
    font-size: .61rem;
    font-weight: 650;
    white-space: nowrap;
}

    .realtime-state > i {
        width: 7px;
        height: 7px;
        flex: 0 0 7px;
        border-radius: 50%;
        background: var(--warning);
        box-shadow: 0 0 0 3px color-mix(in srgb, var(--warning) 12%, transparent);
    }

    .realtime-state[data-realtime-state="connected"] {
        color: var(--success);
    }

        .realtime-state[data-realtime-state="connected"] > i {
            background: var(--success);
            box-shadow: 0 0 0 3px color-mix(in srgb, var(--success) 12%, transparent);
        }

    .realtime-state.is-live {
        color: var(--success);
    }

        .realtime-state.is-live > i {
            background: var(--success);
            box-shadow: 0 0 0 3px color-mix(in srgb, var(--success) 12%, transparent);
        }

    .realtime-state[data-realtime-state="disconnected"], .realtime-state[data-realtime-state="error"] {
        color: var(--danger);
    }

        .realtime-state[data-realtime-state="disconnected"] > i, .realtime-state[data-realtime-state="error"] > i {
            background: var(--danger);
            box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 12%, transparent);
        }

.topbar-search {
    display: flex;
    width: auto;
    min-width: 232px;
    min-height: 36px;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-soft);
    color: var(--muted);
    box-shadow: none;
    font-size: .73rem;
    text-decoration: none;
}

    .topbar-search .ui-icon {
        width: 16px;
        height: 16px;
        flex-basis: 16px;
    }

    .topbar-search kbd {
        min-width: 38px;
        margin-left: auto;
        padding: 2px 4px;
        border: 1px solid var(--line);
        border-radius: 4px;
        background: var(--surface);
        color: var(--muted);
        font-family: inherit;
        font-size: 10px;
        text-align: center;
    }

.topbar-create {
    display: inline-flex;
    min-height: 36px;
    align-items: center;
    gap: 7px;
    padding: 7px 11px;
    border: 1px solid #635bff;
    border-radius: 8px;
    background: #635bff;
    color: #fff;
    box-shadow: none;
    font-size: .76rem;
    font-weight: 600;
    white-space: nowrap;
}

    .topbar-create .ui-icon {
        width: 16px;
        height: 16px;
        flex-basis: 16px;
    }

    .topbar-create > .ui-icon:last-child {
        width: 12px;
        height: 12px;
        flex-basis: 12px;
    }

    .topbar-create:hover, .topbar-create-menu[open] .topbar-create {
        background: #5146d8;
        color: #fff;
    }

.account-menu {
    margin: 0;
}

.account-menu-summary {
    min-height: 36px;
    gap: 5px;
    padding: 0 0 0 10px;
    border: 0;
    border-left: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

    .user-avatar, .account-menu-summary .user-avatar {
        width: 31px;
        height: 31px;
        border: 1px solid color-mix(in srgb, var(--brand) 15%, var(--line));
        border-radius: 50%;
        background: var(--brand-soft);
        color: var(--brand-strong);
        font-size: .77rem;
    }

.account-menu-chevron .ui-icon {
    width: 12px;
    height: 12px;
    flex-basis: 12px;
}

.topbar-popover {
    width: 290px;
    max-width: calc(100vw - 28px);
    padding: 6px;
    border-color: var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
}

    .topbar-popover a, .topbar-popover button {
        grid-template-columns: 28px minmax(0,1fr);
        gap: 8px;
        padding: 10px;
    }

        .topbar-popover a > span:first-child, .topbar-popover button > span:first-child {
            display: grid;
            place-items: center;
            color: var(--muted);
        }

    .topbar-popover strong {
        font-size: .78rem;
        font-weight: 650;
    }

    .topbar-popover small {
        font-size: .68rem;
    }

.popover-label {
    padding: 7px 10px 8px;
    color: var(--muted);
    font-size: .64rem;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.account-popover-identity {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 2px 4px 6px;
    padding: 10px 6px 14px;
    border-bottom: 1px solid var(--line);
}

    .account-popover-identity > span:last-child {
        min-width: 0;
    }

    .account-popover-identity small {
        overflow-wrap: anywhere;
    }

.notification-count {
    min-width: 17px;
    height: 17px;
    top: -1px;
    right: -1px;
    padding: 0 3px;
    font-size: .56rem;
}

.command-palette-dialog {
    border: 1px solid var(--line);
    border-radius: 13px;
    background: var(--surface);
}

.command-palette-input .ui-icon {
    flex-shrink: 0;
    color: var(--muted);
}

/* Compact page hierarchy, consistent form rhythm and readable data. */
.app-page .page-heading {
    min-height: 0;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
}

    .app-page .page-heading::before, .app-page .page-heading::after {
        display: none;
    }

    .app-page .page-heading > div:first-child {
        max-width: 780px;
    }

    .app-page .page-heading h1, .app-page .form-page-header h1 {
        max-width: none;
        color: var(--ink);
        font-size: clamp(1.45rem, 1.85vw, 1.85rem);
        font-weight: 700;
        line-height: 1.22;
    }

    .app-page .page-heading p:not(.eyebrow), .app-page .form-page-header > p:last-child {
        max-width: 760px;
        margin-top: 6px;
        color: var(--muted);
        font-size: .8rem;
        line-height: 1.6;
    }

.eyebrow, .section-kicker {
    margin: 0 0 5px;
    color: var(--muted);
    font-size: .64rem;
    font-weight: 700;
    letter-spacing: .07em;
    line-height: 1.4;
    text-transform: uppercase;
}

.page-actions, .page-heading-actions, .heading-actions {
    display: flex;
    flex-wrap: wrap;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;
}

.page-guide {
    width: fit-content;
    max-width: 100%;
    margin-bottom: 14px;
}

    .page-guide summary {
        gap: 6px;
    }

        .page-guide summary strong {
            font-size: .67rem;
            font-weight: 500;
            color: var(--muted);
        }

.page-guide-icon {
    width: 18px;
    height: 18px;
    background: transparent;
    color: var(--muted);
}

    .page-guide-icon .ui-icon {
        width: 16px;
        height: 16px;
    }

.page-guide-prompt {
    font-size: .66rem;
}

.page-guide > p {
    max-width: 860px;
    margin-left: 24px;
    padding: 8px 12px;
    border-left: 2px solid var(--brand);
    background: var(--surface);
    font-size: .77rem;
}

.panel, .metric-card, .task-metric, .finance-metric, .billing-metric, .planning-metrics > article {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.panel {
    padding: 20px;
}

.app-page .panel::before {
    display: none;
}

.panel-header, .section-header {
    min-width: 0;
    gap: 12px;
}

    .panel-header h2, .section-header h2 {
        color: var(--ink);
        font-size: .95rem;
        font-weight: 650;
    }

.panel-copy, .panel-caption {
    color: var(--muted);
}

@media (hover: hover) {
    .app-page .panel:hover, .app-page .metric-card:hover, .app-page .task-metric:hover,
    .app-page .finance-metric:hover, .app-page .billing-metric:hover, .app-page .planning-metrics > article:hover {
        border-color: var(--line);
        box-shadow: var(--shadow-sm);
        transform: none;
    }
}

.primary-button, .secondary-button, .ghost-button, button.primary-button, button.secondary-button {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 8px 13px;
    border: 1px solid transparent;
    border-radius: 8px;
    box-shadow: none;
    font-size: .78rem;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 0;
    white-space: nowrap;
    cursor: pointer;
    text-decoration: none;
}

.primary-button {
    background: #635bff;
    color: #fff;
}

    .primary-button:hover {
        background: #5146d8;
        box-shadow: none;
        transform: none;
    }

.secondary-button {
    border-color: var(--line-strong);
    background: var(--surface);
    color: var(--ink);
}

    .secondary-button:hover {
        border-color: color-mix(in srgb, var(--brand) 45%, var(--line));
        background: var(--surface-soft);
        color: var(--brand-strong);
        box-shadow: none;
        transform: none;
    }

.ghost-button {
    background: transparent;
    color: var(--muted);
}

    .ghost-button:hover {
        background: var(--surface-soft);
        color: var(--ink);
    }

    .primary-button .ui-icon, .secondary-button .ui-icon, .ghost-button .ui-icon {
        width: 16px;
        height: 16px;
        flex-basis: 16px;
    }

button:disabled, .primary-button:disabled, .secondary-button:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--brand-strong);
    font-size: .76rem;
    font-weight: 600;
    text-decoration: none;
}

    .text-link:hover {
        text-decoration: underline;
    }

    .text-link .ui-icon {
        width: 14px;
        height: 14px;
        flex-basis: 14px;
    }

label {
    color: var(--ink);
    font-size: .77rem;
    font-weight: 600;
}

.app-page input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="color"]),
.app-page select, .app-page textarea,
.auth-page input:not([type="checkbox"]):not([type="radio"]), .auth-page select {
    min-width: 0;
    min-height: 40px;
    padding: 9px 11px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background: var(--surface);
    color: var(--ink);
    box-shadow: var(--shadow-xs);
    font-size: .81rem;
    line-height: 1.4;
    transition: border-color .12s, box-shadow .12s;
}

.app-page textarea {
    min-height: 110px;
    line-height: 1.6;
}

input::placeholder, textarea::placeholder {
    color: var(--muted);
    opacity: 1;
}

.app-page input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):focus,
.app-page select:focus, .app-page textarea:focus {
    border-color: var(--brand);
    outline: none;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 12%, transparent);
}

input[type="checkbox"], input[type="radio"] {
    width: 16px;
    height: 16px;
    accent-color: var(--brand);
}

.app-page .form-page {
    width: 100%;
    max-width: none;
    margin: 0;
}

.app-page .form-page-header {
    max-width: 980px;
    margin-bottom: 20px;
}

.app-page .entity-form {
    padding: 24px;
}

.form-grid {
    gap: 18px;
}

    .form-grid > div {
        min-width: 0;
        gap: 6px;
    }

    .form-grid input, .form-grid select, .form-grid textarea {
        width: 100%;
    }

.form-section {
    gap: 10px;
    padding-bottom: 20px;
}

    .form-section h2 {
        font-size: .94rem;
    }

    .form-section > p, .form-hint, .field-help, .textarea-counter {
        font-size: .74rem;
        line-height: 1.55;
        color: var(--muted);
    }

.field-error, .field-validation-error {
    font-size: .74rem;
    line-height: 1.45;
    color: var(--danger);
}

.form-actions {
    gap: 8px;
    margin-top: 8px;
    padding-top: 12px;
}

.custom-field-row {
    grid-template-columns: minmax(140px,.7fr) minmax(180px,1fr) auto;
    gap: 8px;
}

    .custom-field-row button {
        min-width: 38px;
        min-height: 38px;
        border-radius: 8px;
    }

.entity-form .file-drop, .task-planning-block {
    border-radius: 10px;
    background: var(--surface-soft);
}

.alert, .service-banner {
    border-radius: 10px;
    font-size: .8rem;
}

.app-page .empty-state {
    min-height: 220px;
    padding: 24px;
    border-radius: 10px;
    background: none;
}

.empty-state h2, .error-state-card h2 {
    font-size: 1rem;
}

.empty-state p, .error-state-card p {
    max-width: 480px;
    margin: 8px auto 16px;
    color: var(--muted);
    font-size: .82rem;
    line-height: 1.6;
}

.empty-symbol {
    width: 46px;
    height: 46px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface-soft);
    color: var(--brand);
}

    .empty-symbol .ui-icon {
        width: 23px;
        height: 23px;
    }

.metric-grid, .task-metrics, .finance-metrics, .billing-metrics, .planning-metrics {
    gap: 14px;
}

    .metric-card, .finance-metric, .task-metric, .billing-metric, .planning-metrics > article {
        min-height: 112px;
        padding: 18px;
    }

        .metric-card.featured, [data-theme="dark"] .metric-card.featured {
            border-color: color-mix(in srgb, var(--brand) 25%, var(--line));
            background: var(--brand-soft);
            color: var(--brand-strong);
        }

            .metric-card.featured .metric-label, .metric-card.featured p, [data-theme="dark"] .featured .metric-label, [data-theme="dark"] .featured p {
                color: var(--brand-strong);
            }

        .metric-value, .task-metric strong, .finance-metric strong, .billing-metric strong, .planning-metrics strong {
            margin-top: 10px;
            font-family: inherit;
            font-size: clamp(1.35rem,1.6vw,1.7rem);
            font-weight: 700;
            font-variant-numeric: tabular-nums;
            letter-spacing: -.035em;
        }

.metric-label {
    font-size: .76rem;
}

.metric-card p {
    font-size: .72rem;
}

.metric-icon, .trend {
    border-radius: 7px;
    background: var(--surface-soft);
}

.app-page :is(.task-metric small, .task-filter label, .finance-filter label, .compact-form label, .finance-metric small, .billing-metric small, .planning-metrics small, .billing-search label, .planning-search label, .calendar-legend) {
    font-size: .74rem;
}

.app-page :is(.task-metric span, .task-column header p, .task-card-meta, .task-description, .task-facts dd, .task-documents a, .task-status-form button, .finance-metric p, .finance-table td > small, .contact-card header p, .contact-details dd, .billing-metric span, .bill-card header p, .bill-card dd, .subscription-card header p, .planning-metrics span, .notification-preference-card small, .panel-caption, .muted-copy, .form-hint) {
    font-size: .73rem;
    line-height: 1.55;
}

.app-page :is(.responsive-table, .finance-table, .report-monthly-table) {
    font-size: .8rem;
}

    .app-page :is(.responsive-table, .finance-table, .report-monthly-table) th {
        padding: 12px 14px;
        background: var(--surface-soft);
        color: var(--muted);
        font-size: .7rem;
        font-weight: 600;
        letter-spacing: .02em;
    }

    .app-page :is(.responsive-table, .finance-table, .report-monthly-table) td {
        padding: 13px 14px;
        vertical-align: middle;
    }

.app-page .status-badge {
    padding: 3px 7px;
    border-radius: 5px;
    font-size: .68rem;
    font-weight: 600;
    line-height: 1.5;
}

.income-text {
    color: var(--success);
}

.expense-text {
    color: var(--danger);
}

/* Ortak DataTable bileşeni: büyük listeler sayfayı uzatmak yerine kendi içinde akar. */
.data-table-shell {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: var(--surface);
}

.data-table-toolbar {
    display: flex;
    min-height: 58px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .65rem;
    padding: .65rem .75rem;
    border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--surface-soft) 76%, var(--surface));
}

.data-table-search {
    position: relative;
    display: flex;
    min-width: min(100%, 260px);
    flex: 1 1 260px;
    align-items: center;
}

    .data-table-search > span {
        position: absolute;
        left: .72rem;
        z-index: 1;
        color: var(--muted);
        pointer-events: none;
    }

    .data-table-search input {
        width: 100%;
        min-height: 36px !important;
        padding: .45rem .7rem .45rem 2rem !important;
        font-size: .7rem !important;
    }

.data-table-tools {
    display: flex;
    align-items: center;
    gap: .5rem;
    color: var(--muted);
    font-size: .64rem;
}

    .data-table-tools label {
        display: flex;
        align-items: center;
        gap: .38rem;
        margin: 0;
        color: var(--muted);
        font-size: .62rem;
        white-space: nowrap;
    }

    .data-table-tools select {
        width: auto;
        min-height: 34px !important;
        padding: .3rem 1.8rem .3rem .5rem !important;
        font-size: .66rem !important;
    }

.data-table-density {
    min-height: 34px;
    padding: .35rem .55rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--muted);
    cursor: pointer;
    font-size: .62rem;
    font-weight: 750;
}

.data-table-frame {
    max-height: min(62vh, 620px);
    overflow: auto;
    overscroll-behavior: contain;
    scrollbar-color: color-mix(in srgb, var(--brand) 30%, var(--line)) transparent;
    scrollbar-width: thin;
}

    .data-table-frame table {
        width: 100%;
        margin: 0;
        border-collapse: separate;
        border-spacing: 0;
    }

    .data-table-frame thead {
        position: sticky;
        top: 0;
        z-index: 3;
    }

        .data-table-frame thead th {
            border-bottom: 1px solid var(--line-strong);
            background: color-mix(in srgb, var(--surface-soft) 94%, var(--surface));
            box-shadow: 0 1px 0 var(--line);
        }

    .data-table-frame th,
    .data-table-frame td {
        padding: .72rem .7rem;
    }

    .data-table-frame tbody tr:last-child > * {
        border-bottom: 0;
    }

    .data-table-frame tbody tr:hover {
        background: color-mix(in srgb, var(--brand) 4%, var(--surface));
    }

    .data-table-frame [data-grid-sort] {
        display: inline-flex;
        align-items: center;
        gap: .35rem;
        padding: 0;
        border: 0;
        background: transparent;
        color: inherit;
        cursor: pointer;
        font: inherit;
        font-weight: inherit;
        text-transform: inherit;
    }

        .data-table-frame [data-grid-sort]::after {
            color: var(--muted);
            content: "↕";
            font-size: .62rem;
            opacity: .55;
        }

    .data-table-frame th[aria-sort="ascending"] [data-grid-sort]::after {
        color: var(--brand);
        content: "↑";
        opacity: 1;
    }

    .data-table-frame th[aria-sort="descending"] [data-grid-sort]::after {
        color: var(--brand);
        content: "↓";
        opacity: 1;
    }

.data-table-shell.is-compact .data-table-frame th,
.data-table-shell.is-compact .data-table-frame td {
    padding-block: .43rem;
}

.data-table-shell [hidden] {
    display: none !important;
}

.data-table-empty {
    padding: 2rem 1rem;
    color: var(--muted);
    text-align: center;
}

.data-table-footer {
    display: flex;
    min-height: 50px;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .55rem .75rem;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: .63rem;
}

.data-table-pagination {
    display: flex;
    gap: .4rem;
}

    .data-table-pagination button {
        min-width: 34px;
        min-height: 32px;
        border: 1px solid var(--line);
        border-radius: 8px;
        background: var(--surface);
        color: var(--ink);
        cursor: pointer;
    }

        .data-table-pagination button:disabled {
            cursor: default;
            opacity: .4;
        }

/* Rapor merkezi */
.report-filter-panel {
    position: sticky;
    top: calc(var(--topbar-height) + .65rem);
    z-index: 8;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-md);
}

.report-context-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .55rem;
    margin: .2rem 0 1rem;
}

.report-period-caption,
.report-rate-caption {
    margin: 0;
}

.report-dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(290px, .75fr);
    gap: .8rem;
    margin-bottom: .8rem;
}

    .report-dashboard-grid > .wide {
        grid-row: span 2;
    }

.report-chart-wrap {
    position: relative;
    min-width: 0;
    margin-top: .7rem;
}

.report-chart {
    display: block;
    width: 100%;
    height: 330px;
}

    .report-chart.compact {
        height: 215px;
    }

.analytics-tooltip {
    position: absolute;
    z-index: 6;
    max-width: 270px;
    padding: .58rem .7rem;
    border: 1px solid color-mix(in srgb, var(--brand) 25%, var(--line));
    border-radius: 10px;
    background: color-mix(in srgb, var(--surface) 96%, transparent);
    box-shadow: var(--shadow-md);
    pointer-events: none;
}

    .analytics-tooltip strong,
    .analytics-tooltip span {
        display: block;
    }

    .analytics-tooltip strong {
        font-size: .7rem;
    }

    .analytics-tooltip span {
        margin-top: .15rem;
        color: var(--muted);
        font-size: .6rem;
        line-height: 1.45;
    }

.chart-legend {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .42rem;
    color: var(--muted);
    font-size: .6rem;
}

    .chart-legend i {
        width: 8px;
        height: 8px;
        border-radius: 99px;
    }

    .chart-legend .income-dot {
        background: var(--success);
    }

    .chart-legend .expense-dot {
        background: var(--danger);
    }

.report-insight-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .65rem;
    margin: 0 0 .8rem;
}

    .report-insight-strip > article {
        display: flex;
        min-width: 0;
        align-items: center;
        gap: .7rem;
        padding: .75rem .85rem;
        border: 1px solid var(--line);
        border-radius: 12px;
        background: var(--surface);
        box-shadow: var(--shadow-xs);
    }

    .report-insight-strip i {
        display: grid;
        width: 34px;
        height: 34px;
        flex: 0 0 34px;
        place-items: center;
        border-radius: 10px;
        background: var(--brand-soft);
        color: var(--brand-strong);
        font-style: normal;
        font-weight: 850;
    }

    .report-insight-strip span,
    .report-insight-strip strong,
    .report-insight-strip small {
        display: block;
        min-width: 0;
    }

    .report-insight-strip span {
        color: var(--muted);
        font-size: .55rem;
        font-weight: 750;
        text-transform: uppercase;
    }

    .report-insight-strip strong {
        margin-top: .1rem;
        overflow: hidden;
        font-size: .76rem;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .report-insight-strip small {
        margin-top: .08rem;
        color: var(--muted);
        font-size: .55rem;
    }

.report-table-section {
    margin-bottom: .8rem;
}

    .report-table-section .report-monthly-table {
        min-width: 680px;
    }

.report-category-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    margin-right: .38rem;
    border-radius: 99px;
}

.report-type-badge {
    display: inline-flex;
    padding: .25rem .42rem;
    border-radius: 999px;
    font-size: .55rem;
    font-weight: 800;
}

    .report-type-badge.income {
        background: color-mix(in srgb, var(--success) 12%, var(--surface));
        color: var(--success);
    }

    .report-type-badge.expense {
        background: color-mix(in srgb, var(--danger) 11%, var(--surface));
        color: var(--danger);
    }

.report-donut-layout {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
    gap: .7rem;
    align-items: center;
}

.report-donut {
    display: block;
    width: 170px;
    height: 170px;
}

.report-donut-legend {
    display: grid;
    gap: .4rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

    .report-donut-legend li {
        display: grid;
        grid-template-columns: 9px minmax(0, 1fr) auto;
        gap: .4rem;
        align-items: center;
        color: var(--muted);
        font-size: .58rem;
    }

    .report-donut-legend i {
        width: 8px;
        height: 8px;
        border-radius: 50%;
    }

    .report-donut-legend span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .report-donut-legend b {
        color: var(--ink);
        font-variant-numeric: tabular-nums;
    }

/* Finans merkezi */
.finance-filter {
    position: relative;
    margin-bottom: .75rem;
    border-radius: 14px;
}

.finance-visual-grid,
.finance-data-grid {
    gap: .8rem;
}

.finance-chart-panel {
    overflow: hidden;
}

.finance-chart {
    height: 310px;
}

.finance-chart-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .6rem;
    margin-top: .6rem;
}

.chart-segmented {
    display: inline-flex;
    gap: .18rem;
    padding: .2rem;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--surface-soft);
}

    .chart-segmented button {
        min-height: 28px;
        padding: .28rem .5rem;
        border: 0;
        border-radius: 6px;
        background: transparent;
        color: var(--muted);
        cursor: pointer;
        font-size: .57rem;
        font-weight: 780;
    }

        .chart-segmented button.active {
            background: var(--surface);
            color: var(--brand-strong);
            box-shadow: var(--shadow-xs);
        }

.finance-table-frame {
    max-height: min(64vh, 680px);
}

.finance-data-table .finance-table {
    min-width: 920px;
}

.transaction-panel {
    overflow: hidden;
}

    .transaction-panel > .data-table-shell {
        margin-top: .8rem;
    }



/* One dashboard, with finance and daily operations visible together. */
.workspace-overview {
    display: grid;
    gap: 20px;
}

.overview-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
}

    .overview-heading h1 {
        font-size: clamp(1.5rem,2vw,1.9rem);
        font-weight: 700;
        line-height: 1.22;
    }

    .overview-heading p:not(.section-kicker) {
        margin-top: 6px;
        color: var(--muted);
        font-size: .8rem;
    }

.overview-date {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: .76rem;
}

    .overview-date .ui-icon {
        width: 16px;
        height: 16px;
        flex-basis: 16px;
    }

.overview-metrics {
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: 14px;
}

.overview-metric {
    display: grid;
    gap: 13px;
    min-width: 0;
    padding: 19px 20px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
}

.overview-metric-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: var(--muted);
    font-size: .75rem;
    font-weight: 550;
}

.overview-metric-icon {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 8px;
    background: var(--surface-soft);
    color: var(--muted);
}

    .overview-metric-icon.income {
        background: color-mix(in srgb,var(--success) 9%,var(--surface));
        color: var(--success);
    }

    .overview-metric-icon.expense {
        background: color-mix(in srgb,var(--danger) 8%,var(--surface));
        color: var(--danger);
    }

    .overview-metric-icon.brand {
        background: var(--brand-soft);
        color: var(--brand-strong);
    }

.overview-metric > strong {
    overflow-wrap: anywhere;
    font-size: clamp(1.45rem,1.95vw,2.05rem);
    line-height: 1.2;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: -.04em;
}

.overview-metric > small {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--muted);
    font-size: .69rem;
}

    .overview-metric > small .ui-icon {
        width: 13px;
        height: 13px;
        flex-basis: 13px;
    }

.overview-metric.net {
    border-color: color-mix(in srgb,var(--brand) 25%,var(--line));
    background: var(--brand-soft);
}

    .overview-metric.net .overview-metric-head, .overview-metric.net > strong {
        color: var(--brand-strong);
    }

.overview-currency-note {
    margin-top: -10px;
    color: var(--muted);
    font-size: .68rem;
}

.overview-shortcuts {
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: 10px;
}

    .overview-shortcuts > a {
        display: flex;
        min-width: 0;
        align-items: center;
        gap: 12px;
        padding: 15px;
        border: 1px solid var(--line);
        border-radius: 10px;
        background: var(--surface);
        text-decoration: none;
        transition: border-color .12s, background .12s;
    }

        .overview-shortcuts > a:hover {
            border-color: var(--brand);
            background: var(--surface-soft);
        }

        .overview-shortcuts > a > span:first-child {
            display: grid;
            width: 35px;
            height: 35px;
            flex: 0 0 35px;
            place-items: center;
            border: 1px solid var(--line);
            border-radius: 9px;
            color: var(--brand);
            background: var(--surface-soft);
        }

        .overview-shortcuts > a > span:nth-child(2) {
            min-width: 0;
            flex: 1;
        }

    .overview-shortcuts strong, .overview-shortcuts small {
        display: block;
    }

    .overview-shortcuts strong {
        color: var(--ink);
        font-size: .77rem;
        font-weight: 600;
    }

    .overview-shortcuts small {
        margin-top: 3px;
        color: var(--muted);
        font-size: .69rem;
    }

    .overview-shortcuts > a > .ui-icon {
        color: var(--muted);
        width: 15px;
        height: 15px;
        flex-basis: 15px;
    }

    .overview-shortcuts > a.primary-shortcut {
        border-color: #635bff;
        background: #635bff;
        color: #fff;
    }

        .overview-shortcuts > a.primary-shortcut:hover {
            background: #5146d8;
        }

    .overview-shortcuts .primary-shortcut strong {
        color: #fff;
    }

    .overview-shortcuts .primary-shortcut small, .overview-shortcuts > a.primary-shortcut > .ui-icon {
        color: #e4e1ff;
    }

    .overview-shortcuts > a.primary-shortcut > span:first-child {
        border-color: #8e87ff;
        background: #7770ff;
        color: #fff;
    }

.overview-grid {
    display: grid;
    grid-template-columns: minmax(0,1.7fr) minmax(300px,1fr);
    align-items: start;
    gap: 20px;
}

.overview-main, .overview-side {
    display: grid;
    min-width: 0;
    gap: 20px;
}

.overview-panel {
    min-width: 0;
    padding: 0;
    overflow: hidden;
}

.overview-panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--line);
}

    .overview-panel-heading h2 {
        font-size: .95rem;
        font-weight: 650;
    }

    .overview-panel-heading p {
        margin-top: 4px;
        color: var(--muted);
        font-size: .71rem;
    }

.overview-table-wrap {
    overflow-x: auto;
}

.overview-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

    .overview-table th {
        padding: 10px 20px;
        background: var(--surface-soft);
        color: var(--muted);
        font-size: .67rem;
        font-weight: 600;
        white-space: nowrap;
    }

    .overview-table td {
        padding: 13px 20px;
        border-top: 1px solid var(--line);
        font-size: .76rem;
    }

        .overview-table td:last-child, .overview-table th:last-child {
            text-align: right;
        }

    .overview-table tr:hover td {
        background: var(--surface-soft);
    }

.overview-transaction {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 160px;
}

    .overview-transaction > span:first-child {
        display: grid;
        width: 31px;
        height: 31px;
        flex: 0 0 31px;
        place-items: center;
        border-radius: 8px;
        background: var(--surface-soft);
    }

    .overview-transaction strong, .overview-transaction small {
        display: block;
    }

    .overview-transaction strong {
        max-width: 310px;
        overflow: hidden;
        font-size: .77rem;
        font-weight: 600;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .overview-transaction small {
        margin-top: 3px;
        color: var(--muted);
        font-size: .69rem;
    }

.overview-amount {
    white-space: nowrap;
    font-size: .81rem;
    font-variant-numeric: tabular-nums;
    font-weight: 650;
}

    .overview-amount small {
        margin-left: 4px;
        color: var(--muted);
        font-size: .64rem;
    }

.overview-list-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--line);
    background: var(--surface-soft);
}

.overview-empty {
    display: grid;
    min-height: 190px;
    justify-items: center;
    align-content: center;
    gap: 8px;
    padding: 24px;
    color: var(--muted);
    text-align: center;
}

    .overview-empty > .ui-icon {
        width: 28px;
        height: 28px;
        margin-bottom: 4px;
        color: var(--brand);
    }

    .overview-empty strong {
        color: var(--ink);
        font-size: .84rem;
        font-weight: 600;
    }

    .overview-empty p {
        max-width: 330px;
        font-size: .75rem;
        line-height: 1.6;
    }

    .overview-empty a {
        margin-top: 6px;
    }

.overview-agenda {
    padding: 0 20px;
}

.overview-agenda-item {
    display: grid;
    grid-template-columns: 43px minmax(0,1fr) 16px;
    align-items: center;
    gap: 12px;
    padding: 15px 0;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
    text-decoration: none;
}

    .overview-agenda-item:last-child {
        border-bottom: 0;
    }

    .overview-agenda-item time {
        display: grid;
        justify-items: center;
        gap: 2px;
        padding: 7px 3px;
        border: 1px solid var(--line);
        border-radius: 8px;
        color: var(--muted);
        background: var(--surface-soft);
    }

        .overview-agenda-item time strong {
            font-size: .85rem;
            color: var(--ink);
            font-weight: 650;
        }

        .overview-agenda-item time small {
            font-size: .6rem;
        }

    .overview-agenda-item > span strong, .overview-agenda-item > span small {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .overview-agenda-item > span strong {
        font-size: .77rem;
        font-weight: 600;
    }

    .overview-agenda-item > span small {
        margin-top: 3px;
        color: var(--muted);
        font-size: .69rem;
    }

    .overview-agenda-item > .ui-icon {
        width: 14px;
        color: var(--muted);
    }

    .overview-agenda-item.overdue > span small {
        color: var(--danger);
    }

    .overview-agenda-item:hover > span strong {
        color: var(--brand-strong);
    }

.overview-note-form {
    display: grid;
    gap: 10px;
    padding: 18px 20px;
}

    .overview-note-form label {
        display: block;
        margin-bottom: 6px;
        font-size: .72rem;
    }

    .overview-note-form input {
        width: 100%;
    }

.overview-note-form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

    .overview-note-form-footer span {
        color: var(--muted);
        font-size: .67rem;
    }

.overview-notes {
    display: grid;
    padding: 0 20px;
}

    .overview-notes > a {
        display: flex;
        align-items: flex-start;
        gap: 10px;
        min-width: 0;
        padding: 15px 0;
        border-bottom: 1px solid var(--line);
        text-decoration: none;
    }

        .overview-notes > a:last-child {
            border: 0;
        }

        .overview-notes > a > .ui-icon {
            width: 17px;
            height: 17px;
            flex-basis: 17px;
            color: var(--brand);
            margin-top: 2px;
        }

        .overview-notes > a > span {
            min-width: 0;
            flex: 1;
        }

    .overview-notes strong, .overview-notes small {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .overview-notes strong {
        font-size: .77rem;
        font-weight: 600;
    }

    .overview-notes small {
        margin-top: 4px;
        color: var(--muted);
        font-size: .71rem;
    }

    .overview-notes time {
        color: var(--muted);
        font-size: .63rem;
        white-space: nowrap;
    }

/* Module refinements: useful space and predictable reading order. */
.task-board {
    grid-template-columns: repeat(6,minmax(235px,1fr));
    gap: 12px;
    scrollbar-width: thin;
    padding-bottom: 14px;
}

.task-column {
    padding: 12px;
    border-radius: 11px;
    border-color: var(--line);
    background: #edf0f5;
}

[data-theme="dark"] .task-column {
    background: #121a29;
}

.task-column > header {
    padding: 2px 2px 13px;
}

.task-column h2, .app-page .task-column h2 {
    font-size: .8rem;
    font-weight: 650;
}

.task-column header > span {
    min-width: 23px;
    height: 23px;
    border: 1px solid var(--line);
    border-radius: 6px;
    font-size: .7rem;
}

.task-card {
    padding: 14px;
    border-radius: 9px;
}

.task-facts {
    gap: 6px;
    margin-top: 12px;
}

    .task-facts div {
        padding: 7px;
        border-radius: 6px;
    }

    .task-facts dt, .app-page .task-facts dt {
        font-size: .65rem;
    }

    .task-facts dd {
        overflow: visible;
        text-overflow: clip;
        white-space: normal;
        overflow-wrap: anywhere;
    }

.task-filter, .contact-search, .billing-search, .planning-toolbar, .finance-filter {
    padding: 14px 16px;
    border-radius: 10px;
}

.notes-layout {
    grid-template-columns: 246px minmax(0,1fr);
    gap: 20px;
}

.notes-sidebar, .notes-main {
    gap: 16px;
}

.note-card {
    border-radius: 10px;
    box-shadow: var(--shadow-xs);
}

.note-group-list a {
    border-radius: 7px;
}

.contact-grid {
    grid-template-columns: repeat(auto-fit,minmax(min(100%,320px),1fr));
    gap: 16px;
}

.contact-card header h2 {
    font-size: .94rem;
}

.contact-avatar {
    width: 42px;
    height: 42px;
    border-radius: 11px;
    background: var(--brand-soft);
    color: var(--brand-strong);
}

.contact-details {
    padding-top: 6px;
}

    .contact-details div {
        display: block;
    }

    .contact-details dt, .app-page .contact-details dt {
        font-size: .71rem;
    }

    .contact-details dd, .app-page .contact-details dd {
        overflow: visible;
        font-size: .77rem;
        text-overflow: clip;
        white-space: normal;
        overflow-wrap: anywhere;
    }

.calendar-layout {
    grid-template-columns: minmax(0,1fr) 310px;
    gap: 20px;
}

.calendar-toolbar {
    margin: 0 0 14px;
}

.calendar-grid-panel {
    padding: 0;
    overflow: hidden;
}

.calendar-grid {
    gap: 0;
}

    .calendar-grid + .calendar-grid {
        margin-top: 0;
    }

.calendar-grid-header {
    margin-bottom: 0;
}

.calendar-dayname {
    padding: 10px 8px;
    border-bottom: 1px solid var(--line);
    background: var(--surface-soft);
    font-size: .73rem;
}

.calendar-cell {
    min-height: clamp(72px,calc((100vh - 330px)/6),104px);
    padding: 6px;
    border: 0;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    border-radius: 0;
}

    .calendar-cell:last-child {
        border-right: 0;
    }

    .calendar-cell.today {
        background: color-mix(in srgb,var(--brand) 4%,var(--surface));
    }

    .calendar-cell.selected {
        box-shadow: inset 0 0 0 2px var(--brand);
    }

.calendar-chip {
    border-radius: 4px;
    font-size: .67rem;
    line-height: 1.4;
}

.calendar-side {
    min-width: 0;
}

.app-page .calendar-day-panel {
    position: sticky;
    top: calc(var(--topbar-height) + 16px);
}

.calendar-day-copy strong {
    font-size: .75rem;
}

.calendar-day-copy small {
    font-size: .7rem;
}

.calendar-day-side {
    flex-shrink: 0;
}

    .calendar-day-side a, .calendar-day-side button {
        white-space: nowrap;
    }

.billing-layout {
    grid-template-columns: minmax(0,1.7fr) minmax(290px,1fr);
    gap: 20px;
}

.bill-card, .subscription-card, .budget-card, .goal-card, .obligation-card {
    border-radius: 10px;
    padding: 16px;
}

    .bill-card h3, .subscription-card h3, .app-page .bill-card h3, .app-page .subscription-card h3 {
        font-size: .89rem;
    }

.planning-data-table {
    min-width: 980px;
}

    .planning-summary-table th, .planning-data-table th {
        background: var(--surface-soft);
        font-size: .71rem;
        font-weight: 600;
    }

    .planning-summary-table td, .planning-data-table td {
        font-size: .8rem;
    }

        .planning-summary-table td > small, .planning-data-table td > small {
            font-size: .71rem;
        }

.planning-table-card {
    padding: 0;
}

.planning-detail-panel {
    border-radius: 11px;
    box-shadow: var(--shadow-lg);
}

    .planning-detail-panel .planning-inline-form {
        gap: 10px;
    }

.planning-toolbar input, .planning-toolbar select {
    width: 100%;
}

.education-layout, .student-layout, .review-layout {
    grid-template-columns: minmax(0,1fr) 310px;
    gap: 20px;
}

.education-main, .education-side, .student-main, .student-side {
    gap: 16px;
}

.group-card-grid {
    grid-template-columns: repeat(auto-fit,minmax(min(100%,300px),1fr));
}

.app-page .current-rate-note {
    color: var(--muted);
    font-size: .72rem;
    line-height: 1.6;
}

.security-metrics {
    grid-template-columns: repeat(4,minmax(0,1fr));
}

.mfa-status-banner {
    margin: 0 0 20px;
}

.security-grid {
    gap: 20px;
}

.security-row {
    grid-template-columns: 36px minmax(0,1fr) auto;
    gap: 12px;
    padding: 13px;
    border-radius: 9px;
    background: var(--surface);
}

.security-device-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--surface-soft);
}

.security-copy p {
    font-size: .77rem;
}

.security-copy small {
    font-size: .69rem;
}

.notification-preference-card {
    border-radius: 9px;
}

.search-result-card {
    border-radius: 10px;
}

.search-results {
    gap: 12px;
}

.search-form-panel {
    margin-bottom: 16px;
}

.empty-state-card h2 {
    font-size: 1.1rem;
}

.empty-state-card p {
    max-width: 560px;
    margin-inline: auto;
    color: var(--muted);
    font-size: .8rem;
    line-height: 1.65;
}

.notification-inbox {
    max-width: none;
    margin: 0;
}

.inbox-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
}

    .inbox-head h1 {
        margin: 0;
        font-size: 1.85rem;
        font-weight: 700;
    }

    .inbox-head p:not(.eyebrow) {
        margin-top: 6px;
        color: var(--muted);
        font-size: .8rem;
    }

.inbox-tabs {
    display: flex;
    flex: 0 0 auto;
    gap: 3px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--surface);
}

    .inbox-tabs a {
        padding: 8px 14px;
        border-radius: 6px;
        font-size: .77rem;
        font-weight: 600;
        text-decoration: none;
    }

        .inbox-tabs a.active {
            background: var(--brand-soft);
            color: var(--brand-strong);
        }

.inbox-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.inbox-count {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: .78rem;
}

    .inbox-count strong {
        display: grid;
        min-width: 27px;
        height: 25px;
        padding: 0 6px;
        place-items: center;
        border: 1px solid var(--line);
        border-radius: 6px;
        background: var(--surface);
        color: var(--ink);
    }

.bulk-actions, .row-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

    .bulk-actions form, .row-actions form {
        margin: 0;
    }

.inbox-tools button, .inbox-row .row-actions button {
    min-height: 34px;
    padding: 7px 9px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--surface);
    color: var(--muted);
    font-size: .72rem;
    font-weight: 600;
    cursor: pointer;
}

    .inbox-tools button:hover, .inbox-row .row-actions button:hover {
        color: var(--brand-strong);
        border-color: var(--brand);
    }

.inbox-list {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.inbox-row {
    display: grid;
    grid-template-columns: 9px minmax(0,1fr) auto;
    align-items: start;
    gap: 14px;
    padding: 20px;
    border-bottom: 1px solid var(--line);
}

    .inbox-row:last-child {
        border: 0;
    }

    .inbox-row.unread {
        background: color-mix(in srgb,var(--brand) 3%,var(--surface));
    }

.event-mark {
    width: 7px;
    height: 7px;
    margin-top: 7px;
    border-radius: 50%;
    background: var(--line-strong);
}

.unread .event-mark {
    background: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-soft);
}

.inbox-copy {
    min-width: 0;
}

.inbox-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

    .inbox-title strong {
        font-size: .86rem;
        font-weight: 650;
    }

.inbox-copy p {
    margin-top: 5px;
    color: var(--muted);
    font-size: .78rem;
    line-height: 1.6;
}

.inbox-copy time {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: .69rem;
}

.empty-inbox {
    padding: 56px 20px;
    color: var(--muted);
    text-align: center;
    font-size: .81rem;
}

    .empty-inbox strong {
        display: block;
        margin-bottom: 6px;
        color: var(--ink);
        font-size: .96rem;
    }

/* Authentication and public pages share the same identity without decorative gradients. */
.auth-shell {
    background: var(--bg);
}

.auth-visual {
    background: #111827;
}

    .auth-visual::before, .auth-visual::after {
        display: none;
    }

    .auth-visual .brand strong {
        color: #fff;
    }

    .auth-visual .brand small {
        color: #aab4c6;
    }

.auth-message h1 {
    font-size: clamp(2rem,3.2vw,3.3rem);
    font-weight: 650;
    letter-spacing: -.045em;
}

.auth-message > p:last-child {
    color: #a9b4c9;
    font-size: .94rem;
}

.auth-form-heading h2 {
    font-size: 1.8rem;
}

.auth-form-heading > p:last-child {
    font-size: .84rem;
    line-height: 1.6;
}

.auth-form-wrap {
    background: var(--surface);
}

.auth-visual .eyebrow {
    color: #b2a9ff;
}

.auth-feature-list {
    display: grid;
    gap: 18px;
    margin-top: 24px;
}

    .auth-feature-list > div {
        display: flex;
        align-items: center;
        gap: 13px;
    }

        .auth-feature-list > div > .ui-icon {
            width: 22px;
            height: 22px;
            flex-basis: 22px;
            color: #aaa1ff;
        }

    .auth-feature-list strong, .auth-feature-list small {
        display: block;
    }

    .auth-feature-list strong {
        color: #e8edfa;
        font-size: .82rem;
        font-weight: 600;
    }

    .auth-feature-list small {
        margin-top: 3px;
        color: #97a3ba;
        font-size: .75rem;
    }

.auth-result-card {
    border-radius: 14px;
    box-shadow: var(--shadow-md);
}

.vitrin-header {
    border-bottom-color: var(--line);
    background: var(--surface);
    backdrop-filter: none;
}

.vitrin-page {
    background: var(--bg);
}

    .vitrin-page .brand-mark {
        color: #fff;
    }

    .vitrin-page .brand strong {
        color: var(--ink);
    }

.vitrin-main {
    background: var(--bg);
}

.vitrin-hero {
    gap: 3rem;
}

.vitrin-main .vitrin-hero h1 {
    font-size: clamp(2.4rem,4.1vw,4.8rem);
    letter-spacing: -.055em;
}

.vitrin-feature-hero {
    padding: 32px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: none;
}

    .vitrin-feature-hero::after, .vitrin-module-card::before {
        display: none;
    }

.vitrin-module-card, .vitrin-highlight-card {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.vitrin-feature-section {
    border-radius: 12px;
}

.vitrin-cta-section {
    border-radius: 14px;
    background: #161d32;
}

.vitrin-footer {
    border-top-color: var(--line);
    background: var(--surface);
}

.vitrin-header-inner, .vitrin-footer-inner, .vitrin-footer-legal {
    width: 100%;
    max-width: none;
    padding-inline: 36px;
}

.vitrin-nav a {
    font-size: .82rem;
}

    .vitrin-nav a[aria-current="page"] {
        color: var(--brand-strong);
    }

.vitrin-hero, .vitrin-section, .vitrin-module-grid.full-tour, .vitrin-highlight-grid, .vitrin-feature-section {
    width: calc(100% - 72px);
    max-width: none;
}

/* Keep all modules usable on a narrow screen and all content reachable by keyboard. */
@media (min-width: 981px) {
    [data-sidebar="collapsed"] .sidebar {
        width: var(--sidebar-collapsed-width);
        padding-inline: 10px;
    }

    [data-sidebar="collapsed"] .app-stage {
        margin-left: var(--sidebar-collapsed-width);
    }

    [data-sidebar="collapsed"] .sidebar-brand-row {
        justify-content: center;
        padding: 0;
    }

    [data-sidebar="collapsed"] .brand > span:last-child,
    [data-sidebar="collapsed"] .nav-eyebrow,
    [data-sidebar="collapsed"] .nav-label,
    [data-sidebar="collapsed"] .sidebar-quick-create > span,
    [data-sidebar="collapsed"] .sidebar-collapse-copy,
    [data-sidebar="collapsed"] .sidebar-footer > span:last-child {
        display: none;
    }

    [data-sidebar="collapsed"] .sidebar-quick-create {
        margin-inline: 0;
        padding-inline: 0;
    }

    [data-sidebar="collapsed"] .primary-nav {
        margin-top: 12px;
        gap: 8px;
    }

    [data-sidebar="collapsed"] .nav-item {
        justify-content: center;
        padding-inline: 0;
    }

    [data-sidebar="collapsed"] .sidebar-collapse {
        justify-content: center;
        padding-inline: 0;
    }

        [data-sidebar="collapsed"] .sidebar-collapse .ui-icon {
            transform: rotate(180deg);
        }

    [data-sidebar="collapsed"] .sidebar-footer {
        justify-content: center;
        padding-inline: 0;
    }
}

@media (max-width: 1280px) {
    .workspace-breadcrumb, .workspace-switcher > .ui-icon {
        display: none;
    }

    .topbar-search {
        min-width: 180px;
    }

    .topbar-search-label {
        max-width: 98px;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
    }

    .overview-shortcuts {
        grid-template-columns: repeat(2,minmax(0,1fr));
    }

    .overview-grid {
        grid-template-columns: minmax(0,1.35fr) minmax(280px,1fr);
    }

    .calendar-layout, .education-layout, .student-layout, .review-layout, .billing-layout {
        grid-template-columns: minmax(0,1fr) 280px;
        gap: 16px;
    }

    .report-dashboard-grid {
        grid-template-columns: 1fr 1fr;
    }

        .report-dashboard-grid > .wide {
            grid-column: 1/-1;
            grid-row: auto;
        }

    .report-filter-panel {
        position: relative;
        top: auto;
    }
}

@media (max-width: 1100px) {
    .overview-metrics {
        grid-template-columns: repeat(2,minmax(0,1fr));
    }

    .overview-grid {
        grid-template-columns: 1fr;
    }

    .overview-side {
        grid-template-columns: repeat(2,minmax(0,1fr));
        align-items: start;
    }

    .calendar-layout, .education-layout, .student-layout, .review-layout, .billing-layout {
        grid-template-columns: 1fr;
    }

    .app-page .calendar-day-panel {
        position: static;
        top: auto;
    }

    .education-side, .student-side {
        grid-template-columns: repeat(2,minmax(0,1fr));
    }

    .topbar-search {
        width: 36px;
        min-width: 36px;
        justify-content: center;
        padding: 0;
    }

        .topbar-search-label, .topbar-search kbd {
            display: none;
        }

    .realtime-state > span {
        display: none;
    }

    .realtime-state {
        width: 27px;
        justify-content: center;
        padding-inline: 0;
    }
}

@media (max-width: 980px) {
    .sidebar {
        width: min(292px,calc(100vw - 42px));
        transform: translateX(-102%);
        box-shadow: var(--shadow-lg);
    }

        .sidebar.open {
            transform: translateX(0);
        }

    .sidebar-backdrop:not([hidden]) {
        position: fixed;
        inset: 0;
        z-index: 25;
        display: block;
        border: 0;
        background: rgba(9,14,25,.56);
        backdrop-filter: blur(2px);
    }

    body.menu-open {
        overflow: hidden;
    }

    .app-stage {
        margin-left: 0;
    }

    .app-page .main-content {
        padding: 20px;
    }

    .topbar {
        padding-inline: 20px;
    }

    .mobile-menu {
        display: grid;
    }

    .sidebar-mobile-close {
        display: grid;
        width: 32px;
        height: 32px;
        place-items: center;
        padding: 0;
        border: 0;
        border-radius: 7px;
        background: #1d2638;
        color: #c6d0e1;
        cursor: pointer;
    }

    .sidebar-collapse {
        display: none;
    }

    .workspace-switcher {
        display: flex;
    }

    .sidebar-bottom {
        padding-top: 20px;
    }

    .app-page .page-heading {
        align-items: flex-start;
        flex-wrap: wrap;
    }
}

@media (max-width: 760px) {
    .app-page .main-content {
        padding: 18px 14px;
    }

    .topbar {
        gap: 8px;
        padding-inline: 14px;
    }

    .topbar-context {
        gap: 6px;
    }

    .topbar-actions {
        gap: 5px;
    }

    .topbar-create {
        width: 36px;
        height: 36px;
        min-height: 36px;
        justify-content: center;
        padding: 0;
    }

        .topbar-create > span, .topbar-create > .ui-icon:last-child {
            display: none;
        }

    .workspace-switcher strong {
        max-width: 135px;
        font-size: .75rem;
    }

    .panel {
        padding: 16px;
    }

    .app-page .entity-form {
        padding: 18px;
    }

    .app-page .page-heading {
        gap: 12px;
        margin-bottom: 16px;
    }

        .app-page .page-heading h1 {
            font-size: 1.5rem;
        }

    .page-actions, .page-heading-actions {
        justify-content: flex-start;
        width: 100%;
    }

    .page-guide-prompt {
        display: none;
    }

    .metric-grid, .finance-metrics, .task-metrics, .billing-metrics, .planning-metrics {
        grid-template-columns: repeat(2,minmax(0,1fr));
        gap: 10px;
    }

    .overview-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .overview-date {
        font-size: .71rem;
    }

    .workspace-overview {
        gap: 16px;
    }

    .overview-metrics {
        gap: 10px;
    }

    .overview-metric {
        padding: 15px;
        gap: 10px;
    }

        .overview-metric > strong {
            font-size: 1.5rem;
        }

    .overview-metric-head {
        font-size: .71rem;
    }

    .overview-metric > small {
        font-size: .64rem;
    }

    .overview-panel {
        padding: 0;
    }

    .overview-panel-heading {
        padding: 16px;
    }

    .overview-table th, .overview-table td {
        padding-inline: 16px;
    }

        .overview-table th:nth-child(2), .overview-table td:nth-child(2) {
            display: none;
        }

    .overview-transaction strong {
        max-width: 240px;
    }

    .overview-side {
        grid-template-columns: 1fr;
    }

    .notes-layout {
        grid-template-columns: 1fr;
    }

    .notes-sidebar {
        grid-template-columns: repeat(2,minmax(0,1fr));
    }

    .calendar-cell {
        min-height: 64px;
        padding: 4px;
    }

    .calendar-dayname {
        padding: 10px 4px;
        font-size: .67rem;
    }

    .calendar-chip {
        font-size: .6rem;
    }

    .education-side, .student-side, .security-grid {
        grid-template-columns: 1fr;
    }

    .form-grid, .form-grid.three {
        grid-template-columns: 1fr;
    }

    .custom-field-row {
        grid-template-columns: minmax(0,.75fr) minmax(0,1fr) 34px;
    }

    .report-dashboard-grid, .report-insight-strip {
        grid-template-columns: 1fr;
    }

        .report-dashboard-grid > .wide {
            grid-column: auto;
        }

    .report-donut-layout {
        grid-template-columns: 1fr;
        justify-items: center;
    }

    .report-donut-legend {
        width: 100%;
    }

    .report-chart {
        height: 280px;
    }

    .data-table-toolbar {
        align-items: stretch;
    }

    .data-table-tools {
        width: 100%;
        justify-content: space-between;
    }

    .data-table-frame {
        max-height: 68vh;
    }

    .inbox-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 14px;
    }

    .inbox-row {
        grid-template-columns: 8px minmax(0,1fr);
        gap: 10px;
        padding: 16px;
    }

        .inbox-row .row-actions {
            grid-column: 2;
        }

    .vitrin-header-inner, .vitrin-footer-inner, .vitrin-footer-legal {
        padding-inline: 18px;
    }

    .vitrin-hero, .vitrin-section, .vitrin-module-grid.full-tour, .vitrin-highlight-grid, .vitrin-feature-section {
        width: calc(100% - 36px);
    }

    .vitrin-feature-hero {
        width: calc(100% - 36px);
        padding: 22px;
    }
}

@media (max-width: 520px) {
    .topbar {
        gap: 4px;
    }

    .workspace-switcher strong {
        max-width: 90px;
    }

    .topbar-create {
        width: 34px;
        height: 34px;
        min-height: 34px;
        padding: 0;
    }

        .topbar-create > span {
            display: none;
        }

        .topbar-create > .ui-icon:last-child {
            display: none;
        }

    .theme-button {
        display: none;
    }

    .realtime-state {
        display: none;
    }

    .account-menu-summary {
        padding-left: 6px;
    }

    .account-menu-chevron {
        display: none;
    }

    .topbar-search, .icon-button, .notification-button {
        width: 32px;
        min-width: 32px;
        height: 34px;
    }

    .topbar-create-popover {
        position: fixed;
        top: 58px;
        right: 14px;
        width: 290px;
    }

    .overview-shortcuts {
        gap: 8px;
    }

        .overview-shortcuts > a {
            padding: 12px;
            gap: 8px;
        }

            .overview-shortcuts > a > span:first-child {
                width: 28px;
                height: 30px;
                flex-basis: 28px;
            }

            .overview-shortcuts > a > .ui-icon {
                display: none;
            }

        .overview-shortcuts strong {
            font-size: .72rem;
        }

        .overview-shortcuts small {
            font-size: .64rem;
        }

    .overview-metric {
        padding: 13px;
    }

    .overview-metric-icon {
        width: 25px;
        height: 25px;
    }

    .overview-metric > strong {
        font-size: 1.33rem;
    }

    .overview-metric-head {
        font-size: .67rem;
    }

    .overview-transaction {
        min-width: 130px;
        gap: 8px;
    }

        .overview-transaction strong {
            max-width: 140px;
        }

        .overview-transaction > span:first-child {
            width: 25px;
            height: 27px;
            flex-basis: 25px;
        }

    .overview-table td, .overview-table th {
        padding: 12px;
    }

    .overview-amount {
        font-size: .75rem;
    }

        .overview-amount small {
            display: block;
            margin: 2px 0 0;
        }

    .notes-sidebar {
        grid-template-columns: 1fr;
    }

    .report-custom-range > div, .report-custom-range > button {
        width: 100%;
    }

    .report-custom-range input, .report-custom-range select {
        width: 100%;
    }

    .data-table-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .finance-chart {
        height: 260px;
    }

    .security-row {
        grid-template-columns: 32px minmax(0,1fr);
    }

    .security-actions {
        grid-column: 2;
        justify-content: flex-start;
    }
}

@media (max-width: 375px) {
    .workspace-switcher {
        display: none;
    }

    .topbar-context {
        flex: 0 0 auto;
    }

    .topbar-actions {
        margin-left: auto;
    }

    .overview-shortcuts {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sidebar, .app-stage, .nav-item, .overview-shortcuts > a {
        transition: none;
    }
}

@media print {
    .sidebar, .topbar, .page-guide, .route-progress {
        display: none;
    }

    .app-stage {
        margin: 0;
    }

    .app-page .main-content {
        padding: 0;
    }
}

/* Faz 38 · bütün uygulama kabuğunda okunabilir tipografi ve dokunma hedefleri. */
body.app-page .main-content :where(p, li, dd, .panel-copy, .muted-copy) {
    font-size: var(--readable-text) !important;
    line-height: 1.62;
}

body.app-page .main-content :where(dt, code, kbd, [class$="-meta"], [class*="-meta "], [class$="-caption"], [class*="-caption "], [class$="-help"], [class*="-help "], [class$="-note"], [class*="-note "], [class$="-label"], [class*="-label "], [class$="-status"], [class*="-status "]) {
    font-size: var(--readable-compact) !important;
    line-height: 1.55;
}

body.app-page .main-content :where(small, figcaption, time, .field-help, .form-hint, .textarea-counter, .panel-caption, .field-error, .field-validation-error, .data-table-footer, .eyebrow, .section-kicker, .page-guide-prompt) {
    font-size: var(--readable-compact) !important;
    line-height: 1.55;
}

body.app-page :where(label, legend, .metric-label, .status-badge, .text-link, .row-action, .back-link) {
    font-size: var(--readable-label) !important;
    line-height: 1.45;
}

body.app-page :where( input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="color"]), select, textarea) {
    min-height: var(--touch-target) !important;
    font-size: var(--readable-control) !important;
    line-height: 1.4;
}

body.auth-page :where( input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), select, textarea) {
    min-height: var(--touch-target) !important;
    font-size: var(--readable-control) !important;
}

body.app-page :where(.primary-button, .secondary-button, .ghost-button, .text-button, .danger-button, .text-link, .row-action, .back-link, .sidebar-quick-create, .topbar-create, .data-table-density, .data-table-pagination button) {
    min-height: var(--touch-target) !important;
    padding-block: 9px;
    font-size: var(--readable-label) !important;
}

body.app-page button {
    min-height: var(--touch-target) !important;
}

    body.app-page button:not([aria-label]) {
        font-size: var(--readable-label) !important;
        line-height: 1.4;
    }

body.app-page :where(button[aria-label], .icon-button, .notification-button, .mobile-menu, .sidebar-mobile-close) {
    min-width: var(--touch-target) !important;
    min-height: var(--touch-target) !important;
}

body.app-page :where(summary, .account-menu-summary, .topbar-popover a, .topbar-popover button, .nav-item, .permission-option, .check-row) {
    min-height: var(--touch-target) !important;
}

body.app-page .sidebar :where(.nav-item, .sidebar-quick-create, .sidebar-collapse) {
    min-height: var(--touch-target) !important;
    font-size: max(.78rem, 14px) !important;
}

body.app-page .sidebar :where(.nav-eyebrow, .brand small, .sidebar-footer strong, .sidebar-footer small) {
    font-size: max(.72rem, 12.5px) !important;
    line-height: 1.45;
}

body.app-page .topbar :where(.workspace-breadcrumb, .workspace-switcher strong, .topbar-search, .topbar-popover strong, .topbar-popover small, .popover-label) {
    font-size: max(.75rem, 13px) !important;
}

body.app-page .topbar :where(.topbar-search, .topbar-create, .account-menu-summary, .icon-button, .notification-button) {
    min-height: var(--touch-target) !important;
}

body.app-page .topbar :where(.icon-button, .notification-button) {
    width: var(--touch-target) !important;
    min-width: var(--touch-target) !important;
    height: var(--touch-target) !important;
}

body.auth-page :where(p, li) {
    font-size: var(--readable-text) !important;
    line-height: 1.62;
}

body.auth-page :where(small, .field-help, .form-hint, .field-error, .field-validation-error, label) {
    font-size: var(--readable-label) !important;
    line-height: 1.5;
}

body.auth-page :where(button, .primary-button, .secondary-button, .ghost-button, .text-button) {
    min-height: var(--touch-target) !important;
    font-size: var(--readable-label) !important;
}

body.app-page .main-content :where(table) {
    font-size: var(--readable-label) !important;
}

body.app-page .main-content :where(th, td) {
    font-size: var(--readable-label) !important;
    line-height: 1.5;
}

body.app-page .main-content :where(th) {
    font-size: var(--readable-compact) !important;
}

body.app-page .main-content :where(.task-facts dt, .task-documents a, .overview-note-form-footer span, .overview-metric-head, .calendar-dayname, .calendar-chip, .calendar-day-copy strong, .calendar-day-copy small, .market-quick-links a, .analytics-tooltip span, .analytics-tooltip strong, .chart-legend) {
    font-size: var(--readable-compact) !important;
    line-height: 1.5;
}

body.app-page .main-content :where(.task-documents a, .market-quick-links a, .calendar-chip) {
    min-height: var(--touch-target) !important;
    align-items: center;
}

body.app-page .data-table-search input,
body.app-page .data-table-tools select {
    min-height: var(--touch-target) !important;
    font-size: var(--readable-control) !important;
}

body.app-page .data-table-tools,
body.app-page .data-table-tools label,
body.app-page .data-table-footer {
    font-size: var(--readable-compact) !important;
}

body.app-page .data-table-frame [data-grid-sort] {
    min-height: var(--touch-target);
    padding-block: 6px;
}

body.app-page :where(.responsive-table, .data-table-frame, .finance-table-frame) {
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-gutter: stable;
}

    body.app-page :where(.responsive-table, .data-table-frame, .finance-table-frame) > table {
        width: 100%;
    }

body.app-page .responsive-table > table {
    min-width: max(100%, 640px);
}

@media (max-width: 768px) {
    body.app-page .main-content {
        padding: 18px;
    }

    body.app-page .page-heading p:not(.eyebrow),
    body.app-page .form-page-header > p:last-child {
        font-size: var(--readable-text) !important;
    }

    body.app-page :where(.primary-button, .secondary-button, .ghost-button, .text-button, .danger-button, .topbar-create) {
        min-height: 46px !important;
    }

    body.app-page .topbar :where(.topbar-search, .topbar-create) {
        width: var(--touch-target) !important;
        min-width: var(--touch-target) !important;
        height: var(--touch-target) !important;
        padding-inline: 0;
        justify-content: center;
    }

    body.app-page :where(.responsive-table, .data-table-frame, .finance-table-frame) {
        width: 100%;
        max-width: calc(100vw - 36px);
    }
}

@media (max-width: 390px) {
    body.app-page .main-content {
        padding: 14px;
    }

    body.app-page .panel,
    body.app-page .entity-form {
        padding: 16px;
    }

    body.app-page :where(.responsive-table, .data-table-frame, .finance-table-frame) {
        max-width: calc(100vw - 28px);
    }
}

@media (max-width: 340px) {
    body.app-page .main-content {
        padding: 10px;
    }

    body.app-page :where(.responsive-table, .data-table-frame, .finance-table-frame) {
        max-width: calc(100vw - 20px);
    }
}

@media (prefers-reduced-motion: reduce) {
    body.app-page *, body.app-page *::before, body.app-page *::after,
    body.auth-page *, body.auth-page *::before, body.auth-page *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}

@media (prefers-contrast: more) {
    :root {
        --muted: #475467;
        --muted-color: #475467;
        --line: #98a2b3;
        --line-strong: #667085;
    }

    [data-theme="dark"] {
        --muted: #d0d5dd;
        --muted-color: #d0d5dd;
        --line: #667085;
        --line-strong: #98a2b3;
    }

    body.app-page :where(.field-help, .form-hint, small, .muted-copy, .panel-caption) {
        color: var(--ink);
    }
}

@media (forced-colors: active) {
    body.app-page :where(.primary-button, .secondary-button, .ghost-button, .danger-button, .status-badge, .panel, .data-table-shell) {
        border: 1px solid CanvasText;
    }

    body.app-page :where(button, input, select, textarea, summary, a):focus-visible {
        outline: 3px solid Highlight !important;
        outline-offset: 3px;
    }
}

/* Deneme süresini ve paket geçişini bütün çalışma ekranlarında erişilebilir gösterir. */
.platform-subscription-notice {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .6rem 1rem;
    padding: .7rem 1rem;
    margin-bottom: 1rem;
    background: var(--brand-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    font-size: .8rem
}

    .platform-subscription-notice a {
        color: var(--brand);
        font-weight: 700;
        text-decoration: underline;
        text-underline-offset: .2em
    }
