:root {
    --sidebar-expanded-width: 240px;
    --sidebar-collapsed-width: 76px;
    --topbar-height: 70px;
    --mobile-bottom-nav-height: 68px;
    --primary: #2563eb;
    --bg: #f6f7f9;
    --border: var(--border);
    --surface: #fff;
    --surface-muted: #f8fafc;
    --surface-subtle: #f1f5f9;
    --text: #172033;
    --text-strong: #0f172a;
    --text-muted: #64748b;
    --success-surface: #dcfce7;
    --success-text: #166534;
    --warning-surface: #fef3c7;
    --warning-text: #92400e;
    --danger-surface: #fee2e2;
    --danger-text: #991b1b;
    --info-surface: #dbeafe;
    --info-text: #1d4ed8;
    --violet-surface: #ede9fe;
    --violet-text: #6d28d9;
    --pink-surface: #fce7f3;
    --pink-text: #9d174d;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
}

#sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--sidebar-expanded-width);
    padding: 18px;
    overflow-x: hidden;
    overflow-y: auto;
    background: var(--surface);
    border-right: 1px solid var(--border);
    z-index: 30;
    transition: width .2s ease;
}

.brand,
.logo-mark {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--primary);
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 22px;
    flex: 0 0 42px;
}

.brand {
    margin-bottom: 28px;
}

#sidebar nav {
    display: grid;
    gap: 6px;
}

#sidebar a {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    padding: 11px 12px;
    overflow: hidden;
    color: var(--text);
    text-decoration: none;
    white-space: nowrap;
    border-radius: 10px;
}

#sidebar a:hover {
    background: var(--surface-subtle);
    color: var(--text-strong);
}

.app-topbar {
    position: fixed;
    top: 0;
    right: 0;
    left: var(--sidebar-expanded-width);
    width: calc(100% - var(--sidebar-expanded-width));
    height: var(--topbar-height);
    padding: 0 28px;
    display: flex;
    align-items: center;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    z-index: 20;
    transition: left .2s ease, width .2s ease;
}

.app-main {
    width: calc(100% - var(--sidebar-expanded-width));
    min-height: 100vh;
    margin-left: var(--sidebar-expanded-width);
    padding: 100px 32px 90px;
    transition: margin-left .2s ease, width .2s ease;
}

.sidebar-collapsed #sidebar {
    width: var(--sidebar-collapsed-width);
}

.sidebar-collapsed #sidebar nav span {
    display: none;
}

.sidebar-collapsed .app-topbar {
    left: var(--sidebar-collapsed-width);
    width: calc(100% - var(--sidebar-collapsed-width));
}

.sidebar-collapsed .app-main {
    width: calc(100% - var(--sidebar-collapsed-width));
    margin-left: var(--sidebar-collapsed-width);
}

.page-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.page-head h1 {
    margin: 0;
    font-size: 28px;
}

.page-head p {
    margin: .35rem 0 0;
    color: var(--text-muted);
}

.card,
.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: none;
}

.stat-card {
    padding: 22px;
    display: flex;
    justify-content: space-between;
}

.stat-card strong {
    color: #16a34a;
}

.form-card {
    max-width: 820px;
    padding: 28px;
}

.table > :not(caption) > * > * {
    padding: 16px;
}

.permission-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.permission-list span {
    padding: 4px 8px;
    font-size: 12px;
    color: var(--info-text);
    background: color-mix(in srgb, var(--primary) 9%, var(--surface));
    border-radius: 999px;
}

.login-page {
    min-height: 100vh;
    padding: 24px;
    display: grid;
    place-items: center;
}

.login-card {
    width: min(420px, 100%);
    padding: 36px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
}

.login-card h1 {
    margin: 18px 0 0;
}


.bottom-nav {
    display: none;
}

.empty-state {
    padding: 80px 20px;
    text-align: center;
}

/*
 * Bottom navigation görünür olduğunda:
 * - Sidebar tamamen gizlenir.
 * - Expand/collapse butonu gizlenir.
 * - Topbar ve içerik tam genişlik kullanır.
 */
@media (max-width: 767.98px) {
    #sidebar {
        display: none !important;
        width: 0 !important;
    }

    #sidebarToggle {
        display: none !important;
    }

    .app-topbar,
    .sidebar-collapsed .app-topbar {
        left: 0 !important;
        width: 100% !important;
        padding: 0 16px;
    }

    .app-main,
    .sidebar-collapsed .app-main {
        width: 100% !important;
        margin-left: 0 !important;
        padding:
            calc(var(--topbar-height) + 20px)
            16px
            calc(var(--mobile-bottom-nav-height) + 22px);
    }

    .bottom-nav {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        height: var(--mobile-bottom-nav-height);
        display: flex;
        justify-content: space-around;
        background: var(--surface);
        border-top: 1px solid var(--border);
        z-index: 40;
    }

    .bottom-nav a {
        display: flex;
        flex: 1;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        color: var(--text-muted);
        text-decoration: none;
    }

    .bottom-nav i {
        font-size: 20px;
    }

    .page-head {
        align-items: flex-start;
    }

    .page-head h1 {
        font-size: 24px;
    }

    .form-card {
        max-width: none;
        padding: 20px;
    }
}


.project-card { display: flex; flex-direction: column; }
.kanban-head { position: sticky; left: 0; }
.kanban-board { display: flex; align-items: flex-start; gap: 16px; overflow-x: auto; min-height: calc(100vh - 190px); padding: 4px 2px 18px; }
.kanban-column { flex: 0 0 320px; max-width: 320px; padding: 12px; background: var(--surface-subtle); border: 1px solid var(--border); border-radius: 16px; }
.kanban-column-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 4px 12px; cursor: grab; }
.task-count { display: inline-grid; min-width: 24px; height: 24px; margin-left: 8px; place-items: center; color: var(--text-muted); background: var(--surface); border-radius: 999px; font-size: 12px; }
.kanban-task-list { min-height: 36px; }
.kanban-task { margin-bottom: 10px; padding: 14px; cursor: pointer; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 2px 8px rgba(15,23,42,.04); }
.kanban-task:hover { border-color: color-mix(in srgb, var(--primary) 35%, var(--border)); }
.kanban-task h6 { margin: 0; line-height: 1.4; }
.kanban-task p { margin: 10px 0; color: var(--text-muted); font-size: 13px; }
.task-meta { display: flex; justify-content: space-between; gap: 8px; color: var(--text-muted); font-size: 12px; }
.priority { padding: 3px 7px; border-radius: 999px; font-size: 10px; text-transform: uppercase; white-space: nowrap; }
.priority-low { color: var(--text-muted); background: var(--surface-subtle); }
.priority-normal { color: var(--info-text); background: color-mix(in srgb, var(--primary) 18%, var(--surface)); }
.priority-high { color: var(--warning-text); background: var(--warning-surface); }
.priority-critical { color: var(--danger-text); background: var(--danger-surface); }
.task-panel { width: min(520px, 100vw) !important; }
@media (max-width: 767.98px) { .kanban-board { margin-right: -16px; padding-right: 16px; } .kanban-column { flex-basis: 86vw; max-width: 86vw; } }

/* Kanban productivity pack */
.kanban-toolbar { padding: 12px; position: sticky; top: 82px; z-index: 8; }
.kanban-toolbar-grid { display: grid; grid-template-columns: minmax(220px, 1fr) 190px 220px auto; gap: 10px; }
.mobile-column-select { display: none; }
.kanban-column { position: relative; overflow: hidden; scroll-snap-align: start; transition: flex-basis .2s ease, max-width .2s ease; }
.kanban-column-accent { position: absolute; top: 0; right: 0; left: 0; height: 4px; background: var(--column-color); }
.column-icon { color: var(--column-color); }
.kanban-column-title-wrap { display: flex; align-items: center; gap: 7px; min-width: 0; }
.wip-badge { padding: 3px 7px; color: var(--text-muted); background: var(--surface); border-radius: 999px; font-size: 10px; white-space: nowrap; }
.kanban-column.wip-exceeded { border-color: #ef4444; background: var(--danger-surface); }
.kanban-column.wip-exceeded .wip-badge { color: var(--danger-text); background: var(--danger-surface); }
.kanban-column.is-collapsed { flex-basis: 64px; max-width: 64px; min-height: 240px; }
.kanban-column.is-collapsed .kanban-task-list,
.kanban-column.is-collapsed .add-task,
.kanban-column.is-collapsed .task-count,
.kanban-column.is-collapsed .wip-badge,
.kanban-column.is-collapsed .dropdown { display: none !important; }
.kanban-column.is-collapsed .kanban-column-head { writing-mode: vertical-rl; min-height: 210px; justify-content: flex-start; }
.kanban-column.is-collapsed .collapse-column i::before { content: "\\f285"; }
.task-overdue { border-left: 3px solid #ef4444; }
.task-description { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.sortable-ghost { opacity: .35; }
.sortable-drag { transform: rotate(2deg); }

@media (max-width: 991.98px) {
    .kanban-toolbar-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 767.98px) {
    .kanban-head { position: static; }
    .kanban-head .d-flex { width: 100%; }
    .kanban-head .btn { flex: 1; font-size: 12px; }
    .kanban-toolbar { position: static; padding: 10px; }
    .kanban-toolbar-grid { grid-template-columns: 1fr; }
    .mobile-column-select { display: block; }
    .kanban-board { scroll-snap-type: x mandatory; overscroll-behavior-x: contain; gap: 12px; }
    .kanban-column { flex: 0 0 calc(100vw - 48px); max-width: calc(100vw - 48px); }
    .kanban-column.is-collapsed { flex-basis: calc(100vw - 48px); max-width: calc(100vw - 48px); min-height: auto; }
    .kanban-column.is-collapsed .kanban-task-list,
    .kanban-column.is-collapsed .add-task,
    .kanban-column.is-collapsed .task-count,
    .kanban-column.is-collapsed .wip-badge,
    .kanban-column.is-collapsed .dropdown { display: initial !important; }
    .kanban-column.is-collapsed .kanban-column-head { writing-mode: initial; min-height: auto; justify-content: space-between; }
    .collapse-column { display: none; }
    .task-meta { flex-direction: column; }
}

/* Task collaboration panel */
.task-panel { width: min(720px, 100vw) !important; }
.task-detail-tab, .task-detail-only { display: none; }
.task-label-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.task-label-option { cursor: pointer; }
.task-label-option input { position: absolute; opacity: 0; pointer-events: none; }
.task-label-option span { display: inline-flex; align-items: center; padding: 5px 10px; border: 1px solid color-mix(in srgb, var(--label-color) 45%, white); border-radius: 999px; color: var(--label-color); background: color-mix(in srgb, var(--label-color) 10%, var(--surface)); font-size: 12px; font-weight: 600; }
.task-label-option input:checked + span { color: #fff; background: var(--label-color); border-color: var(--label-color); }
.subtask-row, .attachment-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.task-comment { padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.comment-body { white-space: normal; word-break: break-word; }
.empty-mini { padding: 24px 12px; text-align: center; color: var(--text-muted); background: var(--surface-muted); border-radius: 12px; }
.task-timeline { position: relative; padding-left: 18px; }
.timeline-item { position: relative; display: flex; gap: 12px; padding: 0 0 20px 14px; border-left: 1px solid var(--border); }
.timeline-dot { position: absolute; left: -5px; top: 4px; width: 9px; height: 9px; border-radius: 50%; background: var(--primary); }
.task-upload-zone { padding: 16px; border: 1px dashed var(--border-strong); border-radius: 12px; background: var(--surface-muted); }
@media (max-width: 767.98px) { .task-panel { width: 100vw !important; } .task-panel .offcanvas-body { padding-bottom: 72px; } #taskTabs { flex-wrap: nowrap; overflow-x: auto; } #taskTabs .nav-link { white-space: nowrap; } }

.notification-unread { background: color-mix(in srgb, var(--primary) 9%, var(--surface)); border-left: 3px solid var(--primary) !important; }

.task-overdue-row { background: var(--warning-surface); }
.priority-low { background: var(--surface-subtle); color: var(--text); }
.priority-normal { background: color-mix(in srgb, var(--primary) 18%, var(--surface)); color: var(--info-text); }
.priority-high { background: var(--warning-surface); color: var(--warning-text); }
.priority-critical { background: var(--danger-surface); color: var(--danger-text); }
.personal-task-item.is-completed .task-title { text-decoration: line-through; color: var(--text-muted); }
#calendar .fc-toolbar-title { font-size:1.25rem; }
#calendar .fc-button { background: var(--primary); border-color: var(--primary); }
@media(max-width:767.98px){#calendar .fc-toolbar{display:grid;gap:.75rem}#calendar .fc-toolbar-chunk{display:flex;justify-content:center}.personal-task-form{max-width:none}}


.opportunity-board{display:flex;gap:16px;overflow-x:auto;align-items:flex-start;padding-bottom:16px}.opportunity-column{width:310px;min-width:310px;background: var(--surface-subtle);border-radius:16px;padding:10px}.opportunity-column-head{background: var(--surface);border: 1px solid var(--border);border-top: 4px solid #64748b;border-radius:12px;padding:12px;display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}.opportunity-column-head small{display:block;color: var(--text-muted);margin-top:3px}.opportunity-list{min-height:140px;display:grid;gap:10px}.opportunity-card{background: var(--surface);border: 1px solid var(--border);border-radius:12px;padding:14px;cursor:grab}.opportunity-card:active{cursor:grabbing}@media(max-width:767.98px){.opportunity-board{scroll-snap-type:x mandatory}.opportunity-column{width:calc(100vw - 48px);min-width:calc(100vw - 48px);scroll-snap-align:start}}

/* Application-wide CRUD offcanvas */
.app-offcanvas {
    width: min(720px, 100vw) !important;
    border-left: 1px solid var(--border);
}

.app-offcanvas.app-offcanvas-wide {
    width: min(900px, 100vw) !important;
}

.app-offcanvas-header {
    min-height: 76px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
}

.app-offcanvas-header .offcanvas-title {
    font-size: 1.1rem;
    font-weight: 700;
}

.app-offcanvas-body {
    padding: 20px;
    background: var(--bg);
}

.app-offcanvas-loading {
    min-height: 240px;
    display: grid;
    place-items: center;
}

.app-offcanvas-content > .card,
.app-offcanvas-content > form.card,
.app-offcanvas-content .form-card {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 24px;
}

.app-offcanvas-content form > .d-flex:last-child,
.app-offcanvas-content form > button:last-child {
    position: sticky;
    bottom: -20px;
    z-index: 2;
    margin-right: -24px;
    margin-bottom: -24px;
    margin-left: -24px;
    padding: 16px 24px;
    background: color-mix(in srgb, var(--surface) 96%, transparent);
    border-top: 1px solid var(--border);
    backdrop-filter: blur(8px);
}

.app-offcanvas-content form > button:last-child {
    margin-top: 24px;
    margin-right: 0;
    margin-bottom: 0;
    margin-left: 0;
}

@media (max-width: 767.98px) {
    .app-offcanvas,
    .app-offcanvas.app-offcanvas-wide {
        width: 100vw !important;
    }

    .app-offcanvas-header {
        min-height: var(--topbar-height);
        padding: 14px 16px;
    }

    .app-offcanvas-body {
        padding: 16px 16px calc(var(--mobile-bottom-nav-height) + 16px);
    }

    .app-offcanvas-content > .card,
    .app-offcanvas-content > form.card,
    .app-offcanvas-content .form-card {
        padding: 20px;
        border-radius: 14px;
    }
}

.document-folder-card{transition:transform .15s ease,border-color .15s ease}.document-folder-card:hover{transform:translateY(-2px);border-color: color-mix(in srgb, var(--primary) 35%, var(--border))}.document-icon{font-size:2rem;color: #f59e0b;line-height:1}.document-icon:hover{color: #d97706}


/* Global search */
.global-search-wrap { position: relative; width: min(520px, 42vw); }
.global-search-icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--text-muted); z-index: 2; }
.global-search-input { padding-left: 38px; background: var(--surface-muted); border-color: var(--border); }
.global-search-results { position: absolute; top: calc(100% + 8px); left: 0; right: 0; max-height: 420px; overflow-y: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 18px 50px rgba(15,23,42,.16); z-index: 100; }
.global-search-item { display: flex; gap: 12px; align-items: center; padding: 11px 14px; color: var(--text); text-decoration: none; border-bottom: 1px solid var(--border); }
.global-search-item:last-child { border-bottom: 0; }
.global-search-item:hover { background: var(--surface-muted); }
.global-search-item > i { width: 30px; height: 30px; display: grid; place-items: center; color: var(--primary); background: color-mix(in srgb, var(--primary) 9%, var(--surface)); border-radius: 9px; }
.global-search-item span { min-width: 0; display: grid; }
.global-search-item strong, .global-search-item small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.global-search-item small { color: var(--text-muted); }
.global-search-empty { padding: 18px; text-align: center; color: var(--text-muted); }
.app-offcanvas-form { width: 100%; max-width: none; margin: 0; padding: 24px; }
@media (max-width: 767.98px) { .global-search-wrap { width: auto; flex: 1; margin-left: 0 !important; } .global-search-input { font-size: 14px; } .app-topbar > .ms-auto { gap: .5rem !important; } .app-topbar > .ms-auto > span { display: none; } }

.rich-editor {
    min-height: 260px;
    background: var(--surface);
}

.ql-toolbar.ql-snow {
    border-color: var(--border);
    border-radius: 10px 10px 0 0;
}

.ql-container.ql-snow {
    min-height: 220px;
    border-color: var(--border);
    border-radius: 0 0 10px 10px;
    font-size: 15px;
}

@media (max-width: 767.98px) {
    .rich-editor { min-height: 220px; }
    .ql-container.ql-snow { min-height: 180px; }
}

/* Common list tools */
.app-list-toolbar {
    margin-bottom: 12px;
    padding: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
}

.app-list-toolbar-main {
    display: flex;
    align-items: center;
    gap: 10px;
}

.app-list-search-wrap {
    position: relative;
    flex: 1;
    min-width: 220px;
}

.app-list-search-wrap > i {
    position: absolute;
    top: 50%;
    left: 12px;
    color: var(--text-muted);
    transform: translateY(-50%);
}

.app-list-search {
    padding-left: 36px;
}

.app-list-page-size {
    width: 92px;
}

.app-list-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}

.app-list-filter {
    min-width: 180px;
}

.app-list-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 54px;
    margin-top: 0;
    padding: 10px 12px;
    color: var(--text-muted);
    font-size: 13px;
    background: var(--surface);
    border-top: 1px solid var(--border);
    border-radius: 0 0 14px 14px;
}

.app-list-summary {
    line-height: 1.35;
}

.app-list-pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-height: 34px;
    margin-left: auto;
}

.app-pagination-list {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.app-pagination-item {
    display: flex;
    margin: 0;
    padding: 0;
}

.app-pagination-button {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    font-size: 13px;
    line-height: 1;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

.app-pagination-button:hover:not(:disabled):not(.active) {
    background: var(--surface-muted);
    border-color: var(--border-strong);
}

.app-pagination-button.active,
.app-pagination-button[aria-current="page"] {
    color: #fff;
    background: var(--primary);
    border-color: var(--primary);
}

.app-pagination-button:disabled {
    color: var(--text-muted);
    background: var(--surface-muted);
    cursor: not-allowed;
    opacity: .6;
}

.app-list-sortable {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.app-list-sortable::after {
    content: "↕";
    margin-left: 6px;
    color: #cbd5e1;
    font-size: 12px;
}

.app-list-sortable[data-sort-direction="asc"]::after {
    content: "↑";
    color: var(--primary);
}

.app-list-sortable[data-sort-direction="desc"]::after {
    content: "↓";
    color: var(--primary);
}

@media (max-width: 767.98px) {
    .app-list-toolbar-main {
        flex-wrap: wrap;
    }

    .app-list-search-wrap {
        flex-basis: 100%;
    }

    .app-list-filter-toggle {
        flex: 1;
    }

    .app-list-footer {
        align-items: center;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .app-list-pagination {
        margin-left: auto;
    }
}

@media (max-width: 480px) {
    .app-list-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .app-list-pagination {
        width: 100%;
        justify-content: flex-end;
    }
}

.audit-json{max-height:280px;overflow:auto;padding:14px;background: #0f172a;color: #e2e8f0;border-radius:10px;font-size:12px;white-space:pre-wrap;word-break:break-word;}


.ticket-board { display:flex; gap:16px; overflow-x:auto; padding-bottom:16px; align-items:flex-start; }
.ticket-column { flex:0 0 310px; background: var(--surface-subtle); border: 1px solid var(--border); border-radius:14px; overflow:hidden; }
.ticket-column-head { display:flex; justify-content:space-between; align-items:center; padding:14px 16px; font-weight:700; background: var(--surface); border-bottom: 1px solid var(--border); }
.ticket-column-body { min-height:180px; padding:12px; display:grid; gap:10px; }
.ticket-card { display:block; padding:14px; background: var(--surface); border: 1px solid var(--border); border-radius:12px; color: inherit; }
.ticket-card:hover { border-color: #93c5fd; box-shadow:0 4px 14px rgba(15,23,42,.06); }
.ticket-comment { padding:16px 0; border-bottom: 1px solid var(--border); }
.ticket-comment:last-child { border-bottom: 0; }
.ticket-comment.is-internal { margin:8px 0; padding:14px; border: 1px solid color-mix(in srgb, var(--warning-text) 40%, var(--border)); background: var(--warning-surface); border-radius:12px; }
@media(max-width:767.98px){ .ticket-column{flex-basis:86vw;} }

/* Dashboard / Operations Center */
.dashboard-page {
    display: grid;
    gap: 20px;
}

.dashboard-welcome {
    padding: 4px 0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}

.dashboard-welcome-copy {
    min-width: 0;
}

.dashboard-eyebrow {
    display: inline-block;
    margin-bottom: 6px;
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.dashboard-welcome h1 {
    margin: 0;
    font-size: clamp(26px, 3vw, 34px);
    letter-spacing: -.025em;
}

.dashboard-welcome p {
    max-width: 720px;
    margin: 7px 0 0;
    color: var(--text-muted);
}

.dashboard-updated {
    margin-top: 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 12px;
}

.dashboard-header-tools {
    display: grid;
    justify-items: end;
    gap: 10px;
}

.dashboard-scope-switch {
    padding: 4px;
    display: inline-flex;
    gap: 3px;
    background: var(--surface-subtle);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.dashboard-scope-switch a {
    padding: 7px 11px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    border-radius: 9px;
}

.dashboard-scope-switch a:hover {
    color: var(--text);
}

.dashboard-scope-switch a.active {
    color: var(--text-strong);
    background: var(--surface);
    box-shadow: 0 1px 4px rgba(15, 23, 42, .08);
}

.dashboard-quick-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.dashboard-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.dashboard-kpi-card {
    position: relative;
    min-width: 0;
    min-height: 88px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: inherit;
    text-decoration: none;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    transition: transform .15s ease,
        border-color .15s ease,
        box-shadow .15s ease;
}

.dashboard-kpi-card:hover {
    color: inherit;
    border-color: var(--border-strong);
    box-shadow: 0 10px 28px rgba(15, 23, 42, .06);
    transform: translateY(-2px);
}

.dashboard-kpi-icon {
    width: 44px;
    height: 44px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 44px;
    font-size: 19px;
    border-radius: 13px;
}

.dashboard-kpi-content {
    min-width: 0;
    display: grid;
}

.dashboard-kpi-content small,
.dashboard-kpi-content em {
    overflow: hidden;
    color: var(--text-muted);
    font-size: 12px;
    font-style: normal;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-kpi-content strong {
    margin: 1px 0;
    font-size: 23px;
    line-height: 1.1;
}

.dashboard-widget-handle {
    position: absolute;
    top: 8px;
    right: 8px;
    display: none;
    color: var(--text-muted);
    cursor: grab;
}

.dashboard-editing .dashboard-widget {
    border-style: dashed;
    cursor: grab;
    user-select: none;
}

.dashboard-editing .dashboard-widget:hover {
    transform: none;
}

.dashboard-editing .dashboard-widget-handle {
    display: block;
}

.dashboard-editing .dashboard-widget::after {
    content: "Sürükle";
    position: absolute;
    right: 12px;
    bottom: 8px;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.widget-ghost {
    opacity: .45;
    background: color-mix(in srgb, var(--primary) 9%, var(--surface));
    border-color: #93c5fd;
}

.dashboard-grid {
    display: grid;
    gap: 16px;
}

.dashboard-grid-main {
    grid-template-columns: minmax(0, 1.6fr) minmax(320px, .9fr);
}

.dashboard-grid-equal {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-panel {
    min-width: 0;
    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
}

.dashboard-panel-head {
    margin-bottom: 16px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.dashboard-panel-head h2 {
    margin: 0;
    font-size: 17px;
}

.dashboard-panel-head p {
    margin: 3px 0 0;
    color: var(--text-muted);
    font-size: 13px;
}

.dashboard-empty {
    min-height: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--text-muted);
    text-align: center;
}

.dashboard-empty.compact {
    min-height: 180px;
}

.dashboard-empty i {
    margin-bottom: 6px;
    color: var(--text-muted);
    font-size: 32px;
}

.dashboard-empty strong {
    color: var(--text);
}

.dashboard-empty span {
    max-width: 320px;
    font-size: 13px;
}

.dashboard-task-list,
.dashboard-agenda-list,
.dashboard-ticket-list,
.dashboard-project-risk-list,
.dashboard-document-list,
.dashboard-recent-list {
    display: grid;
}

.dashboard-task-row {
    padding: 13px 4px;
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr) auto 96px;
    align-items: center;
    gap: 10px;
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid var(--border);
}

.dashboard-task-row:last-child,
.dashboard-agenda-item:last-child,
.dashboard-ticket-item:last-child,
.dashboard-project-risk-item:last-child,
.dashboard-document-item:last-child,
.dashboard-recent-item:last-child {
    border-bottom: 0;
}

.dashboard-task-row:hover strong,
.dashboard-agenda-item:hover strong,
.dashboard-ticket-item:hover strong,
.dashboard-project-risk-item:hover strong,
.dashboard-document-item:hover strong,
.dashboard-recent-item:hover strong {
    color: var(--primary);
}

.dashboard-task-check {
    color: var(--text-muted);
}

.dashboard-task-main,
.dashboard-agenda-item > span:last-child,
.dashboard-ticket-item > span:first-child,
.dashboard-project-risk-main,
.dashboard-document-item > span:nth-child(2),
.dashboard-recent-item > span:nth-child(2) {
    min-width: 0;
    display: grid;
}

.dashboard-task-main strong,
.dashboard-task-main small,
.dashboard-agenda-item strong,
.dashboard-agenda-item small,
.dashboard-ticket-item strong,
.dashboard-ticket-item small,
.dashboard-project-risk-item strong,
.dashboard-project-risk-item small,
.dashboard-document-item strong,
.dashboard-document-item small,
.dashboard-recent-item strong,
.dashboard-recent-item small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-task-main small,
.dashboard-agenda-item small,
.dashboard-ticket-item small,
.dashboard-project-risk-item small,
.dashboard-document-item small,
.dashboard-recent-item small {
    color: var(--text-muted);
    font-size: 12px;
}

.dashboard-task-row time {
    font-size: 12px;
    text-align: right;
}

.dashboard-agenda-item {
    padding: 12px 0;
    display: grid;
    grid-template-columns: 46px 34px minmax(0, 1fr);
    align-items: center;
    gap: 9px;
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid var(--border);
}

.dashboard-agenda-item > time {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
}

.dashboard-agenda-icon,
.dashboard-document-icon,
.dashboard-recent-icon {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    color: var(--primary);
    background: color-mix(in srgb, var(--primary) 9%, var(--surface));
    border-radius: 10px;
}

.dashboard-project-risk-item {
    padding: 12px 0;
    display: grid;
    grid-template-columns: 8px minmax(0, 1fr) 108px;
    align-items: center;
    gap: 12px;
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid var(--border);
}

.dashboard-risk-indicator {
    width: 8px;
    height: 42px;
    border-radius: 999px;
    background: #94a3b8;
}

.dashboard-risk-indicator.danger {
    background: #ef4444;
}

.dashboard-risk-indicator.warning {
    background: #f59e0b;
}

.dashboard-risk-indicator.attention {
    background: #3b82f6;
}

.dashboard-project-progress {
    width: 100%;
    height: 5px;
    margin-top: 7px;
    overflow: hidden;
    background: var(--surface-subtle);
    border-radius: 999px;
}

.dashboard-project-progress i {
    height: 100%;
    display: block;
    background: var(--primary);
    border-radius: inherit;
}

.dashboard-project-risk-meta {
    display: grid;
    justify-items: end;
    gap: 2px;
}

.dashboard-project-risk-meta strong {
    font-size: 13px;
}

.dashboard-project-risk-meta em {
    color: var(--danger-text);
    font-size: 11px;
    font-style: normal;
    font-weight: 700;
}

.dashboard-ticket-item {
    padding: 12px 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 126px;
    align-items: center;
    gap: 10px;
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid var(--border);
}

.dashboard-ticket-meta {
    display: grid;
    justify-items: end;
    gap: 5px;
}

.dashboard-ticket-meta .badge {
    font-size: 10px;
}

.dashboard-pipeline-list {
    display: grid;
    gap: 14px;
}

.dashboard-pipeline-row {
    display: grid;
    grid-template-columns: minmax(130px, .75fr) minmax(120px, 1fr) minmax(110px, auto);
    align-items: center;
    gap: 12px;
}

.dashboard-pipeline-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 13px;
}

.dashboard-pipeline-label span {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 7px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-pipeline-label i {
    width: 8px;
    height: 8px;
    flex: 0 0 8px;
    border-radius: 50%;
}

.dashboard-progress {
    height: 8px;
    overflow: hidden;
    background: var(--surface-subtle);
    border-radius: 999px;
}

.dashboard-progress span {
    height: 100%;
    display: block;
    border-radius: inherit;
}

.dashboard-pipeline-row > small {
    color: var(--text-muted);
    font-size: 11px;
    text-align: right;
}

.dashboard-mini-stat {
    padding: 5px 9px;
    color: var(--text-muted);
    font-size: 12px;
    background: var(--surface-muted);
    border-radius: 999px;
}

.dashboard-bar-chart {
    height: 230px;
    padding-top: 16px;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    align-items: end;
    gap: 12px;
}

.dashboard-bar-item {
    height: 100%;
    display: grid;
    grid-template-rows: 20px 1fr 22px;
    align-items: end;
    gap: 5px;
    text-align: center;
}

.dashboard-bar-value {
    color: var(--text-muted);
    font-size: 12px;
}

.dashboard-bar-track {
    width: min(34px, 75%);
    height: 100%;
    margin: 0 auto;
    display: flex;
    align-items: end;
    overflow: hidden;
    background: var(--surface-subtle);
    border-radius: 8px 8px 3px 3px;
}

.dashboard-bar-track span {
    width: 100%;
    display: block;
    background: linear-gradient(180deg, #60a5fa, var(--primary));
    border-radius: inherit;
}

.dashboard-bar-item small {
    color: var(--text-muted);
    font-size: 11px;
}

.dashboard-recent-item {
    padding: 11px 0;
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) 100px;
    align-items: center;
    gap: 10px;
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid var(--border);
}

.dashboard-recent-item time {
    color: var(--text-muted);
    font-size: 11px;
    text-align: right;
}

.dashboard-document-item {
    padding: 11px 0;
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) 42px;
    align-items: center;
    gap: 10px;
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid var(--border);
}

.dashboard-document-item time {
    color: var(--text-muted);
    font-size: 11px;
    text-align: right;
}

@media (max-width: 1399.98px) {
    .dashboard-kpi-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1099.98px) {
    .dashboard-welcome {
        align-items: stretch;
        flex-direction: column;
    }

    .dashboard-header-tools {
        justify-items: start;
    }

    .dashboard-grid-main,
    .dashboard-grid-equal {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    .dashboard-page {
        gap: 14px;
    }

    .dashboard-header-tools,
    .dashboard-scope-switch,
    .dashboard-quick-actions {
        width: 100%;
    }

    .dashboard-scope-switch a {
        flex: 1 1 0;
        justify-content: center;
    }

    .dashboard-quick-actions {
        align-items: stretch;
        flex-wrap: wrap;
    }

    .dashboard-quick-actions .dropdown {
        flex: 1 1 100%;
    }

    .dashboard-quick-actions .dropdown > .btn {
        width: 100%;
    }

    .dashboard-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px;
    }

    .dashboard-kpi-card {
        min-height: 82px;
        padding: 13px;
    }

    .dashboard-kpi-icon {
        width: 38px;
        height: 38px;
        flex-basis: 38px;
    }

    .dashboard-kpi-content strong {
        font-size: 20px;
    }

    .dashboard-panel {
        padding: 16px;
        border-radius: 16px;
    }

    .dashboard-panel-head {
        align-items: center;
    }

    .dashboard-task-row {
        grid-template-columns: 20px minmax(0, 1fr) auto;
    }

    .dashboard-task-row time {
        display: none;
    }

    .dashboard-project-risk-item {
        grid-template-columns: 7px minmax(0, 1fr);
    }

    .dashboard-project-risk-meta {
        grid-column: 2;
        justify-items: start;
        grid-auto-flow: column;
        justify-content: start;
        gap: 10px;
    }

    .dashboard-ticket-item {
        grid-template-columns: minmax(0, 1fr) 100px;
    }

    .dashboard-pipeline-row {
        grid-template-columns: minmax(115px, .8fr) 1fr;
    }

    .dashboard-pipeline-row > small {
        grid-column: 2;
        margin-top: -8px;
    }

    .dashboard-recent-item {
        grid-template-columns: 36px minmax(0, 1fr);
    }

    .dashboard-recent-item time {
        display: none;
    }
}

@media (max-width: 480px) {
    .dashboard-kpi-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-scope-switch a {
        padding-inline: 7px;
        font-size: 11px;
    }

    .dashboard-bar-chart {
        gap: 7px;
    }

    .dashboard-ticket-item {
        grid-template-columns: minmax(0, 1fr);
    }

    .dashboard-ticket-meta {
        grid-auto-flow: column;
        justify-items: start;
        justify-content: space-between;
    }
}

/* Mobile bottom navigation and More sheet */
.bottom-nav button {
    border: 0;
    background: transparent;
}

.bottom-nav > a,
.bottom-nav > button {
    min-width: 0;
    flex: 1 1 20%;
    padding: 7px 3px max(6px, env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: var(--text-muted);
    text-decoration: none;
    font: inherit;
}

.bottom-nav > a:hover,
.bottom-nav > button:hover,
.bottom-nav > a:focus-visible,
.bottom-nav > button:focus-visible {
    color: var(--primary);
}

.bottom-nav small {
    max-width: 100%;
    overflow: hidden;
    font-size: 10px;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mobile-more-backdrop,
.mobile-more-sheet {
    display: none;
}

@media (max-width: 767.98px) {
    body.mobile-more-open {
        overflow: hidden;
    }

    .mobile-more-backdrop {
        position: fixed;
        inset: 0;
        display: block;
        background: rgba(15, 23, 42, .44);
        opacity: 0;
        z-index: 1040;
        transition: opacity .2s ease;
    }

    .mobile-more-backdrop.is-open {
        opacity: 1;
    }

    .mobile-more-sheet {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        max-height: min(82vh, 720px);
        padding: 8px 16px calc(18px + env(safe-area-inset-bottom));
        display: block;
        overflow-y: auto;
        background: var(--surface);
        border-radius: 22px 22px 0 0;
        box-shadow: 0 -18px 55px rgba(15, 23, 42, .2);
        transform: translateY(105%);
        visibility: hidden;
        z-index: 1050;
        transition: transform .24s ease, visibility .24s ease;
    }

    .mobile-more-sheet.is-open {
        transform: translateY(0);
        visibility: visible;
    }

    .mobile-more-handle {
        width: 42px;
        height: 4px;
        margin: 1px auto 13px;
        background: #cbd5e1;
        border-radius: 999px;
    }

    .mobile-more-header {
        margin-bottom: 15px;
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 16px;
    }

    .mobile-more-header h2 {
        margin: 0;
        font-size: 19px;
    }

    .mobile-more-header p {
        margin: 3px 0 0;
        color: var(--text-muted);
        font-size: 12px;
    }

    .mobile-more-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .mobile-more-grid > a,
    .mobile-more-logout button {
        min-height: 76px;
        width: 100%;
        padding: 12px 9px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 7px;
        color: var(--text);
        text-align: center;
        text-decoration: none;
        background: var(--surface-muted);
        border: 1px solid var(--border);
        border-radius: 14px;
    }

    .mobile-more-grid i {
        color: var(--primary);
        font-size: 22px;
    }

    .mobile-more-grid span {
        font-size: 12px;
        font-weight: 600;
    }

    .mobile-more-logout {
        margin: 0;
    }

    .mobile-more-logout button {
        border-color: color-mix(in srgb, var(--danger-text) 35%, var(--border));
        color: var(--danger-text);
    }

    .mobile-more-logout button i {
        color: var(--danger-text);
    }
}

/* v16.2 - Topbar command center */
.topbar-quick-create { display:inline-flex; align-items:center; gap:.4rem; white-space:nowrap; }
.global-search-shortcut { position:absolute; right:10px; top:50%; transform:translateY(-50%); padding:2px 6px; font-size:11px; color: var(--text-muted); background: var(--surface); border: 1px solid var(--border); border-radius:6px; }
.global-search-input { padding-right:66px; }
.topbar-popover { position:fixed; top:64px; z-index:1200; background: var(--surface); border: 1px solid var(--border); border-radius:16px; box-shadow:0 20px 60px rgba(15,23,42,.18); }
.quick-create-popover { left:calc(var(--sidebar-expanded-width) + 82px); width:360px; padding:14px; }
.sidebar-collapsed .quick-create-popover { left:calc(var(--sidebar-collapsed-width) + 82px); }
.topbar-popover-title { padding:2px 4px 10px; font-size:13px; font-weight:700; color: var(--text); }
.quick-create-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.quick-create-grid a { display:flex; align-items:center; gap:10px; min-height:48px; padding:10px 12px; color: var(--text); text-decoration:none; background: var(--surface-muted); border: 1px solid var(--border); border-radius:12px; }
.quick-create-grid a:hover { color: var(--primary); background: color-mix(in srgb, var(--primary) 9%, var(--surface)); border-color: color-mix(in srgb, var(--primary) 35%, var(--border)); }
.quick-create-grid i { width:28px; height:28px; display:grid; place-items:center; color: var(--primary); background: var(--surface); border-radius:8px; }
.notification-popover { right:140px; width:min(390px,calc(100vw - 24px)); max-height:520px; overflow:hidden; }
.notification-popover-header { display:flex; align-items:center; justify-content:space-between; padding:14px 16px; border-bottom: 1px solid var(--border); }
.notification-popover-list { max-height:390px; overflow:auto; }
.notification-popover-item { display:block; padding:12px 16px; color: var(--text); text-decoration:none; border-bottom: 1px solid var(--border); }
.notification-popover-item:hover { background: var(--surface-muted); }
.notification-popover-item.is-unread { background: color-mix(in srgb, var(--primary) 9%, var(--surface)); }
.notification-popover-item strong { display:block; font-size:14px; }
.notification-popover-item span { display:block; margin-top:3px; color: var(--text-muted); font-size:12px; }
.notification-popover-empty { padding:30px 18px; text-align:center; color: var(--text-muted); }
.notification-popover-footer { display:block; padding:12px 16px; text-align:center; text-decoration:none; border-top: 1px solid var(--border); }
.global-search-results .search-section-title { padding:8px 14px; color: var(--text-muted); font-size:11px; font-weight:700; letter-spacing:.04em; text-transform:uppercase; background: var(--surface-muted); }
.global-search-results .global-search-item.is-active { background: color-mix(in srgb, var(--primary) 9%, var(--surface)); }
@media(max-width:991.98px){ .topbar-quick-create span{display:none;} .topbar-quick-create{padding:.5rem .65rem;} .quick-create-popover{left:84px;} .sidebar-collapsed .quick-create-popover{left:84px;} }
@media(max-width:767.98px){ .topbar-quick-create{display:none;} .global-search-shortcut{display:none;} .global-search-input{padding-right:12px;} .notification-popover{right:12px; top:62px;} .quick-create-popover{display:none!important;} .topbar-actions>a span,.topbar-actions form{display:none;} }

/* Document browser: selection, card view and preview */
.document-toolbar {
    position: sticky;
    top: calc(var(--topbar-height) + 12px);
    z-index: 8;
}

.document-preview-card {
    position: relative;
    overflow: hidden;
}

.document-preview-select {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 3;
    padding: 5px;
    line-height: 1;
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, .08);
}

.document-preview-surface {
    width: 100%;
    height: 190px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: var(--text-muted);
    background: var(--surface-muted);
    border: 0;
    border-bottom: 1px solid var(--border);
}

.document-preview-surface:hover {
    background: var(--surface-subtle);
}

.document-preview-surface img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .2s ease;
}

.document-preview-surface:hover img {
    transform: scale(1.025);
}

.document-preview-surface > i {
    font-size: 64px;
}

.document-preview-modal-image {
    display: block;
    max-width: 100%;
    max-height: 75vh;
    margin: 0 auto;
    object-fit: contain;
}

.document-preview-frame {
    display: block;
    width: 100%;
    height: 75vh;
    border: 0;
}

#documentPreviewModal .modal-body {
    min-height: 240px;
    background: #0f172a;
}

#documentPreviewModal .empty-state {
    color: #e2e8f0;
    background: var(--surface);
}

@media (max-width: 767.98px) {
    .document-toolbar {
        position: static;
    }

    .document-toolbar .btn-group {
        width: 100%;
    }

    .document-toolbar .btn-group .btn {
        flex: 1;
    }

    .document-preview-surface {
        height: 220px;
    }

    #documentPreviewModal .modal-dialog {
        min-height: 100%;
        margin: 0;
    }

    #documentPreviewModal .modal-content {
        min-height: 100vh;
        border: 0;
        border-radius: 0;
    }

    .document-preview-frame,
    .document-preview-modal-image {
        max-height: calc(100vh - 140px);
        height: calc(100vh - 140px);
    }
}

/* Document toolbar layout fix */
.document-toolbar {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 8px !important;
    min-height: 58px;
    padding: 10px 12px !important;
}

.document-toolbar .form-check {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0 !important;
    white-space: nowrap;
}

.document-toolbar #selectedDocumentCount {
    margin-right: auto !important;
    white-space: nowrap;
}

.document-toolbar > .btn,
.document-toolbar > .btn-group {
    flex: 0 0 auto;
    margin: 0 !important;
}

.document-toolbar .btn-group {
    display: inline-flex;
    width: auto !important;
}

.document-toolbar .btn-group .btn {
    flex: 0 0 auto !important;
    width: 36px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 767.98px) {
    .document-toolbar {
        position: static;
        flex-wrap: wrap !important;
        justify-content: flex-end !important;
    }

    .document-toolbar #selectedDocumentCount {
        flex: 1 1 100%;
        margin-right: 0 !important;
    }

    .document-toolbar .btn-group {
        width: auto !important;
    }

    .document-toolbar .btn-group .btn {
        flex: 0 0 auto !important;
    }
}

/* Sprint 07 - Basic Reporting Center */
.reports-page-head{margin-bottom:16px}.report-center-layout{display:grid;grid-template-columns:280px minmax(0,1fr);gap:18px;align-items:start}.report-catalog{position:sticky;top:84px;overflow:hidden;background: var(--surface);border: 1px solid var(--border);border-radius:16px}.report-catalog-head{display:flex;align-items:center;justify-content:space-between;padding:16px 16px 12px;border-bottom: 1px solid var(--border)}.report-catalog-head span{font-weight:700;color: var(--text-strong)}.report-catalog-head small{color: var(--text-muted)}.report-catalog-list{display:grid;padding:8px}.report-catalog-item{display:grid;grid-template-columns:38px minmax(0,1fr);gap:10px;align-items:start;padding:11px 10px;color: var(--text);text-decoration:none;border-radius:11px}.report-catalog-item:hover{background: var(--surface-muted);color: var(--text-strong)}.report-catalog-item.active{background: color-mix(in srgb, var(--primary) 9%, var(--surface));color: var(--info-text)}.report-catalog-icon{width:38px;height:38px;display:grid;place-items:center;background: var(--surface-subtle);border-radius:10px;font-size:17px}.report-catalog-item.active .report-catalog-icon{background: color-mix(in srgb, var(--primary) 18%, var(--surface))}.report-catalog-item strong,.report-catalog-item small{display:block}.report-catalog-item strong{font-size:13px}.report-catalog-item small{margin-top:2px;color: var(--text-muted);font-size:11px;line-height:1.35}.report-catalog-note{display:flex;gap:8px;padding:12px 14px;color: var(--text-muted);background: var(--surface-muted);border-top: 1px solid var(--border);font-size:11px;line-height:1.4}.report-workspace{min-width:0;display:grid;gap:16px}.report-workspace-head{min-height:68px;display:flex;align-items:center;justify-content:space-between;gap:14px;padding:16px 18px;background: var(--surface);border: 1px solid var(--border);border-radius:16px}.report-workspace-title{display:flex;align-items:center;gap:12px}.report-workspace-title h2{margin:0;color: var(--text-strong);font-size:19px}.report-workspace-title p{margin:3px 0 0;color: var(--text-muted);font-size:12px}.report-workspace-icon{width:42px;height:42px;display:grid;place-items:center;color: var(--info-text);background: color-mix(in srgb, var(--primary) 18%, var(--surface));border-radius:12px;font-size:18px}.report-period-badge{display:inline-flex;align-items:center;gap:7px;padding:8px 11px;color: var(--text-muted);background: var(--surface-muted);border: 1px solid var(--border);border-radius:999px;font-size:12px;white-space:nowrap}.reports-filter-card{padding:16px}.report-content{display:grid;gap:16px}.reports-kpi-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.report-kpi{min-height:118px;padding:16px;display:flex;align-items:flex-start;gap:12px;background: var(--surface);border: 1px solid var(--border);border-radius:15px}.report-kpi-icon{width:40px;height:40px;display:grid;place-items:center;flex:0 0 40px;border-radius:11px;font-size:18px}.report-kpi div{min-width:0;display:grid;gap:4px}.report-kpi small,.report-kpi em{color: var(--text-muted);font-size:11px;font-style:normal}.report-kpi strong{overflow-wrap:anywhere;color: var(--text-strong);font-size:17px;line-height:1.25}.reports-grid{display:grid;gap:16px}.reports-grid-2{grid-template-columns:repeat(2,minmax(0,1fr))}.reports-grid-3{grid-template-columns:repeat(3,minmax(0,1fr))}.report-panel{min-width:0;padding:18px;background: var(--surface);border: 1px solid var(--border);border-radius:15px}.report-panel-head{min-height:42px;margin-bottom:14px;display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.report-panel-head h3{margin:0;color: var(--text-strong);font-size:16px}.report-panel-head p{margin:3px 0 0;color: var(--text-muted);font-size:12px}.report-currency-series,.report-series-block,.report-mini-bars,.report-stage-list{display:grid;gap:10px}.report-series-block+ .report-series-block{padding-top:13px;border-top: 1px solid var(--border)}.report-series-head{display:flex;align-items:center;justify-content:space-between;gap:10px}.report-series-head span{color: var(--text-muted);font-size:12px}.report-mini-bar-row{display:grid;grid-template-columns:58px minmax(70px,1fr) 90px;align-items:center;gap:8px;font-size:11px}.report-mini-bar-row>span{color: var(--text-muted)}.report-mini-bar-row>div,.report-progress,.report-probability,.report-workload-score{height:7px;overflow:hidden;background: var(--surface-subtle);border-radius:999px}.report-mini-bar-row i,.report-progress i,.report-probability span,.report-workload-score span{height:100%;display:block;background: #2563eb;border-radius:inherit}.report-mini-bars-secondary .report-mini-bar-row i{background: #7c3aed}.report-mini-bar-row strong{text-align:right;font-size:11px}.report-stage-row{display:grid;grid-template-columns:10px minmax(110px,1fr) minmax(110px,auto);align-items:center;gap:10px;padding:10px 0;border-bottom: 1px solid var(--border)}.report-stage-row:last-child{border-bottom: 0}.report-stage-dot{width:9px;height:9px;border-radius:50%}.report-stage-row div{display:grid}.report-stage-row small{color: var(--text-muted);font-size:11px}.report-stage-row>span:last-child{text-align:right;color: var(--text);font-size:12px}.report-empty-inline{padding:24px 12px;text-align:center;color: var(--text-muted);font-size:13px}.report-sla-compact{display:grid;gap:8px}.report-sla-compact>div:not(.report-progress):not(.report-sla-counts){display:flex;justify-content:space-between;gap:10px}.report-sla-compact .report-progress i{background: #16a34a}.report-sla-counts{display:flex;gap:12px;flex-wrap:wrap;margin-top:6px;color: var(--text-muted);font-size:11px}.report-project-list{display:grid}.report-project-row{padding:12px 0;display:grid;grid-template-columns:minmax(150px,1fr) minmax(110px,1.1fr) 76px;align-items:center;gap:13px;color: inherit;text-decoration:none;border-bottom: 1px solid var(--border)}.report-project-row:last-child{border-bottom: 0}.report-project-row:hover strong{color: var(--primary)}.report-project-title,.report-project-rate{display:grid;gap:3px}.report-project-title small,.report-project-rate small{color: var(--text-muted);font-size:11px}.report-project-progress{height:7px;overflow:hidden;background: var(--surface-subtle);border-radius:999px}.report-project-progress span{height:100%;display:block;background: var(--primary);border-radius:inherit}.report-project-rate{text-align:right}.report-table{margin-bottom:0}.report-table th{color: var(--text-muted);font-size:11px;font-weight:600;white-space:nowrap}.report-table td{font-size:12px}.report-data-card{overflow:visible}.report-detail-table{min-width:980px}.report-detail-table th{padding:12px 13px;color: var(--text-muted);background: var(--surface-muted);font-size:11px;font-weight:700;white-space:nowrap;border-bottom: 1px solid var(--border)}.report-detail-table td{padding:12px 13px;color: var(--text);font-size:12px;vertical-align:middle}.report-detail-table tbody tr:hover{background: var(--surface-muted)}.report-cell-subject{max-width:240px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.report-status,.report-risk,.report-sla-state{display:inline-flex;align-items:center;gap:5px;padding:4px 8px;border-radius:999px;font-size:10px;font-weight:700;white-space:nowrap}.report-status-success{color: var(--success-text);background: var(--success-surface)}.report-status-danger{color: var(--danger-text);background: var(--danger-surface)}.report-status-warning{color: var(--warning-text);background: var(--warning-surface)}.report-status-info{color: var(--info-text);background: color-mix(in srgb, var(--primary) 18%, var(--surface))}.report-status-neutral{color: var(--text-muted);background: var(--surface-subtle)}.report-risk-success{color: var(--success-text);background: var(--success-surface)}.report-risk-warning{color: var(--warning-text);background: var(--warning-surface)}.report-risk-attention{color: var(--warning-text);background: var(--warning-surface)}.report-risk-danger{color: var(--danger-text);background: var(--danger-surface)}.report-sla-state.success{color: var(--success-text);background: var(--success-surface)}.report-sla-state.danger{color: var(--danger-text);background: var(--danger-surface)}.report-sla-state.neutral{color: var(--text-muted);background: var(--surface-subtle)}.report-probability{width:72px;margin-bottom:3px}.report-probability span{background: #7c3aed}.report-workload-score{display:inline-block;width:68px;margin-right:7px;vertical-align:middle}.report-workload-score span{background: #0ea5e9}.report-pagination-card{padding:12px 14px;display:flex;align-items:center;justify-content:space-between;gap:12px}.report-pagination-summary{color: var(--text-muted);font-size:12px}.report-pagination-summary strong{color: var(--text-strong)}.report-pagination-actions{display:flex;align-items:center;gap:14px}.report-page-size{display:flex;align-items:center;gap:5px;color: var(--text-muted);font-size:11px}.report-page-size a{min-width:28px;padding:4px 6px;text-align:center;color: var(--text-muted);text-decoration:none;background: var(--surface-muted);border-radius:6px}.report-page-size a.active{color: #fff;background: #2563eb}
@media(max-width:1399.98px){.reports-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.report-center-layout{grid-template-columns:250px minmax(0,1fr)}}
@media(max-width:1199.98px){.report-center-layout{grid-template-columns:1fr}.report-catalog{position:static}.report-catalog-list{display:flex;overflow-x:auto;scrollbar-width:thin}.report-catalog-item{min-width:215px}.report-catalog-note{display:none}.reports-grid-3{grid-template-columns:1fr 1fr}}
@media(max-width:991.98px){.reports-grid-3,.reports-grid-2{grid-template-columns:1fr}.report-workspace-head{align-items:flex-start}.report-pagination-card{align-items:flex-start;flex-direction:column}.report-pagination-actions{width:100%;justify-content:space-between}.report-detail-table{min-width:900px}}
@media(max-width:767.98px){.reports-page-head{gap:12px;flex-direction:column}.reports-page-head>div:last-child{width:100%}.reports-page-head .btn,.reports-page-head .dropdown{flex:1}.reports-page-head .dropdown .btn{width:100%}.report-workspace-head{align-items:stretch;flex-direction:column}.report-period-badge{align-self:flex-start}.reports-kpi-grid{grid-template-columns:1fr}.report-kpi{min-height:auto}.report-panel{padding:15px}.report-project-row{grid-template-columns:1fr;gap:7px}.report-project-rate{text-align:left}.report-mini-bar-row{grid-template-columns:52px minmax(60px,1fr) 76px}.report-pagination-actions{align-items:flex-start;flex-direction:column}.report-catalog-item{min-width:195px}.report-catalog-item small{display:none}}
@media print{#sidebar,header,.bottom-nav,.mobile-more-sheet,.mobile-more-backdrop,.reports-filter-card,.reports-page-head .btn,.reports-page-head .dropdown,.report-catalog,.report-pagination-card{display:none!important}.app-main{width:100%!important;margin:0!important;padding:0!important}.report-center-layout{display:block}.report-workspace{gap:10px}.report-workspace-head,.report-panel,.report-kpi,.report-data-card{break-inside:avoid;box-shadow:none}.reports-grid-2,.reports-grid-3{grid-template-columns:1fr 1fr}.report-detail-table{min-width:0;font-size:9px}}

/* Notification Center v18 */
.notification-center-list{display:grid}.notification-center-item{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 18px;border-bottom: 1px solid var(--border);background: var(--surface)}.notification-center-item:last-child{border-bottom: 0}.notification-center-item.notification-unread{background: var(--info-surface)}.notification-center-main{min-width:0;display:flex;align-items:flex-start;gap:14px;flex:1;color: inherit;text-decoration:none}.notification-center-main p{margin:4px 0;color: var(--text-muted)}.notification-center-main small{color: var(--text-muted)}.notification-category-badge{padding:5px 9px;color: var(--info-text);background: color-mix(in srgb, var(--primary) 18%, var(--surface));border-radius:999px;font-size:11px;white-space:nowrap}.notification-center-actions{display:flex;gap:6px}.notification-preference-table{display:grid;border: 1px solid var(--border);border-radius:14px;overflow:hidden}.notification-preference-head,.notification-preference-row{display:grid;grid-template-columns:minmax(0,1fr) 110px 110px;align-items:center;gap:12px;padding:14px 16px}.notification-preference-head{background: var(--surface-muted);color: var(--text-muted);font-size:12px;font-weight:700}.notification-preference-row{border-top: 1px solid var(--border)}.notification-preference-switch{display:flex;justify-content:center}.notification-preference-switch input{position:absolute;opacity:0}.notification-preference-switch span{width:42px;height:24px;position:relative;background: #cbd5e1;border-radius:999px;cursor:pointer}.notification-preference-switch span:after{content:"";position:absolute;top:3px;left:3px;width:18px;height:18px;background: var(--surface);border-radius:50%;transition:.2s}.notification-preference-switch input:checked+span{background: var(--primary)}.notification-preference-switch input:checked+span:after{transform:translateX(18px)}@media(max-width:767.98px){.notification-center-item{align-items:flex-start}.notification-center-main{display:grid}.notification-center-actions{flex-direction:column}.notification-preference-head,.notification-preference-row{grid-template-columns:minmax(0,1fr) 74px 74px;padding:12px 10px;font-size:12px}}

/* Platform v24-v29 */
.dashboard-editing .dashboard-widget{outline: 2px dashed #93c5fd;cursor:grab}.widget-ghost{opacity:.35}.workflow-designer{display:grid;grid-template-columns:210px 1fr 280px;gap:12px;height:calc(100vh - 170px)}.workflow-palette,.workflow-properties{background: var(--surface);border: 1px solid var(--border);border-radius:14px;padding:14px;overflow:auto}.workflow-palette button{width:100%;display:flex;gap:10px;align-items:center;padding:10px;margin-bottom:8px;border: 1px solid var(--border);background: var(--surface);border-radius:10px}.workflow-canvas{position:relative;overflow:auto;background-color: var(--surface-muted);background-image: radial-gradient(#cbd5e1 1px,transparent 1px);background-size:20px 20px;border: 1px solid var(--border);border-radius:14px;min-height:500px}.workflow-node{position:absolute;width:170px;padding:12px;display:flex;align-items:center;gap:8px;background: var(--surface);border: 1px solid color-mix(in srgb, var(--primary) 35%, var(--border));border-radius:12px;box-shadow:0 8px 20px rgba(15,23,42,.08);cursor:move}.workflow-node .node-delete{margin-left:auto;border: 0;background: transparent;color: #ef4444}.workflow-properties h3{font-size:16px}.version-row{display:grid;padding:12px 0;border-bottom: 1px solid var(--border)}.version-row small,.version-row span{color: var(--text-muted);font-size:12px}.module-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.module-card{padding:18px;display:grid;grid-template-columns:42px 1fr auto;align-items:center;gap:12px;background: var(--surface);border: 1px solid var(--border);border-radius:15px}.module-card>i{font-size:24px;color: var(--primary)}.module-card div{display:grid}.module-card small{color: var(--text-muted)}.module-card>div:last-child{grid-column:1/-1;display:flex;gap:8px}.platform-links{display:flex;gap:10px;flex-wrap:wrap}.platform-links a{padding:10px 14px;background: var(--surface);border: 1px solid var(--border);border-radius:10px;text-decoration:none}.code-editor{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:13px}.audit-kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:16px}.audit-kpis>div{padding:18px;background: var(--surface);border: 1px solid var(--border);border-radius:14px;display:grid}.audit-kpis small{color: var(--text-muted)}.audit-kpis strong{font-size:26px}.risk-badge{display:inline-flex;min-width:40px;justify-content:center;padding:4px 8px;border-radius:999px;font-weight:700}.risk-low{background: var(--success-surface);color: var(--success-text)}.risk-medium{background: var(--warning-surface);color: var(--warning-text)}.risk-high{background: var(--danger-surface);color: var(--danger-text)}
@media(max-width:991.98px){.workflow-designer{grid-template-columns:150px 1fr}.workflow-properties{display:none}.module-grid{grid-template-columns:1fr 1fr}}
@media(max-width:767.98px){.workflow-designer{grid-template-columns:1fr;height:auto}.workflow-palette{display:flex;overflow-x:auto}.workflow-palette button{min-width:130px}.workflow-canvas{min-height:520px}.module-grid,.audit-kpis{grid-template-columns:1fr}.module-card{grid-template-columns:36px 1fr auto}}

/* Form Builder 2.0 */
.form-builder-form{padding:0}.form-builder-settings{display:grid;grid-template-columns:2fr 1.5fr 1fr 1.5fr;gap:12px}.form-builder-workspace{display:grid;grid-template-columns:170px minmax(360px,1fr) 260px;min-height:520px;border: 1px solid var(--border);border-radius:16px;overflow:hidden;background: var(--surface)}.form-builder-toolbox,.form-builder-properties{padding:16px;background: var(--surface-muted)}.form-builder-toolbox{border-right: 1px solid var(--border);display:flex;flex-direction:column;gap:8px}.form-builder-toolbox button{display:flex;align-items:center;gap:8px;padding:9px 10px;border: 1px solid var(--border);background: var(--surface);border-radius:9px;text-align:left}.form-builder-properties{border-left: 1px solid var(--border)}.form-builder-properties label{display:block;margin-top:10px;margin-bottom:4px;font-size:12px;font-weight:600}.form-builder-canvas{padding:16px;min-width:0}.form-builder-tabs{display:flex;gap:6px;margin-bottom:14px}.form-builder-tabs button{border: 0;background: var(--surface-subtle);padding:8px 12px;border-radius:8px}.form-builder-tabs button.active{background: var(--primary);color: #fff}.builder-field{display:grid;grid-template-columns:24px 1fr 36px;align-items:center;gap:8px;padding:12px;margin-bottom:8px;border: 1px solid var(--border);border-radius:11px;background: var(--surface);cursor:pointer}.builder-field.selected{border-color: var(--primary);box-shadow:0 0 0 3px rgba(37,99,235,.1)}.builder-field small{display:block;color: var(--text-muted)}.builder-drag{cursor:grab;color: var(--text-muted)}.builder-empty{padding:80px 20px;text-align:center;color: var(--text-muted);border: 2px dashed var(--border);border-radius:12px}.public-form-page{min-height:100vh;background: var(--surface-subtle);padding:40px 16px}.public-form-page main{max-width:820px;margin:auto}.public-form-shell{max-width:850px;margin:0 auto}.public-form-card{padding:28px;background: var(--surface);border: 1px solid var(--border,var(--border));border-radius:18px;box-shadow:0 12px 35px rgba(15,23,42,.06)}
@media(max-width:991.98px){.form-builder-settings{grid-template-columns:1fr 1fr}.form-builder-workspace{grid-template-columns:140px 1fr}.form-builder-properties{grid-column:1/-1;border-left: 0;border-top: 1px solid var(--border)}}@media(max-width:767.98px){.form-builder-settings{grid-template-columns:1fr}.form-builder-workspace{display:block}.form-builder-toolbox{display:grid;grid-template-columns:1fr 1fr;border-right: 0;border-bottom: 1px solid var(--border)}.form-builder-properties{border-top: 1px solid var(--border)}.public-form-card{padding:20px}}


/* Kolay Neural Platform */
.neural-page-head{margin-bottom:16px}.neural-legend{display:flex;gap:14px;align-items:center;color: var(--text-muted);font-size:13px}.neural-legend span{display:flex;align-items:center;gap:6px}.neural-legend i{width:11px;height:11px;border-radius:50%;display:block}.neural-legend .core{background: #111827}.neural-legend .active{background: #2563eb}.neural-legend .passive{background: #cbd5e1}.neural-toolbar{padding:10px 12px;margin-bottom:12px;display:flex;align-items:center}.neural-shell{height:calc(100vh - 230px);min-height:620px;display:grid;grid-template-columns:minmax(0,1fr) 370px;overflow:hidden;background: radial-gradient(circle at 50% 45%,var(--surface) 0,var(--surface-muted) 45%,var(--surface-subtle) 100%);border: 1px solid var(--border);border-radius:18px}.module-graph{min-width:0;height:100%;border-right: 1px solid var(--border)}.module-inspector{height:100%;overflow:auto;padding:22px;background: color-mix(in srgb, var(--surface) 94%, transparent)}.module-inspector-empty{height:100%;display:grid;place-content:center;text-align:center;color: var(--text-muted);gap:8px}.module-inspector-empty i{font-size:42px;color: var(--text-muted)}.module-inspector-empty strong{color: var(--text);font-size:18px}.module-inspector-head{display:grid;grid-template-columns:54px 1fr auto;align-items:center;gap:12px}.module-inspector-head h2{margin:0;font-size:20px}.module-inspector-head code{color: var(--text-muted)}.module-node-icon{width:54px;height:54px;border-radius:50%;display:grid;place-items:center;background: color-mix(in srgb,var(--module-color) 15%,var(--surface));color: var(--module-color);font-size:22px;border: 2px solid var(--module-color)}.module-description{margin:18px 0;color: var(--text-muted);line-height:1.6}.module-meta-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.module-meta-grid div{padding:12px;background: var(--surface-muted);border-radius:12px;display:grid;gap:2px}.module-meta-grid small{color: var(--text-muted)}.module-detail-section{margin-top:22px}.module-detail-section h3{font-size:14px;margin-bottom:10px}.module-chip-list{display:flex;flex-wrap:wrap;gap:6px}.module-chip-list span{padding:5px 9px;background: color-mix(in srgb, var(--primary) 9%, var(--surface));color: var(--info-text);border-radius:999px;font-size:12px}.module-relation-list{display:grid;gap:7px}.module-relation-list>div{display:grid;grid-template-columns:24px 1fr auto;align-items:center;padding:9px 10px;background: var(--surface-muted);border-radius:10px}.module-relation-list small{color: var(--text-muted)}.module-inspector-actions{position:sticky;bottom:-22px;margin:22px -22px -22px;padding:16px 22px;background: var(--surface);border-top: 1px solid var(--border)}
@media(max-width:991.98px){.neural-shell{grid-template-columns:1fr;height:auto}.module-graph{height:600px;border-right: 0;border-bottom: 1px solid var(--border)}.module-inspector{min-height:420px}.neural-page-head{align-items:flex-start;gap:10px}.neural-legend{flex-wrap:wrap}}
@media(max-width:767.98px){.neural-toolbar{align-items:flex-start;gap:8px;flex-wrap:wrap}.neural-toolbar .ms-auto{margin-left:0!important;width:100%}.module-graph{height:480px}.module-inspector{padding:16px}.module-inspector-actions{margin-left:-16px;margin-right:-16px;bottom:-16px}.module-inspector-head{grid-template-columns:48px 1fr}.module-inspector-head .badge{grid-column:2}.module-node-icon{width:48px;height:48px}}

/* CRM Production Ready — Sprint 01A */
.crm-page-head {
    gap: 16px;
}

.crm-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.crm-stat-card {
    min-height: 96px;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
}

.crm-stat-card span {
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
}

.crm-stat-card strong {
    color: var(--text);
    font-size: 28px;
    line-height: 1;
}

.crm-filter-card {
    padding: 18px;
}

.crm-filter-card .form-label {
    margin-bottom: 6px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
}

.crm-list-meta {
    min-height: 52px;
    padding: 12px 16px;
    color: var(--text-muted);
    font-size: 13px;
    border-bottom: 1px solid var(--border);
}

.crm-record-link {
    color: var(--text);
    font-weight: 700;
    text-decoration: none;
}

.crm-record-link:hover {
    color: var(--primary);
}

.crm-table thead th {
    color: var(--text-muted);
    background: var(--surface-muted);
    border-bottom-color: var(--border);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.crm-table tbody tr:last-child td {
    border-bottom: 0;
}

.crm-status {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.crm-status-active {
    color: var(--success-text);
    background: var(--success-surface);
}

.crm-status-prospect {
    color: var(--info-text);
    background: color-mix(in srgb, var(--primary) 18%, var(--surface));
}

.crm-status-passive {
    color: var(--text-muted);
    background: var(--surface-subtle);
}

.crm-edit-form {
    max-width: 900px;
}

.crm-form-section {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.crm-form-section-title {
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
    font-size: 14px;
    font-weight: 800;
}

.crm-form-section-title i {
    color: var(--primary);
}

.crm-detail-card {
    padding: 20px;
}

.crm-detail-card-title {
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
    font-size: 14px;
    font-weight: 800;
}

.crm-detail-card-title i {
    color: var(--primary);
}

.crm-detail-list {
    margin: 0;
}

.crm-detail-list > div {
    padding: 9px 0;
    display: grid;
    grid-template-columns: 115px minmax(0, 1fr);
    gap: 12px;
    border-bottom: 1px solid var(--border);
}

.crm-detail-list > div:last-child {
    border-bottom: 0;
}

.crm-detail-list dt {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
}

.crm-detail-list dd {
    margin: 0;
    min-width: 0;
    overflow-wrap: anywhere;
}

.crm-detail-list a {
    text-decoration: none;
}

.crm-tabs .nav-link {
    color: var(--text-muted);
    font-weight: 700;
}

.crm-tabs .nav-link.active {
    color: var(--primary);
}

.crm-notes-content {
    color: var(--text);
    line-height: 1.7;
    white-space: pre-wrap;
}

@media (max-width: 991.98px) {
    .crm-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .crm-page-head {
        flex-direction: column;
    }

    .crm-page-head > .btn,
    .crm-page-head > div:last-child {
        width: 100%;
    }

    .crm-page-head > div:last-child > .btn,
    .crm-page-head > div:last-child > .dropdown {
        flex: 1;
    }

    .crm-page-head > div:last-child .dropdown > .btn {
        width: 100%;
    }

    .crm-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .crm-stat-card {
        min-height: 84px;
        padding: 14px;
    }

    .crm-stat-card strong {
        font-size: 24px;
    }

    .crm-filter-card {
        padding: 14px;
    }

    .crm-detail-list > div {
        grid-template-columns: 1fr;
        gap: 3px;
    }
}

.validation-summary-valid {
    display: none;
}

/* Unified list/table shell and pagination — CRM Sprint 01A UI stabilization */
.app-data-card,
.app-list-card {
    overflow: visible;
    border-radius: 14px;
}

.app-data-card > .app-table-scroll,
.app-list-card > .table-responsive,
.app-list-card > .app-table-scroll {
    border-radius: 14px 14px 0 0;
}

.app-table-scroll {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

.app-data-footer,
.app-list-card > .app-list-footer {
    min-height: 58px;
    padding: 11px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    color: var(--text-muted);
    font-size: 13px;
    background: var(--surface);
    border-top: 1px solid var(--border);
    border-radius: 0 0 14px 14px;
}

.app-data-summary,
.app-list-summary {
    line-height: 1.35;
    white-space: nowrap;
}

.app-data-footer-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
}

.app-page-size-form,
.app-client-page-size {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 12px;
    white-space: nowrap;
}

.app-page-size-form .form-select,
.app-client-page-size .form-select {
    width: 76px;
    min-width: 76px;
}

.app-pagination-button {
    text-decoration: none;
}

.app-list-card > .app-list-toolbar {
    margin: 0;
    border: 0;
    border-bottom: 1px solid var(--border);
    border-radius: 14px 14px 0 0;
}

.app-dropdown-portal {
    z-index: 1095 !important;
}

.crm-status-danger {
    color: var(--danger-text);
    background: var(--danger-surface);
}

.crm-status-warning {
    color: var(--warning-text);
    background: var(--warning-surface);
}

.opportunity-board-card .opportunity-board {
    margin: 0;
    padding: 16px;
    border-radius: 14px 14px 0 0;
}

.opportunity-column-empty {
    min-height: 82px;
    display: grid;
    place-items: center;
    padding: 16px;
    color: var(--text-muted);
    font-size: 12px;
    text-align: center;
    border: 1px dashed var(--border-strong);
    border-radius: 10px;
}

@media (max-width: 767.98px) {
    .app-data-footer,
    .app-list-card > .app-list-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .app-data-footer-actions {
        width: 100%;
        margin-left: 0;
        justify-content: space-between;
    }
}

@media (max-width: 480px) {
    .app-data-footer-actions {
        align-items: flex-end;
        flex-direction: column;
    }

    .app-list-pagination {
        width: 100%;
        justify-content: flex-end;
    }
}

/* CRM Sprint 01B — 360° workspace and Projects card/list standard */
.app-view-switch {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px;
    background: var(--surface-subtle);
    border: 1px solid var(--border);
    border-radius: 10px;
}

.app-view-switch .btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    border: 0;
    border-radius: 7px;
}

.app-view-switch .btn.active {
    color: var(--text-strong);
    background: var(--surface);
    box-shadow: 0 1px 3px rgba(15, 23, 42, .12);
}

.project-data-card {
    overflow: visible;
}

.project-grid-view {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    padding: 16px;
}

.project-card-v2 {
    min-width: 0;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 13px;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.project-card-v2:hover {
    transform: translateY(-2px);
    border-color: var(--border-strong);
    box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
}

.project-card-v2-head,
.project-card-v2-actions,
.project-card-v2-meta,
.project-card-v2-badges {
    display: flex;
    align-items: center;
    gap: 10px;
}

.project-card-v2-head {
    align-items: flex-start;
    justify-content: space-between;
}

.project-card-v2-title {
    display: block;
    color: var(--text-strong);
    font-size: 16px;
    font-weight: 750;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-card-v2-title:hover,
.project-card-v2-company:hover {
    color: var(--primary);
}

.project-card-v2-owner,
.project-card-v2-meta,
.project-card-v2-company {
    color: var(--text-muted);
    font-size: 12px;
}

.project-card-v2-owner,
.project-card-v2-company,
.project-card-v2-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.project-card-v2-description {
    min-height: 42px;
    margin: 0;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-card-v2-company {
    width: fit-content;
    max-width: 100%;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-card-v2-meta {
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.project-card-v2-badges {
    flex-wrap: wrap;
}

.project-card-v2-actions {
    margin-top: auto;
}

.project-list-description {
    max-width: 340px;
}

.project-grid-empty {
    grid-column: 1 / -1;
}

.crm-workspace-hero {
    margin-bottom: 16px;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background: linear-gradient(135deg, var(--surface) 0%, var(--surface-muted) 100%);
    border: 1px solid var(--border);
    border-radius: 16px;
}

.crm-workspace-identity,
.crm-workspace-actions,
.crm-workspace-subtitle {
    display: flex;
    align-items: center;
}

.crm-workspace-identity {
    min-width: 0;
    gap: 14px;
}

.crm-workspace-avatar {
    width: 54px;
    height: 54px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    color: var(--info-text);
    background: color-mix(in srgb, var(--primary) 18%, var(--surface));
    border-radius: 15px;
    font-size: 24px;
}

.crm-workspace-avatar-person {
    color: var(--violet-text);
    background: var(--violet-surface);
}

.crm-workspace-hero h1 {
    margin: 0;
    color: var(--text-strong);
    font-size: 25px;
    letter-spacing: -.02em;
}

.crm-workspace-subtitle {
    margin-top: 6px;
    gap: 14px;
    flex-wrap: wrap;
    color: var(--text-muted);
    font-size: 13px;
}

.crm-workspace-subtitle a,
.crm-workspace-subtitle span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.crm-workspace-subtitle a {
    color: var(--text-muted);
    text-decoration: none;
}

.crm-workspace-actions {
    flex: 0 0 auto;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.crm-workspace-kpis {
    margin-bottom: 16px;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
}

.crm-contact-kpis {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.crm-workspace-kpi {
    min-width: 0;
    padding: 15px 16px;
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 13px;
}

.crm-workspace-kpi span {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 650;
}

.crm-workspace-kpi strong {
    margin-top: 7px;
    color: var(--text-strong);
    font-size: 22px;
    line-height: 1.1;
    overflow: hidden;
    text-overflow: ellipsis;
}

.crm-workspace-kpi small {
    margin-top: 6px;
    color: var(--text-muted);
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.crm-workspace-tabs-card {
    overflow: visible;
}

.crm-workspace-tabs-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    border-bottom: 1px solid var(--border);
    -webkit-overflow-scrolling: touch;
}

.crm-workspace-tabs {
    min-width: max-content;
    padding: 0 12px;
    border: 0;
    flex-wrap: nowrap;
}

.crm-workspace-tabs .nav-link {
    padding: 15px 13px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 700;
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    white-space: nowrap;
}

.crm-workspace-tabs .nav-link.active {
    color: var(--primary);
    background: transparent;
    border-bottom-color: var(--primary);
}

.crm-workspace-tab-content {
    padding: 18px;
}

.crm-info-panel {
    padding: 17px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.crm-info-panel-head,
.app-form-section-head {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.crm-info-panel-head {
    margin-bottom: 10px;
    color: var(--text-strong);
}

.crm-info-panel-head i,
.app-form-section-head > i {
    color: var(--primary);
}

.crm-primary-contact {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.crm-primary-contact a {
    color: var(--text-strong);
    font-weight: 750;
    text-decoration: none;
}

.crm-primary-contact span,
.crm-primary-contact div,
.crm-inline-empty {
    color: var(--text-muted);
    font-size: 13px;
}

.crm-tab-section-head {
    margin-bottom: 14px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
}

.crm-tab-section-head h2 {
    margin: 0;
    color: var(--text-strong);
    font-size: 17px;
}

.crm-tab-section-head p {
    margin: 4px 0 0;
    color: var(--text-muted);
    font-size: 13px;
}

.crm-related-card {
    overflow: visible;
}

.crm-related-empty {
    min-height: 190px;
    padding: 30px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 8px;
    color: var(--text-muted);
    text-align: center;
    background: var(--surface-muted);
    border: 1px dashed var(--border-strong);
    border-radius: 12px;
}

.crm-related-empty i {
    color: var(--text-muted);
    font-size: 30px;
}

.crm-related-empty strong {
    color: var(--text);
    font-size: 15px;
}

.crm-related-empty span {
    max-width: 460px;
    font-size: 13px;
}

.crm-row-overdue {
    background: var(--danger-surface);
}

.crm-timeline-card {
    overflow: hidden;
}

.crm-timeline-toolbar {
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid var(--border);
}

.crm-timeline-search {
    position: relative;
    width: min(420px, 100%);
}

.crm-timeline-search i {
    position: absolute;
    top: 50%;
    left: 12px;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.crm-timeline-search .form-control {
    padding-left: 36px;
}

.crm-timeline-page-size {
    width: 76px;
}

.crm-timeline-list {
    padding: 4px 18px;
}

.crm-timeline-item {
    position: relative;
    min-height: 72px;
    padding: 16px 0 16px 48px;
    display: flex;
    gap: 12px;
    border-bottom: 1px solid var(--border);
}

.crm-timeline-item:last-child {
    border-bottom: 0;
}

.crm-timeline-item::before {
    content: "";
    position: absolute;
    top: 45px;
    bottom: -18px;
    left: 17px;
    width: 1px;
    background: var(--surface-subtle);
}

.crm-timeline-item:last-child::before {
    display: none;
}

.crm-timeline-icon {
    position: absolute;
    top: 16px;
    left: 0;
    width: 35px;
    height: 35px;
    display: grid;
    place-items: center;
    color: var(--info-text);
    background: color-mix(in srgb, var(--primary) 9%, var(--surface));
    border: 1px solid color-mix(in srgb, var(--info-text) 35%, var(--border));
    border-radius: 50%;
}

.crm-timeline-content {
    min-width: 0;
    flex: 1;
}

.crm-timeline-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.crm-timeline-title {
    color: var(--text-strong);
    font-size: 14px;
    font-weight: 750;
    text-decoration: none;
}

.crm-timeline-content p {
    margin: 5px 0 0;
    color: var(--text-muted);
    font-size: 13px;
}

.crm-timeline-meta {
    margin-top: 7px;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    color: var(--text-muted);
    font-size: 11px;
}

.crm-timeline-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.crm-timeline-footer {
    border-radius: 0;
}

.app-form-page-head {
    margin-bottom: 14px;
}

.app-offcanvas-form {
    padding: 0;
    overflow: hidden;
}

.app-form-section {
    padding: 18px;
    border-bottom: 1px solid var(--border);
}

.app-form-section-head {
    margin-bottom: 15px;
}

.app-form-section-head > i {
    margin-top: 2px;
    font-size: 17px;
}

.app-form-section-head div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.app-form-section-head strong {
    color: var(--text-strong);
    font-size: 14px;
}

.app-form-section-head span {
    color: var(--text-muted);
    font-size: 12px;
}

.app-form-actions {
    padding: 14px 18px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    background: var(--surface-muted);
}

@media (max-width: 1399.98px) {
    .crm-workspace-kpis {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .crm-contact-kpis {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

@media (max-width: 1199.98px) {
    .project-grid-view {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .crm-contact-kpis {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .crm-workspace-hero {
        padding: 16px;
        align-items: flex-start;
        flex-direction: column;
    }

    .crm-workspace-actions {
        width: 100%;
        justify-content: stretch;
    }

    .crm-workspace-actions > .btn,
    .crm-workspace-actions > .dropdown {
        flex: 1;
    }

    .crm-workspace-actions > .dropdown > .btn {
        width: 100%;
    }

    .crm-workspace-kpis,
    .crm-contact-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .crm-workspace-tab-content {
        padding: 14px;
    }

    .crm-tab-section-head {
        align-items: stretch;
        flex-direction: column;
    }

    .crm-tab-section-head .btn {
        width: 100%;
    }

    .project-grid-view {
        grid-template-columns: 1fr;
        padding: 12px;
    }

    .app-view-switch span {
        display: none;
    }

    .crm-timeline-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .crm-timeline-search,
    .crm-timeline-page-size {
        width: 100%;
    }

    .crm-timeline-title-row {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 479.98px) {
    .crm-workspace-kpis,
    .crm-contact-kpis {
        grid-template-columns: 1fr 1fr;
    }

    .crm-workspace-avatar {
        width: 46px;
        height: 46px;
        border-radius: 12px;
        font-size: 20px;
    }

    .crm-workspace-hero h1 {
        font-size: 21px;
    }
}


/* CRM Sprint 01C - pipeline and archive consistency */
.opportunity-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .75rem;
}
.opportunity-card-head > a {
    flex: 1 1 auto;
}
.opportunity-card-head .dropdown {
    flex: 0 0 auto;
}
.crm-archive-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.125rem;
    margin-bottom: 1rem;
    border: 1px solid color-mix(in srgb, var(--warning-text) 40%, var(--border));
    border-radius: 14px;
    background: var(--warning-surface);
}
.crm-archive-banner strong { display: block; }
.crm-archive-banner p { margin: .2rem 0 0; color: var(--text-muted); }
.crm-table tr.is-archived > td { background: var(--surface-muted); }
.crm-table tr.is-archived .crm-record-link,
.crm-table tr.is-archived strong { color: var(--text-muted); }
@media (max-width: 767.98px) {
    .crm-archive-banner { align-items: stretch; flex-direction: column; }
    .crm-archive-banner .btn { width: 100%; }
}


/* Archive scope control */
.app-record-scope {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    background: var(--surface-subtle);
    border: 1px solid var(--border);
    border-radius: 12px;
}
.app-record-scope .btn {
    min-height: 34px;
    padding: 6px 12px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--text-muted);
    background: transparent;
    border: 0;
    border-radius: 9px;
    box-shadow: none;
    white-space: nowrap;
}
.app-record-scope .btn:hover {
    color: var(--text-strong);
    background: color-mix(in srgb, var(--surface) 72%, transparent);
}
.app-record-scope .btn.active {
    color: var(--text-strong);
    background: var(--surface);
    box-shadow: 0 1px 3px rgba(15,23,42,.12);
}
.app-record-scope .scope-count {
    min-width: 22px;
    padding: 2px 7px;
    display: inline-flex;
    justify-content: center;
    color: inherit;
    background: var(--surface-subtle);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}
.app-record-scope .btn.active .scope-count {
    color: var(--info-text);
    background: color-mix(in srgb, var(--primary) 18%, var(--surface));
}
.archive-filter-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.archive-filter-row .archive-filter-help {
    margin: 0;
    color: var(--text-muted);
    font-size: 12px;
}
@media (max-width: 767.98px) {
    .app-record-scope {
        width: 100%;
    }
    .app-record-scope .btn {
        flex: 1;
        justify-content: center;
    }
}

/* CRM Sprint 01D - Quotes */
.quote-value-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}
.quote-value-card {
    min-height: 112px;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: linear-gradient(145deg, var(--surface) 0%, var(--surface-muted) 100%);
    border: 1px solid var(--border);
    border-radius: 14px;
}
.quote-value-card span {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
}
.quote-value-card strong {
    margin: 5px 0 2px;
    color: var(--text-strong);
    font-size: 24px;
    line-height: 1.15;
}
.quote-value-card small { color: var(--text-muted); }
.quote-value-card.compact strong { font-size: 22px; }
.quote-list-title { max-width: 320px; }
.quote-revision-badge {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 3px 9px;
    color: var(--text-muted);
    background: var(--surface-subtle);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}
.quote-document-card {
    overflow: hidden;
    padding: 0;
}
.quote-document-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding: 28px;
    background: linear-gradient(135deg, var(--surface) 0%, var(--surface-muted) 100%);
    border-bottom: 1px solid var(--border);
}
.quote-eyebrow {
    display: block;
    margin-bottom: 6px;
    color: var(--primary);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .14em;
}
.quote-document-head h2 {
    margin: 0;
    color: var(--text-strong);
    font-size: 24px;
}
.quote-document-head p {
    margin: 5px 0 0;
    color: var(--text-muted);
}
.quote-grand-total {
    display: block;
    margin-top: 3px;
    color: var(--text-strong);
    font-size: 28px;
    line-height: 1.1;
    white-space: nowrap;
}
.quote-party-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    padding: 22px 28px;
    border-bottom: 1px solid var(--border);
}
.quote-party-grid > div {
    min-width: 0;
    padding: 14px;
    background: var(--surface-muted);
    border: 1px solid var(--border);
    border-radius: 12px;
}
.quote-party-grid span,
.quote-party-grid small {
    display: block;
    color: var(--text-muted);
    font-size: 12px;
}
.quote-party-grid a,
.quote-party-grid strong {
    display: block;
    margin: 3px 0;
    color: var(--text-strong);
    font-weight: 700;
    text-decoration: none;
}
.quote-party-grid a:hover { color: var(--primary); }
.quote-lines-table th {
    padding: 13px 16px;
    color: var(--text-muted);
    background: var(--surface-muted);
    border-bottom-color: var(--border);
    font-size: 11px;
    text-transform: uppercase;
}
.quote-lines-table td { padding: 14px 16px; }
.quote-totals-wrap {
    display: flex;
    justify-content: flex-end;
    padding: 22px 28px;
    background: var(--surface-muted);
    border-top: 1px solid var(--border);
}
.quote-totals { width: min(100%, 390px); }
.quote-totals > div {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 6px 0;
}
.quote-totals span { color: var(--text-muted); }
.quote-totals .grand {
    margin-top: 7px;
    padding-top: 13px;
    color: var(--text-strong);
    border-top: 2px solid #1e293b;
    font-size: 16px;
}
.quote-notes-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    padding: 24px 28px 28px;
    border-top: 1px solid var(--border);
}
.quote-notes-grid h6 { margin-bottom: 8px; }
.quote-notes-grid p {
    margin: 0;
    color: var(--text-muted);
    white-space: pre-wrap;
}
.quote-detail-list > div {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 12px;
    padding: 9px 0;
    border-bottom: 1px solid var(--border);
}
.quote-detail-list > div:last-child { border-bottom: 0; }
.quote-detail-list dt {
    color: var(--text-muted);
    font-weight: 500;
}
.quote-detail-list dd {
    margin: 0;
    color: var(--text-strong);
    font-weight: 600;
    text-align: right;
}
.quote-revision-list {
    display: grid;
    gap: 8px;
}
.quote-revision-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 11px 12px;
    color: inherit;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 11px;
    text-decoration: none;
}
.quote-revision-item:hover {
    color: inherit;
    border-color: #93c5fd;
    background: var(--surface-muted);
}
.quote-revision-item.active {
    border-color: #60a5fa;
    box-shadow: 0 0 0 2px rgba(37,99,235,.08);
}
.quote-revision-item > div:first-child { min-width: 0; }
.quote-revision-item strong,
.quote-revision-item span,
.quote-revision-item small { display: block; }
.quote-revision-item > div:first-child span {
    color: var(--text-muted);
    font-size: 12px;
}
.quote-revision-item .text-end small {
    margin-top: 3px;
    color: var(--text-muted);
    font-size: 11px;
}
.quote-edit-identity {
    padding: 8px 12px;
    text-align: right;
    background: var(--surface-muted);
    border: 1px solid var(--border);
    border-radius: 10px;
}
.quote-edit-identity strong,
.quote-edit-identity span { display: block; }
.quote-edit-identity span {
    color: var(--text-muted);
    font-size: 12px;
}
.quote-edit-form .quote-item {
    margin-bottom: 12px;
    padding: 14px;
    background: var(--surface-muted);
    border: 1px solid var(--border);
    border-radius: 12px;
}
.quote-item-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}
.quote-line-total {
    display: flex;
    align-items: center;
    color: var(--text-strong);
    background: var(--surface-muted);
    font-weight: 700;
}
.quote-live-summary {
    width: min(100%, 430px);
    margin: 18px 0 0 auto;
    padding: 14px 16px;
    background: var(--surface-muted);
    border: 1px solid var(--border);
    border-radius: 12px;
}
.quote-live-summary > div {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 5px 0;
}
.quote-live-summary span { color: var(--text-muted); }
.quote-live-summary .grand {
    margin-top: 5px;
    padding-top: 11px;
    border-top: 2px solid #1e293b;
    font-size: 16px;
}

@media (max-width: 991.98px) {
    .quote-value-grid { grid-template-columns: 1fr; }
    .quote-party-grid { grid-template-columns: 1fr; }
    .quote-document-head { flex-direction: column; }
    .quote-document-head .text-end { text-align: left !important; }
    .quote-notes-grid { grid-template-columns: 1fr; }
}

@media (max-width: 767.98px) {
    .quote-document-head,
    .quote-party-grid,
    .quote-totals-wrap,
    .quote-notes-grid { padding-left: 18px; padding-right: 18px; }
    .quote-grand-total { font-size: 23px; }
    .quote-detail-list > div { grid-template-columns: 1fr; gap: 2px; }
    .quote-detail-list dd { text-align: left; }
    .quote-revision-item { align-items: flex-start; }
}
.quote-currency-totals {
    display: flex;
    align-items: baseline;
    gap: 6px 14px;
    flex-wrap: wrap;
}
.quote-currency-totals strong { white-space: nowrap; }

/* CRM Sprint 01E - timeline, quick activity and mobile quality */
.app-quick-entry-note {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
}

.app-quick-entry-note > i {
    margin-top: 2px;
    font-size: 18px;
}

.app-quick-entry-note > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.app-quick-entry-note span {
    font-size: 12px;
}

.app-form-switch {
    min-height: 38px;
    padding: 8px 12px 8px 40px;
    display: flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-muted);
}

.app-form-switch .form-check-input {
    margin-left: -28px;
}

.crm-timeline-filters {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.crm-timeline-filters > .form-select {
    width: auto;
    min-width: 150px;
}

.crm-timeline-size-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--text-muted);
    font-size: 12px;
    white-space: nowrap;
}

.crm-timeline-title-wrap {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.crm-timeline-entity {
    padding: 2px 7px;
    color: var(--text-muted);
    background: var(--surface-subtle);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
}

.crm-timeline-filter-empty {
    min-height: 220px;
    padding: 32px 16px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 7px;
    color: var(--text-muted);
    text-align: center;
}

.crm-timeline-filter-empty i {
    color: var(--text-muted);
    font-size: 30px;
}

.crm-timeline-filter-empty strong {
    color: var(--text);
}

.crm-timeline-filter-empty span {
    font-size: 13px;
}

.crm-related-card .app-list-toolbar,
.crm-related-card .app-list-footer {
    background: var(--surface);
}

.crm-related-card .app-list-toolbar {
    border-bottom: 1px solid var(--border);
}

.crm-related-card .app-list-footer {
    border-top: 1px solid var(--border);
}

@media (max-width: 991.98px) {
    .crm-timeline-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .crm-timeline-search {
        width: 100%;
    }

    .crm-timeline-filters {
        justify-content: stretch;
    }

    .crm-timeline-filters > .form-select,
    .crm-timeline-size-label {
        flex: 1 1 180px;
    }

    .crm-timeline-size-label .form-select {
        flex: 1;
        width: auto;
    }
}

@media (max-width: 575.98px) {
    .crm-workspace-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .crm-workspace-actions > .btn,
    .crm-workspace-actions > .dropdown,
    .crm-workspace-actions > .dropdown > .btn {
        width: 100%;
    }

    .crm-workspace-kpis,
    .crm-contact-kpis {
        grid-template-columns: 1fr;
    }

    .crm-workspace-tabs-card {
        border-radius: 12px;
    }

    .crm-workspace-tab-content {
        padding: 12px;
    }

    .crm-timeline-list {
        padding: 4px 12px;
    }

    .crm-timeline-item {
        padding-left: 42px;
    }

    .crm-timeline-icon {
        width: 31px;
        height: 31px;
    }

    .crm-timeline-item::before {
        left: 15px;
    }

    .crm-timeline-filters {
        display: grid;
        grid-template-columns: 1fr;
    }

    .crm-timeline-filters > .form-select,
    .crm-timeline-size-label {
        width: 100%;
        min-width: 0;
    }

    .crm-related-card .app-list-toolbar-main,
    .crm-related-card .app-data-footer-actions {
        width: 100%;
    }
}

/* Sprint 02A - Project workspace and Kanban list view */
.project-workspace-head {
    align-items: flex-start;
}

.project-workspace-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    color: var(--text-muted);
}

.project-workspace-title-row {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    flex-wrap: wrap;
}

.project-workspace-title-row > div {
    min-width: 0;
    flex: 1 1 360px;
}

.project-workspace-title-row h1 {
    margin-bottom: 5px;
}

.project-workspace-title-row p {
    max-width: 760px;
    margin-bottom: 0;
}

.project-workspace-badges {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.project-company-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 9px;
    color: var(--text);
    background: var(--surface-muted);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.project-company-link:hover {
    color: var(--info-text);
    border-color: color-mix(in srgb, var(--primary) 35%, var(--border));
}

.project-workspace-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.project-health {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 10px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.project-health-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

.project-health-healthy,
.project-health-completed {
    color: var(--success-text);
    background: var(--success-surface);
    border-color: color-mix(in srgb, var(--success-text) 35%, var(--border));
}

.project-health-attention {
    color: var(--warning-text);
    background: var(--warning-surface);
    border-color: color-mix(in srgb, var(--warning-text) 40%, var(--border));
}

.project-health-risk,
.project-health-critical {
    color: var(--danger-text);
    background: var(--danger-surface);
    border-color: color-mix(in srgb, var(--danger-text) 35%, var(--border));
}

.project-health-archived {
    color: var(--text-muted);
    background: var(--surface-muted);
    border-color: var(--border);
}

.project-workspace-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}

.project-kpi-card {
    min-width: 0;
    padding: 16px 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 5px 16px rgba(15, 23, 42, 0.035);
}

.project-kpi-card span,
.project-kpi-card small {
    display: block;
    color: var(--text-muted);
}

.project-kpi-card span {
    margin-bottom: 5px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .02em;
}

.project-kpi-card strong {
    display: block;
    margin-bottom: 2px;
    color: var(--text-strong);
    font-size: 26px;
    line-height: 1.1;
}

.project-kpi-card small {
    font-size: 12px;
}

.project-kpi-card.is-danger {
    background: var(--danger-surface);
    border-color: color-mix(in srgb, var(--danger-text) 35%, var(--border));
}

.project-kpi-card.is-danger strong {
    color: var(--danger-text);
}

.project-progress-card {
    padding: 17px 18px;
    margin-bottom: 14px;
}

.project-progress-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.project-progress-head > div:first-child {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.project-progress-head span {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
}

.project-progress-head strong {
    color: var(--text-strong);
    font-size: 22px;
}

.project-progress-dates {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.project-progress-dates span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-weight: 600;
}

.project-progress-bar {
    height: 9px;
    background: var(--surface-subtle);
    border-radius: 999px;
}

.project-progress-bar .progress-bar {
    border-radius: inherit;
    background: linear-gradient(90deg, #2563eb, #0ea5e9);
}

.project-workspace-tabs-card {
    overflow: hidden;
}

.project-workspace-tabs {
    padding: 0 14px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
    flex-wrap: nowrap;
}

.project-workspace-tabs .nav-link {
    padding: 14px 13px;
    color: var(--text-muted);
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    font-weight: 700;
    white-space: nowrap;
}

.project-workspace-tabs .nav-link.active {
    color: var(--info-text);
    background: transparent;
    border-bottom-color: var(--primary);
}

.project-workspace-tab-content {
    padding: 20px;
}

.project-overview-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.project-overview-card {
    padding: 18px;
    background: var(--surface-muted);
    border: 1px solid var(--border);
    border-radius: 13px;
}

.project-overview-card h5,
.project-tab-head h5 {
    margin-bottom: 4px;
}

.project-detail-list {
    display: grid;
    gap: 0;
    margin: 14px 0 0;
}

.project-detail-list > div {
    display: grid;
    grid-template-columns: minmax(120px, .75fr) minmax(0, 1.25fr);
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.project-detail-list > div:last-child {
    border-bottom: 0;
}

.project-detail-list dt {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
}

.project-detail-list dd {
    margin: 0;
    color: var(--text-strong);
    font-size: 13px;
    font-weight: 700;
    text-align: right;
}

.project-workload-list {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.project-workload-list > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
}

.project-workload-list span {
    color: var(--text-muted);
    font-size: 13px;
}

.project-workload-list strong {
    color: var(--text-strong);
}

.project-tab-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.project-tab-head p {
    margin: 0;
    color: var(--text-muted);
    font-size: 13px;
}

.project-activity-list {
    display: grid;
    gap: 8px;
}

.project-activity-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 13px;
    color: inherit;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 11px;
    text-decoration: none;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.project-activity-item:hover {
    color: inherit;
    border-color: color-mix(in srgb, var(--primary) 35%, var(--border));
    box-shadow: 0 8px 18px rgba(37, 99, 235, .08);
    transform: translateY(-1px);
}

.project-activity-icon {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    color: var(--info-text);
    background: color-mix(in srgb, var(--primary) 9%, var(--surface));
    border-radius: 10px;
}

.project-activity-body {
    min-width: 0;
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 2px;
}

.project-activity-body strong {
    color: var(--text-strong);
    font-size: 13px;
}

.project-activity-body span {
    color: var(--text-muted);
    font-size: 12px;
}

.project-activity-body small {
    color: var(--text-muted);
    font-size: 11px;
}

.project-activity-arrow {
    color: var(--text-muted);
}

.project-team-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.project-team-card {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 14px;
    background: var(--surface-muted);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.project-team-avatar {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    color: #1e40af;
    background: color-mix(in srgb, var(--primary) 18%, var(--surface));
    border-radius: 50%;
    font-size: 13px;
    font-weight: 800;
}

.project-team-card > div {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.project-team-card strong,
.project-team-card span,
.project-team-card small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-team-card strong {
    color: var(--text-strong);
    font-size: 13px;
}

.project-team-card span {
    color: var(--text-muted);
    font-size: 12px;
}

.project-team-card small {
    margin-top: 2px;
    color: var(--primary);
    font-size: 11px;
    font-weight: 700;
}

.kanban-summary-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.kanban-summary-card {
    padding: 13px 15px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.kanban-summary-card span {
    display: block;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.kanban-summary-card strong {
    display: block;
    margin-top: 3px;
    color: var(--text-strong);
    font-size: 22px;
}

.kanban-summary-card.is-danger {
    background: var(--danger-surface);
    border-color: color-mix(in srgb, var(--danger-text) 35%, var(--border));
}

.kanban-summary-card.is-danger strong {
    color: var(--danger-text);
}

.kanban-workspace-toolbar {
    padding: 14px;
}

.kanban-view-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding-bottom: 13px;
    margin-bottom: 13px;
    border-bottom: 1px solid var(--border);
}

.kanban-filter-grid {
    display: grid;
    grid-template-columns: minmax(230px, 1.6fr) repeat(6, minmax(130px, 1fr)) auto;
    gap: 9px;
    align-items: end;
}

.kanban-filter-grid .form-label {
    margin-bottom: 5px;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
}

.kanban-filter-actions {
    display: flex;
    align-items: center;
    gap: 7px;
}

.kanban-list-description {
    max-width: 380px;
}

.kanban-list-card .app-data-footer {
    border-top: 1px solid var(--border);
}

@media (max-width: 1399.98px) {
    .kanban-filter-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .kanban-filter-search {
        grid-column: span 2;
    }
}

@media (max-width: 991.98px) {
    .project-workspace-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .project-overview-grid,
    .project-team-grid {
        grid-template-columns: 1fr;
    }

    .project-workspace-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .kanban-summary-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .kanban-filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .kanban-filter-search {
        grid-column: span 2;
    }
}

@media (max-width: 575.98px) {
    .project-workspace-title-row {
        display: block;
    }

    .project-health {
        margin-top: 10px;
    }

    .project-workspace-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .project-workspace-actions .btn {
        width: 100%;
    }

    .project-workspace-kpis,
    .kanban-summary-grid,
    .kanban-filter-grid {
        grid-template-columns: 1fr;
    }

    .kanban-filter-search {
        grid-column: auto;
    }

    .project-progress-head,
    .project-progress-dates {
        align-items: flex-start;
        flex-direction: column;
    }

    .project-workspace-tab-content {
        padding: 13px;
    }

    .project-detail-list > div {
        grid-template-columns: 1fr;
        gap: 3px;
    }

    .project-detail-list dd {
        text-align: left;
    }

    .project-tab-head .btn {
        width: 100%;
    }

    .kanban-view-row {
        align-items: stretch;
        flex-direction: column;
    }

    .kanban-view-row .app-view-switch,
    .kanban-view-row .app-record-scope {
        width: 100%;
    }

    .kanban-view-row .btn {
        flex: 1 1 0;
        justify-content: center;
    }

    .kanban-filter-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
}

/* Sprint 02C - Task collaboration quality gate */
.task-comment-composer {
    padding: 14px;
    background: var(--surface-muted);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.task-comment-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.task-comment-head > div {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.task-comment-head small {
    color: var(--text-muted);
    white-space: nowrap;
}

.task-comment-edited {
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
}

.task-comment-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.comment-edit-panel textarea {
    resize: vertical;
}

.attachment-row {
    min-width: 0;
}

.attachment-icon {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: grid;
    place-items: center;
    color: var(--primary);
    background: color-mix(in srgb, var(--primary) 9%, var(--surface));
    border-radius: 10px;
    font-size: 18px;
}

.attachment-name {
    display: block;
    max-width: 100%;
    overflow: hidden;
    color: var(--text);
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.min-w-0 {
    min-width: 0;
}

.task-label-editor {
    display: flex;
    align-items: flex-end;
    gap: 12px;
}

.task-label-editor .form-control-color {
    width: 64px;
    min-width: 64px;
    height: 38px;
}

.task-label-manager-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
}

.task-label-swatch {
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
    background: var(--label-color);
    border-radius: 50%;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--label-color) 16%, white);
}

@media (max-width: 575.98px) {
    .task-comment-head {
        display: grid;
    }

    .task-comment-head small {
        white-space: normal;
    }

    .task-label-editor {
        align-items: stretch;
        flex-direction: column;
    }

    .task-label-editor .form-control-color {
        width: 100%;
    }
}

/* Sprint 02E - Task bulk operations and dependencies */
.task-bulk-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 16px;
    background: var(--surface-muted);
    border-bottom: 1px solid var(--border);
}

.task-bulk-summary,
.task-bulk-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.task-bulk-summary {
    color: var(--text-muted);
    font-size: 13px;
}

.task-bulk-actions .form-select {
    width: auto;
    min-width: 160px;
}

.task-select-column {
    width: 44px;
    min-width: 44px;
    text-align: center;
}

.task-dependency-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 11px 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
}

.task-dependency-icon {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: grid;
    place-items: center;
    color: var(--primary);
    background: color-mix(in srgb, var(--primary) 9%, var(--surface));
    border-radius: 9px;
}

@media (max-width: 575.98px) {
    .task-bulk-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .task-bulk-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .task-bulk-actions .form-select {
        width: 100%;
        min-width: 0;
    }

    .task-dependency-row {
        align-items: flex-start;
        flex-wrap: wrap;
    }
}

/* Sprint 03A — Help Desk production workspace */
.ticket-stat-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.ticket-data-card {
    overflow: visible;
}

.ticket-board-shell {
    padding: 16px;
    overflow-x: auto;
}

.ticket-board {
    display: grid;
    grid-template-columns: repeat(6, minmax(280px, 1fr));
    gap: 14px;
    min-width: 1740px;
    padding-bottom: 4px;
}

.ticket-column {
    min-width: 0;
    background: var(--surface-muted);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: visible;
}

.ticket-column-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 13px 14px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    border-radius: 16px 16px 0 0;
    font-weight: 700;
}

.ticket-status-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: #64748b;
}

.ticket-status-dot.ticket-status-new { background: #3b82f6; }
.ticket-status-dot.ticket-status-assigned { background: #8b5cf6; }
.ticket-status-dot.ticket-status-progress { background: #f59e0b; }
.ticket-status-dot.ticket-status-waiting { background: #ec4899; }
.ticket-status-dot.ticket-status-resolved { background: #10b981; }
.ticket-status-dot.ticket-status-closed { background: #64748b; }

.ticket-column-body {
    min-height: 190px;
    padding: 10px;
    display: grid;
    align-content: start;
    gap: 10px;
}

.ticket-column-empty {
    padding: 28px 10px;
    text-align: center;
    color: var(--secondary);
    font-size: .85rem;
}

.ticket-card {
    position: relative;
    display: block;
    padding: 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 13px;
    color: inherit;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .03);
}

.ticket-card:hover {
    border-color: #93c5fd;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .07);
}

.ticket-card.is-archived {
    background: var(--surface-muted);
    opacity: .9;
}

.ticket-number-link {
    color: var(--primary);
    font-size: .82rem;
    font-weight: 800;
    text-decoration: none;
}

.ticket-card-title {
    margin-top: 5px;
    font-weight: 700;
    line-height: 1.35;
}

.ticket-card-meta {
    display: grid;
    gap: 7px;
    margin-top: 13px;
    color: var(--secondary);
    font-size: .82rem;
}

.ticket-card-meta span:not(.badge) {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ticket-card-meta .badge {
    width: max-content;
}

.ticket-sla-alert {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 12px;
    padding: 8px 10px;
    border-radius: 10px;
    background: color-mix(in srgb, var(--primary) 9%, var(--surface));
    color: var(--info-text);
    font-size: .8rem;
    font-weight: 700;
}

.ticket-sla-alert.danger {
    background: var(--danger-surface);
    color: var(--danger-text);
}

.ticket-status-badge {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 800;
    white-space: nowrap;
}

.ticket-status-badge.ticket-status-new {
    background: color-mix(in srgb, var(--primary) 18%, var(--surface));
    color: var(--info-text);
}

.ticket-status-badge.ticket-status-assigned {
    background: var(--violet-surface);
    color: var(--violet-text);
}

.ticket-status-badge.ticket-status-progress {
    background: var(--warning-surface);
    color: var(--warning-text);
}

.ticket-status-badge.ticket-status-waiting {
    background: var(--pink-surface);
    color: var(--pink-text);
}

.ticket-status-badge.ticket-status-resolved {
    background: var(--success-surface);
    color: var(--success-text);
}

.ticket-status-badge.ticket-status-closed {
    background: var(--surface-subtle);
    color: var(--text-muted);
}

.ticket-sla-text {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text);
    font-size: .84rem;
    font-weight: 600;
    white-space: nowrap;
}

.ticket-sla-text.danger {
    color: var(--danger-text);
}

.ticket-detail-head .page-head-actions form {
    margin: 0;
}

.ticket-archive-banner {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.ticket-archive-banner > i {
    font-size: 1.25rem;
}

.ticket-archive-banner div {
    display: grid;
    gap: 2px;
}

.ticket-sla-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.ticket-sla-card {
    display: grid;
    gap: 5px;
    padding: 16px 18px;
    border: 1px solid var(--border);
    border-radius: 15px;
    background: var(--surface);
}

.ticket-sla-card span {
    color: var(--secondary);
    font-size: .8rem;
    font-weight: 700;
}

.ticket-sla-card strong {
    font-size: 1rem;
}

.ticket-sla-card small {
    color: var(--secondary);
}

.ticket-sla-card.danger {
    border-color: color-mix(in srgb, var(--danger-text) 35%, var(--border));
    background: var(--danger-surface);
}

.ticket-sla-card.danger strong,
.ticket-sla-card.danger small {
    color: var(--danger-text);
}

.ticket-content-card,
.ticket-conversation-card,
.ticket-side-card {
    padding: 20px;
}

.ticket-section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 18px;
}

.ticket-section-head.compact {
    margin-bottom: 14px;
}

.ticket-section-head h2 {
    margin: 2px 0 0;
    font-size: 1.08rem;
}

.ticket-section-kicker {
    color: var(--secondary);
    font-size: .76rem;
    font-weight: 800;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.ticket-description,
.ticket-comment-body {
    white-space: pre-wrap;
    line-height: 1.65;
    color: var(--text);
}

.ticket-conversation-list {
    display: grid;
}

.ticket-comment {
    padding: 17px 0;
    border-bottom: 1px solid var(--border);
}

.ticket-comment:first-child {
    padding-top: 0;
}

.ticket-comment:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.ticket-comment.is-internal {
    margin: 8px 0;
    padding: 16px;
    border: 1px solid color-mix(in srgb, var(--warning-text) 40%, var(--border));
    border-radius: 13px;
    background: var(--warning-surface);
}

.ticket-avatar {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: var(--info-surface);
    color: #3730a3;
    font-weight: 800;
}

.ticket-comment-body {
    margin-top: 12px;
}

.ticket-detail-list {
    display: grid;
    gap: 0;
    margin: 0;
}

.ticket-detail-list > div {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.ticket-detail-list > div:last-child {
    border-bottom: 0;
}

.ticket-detail-list dt {
    color: var(--secondary);
    font-weight: 600;
}

.ticket-detail-list dd {
    margin: 0;
    text-align: right;
    font-weight: 600;
}

.ticket-status-form {
    display: grid;
    gap: 10px;
}

.ticket-file-list {
    display: grid;
    gap: 10px;
}

.ticket-file-item {
    display: grid;
    grid-template-columns: 28px 1fr;
    gap: 10px;
    align-items: start;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 11px;
}

.ticket-file-item > i {
    color: var(--primary);
    font-size: 1.1rem;
}

.ticket-file-item div {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.ticket-file-item strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ticket-file-item small,
.ticket-file-empty {
    color: var(--secondary);
}

@media (max-width: 1399.98px) {
    .ticket-stat-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 991.98px) {
    .ticket-sla-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    .ticket-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ticket-detail-head .page-head-actions,
    .ticket-detail-head .page-head-actions > *,
    .ticket-detail-head .page-head-actions form,
    .ticket-detail-head .page-head-actions button,
    .ticket-detail-head .page-head-actions a {
        width: 100%;
    }

    .ticket-content-card,
    .ticket-conversation-card,
    .ticket-side-card {
        padding: 16px;
    }

    .ticket-detail-list > div {
        grid-template-columns: 1fr;
        gap: 3px;
    }

    .ticket-detail-list dd {
        text-align: left;
    }
}


/* Sprint 03B - Help Desk collaboration */
.ticket-comment .dropdown form,
.ticket-file-actions form {
    margin: 0;
}

.ticket-upload-form {
    margin-bottom: 1rem;
}

.ticket-upload-dropzone {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .9rem;
    border: 1px dashed var(--bs-border-color);
    border-radius: .75rem;
    background: var(--bs-tertiary-bg);
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease;
}

.ticket-upload-dropzone:hover {
    border-color: var(--bs-primary);
    background: rgba(var(--bs-primary-rgb), .04);
}

.ticket-upload-dropzone > i {
    font-size: 1.5rem;
    color: var(--bs-primary);
}

.ticket-upload-dropzone span {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.ticket-upload-dropzone small {
    color: var(--bs-secondary-color);
}

.ticket-upload-dropzone input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.ticket-file-item {
    align-items: center;
}

.ticket-file-content {
    min-width: 0;
    flex: 1;
}

.ticket-file-content strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ticket-file-actions {
    display: flex;
    align-items: center;
    gap: .35rem;
    flex: 0 0 auto;
}

@media (max-width: 575.98px) {
    .ticket-file-item {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .ticket-file-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

/* Ticket file row final grid correction */
.ticket-file-item {
    grid-template-columns: 28px minmax(0, 1fr) auto;
}

.ticket-file-actions {
    grid-column: 3;
}

@media (max-width: 575.98px) {
    .ticket-file-item {
        grid-template-columns: 28px minmax(0, 1fr);
    }

    .ticket-file-actions {
        grid-column: 2;
        width: auto;
        justify-content: flex-start;
    }
}


/* Sprint 03C - Help Desk release candidate polish */
.ticket-filter-actions {
    display: flex;
    gap: .5rem;
    align-items: center;
}

.ticket-filter-actions .btn {
    flex: 1 1 auto;
    white-space: nowrap;
}

.ticket-card-activity {
    display: flex;
    align-items: center;
    gap: .4rem;
    margin-top: .75rem;
    padding-top: .65rem;
    border-top: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: .78rem;
}

.ticket-card-activity i {
    flex: 0 0 auto;
}

@media (max-width: 767.98px) {
    .ticket-filter-actions {
        width: 100%;
    }

    .ticket-filter-actions .btn {
        min-height: 42px;
    }

    .ticket-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 420px) {
    .ticket-stat-grid {
        grid-template-columns: 1fr;
    }
}

.ticket-sla-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 1399.98px) {
    .ticket-sla-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 991.98px) {
    .ticket-sla-grid {
        grid-template-columns: 1fr;
    }
}

/* Sprint 04 - Document Management */
.document-summary-grid .card {
    height: 100%;
}

.document-summary-card {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 1rem;
}

.document-summary-card strong,
.document-summary-card span {
    display: block;
}

.document-summary-card strong {
    font-size: 1.15rem;
    line-height: 1.2;
}

.document-summary-card > div > span {
    margin-top: 0.2rem;
    color: var(--bs-secondary-color);
    font-size: 0.8rem;
}

.document-summary-icon {
    display: inline-grid;
    place-items: center;
    width: 2.65rem;
    height: 2.65rem;
    flex: 0 0 2.65rem;
    border-radius: 0.8rem;
    color: var(--bs-primary);
    background: color-mix(in srgb, var(--bs-primary) 10%, transparent);
    font-size: 1.15rem;
}

.document-filter-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--bs-border-color);
}

.document-filter-footer .btn-group .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.document-bulk-toolbar {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1rem;
}

.document-data-card {
    overflow: visible;
}

.document-folder-row {
    background: color-mix(in srgb, var(--bs-warning) 3%, transparent);
}

.document-row-icon {
    display: inline-grid;
    place-items: center;
    width: 2.35rem;
    height: 2.35rem;
    flex: 0 0 2.35rem;
    border-radius: 0.7rem;
    color: var(--bs-primary);
    background: color-mix(in srgb, var(--bs-primary) 8%, transparent);
    font-size: 1.1rem;
}

.document-row-icon.folder {
    color: #d98c00;
    background: rgba(245, 158, 11, 0.1);
}

.document-description {
    max-width: 36rem;
}

.document-tag-line {
    display: inline-block;
    max-width: 34rem;
    margin-top: 0.2rem;
    color: var(--bs-primary);
    font-size: 0.76rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.document-card-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    padding: 1rem;
}

.document-folder-card-v2,
.document-file-card-v2 {
    position: relative;
    min-width: 0;
    overflow: visible;
    border: 1px solid var(--bs-border-color);
    border-radius: 0.9rem;
    background: var(--bs-body-bg);
    box-shadow: 0 0.2rem 0.9rem rgba(15, 23, 42, 0.035);
}

.document-folder-card-v2 {
    min-height: 10.5rem;
    padding: 1rem;
}

.document-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.document-card-folder-icon {
    display: inline-grid;
    place-items: center;
    width: 3.15rem;
    height: 3.15rem;
    border-radius: 0.9rem;
    color: #d98c00;
    background: rgba(245, 158, 11, 0.11);
    font-size: 1.55rem;
}

.document-card-title {
    display: block;
    max-width: 100%;
    margin-top: 1rem;
    color: var(--bs-body-color);
    font-weight: 650;
    line-height: 1.35;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.document-card-title:hover {
    color: var(--bs-primary);
}

.document-card-meta {
    margin-top: 0.35rem;
    color: var(--bs-secondary-color);
    font-size: 0.78rem;
}

.document-file-card-v2 {
    overflow: visible;
}

.document-file-card-v2 > .document-preview-surface {
    border-radius: 0.9rem 0.9rem 0 0;
}

.document-card-selection {
    position: absolute;
    z-index: 4;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.28rem;
    border-radius: 0.45rem;
    background: color-mix(in srgb, var(--bs-body-bg) 90%, transparent);
    box-shadow: 0 0.1rem 0.5rem rgba(15, 23, 42, 0.12);
}

.document-file-card-body {
    padding: 1rem;
}

.document-file-card-body .document-card-title {
    margin-top: 0;
}

.document-card-description {
    display: -webkit-box;
    margin: 0.85rem 0 0;
    color: var(--bs-secondary-color);
    font-size: 0.82rem;
    line-height: 1.45;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.document-card-footer-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem 0.9rem;
    margin-top: 0.85rem;
    color: var(--bs-secondary-color);
    font-size: 0.75rem;
}

.document-card-footer-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.document-card-empty {
    grid-column: 1 / -1;
}

.document-version-section {
    margin-top: 1.5rem;
}

.document-version-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.7rem;
}

.document-version-section-head h6,
.document-version-section-head p {
    margin: 0;
}

.document-version-section-head p {
    margin-top: 0.2rem;
    color: var(--bs-secondary-color);
    font-size: 0.8rem;
}

.document-version-list {
    overflow: hidden;
    border: 1px solid var(--bs-border-color);
    border-radius: 0.8rem;
}

.document-version-row {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 0.9rem 1rem;
    background: var(--bs-body-bg);
}

.document-version-row + .document-version-row {
    border-top: 1px solid var(--bs-border-color);
}

.document-version-badge {
    display: inline-grid;
    place-items: center;
    min-width: 2.8rem;
    min-height: 2rem;
    padding: 0.25rem 0.45rem;
    border-radius: 0.55rem;
    color: var(--bs-primary);
    background: color-mix(in srgb, var(--bs-primary) 10%, transparent);
    font-size: 0.76rem;
    font-weight: 700;
}

@media (max-width: 1199.98px) {
    .document-card-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 991.98px) {
    .document-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .document-filter-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .document-filter-footer .btn-group {
        width: 100%;
    }

    .document-filter-footer .btn-group .btn {
        flex: 1;
        justify-content: center;
    }
}

@media (max-width: 575.98px) {
    .document-card-grid {
        grid-template-columns: 1fr;
        padding: 0.75rem;
    }

    .document-bulk-toolbar {
        align-items: stretch;
    }

    .document-bulk-toolbar .me-auto {
        width: 100%;
        margin-right: 0 !important;
    }

    .document-bulk-toolbar .btn {
        flex: 1 1 calc(50% - 0.35rem);
    }

    .document-summary-card {
        align-items: flex-start;
        flex-direction: column;
    }

    .document-version-row {
        flex-wrap: wrap;
    }
}

/* Sprint 04 - document version and secure share lifecycle */
.document-share-list {
    display: grid;
    gap: .75rem;
}

.document-share-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .9rem 1rem;
    border: 1px solid var(--bs-border-color);
    border-radius: .8rem;
    background: var(--bs-body-bg);
}

.document-version-row > .d-flex:last-child {
    flex: 0 0 auto;
}

@media (max-width: 575.98px) {
    .document-share-row {
        align-items: stretch;
        flex-direction: column;
    }

    .document-share-row form,
    .document-share-row .btn {
        width: 100%;
    }
}

.document-card-linked {
    display: flex;
    align-items: center;
    gap: .4rem;
    margin-top: .65rem;
    color: var(--bs-secondary-color);
    font-size: .82rem;
    min-width: 0;
}

.document-card-linked span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Sprint 08 - unified error and status pages */
.error-page {
    min-height: calc(100vh - 4rem);
    display: grid;
    place-items: center;
    padding: 2rem 1rem;
}

.error-page-card {
    width: min(100%, 640px);
    padding: clamp(1.5rem, 5vw, 3rem);
    border: 1px solid var(--bs-border-color);
    border-radius: 1.25rem;
    background: var(--bs-body-bg);
    box-shadow: 0 1.25rem 3rem rgba(15, 23, 42, .08);
    text-align: center;
}

.error-page-code {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 4.5rem;
    min-height: 2.25rem;
    margin-bottom: 1rem;
    padding: .35rem .8rem;
    border-radius: 999px;
    background: var(--bs-tertiary-bg);
    color: var(--bs-secondary-color);
    font-weight: 700;
    letter-spacing: .08em;
}

.error-page-card h1 {
    margin-bottom: .75rem;
    font-size: clamp(1.6rem, 4vw, 2.25rem);
}

.error-page-card > p {
    margin: 0 auto 1.5rem;
    max-width: 52ch;
    color: var(--bs-secondary-color);
}

.error-page-correlation {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .45rem .75rem;
    margin-bottom: 1.5rem;
    padding: .75rem 1rem;
    border-radius: .75rem;
    background: var(--bs-tertiary-bg);
    font-size: .875rem;
}

.error-page-correlation code {
    overflow-wrap: anywhere;
}

.email-preview-frame {
    width: 100%;
    min-height: 420px;
    border: 0;
    background: var(--surface);
}
