/* ==========================================================================
   PressHane Design Tokens — Codebase Framework Theme
   ========================================================================== */
:root {
    /* Brand accent (Codebase primary blue) */
    --papyrus-accent: #5c80d1;
    --papyrus-accent-subtle: rgba(92, 128, 209, 0.10);

    /* Light mode (default) — Codebase defaults */
    --papyrus-skeleton-base: #e4e7ed;
    --papyrus-skeleton-highlight: #f0f2f5;
    --papyrus-bg: #f0f2f5;
    --papyrus-text: #495057;
    --papyrus-text-muted: #6c757d;
    --papyrus-block-bg: #ffffff;
    --papyrus-block-header-bg: #f8f9fa;
    --papyrus-border: #e4e7ed;
    --papyrus-input-bg: #ffffff;
    --papyrus-input-border: #d4d7dd;
    --papyrus-block-radius: 0.5rem;
    --papyrus-block-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    --papyrus-block-shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.10);
    --papyrus-block-header-padding: 0.75rem 1.25rem;
    --papyrus-block-content-padding: 1.25rem;
    --papyrus-table-text: #495057;
    --papyrus-nav-item-bg: transparent;
    --papyrus-nav-link-color: #495057;
    --papyrus-modal-text: #495057;
    --papyrus-disabled-bg: #f0f2f5;
    --papyrus-connected-bg: #f0f2f5;
    --papyrus-info-color: #6c757d;
    --papyrus-hover-bg: rgba(0, 0, 0, 0.03);
    --papyrus-save-hint-bg: rgba(255, 255, 255, 0.96);
    --papyrus-save-hint-border: rgba(0, 0, 0, 0.08);

    /* Pagination — let Codebase handle active colors via --bs-pagination-active-bg (#0284c7) */

    /* Sidebar — clean light sidebar */
    --papyrus-sidebar-bg: #ffffff;
    --papyrus-sidebar-border: #e4e7ed;
    --papyrus-sidebar-text: #495057;
    --papyrus-sidebar-text-muted: #9ca3af;
    --papyrus-sidebar-hover: rgba(0, 0, 0, 0.04);
    --papyrus-sidebar-active: rgba(100, 160, 255, 0.10);
    --papyrus-sidebar-active-text: #3b82f6;
    --papyrus-sidebar-heading: #9ca3af;

    /* Header — clean, separated from content */
    --papyrus-header-bg: #ffffff;
    --papyrus-header-border: #e4e7ed;
    --papyrus-header-btn-hover: rgba(0, 0, 0, 0.05);

}

/* Dark mode — Codebase framework dark grays */
html.dark {
    --papyrus-accent: #7b9fe0;
    --papyrus-accent-subtle: rgba(123, 159, 224, 0.10);

    --papyrus-skeleton-base: #3d4450;
    --papyrus-skeleton-highlight: #454c53;
    --papyrus-bg: #1a1d23;
    --papyrus-text: #cbd2dd;
    --papyrus-text-muted: #8b95a5;
    --papyrus-block-bg: #2b3136;
    --papyrus-block-header-bg: #454c53;
    --papyrus-border: #3d4450;
    --papyrus-input-bg: #353b42;
    --papyrus-input-border: #4a5060;
    --papyrus-block-shadow: 0 1px 2px rgba(0, 0, 0, 0.2), 0 1px 4px rgba(0, 0, 0, 0.12);
    --papyrus-block-shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.3);
    --papyrus-table-text: #cbd2dd;
    --papyrus-nav-item-bg: transparent;
    --papyrus-nav-link-color: #cbd2dd;
    --papyrus-modal-text: #cbd2dd;
    --papyrus-disabled-bg: #1a1d23;
    --papyrus-connected-bg: #2b3136;
    --papyrus-info-color: #8b95a5;
    --papyrus-hover-bg: rgba(255, 255, 255, 0.04);
    --papyrus-save-hint-bg: rgba(43, 49, 54, 0.96);
    --papyrus-save-hint-border: rgba(255, 255, 255, 0.06);

    /* Sidebar — Codebase sidebar-dark */
    --papyrus-sidebar-bg: #2b3136;
    --papyrus-sidebar-border: #3d4450;
    --papyrus-sidebar-text: #cbd2dd;
    --papyrus-sidebar-text-muted: #6c7787;
    --papyrus-sidebar-hover: rgba(255, 255, 255, 0.05);
    --papyrus-sidebar-active: rgba(100, 160, 255, 0.10);
    --papyrus-sidebar-active-text: #64a0ff;
    --papyrus-sidebar-heading: #5c6370;

    /* Header — match sidebar */
    --papyrus-header-bg: #2b3136;
    --papyrus-header-border: #3d4450;
    --papyrus-header-btn-hover: rgba(255, 255, 255, 0.06);
}
/* ==========================================================================
   Theme Transitions — Smooth theme switching (0.3s)
   Only key structural/layout elements are listed to keep paint cost low.
   Child text/border colors inherit the transition timing from parents.
   ========================================================================== */

html,
html body,
#page-container,
#main-container,
#page-header,
#sidebar,
#sidebar .sidebar-content,
.block,
.block-content,
.block-header,
.block-header-default,
.modal-content,
.nav-item,
.nav-link,
.form-control,
.form-select,
.dropdown-menu,
.card,
.card-header,
.card-body,
.list-group-item,
.bg-body-light,
.bg-body-extra-light,
.dataTables_wrapper .page-link {
    transition:
        background-color 0.3s ease,
        color 0.3s ease,
        border-color 0.3s ease,
        box-shadow 0.3s ease;
}

/* ---------------------------------------------------------------------------
   Dark-mode toggle icon — scale + rotate on swap for visual feedback
   --------------------------------------------------------------------------- */
.dark-mode-toggle .fa {
    transition:
        transform 0.3s ease,
        opacity 0.3s ease,
        color 0.3s ease;
}

/* Applied briefly via JS to animate the icon swap */
.dark-mode-toggle .fa.theme-icon-spin {
    transform: rotate(180deg) scale(0);
    opacity: 0;
}
/* ==========================================================================
   Typography & Text Utilities
   ========================================================================== */

/* Error page hero code sizing */
.error-code {
    font-size: 8rem;
}

/* Separator utility */
.separator {
    display: flex;
    align-items: center;
    text-align: center;
}

.separator::before,
.separator::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #000;
}

.separator:not(:empty)::before {
    margin-right: 0.25em;
}

.separator:not(:empty)::after {
    margin-left: 0.25em;
}

/* Separator line per theme */
html:not(.dark) .separator::before,
html:not(.dark) .separator::after {
    border-bottom-color: var(--papyrus-border);
}

html.dark .separator::before,
html.dark .separator::after {
    border-bottom-color: var(--papyrus-border);
}

/* Text colors */
.text-muted {
    color: var(--papyrus-text-muted) !important;
}

/* Breadcrumb */
.breadcrumb-item + .breadcrumb-item::before {
    color: var(--papyrus-text-muted);
}

.breadcrumb-item.active {
    color: var(--papyrus-text-muted);
}

/* Content area text color */
#main-container .content {
    color: var(--papyrus-text);
}

/* content-heading text color */
html.dark .content-heading {
    color: var(--papyrus-text);
    border-bottom-color: var(--papyrus-border);
}

/* Form label */
.form-label {
    white-space: nowrap;
}
/* ==========================================================================
   Form UX — Validation, Input Formatting, Unsaved Changes
   ========================================================================== */

/* Input Formatters - Standardized Input Styling */

/* IBAN Input - Uppercase, Monospace for better readability */
.js-format-iban {
    text-transform: uppercase;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    letter-spacing: 0.5px;
}

/* Account Number Input - Monospace for grouping visibility */
.js-format-account {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    letter-spacing: 0.5px;
}

/* Phone Input - Consistent styling */
.js-format-phone {
    font-family: inherit;
    letter-spacing: 0.3px;
}

/* Email Input - Lowercase */
.js-format-email {
    text-transform: lowercase;
}

/* Common monospace styling for financial inputs */
.input-monospace {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    letter-spacing: 0.5px;
}

/* Inline validation styling */
.papyrus-field--error .form-control,
.papyrus-field--error .form-select {
    border-color: var(--bs-danger) !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.15);
}

.papyrus-field--error .form-label {
    color: var(--bs-danger);
}

.papyrus-inline-error {
    color: var(--bs-danger);
    font-size: 0.8em;
    margin-top: 0.25rem;
    display: block;
    animation: papyrus-error-in 0.25s ease;
}

@keyframes papyrus-error-in {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Unsaved changes indicator */
.papyrus-form--dirty .block-header {
    border-left: 3px solid var(--bs-warning);
}

.papyrus-unsaved-dot {
    display: inline-block;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background-color: var(--bs-warning);
    margin-left: 0.5rem;
    animation: papyrus-pulse 1.5s ease infinite;
}

@keyframes papyrus-pulse {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.4;
    }
}

/* Ctrl+S save toast notification */
.papyrus-save-hint {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    background: var(--papyrus-save-hint-bg);
    color: var(--papyrus-text);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.8rem;
    z-index: 9999;
    pointer-events: none;
    animation: papyrus-hint-in 0.3s ease;
    border: 1px solid var(--papyrus-save-hint-border);
}

.papyrus-save-hint kbd {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
    padding: 0.15em 0.4em;
    font-size: 0.85em;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

@keyframes papyrus-hint-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Validation error messages */
small.text-danger[id$='-error'],
.invalid-feedback.d-block {
    font-size: 0.9em;
    margin-top: 5px;
    display: block;
}

/* Disabled form control */
.form-control:disabled {
    background-color: var(--papyrus-disabled-bg) !important;
}

/* Disabled button */
.btn-disabled {
    color: var(--bs-btn-disabled-color);
    pointer-events: none;
    background-color: var(--bs-btn-disabled-bg);
    border-color: var(--bs-btn-disabled-border-color);
    opacity: var(--bs-btn-disabled-opacity);
}
/* ==========================================================================
   NProgress — Progress bar overrides (from App.vue)
   ========================================================================== */
#nprogress {
    pointer-events: none;
}

#nprogress .bar {
    background: #64a0ff;
    position: fixed;
    z-index: 99999;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
}

#nprogress .peg {
    display: block;
    position: absolute;
    right: 0;
    width: 100px;
    height: 100%;
    box-shadow:
        0 0 10px #64a0ff,
        0 0 5px #64a0ff;
    opacity: 1;
    transform: rotate(3deg) translate(0px, -4px);
}

/* Hide NProgress spinner — we have our own Preloader */
#nprogress .spinner {
    display: none;
}

/* ==========================================================================
   Route Transitions (from App.vue / MainLayout.vue)
   ========================================================================== */

/* Route fade transition */
.fade-enter-active {
    transition: opacity 0.2s ease;
}

.fade-leave-active {
    transition: opacity 0.15s ease;
}

.fade-enter-from,
.fade-leave-to {
    opacity: 0;
}

/* MainLayout page transition */
.page-enter-active,
.page-leave-active {
    transition: opacity 0.15s ease;
}

.page-enter-from,
.page-leave-to {
    opacity: 0;
}

/* Skeleton to content transition */
.skeleton-fade-enter-active {
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.skeleton-fade-leave-active {
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: absolute;
    width: 100%;
}

.skeleton-fade-enter-from,
.skeleton-fade-leave-to {
    opacity: 0;
}

/* Content appear after skeleton */
.content-reveal-enter-active {
    transition:
        opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1) 0.05s,
        transform 0.4s cubic-bezier(0.4, 0, 0.2, 1) 0.05s;
}

.content-reveal-enter-from {
    opacity: 0;
    transform: translateY(6px);
}

/* ==========================================================================
   Common Utilities — cursor-pointer, transition-transform
   ========================================================================== */
.cursor-pointer {
    cursor: pointer;
}

.transition-transform {
    transition: transform 0.2s;
}

.user-select-none {
    user-select: none;
}
/* ==========================================================================
   Block Design System — Consistent styling for all .block elements
   ========================================================================== */

/* Base block: consistent radius, shadow, overflow */
.block {
    border-radius: var(--papyrus-block-radius) !important;
    box-shadow: var(--papyrus-block-shadow);
    overflow: hidden;
    background-color: var(--papyrus-block-bg);
    margin-bottom: 1.25rem;
}

/* Nested blocks: no double shadow */
.block .block {
    box-shadow: none;
}

/* Block header: consistent height, padding, font */
.block-header {
    padding: var(--papyrus-block-header-padding);
    min-height: 48px;
    font-size: 0.875rem;
}

.block-header .block-title {
    font-size: 0.875rem;
    font-weight: 600;
}

/* Block content: consistent padding */
.block-content {
    padding: var(--papyrus-block-content-padding);
}

/* Block content with table inside: remove extra padding for flush look */
.block-content > .table-responsive,
.block-content > .papyrus-table-wrap {
    margin: calc(var(--papyrus-block-content-padding) * -1);
    margin-top: 0;
    width: calc(100% + var(--papyrus-block-content-padding) * 2);
}

/* block-content-full already has its own padding scheme — preserve it */
.block-content.block-content-full {
    padding: var(--papyrus-block-content-padding);
}

/* Stat cards / block grids: equal height rows */
.row > [class*='col'] > .block {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.row > [class*='col'] > .block > .block-content {
    flex: 1;
}

/* Bordered blocks inherit radius */
.block.block-bordered {
    border: 1px solid var(--papyrus-border, rgba(255, 255, 255, 0.08));
}

/* Override Codebase's .block-rounded (0.75rem) to use our token */
.block.block-rounded {
    border-radius: var(--papyrus-block-radius) !important;
}

.block.block-rounded > .block-header,
.block.block-rounded > .nav-tabs {
    border-top-right-radius: var(--papyrus-block-radius);
    border-top-left-radius: var(--papyrus-block-radius);
}

.block.block-rounded > .block-header:last-child,
.block.block-rounded > .nav-tabs:last-child {
    border-bottom-right-radius: var(--papyrus-block-radius);
    border-bottom-left-radius: var(--papyrus-block-radius);
}

.block.block-rounded > .block-content:first-child {
    border-top-right-radius: var(--papyrus-block-radius);
    border-top-left-radius: var(--papyrus-block-radius);
}

.block.block-rounded > .block-content:last-child {
    border-bottom-right-radius: var(--papyrus-block-radius);
    border-bottom-left-radius: var(--papyrus-block-radius);
}

/* Fullscreen blocks: remove radius */
.block.block-mode-fullscreen {
    border-radius: 0 !important;
}

/* Override Codebase framework page-container background */
#page-container {
    background-color: var(--papyrus-bg);
}

/* Fix iOS Safari white background on main-container */
#main-container {
    background-color: var(--papyrus-bg);
    -webkit-overflow-scrolling: touch;
    min-height: 100vh;
}

/* Fix iOS viewport height */
@supports (-webkit-touch-callout: none) {
    #page-container {
        min-height: -webkit-fill-available;
    }
    #main-container {
        min-height: -webkit-fill-available;
    }
}

/* Block content theme colors */
.block-content {
    background-color: var(--papyrus-block-bg);
    color: var(--papyrus-text);
}

.block-header {
    background-color: var(--papyrus-block-header-bg) !important;
    color: var(--papyrus-text);
}

/* Block options styling */
.block-options .block-options-item,
.block-options .dropdown {
    display: contents !important;
}

/* Bordered block adjustments per theme */
html:not(.dark) .block.block-bordered {
    border: 1px solid var(--papyrus-border);
}

html.dark .block.block-bordered {
    border: 1px solid var(--papyrus-border);
}

/* Block dark mode — override Codebase framework defaults */
html.dark .block {
    background-color: var(--papyrus-block-bg) !important;
    border-color: var(--papyrus-border) !important;
}

html.dark .block-header-default {
    background-color: var(--papyrus-block-header-bg) !important;
    border-bottom-color: var(--papyrus-border) !important;
    color: var(--papyrus-text) !important;
}

html.dark .block-content {
    color: var(--papyrus-text) !important;
}

html.dark .block-title {
    color: var(--papyrus-text) !important;
}

/* Card theming */
.card {
    background-color: var(--papyrus-block-bg);
    border-color: var(--papyrus-border);
    color: var(--papyrus-text);
}

.card-header {
    background-color: var(--papyrus-block-header-bg);
    border-bottom-color: var(--papyrus-border);
    color: var(--papyrus-text);
}

.card-body {
    color: var(--papyrus-text);
}

/* List group */
.list-group-item {
    background-color: var(--papyrus-block-bg);
    border-color: var(--papyrus-border);
    color: var(--papyrus-text);
}

/* Page header user dropdown */
.bg-body-light {
    background-color: var(--papyrus-block-header-bg) !important;
}

.bg-body-extra-light {
    background-color: var(--papyrus-block-bg) !important;
}

/* Skeleton container needs relative for absolute leave transition */
.papyrus-table-wrap {
    position: relative;
    overflow: hidden;
}
/* ==========================================================================
   DataTable UX & Table Styling
   ========================================================================== */

table {
    display: table;
    width: 100%;
    color: var(--papyrus-table-text) !important;
}

td {
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

li {
    overflow: hidden;
    text-overflow: ellipsis;
}

.table-footer {
    table-layout: fixed;
    width: 100%;
}

/* Row hover effect */
.table-striped > tbody > tr {
    transition: background-color 0.15s ease;
}

.table-striped > tbody > tr:hover {
    background-color: var(--papyrus-hover-bg) !important;
}

/* DataTable skeleton transition smoothing */
.skeleton-fade-enter-active,
.skeleton-fade-leave-active {
    transition: opacity 0.3s ease;
}

.skeleton-fade-enter-from,
.skeleton-fade-leave-to {
    opacity: 0;
}

/* Consistent status badge styling for DataTable HTML-rendered badges */
.table .badge {
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* DataTable controls — horizontal padding so controls aren't flush against block edges.
   The .table-responsive inside .block-content gets negative margins (blocks.css) to make
   tables edge-to-edge, but DataTable control rows (length, filter, info, pagination)
   need padding so they don't sit flush against block edges. */
.block-content .dataTables_length,
.block-content .dataTables_filter {
    padding-top: 0.75rem;
}

.block-content .dataTables_length {
    padding-left: 1.25rem;
}

.block-content .dataTables_filter {
    padding-right: 1.25rem;
}

.block-content .dataTables_info {
    padding-left: 1.25rem;
}

.block-content .dataTables_paginate {
    padding-right: 1.25rem;
    padding-bottom: 0.75rem;
}

/* DataTable footer — improve pagination UX at all sizes */
.dataTables_wrapper .dataTables_paginate .pagination {
    flex-wrap: wrap;
    gap: 2px;
}

.dataTables_wrapper .dataTables_info {
    padding-top: 0.75rem;
    font-size: 0.85rem;
    color: var(--papyrus-info-color);
}

/* Pagination colors: Codebase handles .page-link, .page-item.active, .page-item.disabled
   natively via --bs-pagination-active-bg (#0284c7) and dark mode overrides.
   No custom color overrides needed. */

/* DataTable footer responsive — mobile */
@media (max-width: 767.98px) {
    .dataTables_wrapper .dataTables_info {
        text-align: center;
        padding-bottom: 0.5rem;
        font-size: 0.8rem;
    }

    .dataTables_wrapper .dataTables_paginate {
        text-align: center;
        padding-top: 0;
    }

    .dataTables_wrapper .dataTables_paginate .pagination {
        justify-content: center;
        flex-wrap: wrap;
        gap: 2px;
    }

    .dataTables_wrapper .dataTables_paginate .page-link {
        padding: 0.35rem 0.6rem;
        font-size: 0.8rem;
    }

    .dataTables_wrapper .dataTables_length {
        text-align: center;
        margin-bottom: 0.5rem;
    }

    .dataTables_wrapper .dataTables_length select {
        display: inline-block;
        width: auto;
    }

    .dataTables_wrapper .dataTables_filter {
        text-align: center;
    }

    .dataTables_wrapper .dataTables_filter input {
        width: 100%;
        max-width: none;
    }

    /* On mobile, symmetric padding for DataTable controls */
    .block-content .dataTables_length,
    .block-content .dataTables_filter {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .block-content .dataTables_info {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .block-content .dataTables_paginate {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

@media (max-width: 575.98px) {
    .dataTables_wrapper .dataTables_paginate .pagination {
        font-size: 0.75rem;
    }

    .dataTables_wrapper .dataTables_paginate .page-link {
        padding: 0.25rem 0.5rem;
    }
}

/* Table header */
.table > thead > tr > th {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--papyrus-text-muted);
    border-bottom: 1px solid var(--papyrus-border) !important;
}

html.dark .table > thead > tr > th {
    color: var(--papyrus-text-muted);
    border-bottom-color: var(--papyrus-border) !important;
}

/* Table borders */
.table > :not(caption) > * > * {
    border-bottom-color: var(--papyrus-border);
}

/* Table striped rows in dark mode */
html.dark .table-striped > tbody > tr:nth-of-type(odd) > * {
    --bs-table-bg-type: rgba(255, 255, 255, 0.02);
    color: var(--papyrus-table-text);
}

html.dark .table-striped > tbody > tr:nth-of-type(even) > * {
    color: var(--papyrus-table-text);
}

html.dark .table-hover > tbody > tr:hover > * {
    --bs-table-bg-state: rgba(255, 255, 255, 0.04);
    color: var(--papyrus-table-text);
}

/* DataTable search/length inputs */
html.dark .dataTables_wrapper .dataTables_filter input,
html.dark .dataTables_wrapper .dataTables_length select {
    background-color: var(--papyrus-input-bg);
    color: var(--papyrus-text);
    border-color: var(--papyrus-input-border);
}

/* Mobile tfoot responsive */
@media screen and (max-width: 600px) {
    tfoot {
        display: flex;
        flex-direction: column;
    }

    tfoot tr {
        display: flex;
        flex-direction: row;
        width: 100%;
        box-sizing: border-box;
    }

    tfoot th[data-bs-toggle],
    tfoot td {
        flex: 1;
        padding: 5px;
        text-align: left;
        border: 1px solid var(--papyrus-border);
    }
}
/* ==========================================================================
   Sidebar — Elegant, Subtle Hierarchy
   Light mode: Codebase sidebar-dark class handles dark sidebar natively
               (bg #31373d, text #e4e7ed). We only enhance submenu styling.
   Dark mode:  Override sidebar bg to match our design token (#2b3136).
   ========================================================================== */

/* Sidebar user section — subtle separator (sidebar is always dark-bg) */
#sidebar .content-side-user {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Sidebar logo area — subtle separator */
#sidebar .content-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* ---------------------------------------------------------------------------
   Light mode: sidebar-dark native enhancements
   Codebase sidebar-dark bg is #31373d with light text — use light colors only
   --------------------------------------------------------------------------- */
html:not(.dark) .sidebar-dark #sidebar .nav-main-submenu .nav-main-link {
    color: rgba(228, 231, 237, 0.5) !important;
    font-size: 0.8125rem;
    background-color: transparent !important;
}

html:not(.dark) .sidebar-dark #sidebar .nav-main-submenu .nav-main-link:hover {
    color: #fff !important;
}

html:not(.dark) .sidebar-dark #sidebar .nav-main-submenu .nav-main-link.active {
    color: #fff !important;
    background-color: transparent !important;
}

/* Sidebar close button in light mode — needs light color on dark bg */
html:not(.dark) .sidebar-dark #sidebar .btn-alt-danger {
    color: rgba(228, 231, 237, 0.75);
    background-color: transparent;
    border-color: transparent;
}

/* Sidebar mini-mode brand text in light mode */
html:not(.dark) .sidebar-dark #sidebar .smini-visible .text-primary {
    color: var(--papyrus-accent) !important;
}

/* ---------------------------------------------------------------------------
   Dark mode: Override sidebar to our dark design tokens
   --------------------------------------------------------------------------- */
html.dark #sidebar {
    background-color: var(--papyrus-sidebar-bg) !important;
    border-right: 1px solid var(--papyrus-sidebar-border) !important;
}

html.dark #sidebar .sidebar-content {
    background-color: var(--papyrus-sidebar-bg) !important;
}

html.dark #sidebar .nav-main-link {
    color: var(--papyrus-sidebar-text) !important;
    border-radius: 0.375rem;
    margin: 1px 0.5rem;
    padding: 0.5rem 0.75rem;
    transition: all 0.15s ease;
}

html.dark #sidebar .nav-main-link:hover {
    background-color: var(--papyrus-sidebar-hover) !important;
    color: #fff !important;
}

html.dark #sidebar .nav-main-link.active,
html.dark #sidebar .nav-main-item.open > .nav-main-link {
    background-color: var(--papyrus-sidebar-active) !important;
    color: var(--papyrus-sidebar-active-text) !important;
}

html.dark #sidebar .nav-main-link-icon {
    color: var(--papyrus-sidebar-text-muted) !important;
}

html.dark #sidebar .nav-main-link.active .nav-main-link-icon,
html.dark #sidebar .nav-main-item.open > .nav-main-link .nav-main-link-icon {
    color: var(--papyrus-sidebar-active-text) !important;
}

html.dark #sidebar .nav-main-heading {
    color: var(--papyrus-sidebar-heading) !important;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 1.25rem 0.75rem 0.375rem;
    margin: 0 0.5rem;
}

html.dark #sidebar .nav-main-submenu .nav-main-link {
    color: var(--papyrus-sidebar-text-muted) !important;
    font-size: 0.8125rem;
}

html.dark #sidebar .nav-main-submenu .nav-main-link:hover {
    color: #fff !important;
}

html.dark #sidebar .nav-main-submenu .nav-main-link.active {
    color: var(--papyrus-sidebar-active-text) !important;
    background-color: transparent !important;
}

/* ---------------------------------------------------------------------------
   Submenu padding — reduce default Codebase 3.375rem to 2rem
   --------------------------------------------------------------------------- */
#sidebar .nav-main-submenu {
    padding-left: 2rem !important;
}

/* Submenu item icons — smaller, muted */
#sidebar .nav-main-submenu .nav-main-link-icon {
    font-size: 0.75rem;
    width: 1.25rem;
    min-width: 1.25rem;
    text-align: center;
    margin-right: 0.5rem;
    opacity: 0.6;
    transition: opacity 0.15s ease;
}

#sidebar .nav-main-submenu .nav-main-link:hover .nav-main-link-icon,
#sidebar .nav-main-submenu .nav-main-link.active .nav-main-link-icon {
    opacity: 1;
}

/* Native sidebar scrolling — replaces SimpleBar.
   SimpleBar was corrupting Vue's VDOM by moving <router-link> elements into
   wrapper divs, breaking URL updates on sidebar navigation clicks.
   The Codebase framework's side-scroll class sets overflow-y: visible on this
   element (expecting SimpleBar to handle scrolling), so we override it here.
   content-header is 4.25rem; remaining space scrolls natively. */
#sidebar .js-sidebar-scroll {
    overflow-y: auto !important;
    height: calc(100vh - 4.25rem);
    scrollbar-width: thin;
    scrollbar-color: var(--papyrus-border) transparent;
}

#sidebar .js-sidebar-scroll::-webkit-scrollbar {
    width: 4px;
}

#sidebar .js-sidebar-scroll::-webkit-scrollbar-track {
    background: transparent;
}

#sidebar .js-sidebar-scroll::-webkit-scrollbar-thumb {
    background-color: var(--papyrus-border);
    border-radius: 4px;
}

/* Sidebar user profile area */
.smini-hidden .list-inline {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.smini-hidden .link-fx {
    word-wrap: break-word;
    white-space: normal;
    max-width: 100%;
    text-align: center;
    overflow-wrap: break-word;
}
/* ==========================================================================
   Header — Professional, Clean Separation
   Light mode: Codebase page-header-dark class handles dark header natively
               (bg #31373d, text #cbd2dd). Buttons get light styling via framework.
   Dark mode:  Override header bg to our design token (#2b3136).
   ========================================================================== */

/* ---------------------------------------------------------------------------
   Dark mode: Override header to our dark design tokens
   --------------------------------------------------------------------------- */
html.dark #page-header {
    background-color: var(--papyrus-header-bg) !important;
    border-bottom: 1px solid var(--papyrus-header-border) !important;
}

html.dark #page-header .btn-alt-secondary {
    background-color: transparent;
    border-color: transparent;
    color: var(--papyrus-sidebar-text-muted);
}

html.dark #page-header .btn-alt-secondary:hover {
    background-color: var(--papyrus-header-btn-hover);
    color: #fff;
}

/* Search Overlay — dark mode only */
html.dark #page-header-search {
    background-color: var(--papyrus-header-bg) !important;
}

/* ---------------------------------------------------------------------------
   Dark Mode Toggle Button — appears in header (always dark bg)
   Must use colors that work on dark header bg in BOTH light and dark modes.
   --------------------------------------------------------------------------- */
.dark-mode-toggle {
    position: relative;
    width: 35px;
    height: 35px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    border-radius: 0.375rem;
    margin-right: 8px;
    transition: background-color 0.3s ease;
}

/* Hover bg: light-tint on dark header bg (works in both modes) */
.dark-mode-toggle:hover {
    background-color: rgba(255, 255, 255, 0.08) !important;
}

.dark-mode-toggle .fa {
    font-size: 1rem;
    /* transition is defined in base/transitions.css */
}

.dark-mode-toggle .fa-sun {
    color: #f59e0b;
}

.dark-mode-toggle .fa-moon {
    color: #8b8cf8;
}

/* System icon: light muted color (visible on dark header bg in both modes) */
.dark-mode-toggle .fa-desktop {
    color: rgba(228, 231, 237, 0.65);
}
/* ==========================================================================
   Modal Overrides
   ========================================================================== */

.modal-content,
.modal-footer {
    border-bottom-left-radius: 0.75rem;
    border-bottom-right-radius: 0.75rem;
}

.modal-content {
    color: var(--papyrus-modal-text);
    background-color: var(--papyrus-block-bg);
    border-color: var(--papyrus-border);
}

.modal-header {
    border-bottom-color: var(--papyrus-border);
    color: var(--papyrus-text);
}

.modal-footer {
    border-top-color: var(--papyrus-border);
}

/* SweetAlert2 dark mode */
html.dark .swal2-popup {
    background-color: var(--papyrus-block-bg);
    color: var(--papyrus-text);
}

html.dark .swal2-title {
    color: var(--papyrus-text);
}

html.dark .swal2-html-container {
    color: var(--papyrus-text-muted);
}

html.dark .swal2-input,
html.dark .swal2-textarea {
    background-color: var(--papyrus-input-bg);
    color: var(--papyrus-text);
    border-color: var(--papyrus-input-border);
}

/* ==========================================================================
   ForcePasswordChangeModal
   ========================================================================== */

.force-pw-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1c2e 0%, #16213e 40%, #0f3460 70%, #1a1a2e 100%);
    padding: 1rem;
    overflow: hidden;
}

.force-pw-overlay::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(ellipse at 30% 20%, rgba(100, 160, 255, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(100, 160, 255, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.force-pw-container {
    width: 100%;
    max-width: 440px;
    position: relative;
    z-index: 1;
}

.force-pw-card {
    background: rgba(43, 49, 54, 0.95);
    border-radius: 1rem;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    overflow: hidden;
}

.force-pw-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 2rem 2rem 0;
}

.force-pw-logo {
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

.force-pw-brand {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.force-pw-brand-name {
    color: #e4e7ed;
}

.force-pw-body {
    padding: 1.5rem 2rem 2rem;
}

.force-pw-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(100, 160, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    color: #64a0ff;
    font-size: 1.25rem;
}

.force-pw-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #e4e7ed;
    margin-bottom: 0.25rem;
}

.force-pw-subtitle {
    font-size: 0.95rem;
    color: #8b95a5;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.force-pw-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.force-pw-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.force-pw-input-icon {
    position: absolute;
    left: 1rem;
    color: #6b7585;
    font-size: 0.9rem;
    z-index: 2;
    transition: color 0.2s ease;
    pointer-events: none;
}

.force-pw-input-group:focus-within .force-pw-input-icon {
    color: #64a0ff;
}

.force-pw-input {
    padding-left: 2.75rem !important;
    padding-right: 2.75rem !important;
    height: 3rem;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 0.625rem !important;
    color: #e4e7ed !important;
    font-size: 0.95rem;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease !important;
}

.force-pw-input::placeholder {
    color: #6b7585;
}

.force-pw-input:focus {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(100, 160, 255, 0.5) !important;
    box-shadow: 0 0 0 3px rgba(100, 160, 255, 0.1) !important;
    outline: none;
}

.force-pw-input.is-invalid {
    border-color: rgba(220, 53, 69, 0.7) !important;
}

.force-pw-input:disabled {
    opacity: 0.5;
}

.force-pw-toggle {
    position: absolute;
    right: 0.75rem;
    background: none;
    border: none;
    color: #6b7585;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0.25rem;
    z-index: 2;
    transition: color 0.2s ease;
}

.force-pw-toggle:hover {
    color: #64a0ff;
}

.force-pw-error {
    font-size: 0.8rem;
    color: #e74c3c;
    margin-top: -0.5rem;
    padding-left: 0.25rem;
}

.force-pw-btn {
    width: 100%;
    height: 3rem;
    background: linear-gradient(135deg, #4a80d9, #64a0ff);
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    border-radius: 0.625rem;
    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease,
        opacity 0.15s ease;
    margin-top: 0.5rem;
}

.force-pw-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(100, 160, 255, 0.25);
    color: #fff;
}

.force-pw-btn:active:not(:disabled) {
    transform: translateY(0);
}

.force-pw-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Alerts */
.force-pw-body .alert {
    font-size: 0.875rem;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
}

/* Responsive */
@media (max-width: 480px) {
    .force-pw-container {
        max-width: 100%;
    }

    .force-pw-header {
        padding: 1.5rem 1.25rem 0;
    }

    .force-pw-body {
        padding: 1.25rem;
    }

    .force-pw-title {
        font-size: 1.15rem;
    }
}
/* ==========================================================================
   Select2 Theming
   ========================================================================== */

html.dark .select2-container--default .select2-selection--single,
html.dark .select2-container--default .select2-selection--multiple {
    background-color: var(--papyrus-input-bg);
    border-color: var(--papyrus-input-border);
    color: var(--papyrus-text);
}

html.dark .select2-container--default .select2-selection--single .select2-selection__rendered {
    color: var(--papyrus-text);
}

html.dark .select2-container--default .select2-results__option {
    color: var(--papyrus-text);
}

html.dark .select2-dropdown {
    background-color: var(--papyrus-block-bg);
    border-color: var(--papyrus-border);
}

html.dark .select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: var(--papyrus-accent);
    color: #1a1d23;
}

html.dark .select2-container--default .select2-search--dropdown .select2-search__field {
    background-color: var(--papyrus-input-bg);
    color: var(--papyrus-text);
    border-color: var(--papyrus-input-border);
}
/* ==========================================================================
   Navigation, Dropdown & Tab Overrides
   ========================================================================== */

/* Nav items */
.nav-item {
    background-color: var(--papyrus-nav-item-bg) !important;
}

.nav-link {
    color: var(--papyrus-nav-link-color);
}

/* Dropdown menus */
.dropdown-menu {
    background-color: var(--papyrus-block-bg);
    border-color: var(--papyrus-border);
    color: var(--papyrus-text);
}

.dropdown-item {
    color: var(--papyrus-text);
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: var(--papyrus-hover-bg);
    color: var(--papyrus-text);
}

.dropdown-divider {
    border-color: var(--papyrus-border);
}

/* Tab content borders */
.nav-tabs {
    border-bottom-color: var(--papyrus-border);
}

.nav-tabs .nav-link {
    color: var(--papyrus-nav-link-color);
}

.nav-tabs .nav-link.active {
    background-color: var(--papyrus-block-bg);
    border-color: var(--papyrus-border) var(--papyrus-border) var(--papyrus-block-bg);
    color: var(--papyrus-text);
}
/* ==========================================================================
   Toast Component
   ========================================================================== */

.toast-slide-enter-active,
.toast-slide-leave-active {
    transition: all 0.3s ease;
}

.toast-slide-enter-from {
    transform: translateX(100%);
    opacity: 0;
}

.toast-slide-leave-to {
    transform: translateX(100%);
    opacity: 0;
}

.toast {
    min-width: 300px;
    max-width: 400px;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    background-color: var(--papyrus-block-bg, #fff);
    color: var(--papyrus-text, #495057);
    border-color: var(--papyrus-border, #e4e7ed);
}

.toast-body {
    color: var(--papyrus-text, #495057);
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background-color: rgba(255, 255, 255, 0.7);
    animation: toast-progress linear forwards;
}

@keyframes toast-progress {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}

/* Dark mode toast variants */
html.dark .toast {
    background-color: var(--papyrus-block-bg);
    color: var(--papyrus-text);
    border-color: var(--papyrus-border);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.4);
}

html.dark .toast-body {
    color: var(--papyrus-text);
}

html.dark .toast-header.bg-success {
    background-color: rgba(101, 163, 13, 0.20) !important;
    border-bottom-color: rgba(101, 163, 13, 0.30);
}

html.dark .toast-header.bg-error,
html.dark .toast-header.bg-danger {
    background-color: #5c1a1a !important;
    border-bottom-color: #732222;
}

html.dark .toast-header.bg-warning {
    background-color: #5c4a0a !important;
    border-bottom-color: #735d10;
}

html.dark .toast-header.bg-info {
    background-color: #0a3d5c !important;
    border-bottom-color: #104e73;
}
/* ==========================================================================
   Atom Components — StatusBadge, CurrencyDisplay, PhoneLink, Preloader,
   EmptyState, PapyrusButton, TableSkeleton
   ========================================================================== */

/* ============================================================
   STATUS BADGE (StatusBadge.vue)
   ============================================================ */
.papyrus-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25em;
    padding: 0.35em 0.65em;
    font-size: 0.75em;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.375rem;
    letter-spacing: 0.02em;
    transition: opacity 0.2s ease;
}

.papyrus-badge--success { background-color: rgba(37, 175, 96, 0.15); color: #25af60; border: 1px solid rgba(37, 175, 96, 0.25); }
.papyrus-badge--warning { background-color: rgba(255, 179, 0, 0.15); color: #ffb300; border: 1px solid rgba(255, 179, 0, 0.25); }
.papyrus-badge--danger { background-color: rgba(220, 53, 69, 0.15); color: #dc3545; border: 1px solid rgba(220, 53, 69, 0.25); }
.papyrus-badge--info { background-color: rgba(13, 202, 240, 0.15); color: #0dcaf0; border: 1px solid rgba(13, 202, 240, 0.25); }
.papyrus-badge--secondary { background-color: rgba(108, 117, 125, 0.15); color: #8b95a1; border: 1px solid rgba(108, 117, 125, 0.25); }
.papyrus-badge--primary { background-color: rgba(13, 110, 253, 0.15); color: #5fa3f8; border: 1px solid rgba(13, 110, 253, 0.25); }
.papyrus-badge--sm { font-size: 0.65em; padding: 0.25em 0.5em; }
.papyrus-badge--lg { font-size: 0.85em; padding: 0.4em 0.75em; }
.papyrus-badge i { font-size: 0.85em; }

/* ============================================================
   CURRENCY DISPLAY (CurrencyDisplay.vue)
   ============================================================ */
.currency-display {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    white-space: nowrap;
}

.currency-symbol { font-weight: 500; }
.currency-sm { font-size: 0.875em; }
.currency-lg { font-size: 1.25em; }

/* ============================================================
   PHONE LINK (PhoneLink.vue)
   ============================================================ */
.phone-link-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.phone-link {
    text-decoration: none;
    color: inherit;
}

.phone-link:hover {
    text-decoration: underline;
}

.whatsapp-link {
    color: #25d366;
    text-decoration: none;
    font-size: 1.1em;
}

.whatsapp-link:hover {
    color: #128c7e;
}

/* ============================================================
   PRELOADER (Preloader.vue)
   ============================================================ */
.preloader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.55);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(4px);
}

.preloader-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.preloader-spinner {
    width: 100px;
    height: 100px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.preloader-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: rgba(100, 160, 255, 0.8);
    animation: preloader-spin 1s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.preloader-logo {
    width: 56px;
    height: 56px;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
    animation: preloader-logoPulse 2s ease-in-out infinite;
}

.preloader-progress {
    width: 120px;
    height: 3px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.preloader-progress-bar {
    width: 40%;
    height: 100%;
    border-radius: 2px;
    background: linear-gradient(90deg, rgba(100, 160, 255, 0.6), rgba(100, 160, 255, 1));
    animation: preloader-progressSlide 1.5s ease-in-out infinite;
}

.preloader-message {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
    font-weight: 500;
    margin: 0;
    text-align: center;
    letter-spacing: 0.02em;
}

@keyframes preloader-spin {
    to { transform: rotate(360deg); }
}

@keyframes preloader-logoPulse {
    0%, 100% { transform: scale(1); opacity: 0.9; }
    50% { transform: scale(1.05); opacity: 1; }
}

@keyframes preloader-progressSlide {
    0% { transform: translateX(-100%); }
    50% { transform: translateX(200%); }
    100% { transform: translateX(400%); }
}

/* Preloader transition */
.preloader-enter-active { transition: opacity 0.3s ease; }
.preloader-leave-active { transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1); }
.preloader-enter-from,
.preloader-leave-to { opacity: 0; }
.preloader-leave-to .preloader-spinner { transform: scale(1.1); }

/* ============================================================
   EMPTY STATE (EmptyState.vue)
   ============================================================ */
.empty-state {
    max-width: 600px;
    margin: 0 auto;
}

.empty-state-action {
    margin-top: 1rem;
}

/* ============================================================
   PAPYRUS BUTTON — kbd helper (PapyrusButton.vue)
   ============================================================ */
.btn kbd {
    padding: 0.125rem 0.25rem;
    font-size: 0.75rem;
    color: #fff;
    background-color: #212529;
    border-radius: 0.25rem;
}

.btn:disabled kbd {
    opacity: 0.5;
}

/* ============================================================
   TABLE SKELETON (TableSkeleton.vue)
   ============================================================ */
.table-skeleton {
    overflow: hidden;
}

.skeleton-row {
    animation: skeleton-rowFadeIn 0.4s ease both;
}

.skeleton-line {
    height: 13px;
    border-radius: 6px;
    background: linear-gradient(
        110deg,
        var(--papyrus-skeleton-base, #363c42) 30%,
        var(--papyrus-skeleton-highlight, #454c53) 48%,
        var(--papyrus-skeleton-base, #363c42) 66%
    );
    background-size: 300% 100%;
    animation: skeleton-shimmer 1.8s ease-in-out infinite;
    opacity: 0.85;
}

.skeleton-header {
    height: 15px;
    width: 60%;
    border-radius: 6px;
    opacity: 1;
}

@keyframes skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@keyframes skeleton-rowFadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}
/* ==========================================================================
   Molecule Components — PageHeader, OrderTimeline, TenantSelector,
   DateRangePicker, NavSubmenu, PapyrusModal, PapyrusForm,
   TenantSwitcher, ProductImageUploader, ErrorBoundary
   ========================================================================== */

/* ============================================================
   PAGE HEADER (PageHeader.vue)
   ============================================================ */
.page-header-actions-right,
.page-header-actions-left {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.5rem;
}

/* Ensure direct children fill grid cells */
.page-header-actions-right > .btn,
.page-header-actions-right > a,
.page-header-actions-right > div,
.page-header-actions-left > .btn,
.page-header-actions-left > a,
.page-header-actions-left > div {
    width: 100%;
}

/* Buttons inside wrapper divs should fill their cell */
.page-header-actions-right .btn,
.page-header-actions-left .btn {
    width: 100%;
}

/* Links wrapping buttons should also fill */
.page-header-actions-right a > .btn,
.page-header-actions-left a > .btn {
    width: 100%;
}

/* Flatten nested flex containers into the grid flow */
.page-header-actions-right > .d-flex,
.page-header-actions-left > .d-flex {
    display: contents;
}

/* Row containers inside actions should span full grid width */
.page-header-actions-right > .row,
.page-header-actions-left > .row {
    grid-column: 1 / -1;
}

/* btn-group should span its own cell and fill width */
.page-header-actions-right .btn-group,
.page-header-actions-left .btn-group {
    display: flex;
    width: 100%;
}

.page-header-actions-right .btn-group > .btn,
.page-header-actions-left .btn-group > .btn {
    flex: 1 1 0;
}

/* Tablet: 2 columns */
@media (min-width: 768px) and (max-width: 991.98px) {
    .page-header-actions-right,
    .page-header-actions-left {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile: single column */
@media (max-width: 767.98px) {
    .page-header-actions-right,
    .page-header-actions-left {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   ORDER TIMELINE (OrderTimeline.vue)
   ============================================================ */
.order-timeline {
    padding: 0;
}

.timeline {
    position: relative;
    padding-left: 24px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 4px;
    bottom: 4px;
    width: 2px;
    background: var(--bs-border-color, #3a3f44);
}

.timeline-item {
    position: relative;
    display: flex;
    align-items: flex-start;
    padding-bottom: 16px;
}

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

.timeline-dot {
    position: absolute;
    left: -20px;
    top: 4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--bs-border-color, #3a3f44);
    background: var(--bs-body-bg, #1e2327);
    z-index: 1;
    flex-shrink: 0;
}

.timeline-dot--success { border-color: var(--bs-success, #2ecc71); background: var(--bs-success, #2ecc71); }
.timeline-dot--danger { border-color: var(--bs-danger, #e74c3c); background: var(--bs-danger, #e74c3c); }
.timeline-dot--primary { border-color: var(--bs-primary, #3498db); background: var(--bs-primary, #3498db); }
.timeline-dot--info { border-color: var(--bs-info, #0dcaf0); background: var(--bs-info, #0dcaf0); }
.timeline-dot--warning { border-color: var(--bs-warning, #f39c12); background: var(--bs-warning, #f39c12); }
.timeline-dot--secondary { border-color: var(--bs-secondary, #6c757d); background: var(--bs-secondary, #6c757d); }

.timeline-content { flex: 1; min-width: 0; }
.timeline-header { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; font-size: 0.875rem; }
.timeline-body { font-size: 0.8rem; margin-top: 2px; }
.timeline-notes { font-size: 0.75rem; font-style: italic; }

/* ============================================================
   TENANT SELECTOR (TenantSelector.vue)
   ============================================================ */
.tenant-selector {
    min-width: 200px;
}

.tenant-selector-redirecting {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.tenant-selector-form {
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.tenant-selector-input {
    flex: 1;
}

.tenant-selector-go {
    height: 38px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ============================================================
   DATE RANGE PICKER (DateRangePicker.vue)
   ============================================================ */
.date-range-picker {
    width: 100%;
}

.quick-ranges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.quick-ranges .btn-group {
    flex-wrap: wrap;
}

/* ============================================================
   NAV SUBMENU (NavSubmenu.vue)
   ============================================================ */
.nav-main-link-submenu {
    transition:
        background-color 0.2s ease,
        color 0.2s ease;
}

.nav-main-link-submenu:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

/* Highlight parent when submenu is open */
.nav-main-item.open > .nav-main-link-submenu {
    background-color: rgba(100, 160, 255, 0.04);
}

.nav-main-item.open > .nav-main-link-submenu .nav-main-link-icon {
    color: var(--papyrus-sidebar-active-text);
    transition: color 0.2s ease;
}

.nav-main-submenu {
    transition: max-height 0.25s ease;
    overflow: hidden;
}

/* ============================================================
   NAV ITEM (NavItem.vue)
   ============================================================ */
.nav-main-link {
    position: relative;
    transition:
        background-color 0.2s ease,
        color 0.2s ease;
    display: flex;
    align-items: center;
}

.nav-main-link::before {
    content: '';
    position: absolute;
    top: 4px;
    bottom: 4px;
    width: 3px;
    background: transparent;
    border-radius: 0 2px 2px 0;
    transition: background 0.2s ease;
}

.nav-main-link:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.nav-main-link.active {
    font-weight: 600;
    background-color: rgba(100, 160, 255, 0.08);
    color: rgba(255, 255, 255, 0.95);
}

.nav-main-link.active::before {
    background: var(--papyrus-sidebar-active-text);
}

.nav-main-link.active .nav-main-link-icon {
    color: var(--papyrus-sidebar-active-text);
}

.nav-main-link.active .nav-main-link-name {
    color: rgba(255, 255, 255, 0.95);
}

/* Submenu item active state */
.nav-main-item-submenu .nav-main-link.active::before {
    left: 8px;
}

.nav-main-item-submenu .nav-main-link.active {
    background-color: rgba(100, 160, 255, 0.06);
}

.nav-main-link-badges {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-left: auto;
    flex-shrink: 0;
}

/* ============================================================
   PAPYRUS MODAL (PapyrusModal.vue)
   ============================================================ */
.papyrus-modal .modal-content {
    border: 0;
    background: transparent;
    box-shadow: none;
}

.papyrus-modal .loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1050;
    border-radius: 0.25rem;
}

/* ============================================================
   PAPYRUS FORM — Unsaved Bar (PapyrusForm.vue)
   ============================================================ */
.papyrus-unsaved-bar {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.5rem 1rem;
    background: rgba(43, 49, 54, 0.95);
    border-top: 2px solid #ffb300;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    color: var(--papyrus-text);
    z-index: 10;
    backdrop-filter: blur(8px);
}

.papyrus-unsaved-bar kbd {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
    padding: 0.1em 0.3em;
    font-size: 0.85em;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.papyrus-unsaved-bar-enter-active,
.papyrus-unsaved-bar-leave-active {
    transition:
        transform 0.3s ease,
        opacity 0.3s ease;
}

.papyrus-unsaved-bar-enter-from,
.papyrus-unsaved-bar-leave-to {
    transform: translateY(100%);
    opacity: 0;
}

/* ============================================================
   TENANT SWITCHER (TenantSwitcher.vue)
   ============================================================ */
.tenant-switcher-toggle {
    max-width: 250px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tenant-current-name {
    max-width: 140px;
    display: inline-block;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}

.tenant-super-badge {
    font-size: 0.65rem;
    padding: 0.15em 0.4em;
    vertical-align: middle;
}

.tenant-switcher-menu {
    min-width: 260px;
    max-width: 320px;
}

.tenant-switcher-list {
    max-height: 280px;
    overflow-y: auto;
}

.tenant-switcher-item {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tenant-switcher-item.active {
    background-color: rgba(100, 160, 255, 0.1);
    color: inherit;
}

.tenant-switcher-item:hover:not(.active) {
    background-color: rgba(0, 0, 0, 0.04);
}

.tenant-item-name {
    overflow: hidden;
    text-overflow: ellipsis;
}

.tenant-name-static .btn {
    opacity: 1;
    cursor: default;
}

.tenant-current-name-static {
    max-width: 160px;
    display: inline-block;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
    font-weight: 600;
}

/* ============================================================
   PRODUCT IMAGE UPLOADER (ProductImageUploader.vue)
   ============================================================ */
.upload-area {
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.upload-area:hover,
.upload-area.drag-over {
    border-color: #0d6efd;
    background: var(--papyrus-hover-bg, #f8f9ff);
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
}

.image-card {
    cursor: grab;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: border-color 0.2s;
}

.image-card.is-primary {
    border-color: #ffc107;
}

.image-wrapper {
    position: relative;
    aspect-ratio: 1;
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s;
}

.image-card:hover .image-overlay {
    opacity: 1;
}

.primary-badge {
    position: absolute;
    top: 4px;
    left: 4px;
    background: #ffc107;
    color: #fff;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
}

/* ============================================================
   ERROR BOUNDARY (ErrorBoundary.vue)
   ============================================================ */
.error-boundary details pre {
    max-height: 200px;
    overflow-y: auto;
    font-size: 0.75rem;
}

/* ============================================================
   ADD CLIENT MODAL (AddClientModal.vue)
   ============================================================ */
#musteri-ekle .select2-container {
    width: 100% !important;
}

#musteri-ekle .select2-selection--single {
    height: calc(1.5em + 0.875rem + 2px) !important;
}

#musteri-ekle .select2-selection__rendered {
    line-height: calc(1.5em + 0.875rem) !important;
}

#musteri-ekle .select2-selection__arrow {
    height: 100% !important;
}
/* ==========================================================================
   Chat Module — Extracted from MessageArea, ConversationList, UserSearch,
   MessageInput Vue components
   ========================================================================== */

/* ============================================================
   Chat page layout
   ============================================================ */
.chat-page-active #page-footer {
    display: none !important;
}

.chat-page-active .content {
    padding-bottom: 0 !important;
}

.chat-page-active .chat-app {
    height: calc(100vh - 120px);
}

@media (max-width: 991.98px) {
    .chat-page-active .chat-app {
        height: calc(100vh - 70px);
    }
    .chat-page-active .content {
        padding: 0 !important;
    }
}

/* ============================================================
   MessageArea
   ============================================================ */
.msg-area {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 64px);
    background: var(--papyrus-block-bg);
}

/* ---- Header ---- */
.msg-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: var(--papyrus-block-bg);
    border-bottom: 1px solid var(--papyrus-border);
    gap: 12px;
    min-height: 64px;
}

.msg-back-btn {
    display: none;
    width: 36px;
    height: 36px;
    border: none;
    background: var(--papyrus-block-header-bg);
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--papyrus-text);
    font-size: 0.9rem;
    transition: background 0.15s ease;
}

.msg-back-btn:hover {
    background: var(--papyrus-hover-bg);
}

@media (max-width: 991.98px) {
    .msg-back-btn {
        display: flex;
    }

    .msg-area {
        height: calc(100vh - 56px);
    }
}

.msg-header-avatar-wrap {
    flex-shrink: 0;
}

.msg-header-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.msg-header-avatar-initials {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
}

.msg-header-info {
    flex: 1;
    min-width: 0;
}

.msg-header-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--papyrus-text);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.msg-header-status {
    font-size: 0.775rem;
    color: var(--papyrus-text-muted);
}

.msg-header-actions {
    display: flex;
    gap: 4px;
}

.msg-header-action-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--papyrus-text-muted, #6c757d);
    font-size: 1rem;
    transition: all 0.15s ease;
}

.msg-header-action-btn:hover {
    background: var(--papyrus-hover-bg);
    color: var(--papyrus-text);
}

.msg-header-action-btn.msg-fav-active {
    color: #f59e0b;
}

.msg-header-action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ---- Message Container ---- */
.msg-container {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px;
    background: var(--papyrus-bg, #f0f2f5);
    position: relative;
    /* Subtle wallpaper pattern */
    background-image:
        radial-gradient(circle at 20% 50%, rgba(79, 70, 229, 0.04) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(124, 58, 237, 0.04) 0%, transparent 50%);
}

.msg-container::-webkit-scrollbar {
    width: 5px;
}

.msg-container::-webkit-scrollbar-thumb {
    background: var(--papyrus-border, #d4d7dd);
    border-radius: 4px;
}

/* ---- Date Separator ---- */
.msg-date-separator {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 16px 0;
}

.msg-date-label {
    background: var(--papyrus-block-header-bg, #f8f9fa);
    padding: 4px 14px;
    border-radius: 8px;
    font-size: 0.75rem;
    color: var(--papyrus-text-muted, #6c757d);
    font-weight: 500;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

/* ---- Swipe Wrapper ---- */
.msg-swipe-wrapper {
    display: flex;
    align-items: center;
    max-width: 75%;
    position: relative;
    overflow: visible;
}

.msg-swipe-wrapper-sent {
    margin-left: auto;
}

/* ---- Swipe Action Indicators ---- */
.msg-swipe-action {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 0;
    overflow: hidden;
    transition: width 0.15s ease;
    border-radius: 12px;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.msg-swipe-action-archive {
    background: #2563eb;
    color: #fff;
    margin-right: 4px;
    border-radius: 12px 4px 4px 12px;
}

.msg-swipe-action-delete {
    background: #dc2626;
    color: #fff;
    margin-left: 4px;
    border-radius: 4px 12px 12px 4px;
}

.msg-swipe-action-visible {
    min-height: 36px;
}

/* ---- Message Bubble ---- */
.msg-row {
    display: flex;
    margin-bottom: 4px;
}

.msg-row-sent {
    justify-content: flex-end;
}

.msg-bubble {
    max-width: 100%;
    padding: 8px 12px;
    border-radius: 12px;
    position: relative;
    word-wrap: break-word;
    overflow-wrap: break-word;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease;
    flex-shrink: 1;
    min-width: 0;
}

.msg-bubble-received {
    background: var(--papyrus-block-bg, #ffffff);
    border-top-left-radius: 4px;
    color: var(--papyrus-text, #495057);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.msg-bubble-sent {
    background: #4338ca;
    border-top-right-radius: 4px;
    color: #fff;
}

/* Soft-deleted bubble style */
.msg-bubble-deleted {
    opacity: 0.6;
}

.msg-bubble-deleted.msg-bubble-sent {
    background: #6366f1;
}

html.dark .msg-bubble-deleted.msg-bubble-sent {
    background: #3730a3;
}

.msg-bubble-deleted.msg-bubble-received {
    background: var(--papyrus-block-header-bg, #e9ecef);
}

.msg-text {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
    white-space: pre-wrap;
}

.msg-text-deleted {
    font-style: italic;
    opacity: 0.8;
    font-size: 0.825rem;
}

.msg-deleted-icon {
    font-size: 0.75rem;
    margin-right: 4px;
    opacity: 0.7;
}

/* ---- Desktop Hover Actions ---- */
.msg-hover-actions {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: none;
    align-items: center;
    gap: 2px;
    z-index: 2;
}

.msg-hover-actions-sent {
    left: -60px;
    flex-direction: row-reverse;
}

.msg-hover-actions-received {
    right: -60px;
}

.msg-bubble:hover .msg-hover-actions {
    display: flex;
}

.msg-hover-btn {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.7rem;
    transition: all 0.15s ease;
    opacity: 0;
    transform: scale(0.8);
}

.msg-bubble:hover .msg-hover-btn {
    opacity: 1;
    transform: scale(1);
}

.msg-hover-btn-delete {
    background: rgba(220, 38, 38, 0.15);
    color: #ef4444;
}

.msg-hover-btn-delete:hover {
    background: #dc2626;
    color: #fff;
}

.msg-hover-btn-archive {
    background: rgba(37, 99, 235, 0.15);
    color: #60a5fa;
}

.msg-hover-btn-archive:hover {
    background: #2563eb;
    color: #fff;
}

/* Hide hover actions on touch devices */
@media (hover: none) {
    .msg-hover-actions {
        display: none !important;
    }
}

/* ---- Attachment ---- */
.msg-attachment {
    margin-top: 6px;
}

/* Image attachment */
.msg-attachment-image-link {
    display: block;
    text-decoration: none;
    border-radius: 8px;
    overflow: hidden;
    line-height: 0;
}

.msg-attachment-image {
    max-width: 240px;
    max-height: 180px;
    border-radius: 8px;
    object-fit: cover;
    cursor: pointer;
    transition: opacity 0.15s ease;
}

.msg-attachment-image:hover {
    opacity: 0.9;
}

/* File attachment */
.msg-attachment-file {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.15s ease;
}

.msg-bubble-received .msg-attachment-file {
    background: var(--papyrus-hover-bg, rgba(0, 0, 0, 0.03));
    color: var(--papyrus-text, #495057);
}

.msg-bubble-sent .msg-attachment-file {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.msg-attachment-file:hover {
    opacity: 0.85;
}

.msg-attachment-file-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.msg-bubble-received .msg-attachment-file-icon {
    background: var(--papyrus-accent-subtle, rgba(92, 128, 209, 0.10));
    color: var(--papyrus-accent, #5c80d1);
}

.msg-bubble-sent .msg-attachment-file-icon {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.msg-attachment-file-info {
    flex: 1;
    min-width: 0;
}

.msg-attachment-file-name {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.msg-attachment-file-size {
    display: block;
    font-size: 0.7rem;
    opacity: 0.7;
}

.msg-attachment-download-icon {
    font-size: 0.8rem;
    opacity: 0.6;
    flex-shrink: 0;
}

/* ---- Meta ---- */
.msg-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    margin-top: 2px;
}

.msg-time {
    font-size: 0.7rem;
    opacity: 0.7;
}

.msg-bubble-received .msg-time {
    color: var(--papyrus-text-muted, #6c757d);
}

.msg-seen {
    font-size: 0.7rem;
}

.msg-seen-read {
    color: rgba(255, 255, 255, 0.9);
}

.msg-seen-sent {
    opacity: 0.6;
}

/* ---- Load More ---- */
.msg-load-more {
    text-align: center;
    margin-bottom: 12px;
}

.msg-load-more-btn {
    padding: 6px 16px;
    border: none;
    background: var(--papyrus-block-header-bg, #f8f9fa);
    border-radius: 16px;
    font-size: 0.8rem;
    color: var(--papyrus-accent, #5c80d1);
    cursor: pointer;
    font-weight: 500;
    transition: all 0.15s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.msg-load-more-btn:hover {
    background: var(--papyrus-block-bg, #ffffff);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.msg-loading-more {
    text-align: center;
    padding: 12px;
}

/* ---- Spinners ---- */
.msg-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid var(--papyrus-border, #e4e7ed);
    border-top-color: var(--papyrus-accent, #5c80d1);
    border-radius: 50%;
    animation: chat-spin 0.7s linear infinite;
    margin: 0 auto;
}

.msg-spinner-lg {
    width: 36px;
    height: 36px;
    border-width: 3px;
}

@keyframes chat-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ---- Initial Loading ---- */
.msg-initial-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
}

.msg-loading-text {
    margin-top: 12px;
    font-size: 0.85rem;
    color: var(--papyrus-text-muted, #6c757d);
}

/* ---- Empty ---- */
.msg-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
}

.msg-empty-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--papyrus-block-header-bg, #f8f9fa);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--papyrus-text-muted, #6c757d);
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.msg-empty-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--papyrus-text, #495057);
    margin-bottom: 4px;
}

.msg-empty-desc {
    font-size: 0.825rem;
    color: var(--papyrus-text-muted, #6c757d);
    margin: 0;
}

/* ---- Scroll to bottom button ---- */
.msg-scroll-bottom-btn {
    position: sticky;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    border: none;
    background: var(--papyrus-block-bg, #ffffff);
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--papyrus-accent, #5c80d1);
    font-size: 0.9rem;
    transition: all 0.2s ease;
    z-index: 5;
    margin: 0 auto;
}

.msg-scroll-bottom-btn:hover {
    background: var(--papyrus-accent, #5c80d1);
    color: #fff;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

/* ---- MessageArea Transitions ---- */
.fade-up-enter-active,
.fade-up-leave-active {
    transition: all 0.2s ease;
}

.fade-up-enter-from,
.fade-up-leave-to {
    opacity: 0;
    transform: translateX(-50%) translateY(8px);
}

/* ============================================================
   ConversationList
   ============================================================ */
.conv-list {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

.conv-list::-webkit-scrollbar {
    width: 4px;
}

.conv-list::-webkit-scrollbar-thumb {
    background: var(--papyrus-border);
    border-radius: 4px;
}

/* ---- Conversation Item ---- */
.conv-item {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 12px 16px;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: background 0.15s ease;
    text-align: left;
    gap: 12px;
    border-bottom: 1px solid var(--papyrus-border);
}

.conv-item:hover {
    background: var(--papyrus-hover-bg);
}

.conv-item-active {
    background: var(--papyrus-accent-subtle);
    border-right: 3px solid var(--papyrus-accent);
}

.conv-item-active:hover {
    background: var(--papyrus-accent-subtle);
}

/* ---- Avatar ---- */
.conv-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}

.conv-avatar-img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.conv-avatar-initials {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.5px;
}

.conv-online-dot {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    background: #22c55e;
    border-radius: 50%;
    border: 2px solid var(--papyrus-block-bg, #ffffff);
}

/* ---- Content ---- */
.conv-content {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.conv-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.conv-name {
    font-size: 0.925rem;
    font-weight: 600;
    color: var(--papyrus-text, #495057);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

.conv-item-unread .conv-name {
    color: var(--papyrus-text, #495057);
    font-weight: 700;
}

.conv-time {
    font-size: 0.75rem;
    color: var(--papyrus-text-muted, #6c757d);
    white-space: nowrap;
    flex-shrink: 0;
    margin-left: 8px;
}

.conv-item-unread .conv-time {
    color: var(--papyrus-accent, #5c80d1);
    font-weight: 600;
}

.conv-bottom-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.conv-preview {
    font-size: 0.825rem;
    color: var(--papyrus-text-muted, #6c757d);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
    flex: 1;
    min-width: 0;
}

.conv-item-unread .conv-preview {
    color: var(--papyrus-text, #495057);
    font-weight: 500;
}

.conv-preview-empty {
    font-style: italic;
    color: var(--papyrus-text-muted, #6c757d);
}

.conv-attach-icon {
    margin-right: 4px;
    font-size: 0.75rem;
}

.conv-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: var(--papyrus-accent, #5c80d1);
    color: #fff;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* ---- Loading Skeleton ---- */
.conv-list-loading {
    padding: 8px 0;
}

.conv-skeleton {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    gap: 12px;
}

.conv-skeleton-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(90deg, var(--papyrus-skeleton-base, #e4e7ed) 25%, var(--papyrus-skeleton-highlight, #f0f2f5) 50%, var(--papyrus-skeleton-base, #e4e7ed) 75%);
    background-size: 200% 100%;
    animation: conv-shimmer 1.5s infinite;
    flex-shrink: 0;
}

.conv-skeleton-text {
    flex: 1;
}

.conv-skeleton-line {
    height: 12px;
    border-radius: 6px;
    background: linear-gradient(90deg, var(--papyrus-skeleton-base, #e4e7ed) 25%, var(--papyrus-skeleton-highlight, #f0f2f5) 50%, var(--papyrus-skeleton-base, #e4e7ed) 75%);
    background-size: 200% 100%;
    animation: conv-shimmer 1.5s infinite;
}

.conv-skeleton-name {
    width: 60%;
    margin-bottom: 8px;
}

.conv-skeleton-msg {
    width: 85%;
}

@keyframes conv-shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* ---- Empty ---- */
.conv-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
}

.conv-empty-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--papyrus-block-header-bg, #f8f9fa);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--papyrus-text-muted, #6c757d);
    margin-bottom: 16px;
}

.conv-empty-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--papyrus-text, #495057);
    margin-bottom: 4px;
}

.conv-empty-desc {
    font-size: 0.825rem;
    color: var(--papyrus-text-muted, #6c757d);
    margin: 0;
}

/* ============================================================
   UserSearch
   ============================================================ */
.usearch {
    padding: 12px 16px;
    border-bottom: 1px solid var(--papyrus-border, #e4e7ed);
    background: var(--papyrus-bg, #f0f2f5);
}

.usearch-input-wrap {
    position: relative;
    margin-bottom: 8px;
}

.usearch-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--papyrus-text-muted, #6c757d);
    font-size: 0.85rem;
}

.usearch-input {
    width: 100%;
    padding: 8px 36px 8px 36px;
    border: 1px solid var(--papyrus-input-border, #d4d7dd);
    border-radius: 8px;
    background: var(--papyrus-input-bg, #ffffff);
    font-size: 0.875rem;
    color: var(--papyrus-text, #495057);
    outline: none;
    transition: all 0.2s ease;
}

.usearch-input:focus {
    border-color: var(--papyrus-accent, #5c80d1);
    box-shadow: 0 0 0 3px rgba(92, 128, 209, 0.15);
}

.usearch-spinner {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid var(--papyrus-border, #e4e7ed);
    border-top-color: var(--papyrus-accent, #5c80d1);
    border-radius: 50%;
    animation: usearch-spin 0.7s linear infinite;
}

@keyframes usearch-spin {
    to {
        transform: translateY(-50%) rotate(360deg);
    }
}

/* ---- Loading ---- */
.usearch-loading {
    text-align: center;
    padding: 16px 0 8px;
}

.usearch-loading p {
    font-size: 0.8rem;
    color: var(--papyrus-text-muted, #6c757d);
    margin: 8px 0 0;
}

.usearch-spinner-center {
    width: 24px;
    height: 24px;
    border: 2px solid var(--papyrus-border, #e4e7ed);
    border-top-color: var(--papyrus-accent, #5c80d1);
    border-radius: 50%;
    animation: usearch-spin-center 0.7s linear infinite;
    margin: 0 auto;
}

@keyframes usearch-spin-center {
    to {
        transform: rotate(360deg);
    }
}

/* ---- Results ---- */
.usearch-results {
    max-height: 280px;
    overflow-y: auto;
    border-radius: 8px;
    border: 1px solid var(--papyrus-border, #e4e7ed);
    background: var(--papyrus-block-bg, #ffffff);
}

.usearch-result-item {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 8px 12px;
    border: none;
    background: transparent;
    cursor: pointer;
    gap: 10px;
    text-align: left;
    transition: background 0.1s ease;
}

.usearch-result-item:hover {
    background: var(--papyrus-hover-bg, rgba(0, 0, 0, 0.03));
}

.usearch-result-item + .usearch-result-item {
    border-top: 1px solid var(--papyrus-border, #e4e7ed);
}

.usearch-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.usearch-avatar-initials {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: #fff;
    flex-shrink: 0;
}

.usearch-user-info {
    flex: 1;
    min-width: 0;
}

.usearch-user-name {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--papyrus-text, #495057);
}

.usearch-user-email {
    display: block;
    font-size: 0.75rem;
    color: var(--papyrus-text-muted, #6c757d);
}

/* ---- Load More ---- */
.usearch-load-more {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 10px 12px;
    border: none;
    border-top: 1px solid var(--papyrus-border, #e4e7ed);
    background: transparent;
    cursor: pointer;
    font-size: 0.8rem;
    color: var(--papyrus-accent, #5c80d1);
    font-weight: 500;
    transition: background 0.1s ease;
}

.usearch-load-more:hover:not(:disabled) {
    background: var(--papyrus-hover-bg, rgba(0, 0, 0, 0.03));
}

.usearch-load-more:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.usearch-spinner-small {
    width: 16px;
    height: 16px;
    border: 2px solid var(--papyrus-border, #e4e7ed);
    border-top-color: var(--papyrus-accent, #5c80d1);
    border-radius: 50%;
    animation: usearch-spin-center 0.7s linear infinite;
}

/* ---- Empty / Hint ---- */
.usearch-empty,
.usearch-hint {
    text-align: center;
    padding: 12px 0 4px;
}

.usearch-empty p,
.usearch-hint p {
    font-size: 0.8rem;
    color: var(--papyrus-text-muted, #6c757d);
    margin: 0;
}

.usearch-empty-icon {
    font-size: 1.25rem;
    color: var(--papyrus-border, #e4e7ed);
    margin-bottom: 4px;
}

/* ============================================================
   MessageInput
   ============================================================ */
.msg-input-area {
    border-top: 1px solid var(--papyrus-border);
    background: var(--papyrus-block-bg);
}

/* ---- File Preview ---- */
.msg-file-preview {
    padding: 8px 16px 0;
}

.msg-file-preview-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: var(--papyrus-block-header-bg);
    border-radius: 8px;
}

.msg-file-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--papyrus-accent-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--papyrus-accent);
    font-size: 0.9rem;
    flex-shrink: 0;
}

.msg-file-info {
    flex: 1;
    min-width: 0;
}

.msg-file-name {
    display: block;
    font-size: 0.825rem;
    font-weight: 500;
    color: var(--papyrus-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.msg-file-size {
    font-size: 0.725rem;
    color: var(--papyrus-text-muted, #6c757d);
}

.msg-file-remove {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--papyrus-text-muted, #6c757d);
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.msg-file-remove:hover {
    background: rgba(220, 38, 38, 0.15);
    color: #dc2626;
}

/* ---- Input Row ---- */
.msg-input-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
}

.msg-input-action-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--papyrus-text-muted, #6c757d);
    font-size: 1.1rem;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.msg-input-action-btn:hover:not(:disabled) {
    background: var(--papyrus-hover-bg);
    color: var(--papyrus-accent);
}

.msg-input-action-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ---- Textarea ---- */
.msg-textarea-wrap {
    flex: 1;
    min-width: 0;
}

.msg-textarea {
    width: 100%;
    padding: 10px 16px;
    border: 1px solid var(--papyrus-input-border);
    border-radius: 20px;
    background: var(--papyrus-input-bg);
    font-size: 0.9rem;
    color: var(--papyrus-text);
    resize: none;
    outline: none;
    line-height: 1.5;
    transition: all 0.2s ease;
    font-family: inherit;
    max-height: 120px;
    overflow-y: auto;
}

.msg-textarea:focus {
    border-color: var(--papyrus-accent);
    background: var(--papyrus-input-bg);
    box-shadow: 0 0 0 0.25rem rgba(2, 132, 199, 0.25);
}

.msg-textarea::placeholder {
    color: var(--papyrus-text-muted);
}

.msg-textarea:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ---- Send Button ---- */
.msg-send-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--papyrus-block-header-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--papyrus-text-muted, #6c757d);
    font-size: 0.95rem;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.msg-send-btn-active {
    background: var(--papyrus-accent, #5c80d1);
    color: #fff;
}

.msg-send-btn-active:hover {
    background: #4338ca;
    transform: scale(1.05);
}

.msg-send-btn:disabled {
    cursor: not-allowed;
    transform: none;
}

.msg-send-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: chat-spin 0.7s linear infinite;
}

/* ---- MessageInput Transitions ---- */
.slide-up-enter-active,
.slide-up-leave-active {
    transition: all 0.2s ease;
}

.slide-up-enter-from,
.slide-up-leave-to {
    opacity: 0;
    transform: translateY(8px);
}

/* ==========================================================================
   ChatIndex — App shell layout (extracted from ChatIndex.vue)
   ========================================================================== */

.chat-app {
    display: flex;
    background: var(--papyrus-block-bg, #ffffff);
    overflow: hidden;
    border-radius: 8px;
    box-shadow: var(--papyrus-block-shadow, 0 1px 3px rgba(0, 0, 0, 0.08));
}

/* ---- Sidebar ---- */
.chat-sidebar {
    width: 360px;
    min-width: 360px;
    background: var(--papyrus-block-bg);
    border-right: 1px solid var(--papyrus-border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--papyrus-border);
    background: var(--papyrus-block-header-bg);
}

.chat-sidebar-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    color: var(--papyrus-text);
}

.chat-icon-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--papyrus-hover-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--papyrus-text-muted);
    transition: all 0.2s ease;
    font-size: 1rem;
}

.chat-icon-btn:hover {
    background: var(--papyrus-block-header-bg);
    color: var(--papyrus-accent);
}

.chat-sidebar-search {
    padding: 12px 16px;
    border-bottom: 1px solid var(--papyrus-border);
}

.chat-search-input-wrap {
    position: relative;
}

.chat-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--papyrus-text-muted);
    font-size: 0.85rem;
}

.chat-search-input {
    width: 100%;
    padding: 8px 12px 8px 36px;
    border: 1px solid var(--papyrus-input-border);
    border-radius: 20px;
    background: var(--papyrus-input-bg);
    font-size: 0.875rem;
    color: var(--papyrus-text);
    outline: none;
    transition: all 0.2s ease;
}

.chat-search-input:focus {
    border-color: var(--papyrus-accent);
    background: var(--papyrus-input-bg);
    box-shadow: 0 0 0 0.25rem rgba(2, 132, 199, 0.25);
}

.chat-search-input::placeholder {
    color: var(--papyrus-text-muted);
}

/* ---- Main ---- */
.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--papyrus-bg);
}

/* ---- Empty State ---- */
.chat-empty-state {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.chat-empty-state-inner {
    text-align: center;
    max-width: 360px;
}

.chat-empty-icon {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: var(--papyrus-accent-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 2.5rem;
    color: var(--papyrus-accent);
}

.chat-empty-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--papyrus-text);
    margin-bottom: 8px;
}

.chat-empty-desc {
    color: var(--papyrus-text-muted);
    font-size: 0.9rem;
    margin-bottom: 24px;
    line-height: 1.5;
}

.chat-start-btn {
    display: inline-flex;
    align-items: center;
    padding: 10px 24px;
    background: var(--papyrus-accent, #5c80d1);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chat-start-btn:hover {
    filter: brightness(0.9);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(92, 128, 209, 0.3);
}

/* ---- Transitions ---- */
.slide-down-enter-active,
.slide-down-leave-active {
    transition: all 0.25s ease;
    max-height: 420px;
    overflow: hidden;
}

.slide-down-enter-from,
.slide-down-leave-to {
    max-height: 0;
    opacity: 0;
}

/* ---- Responsive ---- */
@media (max-width: 991.98px) {
    .chat-sidebar {
        width: 100%;
        min-width: 100%;
    }

    .chat-sidebar-hidden {
        display: none;
    }

    .chat-main {
        display: none;
    }

    .chat-main-visible {
        display: flex;
        width: 100%;
    }

    .chat-mobile-messages .chat-main {
        display: flex;
    }
}
/* ==========================================================================
   Panel Module — PanelSkeleton, UnitBlock, CoverItem, InnerItem, WorkGroupItem
   ========================================================================== */

/* --- PanelSkeleton --- */
.panel-skeleton .skeleton-col {
    animation: panel-colSlideIn 0.5s ease both;
}

.panel-skeleton .skeleton-card {
    margin-bottom: 8px;
    animation: panel-cardFadeIn 0.4s ease both;
}

.panel-skeleton .skeleton-card-inner {
    border-radius: 8px;
    padding: 14px 12px;
    text-align: center;
    overflow: hidden;
}

.panel-skeleton .skeleton-date {
    width: 42%;
    height: 9px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.12);
    margin-bottom: 8px;
    animation: panel-pulse 2s ease-in-out infinite;
}

.panel-skeleton .skeleton-title {
    width: 78%;
    height: 14px;
    border-radius: 5px;
    margin-bottom: 6px;
    background: linear-gradient(
        110deg,
        rgba(255, 255, 255, 0.12) 30%,
        rgba(255, 255, 255, 0.25) 48%,
        rgba(255, 255, 255, 0.12) 66%
    );
    background-size: 300% 100%;
    animation: panel-shimmer 1.8s ease-in-out infinite;
}

.panel-skeleton .skeleton-subtitle {
    width: 55%;
    height: 9px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    animation: panel-pulse 2s ease-in-out infinite 0.3s;
}

.panel-skeleton .skeleton-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.12);
    margin: 10px 0;
}

.panel-skeleton .skeleton-actions {
    display: flex;
    justify-content: center;
    gap: 6px;
}

.panel-skeleton .skeleton-btn {
    width: 56px;
    height: 26px;
    border-radius: 5px;
    background: linear-gradient(
        110deg,
        rgba(255, 255, 255, 0.08) 30%,
        rgba(255, 255, 255, 0.18) 48%,
        rgba(255, 255, 255, 0.08) 66%
    );
    background-size: 300% 100%;
    animation: panel-shimmer 1.8s ease-in-out infinite;
}

.panel-skeleton .skeleton-btn-sm {
    width: 30px;
}

.panel-skeleton .skeleton-badge {
    width: 24px;
    height: 20px;
    border-radius: 10px;
    background: rgba(100, 160, 255, 0.2);
    animation: panel-pulse 2s ease-in-out infinite;
}

.panel-skeleton .skeleton-line {
    height: 14px;
    border-radius: 6px;
    background: linear-gradient(
        110deg,
        var(--papyrus-skeleton-base, #363c42) 30%,
        var(--papyrus-skeleton-highlight, #454c53) 48%,
        var(--papyrus-skeleton-base, #363c42) 66%
    );
    background-size: 300% 100%;
    animation: panel-shimmer 1.8s ease-in-out infinite;
}

.panel-skeleton .skeleton-header {
    height: 17px;
}

@keyframes panel-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@keyframes panel-pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

@keyframes panel-colSlideIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes panel-cardFadeIn {
    from { opacity: 0; transform: scale(0.97); }
    to { opacity: 1; transform: scale(1); }
}

/* --- UnitBlock --- */
.unit_list {
    height: 600px;
    min-height: 100px;
    overflow-y: auto;
    padding: 8px;
    transition: background-color 0.2s;
}

.unit_list.drag-over {
    background-color: rgba(var(--bs-primary-rgb, 51, 119, 255), 0.06);
}

@media (max-width: 575.98px) {
    .unit_list {
        height: 400px;
    }
}

@media (min-width: 576px) and (max-width: 767.98px) {
    .unit_list {
        height: 450px;
    }
}

.unit-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
}

.unit-header-content {
    flex: 1;
    min-width: 0;
    text-align: center;
}

.unit-header-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.unit-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.unit-description {
    display: block;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.unit-delete-btn {
    flex-shrink: 0;
}

/* Batch mode selection */
.batch-select-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    cursor: pointer;
    padding: 2px;
    border-radius: 6px;
    border: 2px solid transparent;
    transition:
        border-color 0.15s ease,
        background-color 0.15s ease;
    margin-bottom: 4px;
}

.batch-select-wrapper:hover {
    border-color: var(--bs-primary);
    background: rgba(var(--bs-primary-rgb, 51, 119, 255), 0.05);
}

.batch-select-wrapper.batch-selected {
    border-color: var(--bs-primary);
    background: rgba(var(--bs-primary-rgb, 51, 119, 255), 0.1);
}

.batch-checkbox {
    flex-shrink: 0;
    padding-top: 8px;
    font-size: 1.1rem;
}

.batch-item-content {
    flex: 1;
    min-width: 0;
    pointer-events: none;
}

/* --- Shared Draggable Item (CoverItem, InnerItem, WorkGroupItem) --- */
.draggable-item {
    border-radius: 8px !important;
    border: none !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transition:
        box-shadow 0.2s ease,
        transform 0.15s ease;
    overflow: hidden;
    cursor: grab;
}

.draggable-item:hover {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
    transform: translateY(-2px);
}

.draggable-item:active {
    cursor: grabbing;
}

.draggable-item .block-header {
    border-radius: 0 !important;
    padding: 10px 14px;
}

.draggable-item .block-title {
    font-size: 0.88rem;
    line-height: 1.4;
}

.draggable-item .block-title small {
    font-size: 0.76rem;
    opacity: 0.8;
}

.draggable-item .block-title hr {
    margin: 6px 0 !important;
    opacity: 0.3;
}

.draggable-item .block-options {
    margin-top: 4px;
    display: flex;
    justify-content: center;
    gap: 4px;
}

.draggable-item .block-options .btn {
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 0.78rem;
    min-width: 34px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* --- CoverItem specifics --- */
.cover-item__text {
    color: white;
}

.cover-item__date {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.76rem;
}

.cover-item__order-id {
    font-weight: 700;
}

.cover-item__client {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.76rem;
}

/* --- InnerItem specifics --- */
.inner-item__date {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.76rem;
}

.inner-item__order-id {
    font-weight: 700;
}

.inner-item__client {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.76rem;
}

/* --- WorkGroupItem specifics --- */
.workgroup-item__text {
    color: white;
}

.workgroup-item__date {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.76rem;
}

/* --- Shared border utility for panel items --- */
.border-white-op {
    border-top-color: rgba(255, 255, 255, 0.25) !important;
}

/* Sortable & drag utilities */
.sortable {
    cursor: -webkit-grab;
    cursor: grab;
}

.dragging {
    opacity: 0.5;
    z-index: 1000;
    position: absolute;
}

.connectedUnit {
    background-color: var(--papyrus-connected-bg);
    border-bottom-left-radius: 0.75rem;
    border-bottom-right-radius: 0.75rem;
}

.sortable-placeholder {
    outline: none !important;
    visibility: visible !important;
    height: auto;
    background: none;
    box-shadow: 0px 0px 10px 2px rgba(0, 0, 0, 0.2);
    margin-top: 0;
    margin-bottom: 20px;
    border-radius: 20px;
    position: relative;
}

.sortable-placeholder::after {
    content: 'Yeni Konum';
    color: rgba(228, 231, 237, 0.75);
    font-size: 16px;
    text-align: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 20px;
    pointer-events: none;
}

.sortable-placeholder * {
    visibility: hidden;
}

/* Sortable placeholder text color per theme */
html:not(.dark) .sortable-placeholder::after {
    color: rgba(73, 80, 87, 0.5);
}

/* ==========================================================================
   Panel Views — PanelIndex, PanelForm, PanelHeader, CreateOrderModal,
   ShowWorkGroupModal, ShowCoverModal, ShowInnerModal, OrderInfoStep,
   PaymentStep
   ========================================================================== */

/* ── PanelIndex: Header Action Buttons ── */
.panel-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

@media (max-width: 575.98px) {
    .panel-actions {
        flex-direction: column;
        width: 100%;
    }
    .panel-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

/* ── PanelIndex: Batch Mode ── */
.batch-toolbar {
    background: var(--papyrus-block-header-bg, #2c3136);
    border: 1px solid var(--bs-primary);
    border-radius: 8px;
    padding: 12px 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.batch-toolbar-enter-active,
.batch-toolbar-leave-active {
    transition: all 0.2s ease;
}

.batch-toolbar-enter-from,
.batch-toolbar-leave-to {
    opacity: 0;
    transform: translateY(-8px);
}

.batch-mode-active .draggable-item {
    cursor: pointer;
}

.batch-mode-active .draggable-item:hover {
    outline: 2px solid var(--bs-primary);
    outline-offset: -2px;
    border-radius: 4px;
}

/* ── PanelIndex: Floating Action Button (FAB) ── */
.fab-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    gap: 0.75rem;
    z-index: 1030;
}

.fab-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: -1;
}

.fab-main {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    background: var(--bs-primary);
    color: var(--bs-white);
    font-size: 1.4rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition:
        transform 0.25s ease,
        background-color 0.25s ease,
        box-shadow 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fab-main:hover {
    background: var(--bs-primary-dark, var(--bs-primary));
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
    transform: scale(1.05);
    filter: brightness(0.9);
}

.fab-main--open { background: var(--bs-danger); transform: rotate(0deg); }
.fab-main--open:hover { background: var(--bs-danger); filter: brightness(0.85); }
.fab-main .fa { transition: transform 0.25s ease; }
.fab-main--open .fa { transform: rotate(90deg); }

.fab-action {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 2rem;
    background: var(--papyrus-block-header-bg, #454c53);
    color: var(--papyrus-text, #cbd2dd);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    transition:
        background-color 0.2s ease,
        transform 0.2s ease;
}

.fab-action:hover {
    background: var(--bs-primary);
    color: var(--bs-white);
    transform: scale(1.05);
}

/* FAB action transition */
.fab-action-enter-active { transition: opacity 0.2s ease, transform 0.2s ease; }
.fab-action-leave-active { transition: opacity 0.15s ease, transform 0.15s ease; }
.fab-action-enter-from { opacity: 0; transform: translateY(10px) scale(0.8); }
.fab-action-leave-to { opacity: 0; transform: translateY(10px) scale(0.8); }

/* FAB backdrop transition */
.fab-backdrop-enter-active { transition: opacity 0.2s ease; }
.fab-backdrop-leave-active { transition: opacity 0.15s ease; }
.fab-backdrop-enter-from,
.fab-backdrop-leave-to { opacity: 0; }

/* Hide FAB when printing */
@media print {
    .fab-container { display: none !important; }
}

/* ── PanelIndex: List View ── */
#blocks { min-height: 400px; }
#blocks.list-view .row { flex-direction: column; gap: 0; }
#blocks.list-view .draggable-column { width: 100%; max-width: 100%; flex: 0 0 100%; margin-bottom: 0.25rem !important; padding-left: 0; padding-right: 0; }
#blocks.list-view .draggable-column .block.sortable { margin-bottom: 0; }
#blocks.list-view .slimScrollDiv { height: auto !important; overflow: visible !important; }
#blocks.list-view .block-content.unit_list { height: auto !important; max-height: none; overflow-y: visible !important; padding: 0.25rem 0.5rem; }
#blocks.list-view .slimScrollBar,
#blocks.list-view .slimScrollRail { display: none !important; }
#blocks.list-view .unit-header { padding: 0.25rem 0.625rem !important; }
#blocks.list-view .draggable-item { margin-bottom: 0.25rem !important; }
#blocks.list-view .block-header .block-title { font-size: 0.85rem; }
#blocks.list-view .block-header .block-title small { font-size: 0.75rem; }
#blocks.list-view .block-header .block-options .btn { padding: 0.125rem 0.375rem; font-size: 0.75rem; }
#blocks.list-view .text-center.text-muted.py-4 { padding: 0.5rem 0 !important; }

/* ── PanelHeader ── */
.panel-header { min-height: 56px; padding: 0.5rem 1rem; }
.panel-header__toggles { display: flex; justify-content: center; gap: 6px; margin-top: 4px; }
.panel-header__toggle-dot { width: 14px; height: 14px; min-width: 14px; border: 2px solid transparent; padding: 0; transition: opacity 0.2s ease, transform 0.15s ease; }
.panel-header__toggle-dot:hover { transform: scale(1.3); }
.panel-header__toggle-dot--off { opacity: 0.35; }

/* ── CreateOrderModal: Wizard Steps ── */
.order-wizard-steps {
    position: relative;
    padding: 1.25rem 1.5rem 0.75rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #dee2e6;
}

.wizard-progress-track {
    position: absolute;
    top: 2.1rem;
    left: 10%;
    right: 10%;
    height: 3px;
    background-color: #dee2e6;
    border-radius: 2px;
    z-index: 0;
}

.wizard-progress-fill {
    height: 100%;
    background-color: #3b7ddd;
    border-radius: 2px;
    transition: width 0.4s ease;
}

.wizard-steps-row { display: flex; justify-content: space-between; position: relative; z-index: 1; }

.wizard-step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    flex: 1;
    transition: opacity 0.2s ease;
    min-width: 0;
}

.wizard-step-item.disabled { opacity: 0.45; cursor: not-allowed; }
.wizard-step-item:not(.disabled):hover .wizard-step-circle { transform: scale(1.1); box-shadow: 0 2px 8px rgba(59, 125, 221, 0.3); }

.wizard-step-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
    background-color: var(--papyrus-block-bg, #fff);
    border: 2px solid var(--papyrus-border, #dee2e6);
    color: var(--papyrus-text-muted, #6c757d);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.wizard-step-item.active .wizard-step-circle { background-color: var(--papyrus-accent, #3b7ddd); border-color: var(--papyrus-accent, #3b7ddd); color: #fff; box-shadow: 0 2px 8px rgba(92, 128, 209, 0.35); }
.wizard-step-item.completed .wizard-step-circle { background-color: #198754; border-color: #198754; color: #fff; }

.wizard-step-label { margin-top: 0.4rem; font-size: 0.75rem; font-weight: 500; color: var(--papyrus-text-muted, #6c757d); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; padding: 0 0.25rem; }
.wizard-step-item.active .wizard-step-label { color: var(--papyrus-accent, #3b7ddd); font-weight: 600; }
.wizard-step-item.completed .wizard-step-label { color: #198754; }

@media (max-width: 576px) {
    .order-wizard-steps { padding: 1rem 0.75rem 0.5rem; }
    .wizard-step-circle { width: 30px; height: 30px; font-size: 0.75rem; }
    .wizard-step-label { font-size: 0.65rem; }
    .wizard-progress-track { left: 8%; right: 8%; }
}

/* ── ShowWorkGroupModal ── */
.modal-header-input { background: transparent; color: white; border: none; }

/* ── ShowCoverModal / ShowInnerModal ── */
.modal-header-title { width: 100%; }
.modal-header-date { color: rgba(255, 255, 255, 0.85); font-size: 0.95rem; margin-bottom: 2px; }
.modal-header-order { color: white; font-size: 1.15rem; font-weight: 600; }

.cover-accent-color { color: #009999; }

.detail-modal__quantity-box { text-align: center; border: 2px solid var(--papyrus-border, #a0aab3); border-radius: 10px; padding: 16px 10px; }
.detail-modal__quantity-number { font-size: 3rem; font-weight: 700; line-height: 1.1; }
.detail-modal__quantity-label { font-size: 1.15rem; font-weight: 500; margin-top: 4px; }

.detail-modal__fields { padding: 0 8px; }
.detail-modal__field { display: flex; align-items: baseline; gap: 8px; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.detail-modal__field:last-child { border-bottom: none; margin-bottom: 0; }
.detail-modal__field-label { font-size: 1rem; font-weight: 700; white-space: nowrap; flex-shrink: 0; }
.detail-modal__field-value { font-size: 1.15rem; word-break: break-word; }

@media (max-width: 575.98px) {
    .detail-modal__quantity-number { font-size: 2.2rem; }
    .detail-modal__field { flex-direction: column; gap: 2px; }
}

/* ── OrderInfoStep ── */
.flatpickr-input { background-color: var(--papyrus-input-bg, #fff) !important; cursor: pointer; }
.flatpickr-input:hover { border-color: #86b7fe; }
.bg-primary-light { background-color: rgba(59, 125, 221, 0.1); border-color: #dee2e6; }
.add-client-btn { min-height: 38px; }

@media (max-width: 576px) {
    .add-client-btn { margin-top: 0.25rem; }
}

/* ── PaymentStep ── */
.payment-summary-card {
    background: var(--papyrus-block-bg, #ffffff);
    border: 1px solid var(--papyrus-border, #dee2e6);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    max-width: 360px;
}

.summary-row { display: flex; justify-content: space-between; align-items: center; padding: 0.35rem 0; }
.summary-row + .summary-row { border-top: 1px solid var(--papyrus-border, #dee2e6); }
.summary-row-highlight { font-weight: 600; }
.summary-label { font-size: 0.875rem; color: var(--papyrus-text, #495057); }
.summary-value { font-size: 0.95rem; font-weight: 600; font-variant-numeric: tabular-nums; }
/* ==========================================================================
   Dashboard Module — DashboardIndex.vue
   ========================================================================== */

/* Section spacing */
.dash-section {
    margin-bottom: 1.5rem;
}

.dash-section-heading {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--papyrus-text-muted);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--papyrus-border);
}

/* ============================================================
   STAT CARDS — CSS Grid, equal sizing
   ============================================================ */
.dash-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.dash-stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--papyrus-block-bg);
    border: 1px solid var(--papyrus-border);
    border-radius: var(--papyrus-block-radius, 0.625rem);
    border-left: 3px solid transparent;
    box-shadow: var(--papyrus-block-shadow);
    transition:
        box-shadow 0.2s ease,
        transform 0.2s ease,
        border-color 0.2s ease;
    text-decoration: none;
    color: inherit;
    min-height: 100px;
}

.dash-stat-card:hover {
    box-shadow: var(--papyrus-block-shadow-hover);
    transform: translateY(-1px);
    text-decoration: none;
    color: inherit;
}

.dash-stat-card--warning { border-left-color: var(--bs-warning); }
.dash-stat-card--info { border-left-color: var(--bs-info); }
.dash-stat-card--success { border-left-color: var(--bs-success); }
.dash-stat-card--danger { border-left-color: var(--bs-danger); }
.dash-stat-card--skeleton { border-left-color: var(--papyrus-border); }

/* Icon area */
.dash-stat-card__icon-area {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    font-size: 1.125rem;
    background: var(--papyrus-block-header-bg);
    color: var(--papyrus-text-muted);
}

.dash-stat-card__icon-area--warning { background: rgba(255, 193, 7, 0.12); color: var(--bs-warning); }
.dash-stat-card__icon-area--info { background: rgba(13, 202, 240, 0.12); color: var(--bs-info); }
.dash-stat-card__icon-area--success { background: rgba(25, 135, 84, 0.12); color: var(--bs-success); }
.dash-stat-card__icon-area--danger { background: rgba(220, 53, 69, 0.12); color: var(--bs-danger); }

/* Content area */
.dash-stat-card__content {
    flex: 1;
    min-width: 0;
}

.dash-stat-card__value {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--papyrus-text);
}

.dash-stat-card__label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--papyrus-text-muted);
    margin-top: 0.125rem;
    letter-spacing: 0.03em;
}

.dash-stat-card__sub {
    font-size: 0.7rem;
    color: var(--papyrus-text-muted);
    margin-top: 0.25rem;
}

/* ============================================================
   DASH PANEL — Unified card for charts, tables, etc.
   ============================================================ */
.dash-panel {
    background: var(--papyrus-block-bg);
    border: 1px solid var(--papyrus-border);
    border-radius: var(--papyrus-block-radius, 0.625rem);
    box-shadow: var(--papyrus-block-shadow);
    overflow: hidden;
}

.dash-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--papyrus-block-header-padding, 0.75rem 1.25rem);
    border-bottom: 1px solid var(--papyrus-border);
    background: var(--papyrus-block-header-bg);
    gap: 0.75rem;
    flex-wrap: wrap;
}

.dash-panel__title {
    font-size: 0.8125rem;
    font-weight: 600;
    margin: 0;
    color: var(--papyrus-text);
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.dash-panel__meta {
    font-size: 0.75rem;
    color: var(--papyrus-text-muted);
    white-space: nowrap;
}

.dash-panel__body {
    padding: 1.25rem;
}

/* ============================================================
   CHARTS GRID — 2/3 + 1/3 on desktop, stacked on mobile
   ============================================================ */
.dash-charts-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.dash-charts-grid > .dash-panel--wide {
    grid-column: auto;
}

/* ============================================================
   DUO GRID — 7/5 split for pipeline+clients, AI sections
   ============================================================ */
.dash-duo-grid {
    display: grid;
    grid-template-columns: 7fr 5fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.dash-duo-grid--ai {
    grid-template-columns: 5fr 7fr;
}

.dash-duo-grid > .dash-panel--wide {
    grid-column: auto;
}

/* ============================================================
   CSS BAR CHART
   ============================================================ */
.css-bar-chart {
    min-height: 180px;
}

.css-bar-chart__bars {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    height: 180px;
    gap: 6px;
}

.css-bar-chart__col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
}

.css-bar-chart__bar {
    width: 100%;
    max-width: 48px;
    min-height: 4px;
    background: var(--bs-info);
    border-radius: 4px 4px 0 0;
    transition: height 0.4s ease;
}

.css-bar-chart--success .css-bar-chart__bar {
    background: var(--bs-success);
}

.css-bar-chart__value {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--papyrus-text);
    margin-bottom: 0.25rem;
}

.css-bar-chart__value--sm {
    font-size: 0.7rem;
}

.css-bar-chart__label {
    font-size: 0.7rem;
    color: var(--papyrus-text-muted);
    margin-top: 0.375rem;
    text-transform: uppercase;
    white-space: nowrap;
}

/* ============================================================
   PIPELINE BAR
   ============================================================ */
.pipeline-row:last-child {
    margin-bottom: 0 !important;
}

.pipeline-bar-track {
    height: 22px;
    background: var(--papyrus-block-header-bg);
    border-radius: 6px;
    overflow: hidden;
}

.pipeline-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--bs-primary), var(--bs-info));
    border-radius: 6px;
    transition: width 0.5s ease;
    min-width: 4px;
}

/* ============================================================
   TOP CLIENTS LIST
   ============================================================ */
.top-clients-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.top-client-row {
    display: flex;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--papyrus-border);
}

.top-client-row:last-child {
    border-bottom: none;
}

.top-client-rank {
    flex-shrink: 0;
    margin-right: 0.75rem;
}

.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 700;
    background: var(--papyrus-block-header-bg);
    color: var(--papyrus-text-muted);
}

.rank-badge--1 { background: rgba(255, 193, 7, 0.2); color: var(--bs-warning); }
.rank-badge--2 { background: rgba(108, 117, 125, 0.2); color: var(--bs-secondary); }
.rank-badge--3 { background: rgba(205, 127, 50, 0.2); color: #cd7f32; }

.top-client-info {
    flex: 1;
    min-width: 0;
}

.top-client-info .fw-semibold {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.top-client-revenue {
    flex-shrink: 0;
    margin-left: 0.75rem;
    text-align: right;
}

/* ============================================================
   AI INSIGHTS TOGGLE
   ============================================================ */
.dash-ai-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 1.25rem;
    background: var(--papyrus-block-bg);
    border: 1px solid var(--papyrus-border);
    border-radius: var(--papyrus-block-radius, 0.625rem);
    cursor: pointer;
    margin-bottom: 1rem;
    transition: background-color 0.15s ease;
    user-select: none;
}

.dash-ai-toggle:hover {
    background: var(--papyrus-block-header-bg);
}

.dash-ai-toggle:focus-visible {
    outline: 2px solid var(--bs-primary);
    outline-offset: -2px;
}

.dash-ai-toggle__left {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.dash-ai-toggle__title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--papyrus-text);
}

.dash-ai-toggle__desc {
    font-size: 0.8rem;
    color: var(--papyrus-text-muted);
    margin-left: 0.5rem;
}

/* ============================================================
   QUICK ACCESS GRID
   ============================================================ */
.dash-quick-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.75rem;
}

.dash-quick-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.25rem 0.75rem;
    background: var(--papyrus-block-bg);
    border: 1px solid var(--papyrus-border);
    border-radius: var(--papyrus-block-radius, 0.625rem);
    box-shadow: var(--papyrus-block-shadow);
    text-decoration: none;
    color: inherit;
    transition:
        box-shadow 0.2s ease,
        transform 0.2s ease;
    text-align: center;
}

.dash-quick-card:hover {
    box-shadow: var(--papyrus-block-shadow-hover);
    transform: translateY(-2px);
    text-decoration: none;
    color: inherit;
}

.dash-quick-card:focus-visible {
    outline: 2px solid var(--bs-primary);
    outline-offset: -2px;
}

.dash-quick-card__icon {
    margin-bottom: 0.5rem;
}

.dash-quick-card__label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--papyrus-text-muted);
    line-height: 1.3;
}

/* ============================================================
   SKELETON ANIMATION
   ============================================================ */
.dash-section .skeleton-line {
    border-radius: 6px;
    background: linear-gradient(
        110deg,
        var(--papyrus-skeleton-base, #e9ecef) 30%,
        var(--papyrus-skeleton-highlight, #f8f9fa) 48%,
        var(--papyrus-skeleton-base, #e9ecef) 66%
    );
    background-size: 300% 100%;
    animation: dash-shimmer 1.8s ease-in-out infinite;
    opacity: 0.85;
}

@keyframes dash-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ============================================================
   UTILITY
   ============================================================ */
.cursor-pointer {
    cursor: pointer;
}

.cursor-pointer:focus-visible {
    outline: 2px solid var(--bs-primary);
    outline-offset: -2px;
}

/* ============================================================
   RESPONSIVE BREAKPOINTS
   ============================================================ */

/* Tablet (768px - 1199px) */
@media (max-width: 1199.98px) {
    .dash-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .dash-charts-grid {
        grid-template-columns: 1fr;
    }

    .dash-duo-grid,
    .dash-duo-grid--ai {
        grid-template-columns: 1fr;
    }

    .dash-quick-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Mobile (<768px) */
@media (max-width: 767.98px) {
    .dash-stats-grid {
        grid-template-columns: 1fr;
    }

    .dash-stat-card {
        min-height: auto;
    }

    .dash-quick-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .css-bar-chart__bars {
        gap: 3px;
    }

    .css-bar-chart__value {
        font-size: 0.65rem;
    }

    .css-bar-chart__label {
        font-size: 0.6rem;
    }

    .css-bar-chart__bar {
        max-width: 32px;
    }

    .dash-ai-toggle__desc {
        display: none;
    }

    .dash-panel__header {
        padding: 0.75rem 1rem;
    }

    .dash-panel__body {
        padding: 1rem;
    }
}

/* ============================================================
   DARK MODE ADJUSTMENTS
   ============================================================ */
html.dark .dash-stat-card:hover {
    box-shadow: var(--papyrus-block-shadow-hover);
}

html.dark .dash-quick-card:hover {
    box-shadow: var(--papyrus-block-shadow-hover);
}

html.dark .dash-section-heading {
    color: var(--papyrus-text-muted);
    border-bottom-color: var(--papyrus-border);
}

/* ============================================================
   PRINT STYLES
   ============================================================ */
@media print {
    .dash-stat-card,
    .dash-panel,
    .dash-quick-card {
        break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }

    .dash-stat-card:hover,
    .dash-quick-card:hover {
        box-shadow: none !important;
        transform: none !important;
    }

    .css-bar-chart__bar {
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .pipeline-bar-fill {
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .rank-badge,
    .rank-badge--1,
    .rank-badge--2,
    .rank-badge--3 {
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .dash-section .skeleton-line {
        display: none !important;
    }

    .btn,
    .dash-panel__header .btn {
        display: none !important;
    }
}
/* ==========================================================================
   Command Palette — CommandPalette.vue
   ========================================================================== */

.command-palette-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 15vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.command-palette {
    width: 100%;
    max-width: 600px;
    margin: 0 16px;
    background: var(--bs-body-bg, #1e2327);
    border: 1px solid var(--bs-border-color, #3a3f44);
    border-radius: 12px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 70vh;
}

@media (max-width: 576px) {
    .command-palette {
        max-width: 100%;
        margin: 0 8px;
        border-radius: 8px;
        max-height: 80vh;
    }

    .command-palette-overlay {
        padding-top: 8vh;
    }
}

.command-palette__header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--bs-border-color, #3a3f44);
}

.command-palette__icon {
    color: var(--bs-secondary-color, #999);
    margin-right: 10px;
    font-size: 0.9rem;
}

.command-palette__input {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--bs-body-color, #d4d4d4);
    font-size: 1rem;
    outline: none;
    padding: 4px 0;
}

.command-palette__input::placeholder {
    color: var(--bs-secondary-color, #888);
}

.command-palette__kbd {
    padding: 2px 6px;
    font-size: 0.7rem;
    background: var(--bs-tertiary-bg, #2c3136);
    border: 1px solid var(--bs-border-color, #3a3f44);
    border-radius: 4px;
    color: var(--bs-secondary-color, #999);
    font-family: inherit;
}

.command-palette__body {
    overflow-y: auto;
    min-height: 80px;
    max-height: 50vh;
    padding: 8px 0;
}

.command-palette__loading,
.command-palette__empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
    color: var(--bs-secondary-color, #999);
    font-size: 0.85rem;
}

.command-palette__group-label {
    padding: 8px 16px 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--bs-secondary-color, #888);
    letter-spacing: 0.05em;
}

.command-palette__item {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    cursor: pointer;
    transition: background 0.1s;
    font-size: 0.875rem;
    color: var(--bs-body-color, #d4d4d4);
}

.command-palette__item:hover,
.command-palette__item--active {
    background: var(--bs-tertiary-bg, #2c3136);
}

.command-palette__item-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.command-palette__item-meta {
    font-size: 0.75rem;
    color: var(--bs-secondary-color, #888);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.command-palette__item-badge {
    flex-shrink: 0;
    padding: 2px 8px;
    font-size: 0.7rem;
    font-weight: 600;
    background: var(--bs-tertiary-bg, #2c3136);
    border-radius: 4px;
    color: var(--bs-success, #2ecc71);
    margin-left: 8px;
}

.command-palette__item-shortcut {
    flex-shrink: 0;
    padding: 2px 6px;
    font-size: 0.65rem;
    background: var(--bs-tertiary-bg, #2c3136);
    border: 1px solid var(--bs-border-color, #3a3f44);
    border-radius: 4px;
    color: var(--bs-secondary-color, #999);
    margin-left: 8px;
    font-family: inherit;
}

.command-palette__footer {
    display: flex;
    gap: 16px;
    padding: 8px 16px;
    border-top: 1px solid var(--bs-border-color, #3a3f44);
    font-size: 0.7rem;
    color: var(--bs-secondary-color, #888);
}

.command-palette__footer kbd {
    padding: 1px 4px;
    font-size: 0.65rem;
    background: var(--bs-tertiary-bg, #2c3136);
    border: 1px solid var(--bs-border-color, #3a3f44);
    border-radius: 3px;
    margin-right: 2px;
    font-family: inherit;
}

/* Transitions */
.palette-fade-enter-active,
.palette-fade-leave-active {
    transition: opacity 0.15s ease;
}

.palette-fade-enter-active .command-palette,
.palette-fade-leave-active .command-palette {
    transition:
        transform 0.15s ease,
        opacity 0.15s ease;
}

.palette-fade-enter-from,
.palette-fade-leave-to {
    opacity: 0;
}

.palette-fade-enter-from .command-palette {
    transform: scale(0.96) translateY(-8px);
    opacity: 0;
}

.palette-fade-leave-to .command-palette {
    transform: scale(0.96) translateY(-8px);
    opacity: 0;
}
/* ==========================================================================
   Auth Module — Login.vue, TenantSelectorPage.vue
   ========================================================================== */

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1c2e 0%, #16213e 40%, #0f3460 70%, #1a1a2e 100%);
    padding: 1rem;
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(ellipse at 30% 20%, rgba(100, 160, 255, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(100, 160, 255, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.login-container {
    width: 100%;
    max-width: 440px;
    position: relative;
    z-index: 1;
}

.login-card {
    background: rgba(43, 49, 54, 0.95);
    border-radius: 1rem;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    overflow: hidden;
}

.login-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 2rem 2rem 0;
}

.login-logo {
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

.login-brand {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.login-brand-name {
    color: #e4e7ed;
}

.login-brand-accent {
    color: #64a0ff;
}

.login-body {
    padding: 1.5rem 2rem 2rem;
}

.login-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #e4e7ed;
    margin-bottom: 0.25rem;
}

.login-subtitle {
    font-size: 0.95rem;
    color: #8b95a5;
    margin-bottom: 1.5rem;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.login-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.login-input-icon {
    position: absolute;
    left: 1rem;
    color: #6b7585;
    font-size: 0.9rem;
    z-index: 2;
    transition: color 0.2s ease;
    pointer-events: none;
}

.login-input-group:focus-within .login-input-icon {
    color: #64a0ff;
}

.login-input-wrapper {
    flex: 1;
    margin-bottom: 0;
}

.login-input-wrapper .form-control {
    padding-left: 2.75rem !important;
    height: 3rem;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 0.625rem !important;
    color: #e4e7ed !important;
    font-size: 0.95rem;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease !important;
}

.login-input-wrapper .form-control::placeholder {
    color: #6b7585;
}

.login-input-wrapper .form-control:focus {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(100, 160, 255, 0.5) !important;
    box-shadow: 0 0 0 3px rgba(100, 160, 255, 0.1) !important;
    outline: none;
}

.login-input-password-wrapper .form-control {
    padding-right: 2.75rem !important;
}

.login-password-toggle {
    position: absolute;
    right: 0.75rem;
    background: none;
    border: none;
    color: #6b7585;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0.25rem;
    z-index: 2;
    transition: color 0.2s ease;
}

.login-password-toggle:hover {
    color: #64a0ff;
}

.login-input-wrapper .form-control:disabled {
    opacity: 0.5;
}

.login-remember {
    display: flex;
    align-items: center;
}

.login-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    user-select: none;
    margin: 0;
}

.login-toggle-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.login-toggle-slider {
    position: relative;
    width: 40px;
    height: 22px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 11px;
    transition: background 0.25s ease;
    flex-shrink: 0;
}

.login-toggle-slider::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    background: #8b95a5;
    border-radius: 50%;
    transition:
        transform 0.25s ease,
        background 0.25s ease;
}

.login-toggle-input:checked + .login-toggle-slider {
    background: rgba(100, 160, 255, 0.3);
}

.login-toggle-input:checked + .login-toggle-slider::after {
    transform: translateX(18px);
    background: #64a0ff;
}

.login-toggle-label {
    font-size: 0.875rem;
    color: #8b95a5;
}

.login-btn {
    width: 100%;
    height: 3rem;
    background: linear-gradient(135deg, #4a80d9, #64a0ff);
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    border-radius: 0.625rem;
    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease,
        opacity 0.15s ease;
    margin-top: 0.5rem;
}

.login-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(100, 160, 255, 0.25);
    color: #fff;
}

.login-btn:active:not(:disabled) {
    transform: translateY(0);
}

.login-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Alerts inside login */
.login-body .alert {
    font-size: 0.875rem;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
}

/* ============================================================
   TENANT SELECTOR PAGE
   ============================================================ */
.tenant-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1c2e 0%, #16213e 40%, #0f3460 70%, #1a1a2e 100%);
    padding: 1rem;
    position: relative;
    overflow: hidden;
}

.tenant-page::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(ellipse at 30% 20%, rgba(100, 160, 255, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(100, 160, 255, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.tenant-page-container {
    width: 100%;
    max-width: 440px;
    position: relative;
    z-index: 1;
}

.tenant-page-card {
    background: rgba(43, 49, 54, 0.95);
    border-radius: 1rem;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    overflow: hidden;
}

.tenant-page-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 2rem 2rem 0;
}

.tenant-page-logo {
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

.tenant-page-brand {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.tenant-page-brand-name {
    color: #e4e7ed;
}

.tenant-page-body {
    padding: 1.5rem 2rem 2rem;
}

.tenant-page-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #e4e7ed;
    margin-bottom: 0.25rem;
}

.tenant-page-subtitle {
    font-size: 0.95rem;
    color: #8b95a5;
    margin-bottom: 1.5rem;
}

.tenant-page-footer {
    margin-top: 1.5rem;
    text-align: center;
}

.tenant-page-logout {
    color: #8b95a5;
    font-size: 0.875rem;
    text-decoration: none;
    transition: color 0.2s ease;
    padding: 0;
}

.tenant-page-logout:hover {
    color: #e4e7ed;
}

/* Style overrides for TenantSelector inside this page */
.tenant-page-body .tenant-selector {
    min-width: 100%;
}

.tenant-page-body .form-control,
.tenant-page-body .form-select {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 0.625rem !important;
    color: #e4e7ed !important;
}

.tenant-page-body .form-label {
    color: #8b95a5;
}

.tenant-page-body .badge {
    font-size: 0.75rem;
}

.tenant-page-body .tenant-selector-go {
    background: linear-gradient(135deg, #4a80d9, #64a0ff);
    border: none;
    border-radius: 0.625rem;
    font-weight: 600;
    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease;
}

.tenant-page-body .tenant-selector-go:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(100, 160, 255, 0.25);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 480px) {
    .login-container {
        max-width: 100%;
    }

    .login-header {
        padding: 1.5rem 1.25rem 0;
    }

    .login-body {
        padding: 1.25rem;
    }

    .login-title {
        font-size: 1.15rem;
    }

    .tenant-page-container {
        max-width: 100%;
    }

    .tenant-page-header {
        padding: 1.5rem 1.25rem 0;
    }

    .tenant-page-body {
        padding: 1.25rem;
    }

    .tenant-page-title {
        font-size: 1.15rem;
    }
}
/* ==========================================================================
   Accounting Module — AccountingIndex, Finance, Reports, DebtCreditReport,
   InvoicesList, InvoiceDetail, TransactionCash, StockManagement,
   BankNavbar, StockSlipModal, InvoiceModal
   ========================================================================== */

/* ============================================================
   ACCOUNTING OVERVIEW LAYOUT (AccountingIndex)
   ============================================================ */

/* Section spacing & heading */
.acc-section {
    margin-bottom: 1.5rem;
}

.acc-section-heading {
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--bs-secondary-color, #6c757d);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--bs-border-color, #dee2e6);
}

/* ── Stat Cards — 5 columns on desktop ── */
.acc-stats-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.acc-stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--bs-body-bg, #fff);
    border: 1px solid var(--bs-border-color, #dee2e6);
    border-radius: var(--papyrus-block-radius, 0.5rem);
    border-left: 4px solid transparent;
    box-shadow: var(--papyrus-block-shadow, 0 1px 3px rgba(0, 0, 0, 0.1));
    transition:
        box-shadow 0.2s ease,
        transform 0.2s ease;
    min-height: 100px;
}

.acc-stat-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.acc-stat-card--success { border-left-color: var(--bs-success); }
.acc-stat-card--danger { border-left-color: var(--bs-danger); }
.acc-stat-card--info { border-left-color: var(--bs-info); }
.acc-stat-card--warning { border-left-color: var(--bs-warning); }
.acc-stat-card--purple { border-left-color: #7c3aed; }
.acc-stat-card--skeleton { border-left-color: var(--bs-border-color, #dee2e6); }

/* Icon area */
.acc-stat-card__icon-area {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    font-size: 1.25rem;
    background: var(--bs-tertiary-bg, #f8f9fa);
    color: var(--bs-secondary-color, #6c757d);
}

.acc-stat-card__icon-area--success { background: rgba(25, 135, 84, 0.12); color: var(--bs-success); }
.acc-stat-card__icon-area--danger { background: rgba(220, 53, 69, 0.12); color: var(--bs-danger); }
.acc-stat-card__icon-area--info { background: rgba(13, 202, 240, 0.12); color: var(--bs-info); }
.acc-stat-card__icon-area--warning { background: rgba(255, 193, 7, 0.12); color: var(--bs-warning); }
.acc-stat-card__icon-area--purple { background: rgba(124, 58, 237, 0.12); color: #7c3aed; }

/* Content area */
.acc-stat-card__content { flex: 1; min-width: 0; }

.acc-stat-card__value {
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--bs-body-color);
}

.acc-stat-card__label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--bs-secondary-color, #6c757d);
    margin-top: 0.125rem;
    letter-spacing: 0.02em;
}

.acc-stat-card__sub {
    font-size: 0.7rem;
    color: var(--bs-secondary-color, #999);
    margin-top: 0.25rem;
}

/* ── Panel — Unified card ── */
.acc-panel {
    background: var(--bs-body-bg, #fff);
    border: 1px solid var(--bs-border-color, #dee2e6);
    border-radius: var(--papyrus-block-radius, 0.5rem);
    box-shadow: var(--papyrus-block-shadow, 0 1px 3px rgba(0, 0, 0, 0.1));
    overflow: hidden;
}

.acc-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--papyrus-block-header-padding, 0.75rem 1.25rem);
    border-bottom: 1px solid var(--bs-border-color, #dee2e6);
    background: var(--papyrus-block-header-bg, var(--bs-tertiary-bg, #f8f9fa));
    gap: 0.75rem;
    flex-wrap: wrap;
}

.acc-panel__title {
    font-size: 0.875rem;
    font-weight: 600;
    margin: 0;
    color: var(--bs-body-color);
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.acc-panel__meta {
    font-size: 0.75rem;
    color: var(--bs-secondary-color, #6c757d);
    white-space: nowrap;
}

.acc-panel__body {
    padding: 1.25rem;
}

/* ── Duo Grid — 7/5 split ── */
.acc-duo-grid {
    display: grid;
    grid-template-columns: 7fr 5fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.acc-duo-grid > .acc-panel--wide {
    grid-column: auto;
}

/* ── Cash Flow Bar Chart ── */
.cashflow-chart { min-height: 200px; }

.cashflow-chart__legend {
    display: flex;
    gap: 1.5rem;
    justify-content: flex-end;
    margin-bottom: 0.75rem;
}

.cf-legend-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    color: var(--bs-secondary-color, #6c757d);
}

.cf-dot { width: 10px; height: 10px; border-radius: 2px; }
.cf-dot--income { background: var(--bs-success); }
.cf-dot--expense { background: var(--bs-danger); }

.cashflow-chart__bars {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    height: 180px;
    gap: 8px;
}

.cashflow-chart__group {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
}

.cashflow-chart__pair {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    flex: 1;
    width: 100%;
    justify-content: center;
}

.cashflow-chart__bar {
    width: 40%;
    max-width: 28px;
    min-height: 4px;
    border-radius: 3px 3px 0 0;
    transition: height 0.4s ease;
    cursor: pointer;
}

.cashflow-chart__bar--income { background: var(--bs-success); }
.cashflow-chart__bar--expense { background: var(--bs-danger); opacity: 0.75; }
.cashflow-chart__bar:hover { opacity: 1; filter: brightness(1.1); }

.cashflow-chart__label {
    font-size: 0.65rem;
    color: var(--bs-secondary-color);
    margin-top: 0.375rem;
    text-transform: uppercase;
    white-space: nowrap;
    text-align: center;
}

/* ── Due Checks List ── */
.due-checks-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.due-check-row {
    padding: 0.625rem 0;
    border-bottom: 1px solid var(--bs-border-color, #dee2e6);
}

.due-check-row:last-child {
    border-bottom: none;
}

/* ── Quick Actions Grid ── */
.acc-actions-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1rem;
}

.acc-action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 0.75rem;
    background: var(--bs-body-bg, #fff);
    border: 1px solid var(--bs-border-color, #dee2e6);
    border-radius: var(--papyrus-block-radius, 0.5rem);
    box-shadow: var(--papyrus-block-shadow, 0 1px 3px rgba(0, 0, 0, 0.1));
    text-decoration: none;
    color: inherit;
    transition:
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.acc-action-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    text-decoration: none;
    color: inherit;
}

.acc-action-card__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    font-size: 1.25rem;
    background: var(--bs-tertiary-bg, #f8f9fa);
    color: var(--bs-secondary-color);
}

.acc-action-card__icon--success { background: rgba(25, 135, 84, 0.12); color: var(--bs-success); }
.acc-action-card__icon--danger { background: rgba(220, 53, 69, 0.12); color: var(--bs-danger); }
.acc-action-card__icon--info { background: rgba(13, 202, 240, 0.12); color: var(--bs-info); }
.acc-action-card__icon--warning { background: rgba(255, 193, 7, 0.12); color: var(--bs-warning); }
.acc-action-card__icon--purple { background: rgba(124, 58, 237, 0.12); color: #7c3aed; }
.acc-action-card__icon--primary { background: rgba(var(--bs-primary-rgb), 0.12); color: var(--bs-primary); }

.acc-action-card__label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--bs-secondary-color, #6c757d);
    text-align: center;
    letter-spacing: 0.02em;
}

/* ============================================================
   FINANCE PAGE (Finance.vue)
   ============================================================ */
.finance-page__nav-kbd {
    padding: 0.125rem 0.25rem;
    font-size: 0.7rem;
    color: var(--papyrus-block-bg, #fff);
    background-color: var(--papyrus-text, #212529);
    border-radius: 0.25rem;
    margin-left: 0.375rem;
    vertical-align: middle;
}

/* ============================================================
   DEBT CREDIT REPORT (DebtCreditReport.vue)
   ============================================================ */
.debt-credit-row {
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.debt-credit-row:hover {
    background-color: rgba(var(--bs-primary-rgb, 13, 110, 253), 0.06) !important;
}

[data-theme='dark'] .debt-credit-row:hover {
    background-color: rgba(255, 255, 255, 0.05) !important;
}

/* ============================================================
   REPORTS PAGE (Reports.vue)
   ============================================================ */
.report-coming-soon {
    opacity: 0.6;
}

/* ============================================================
   INVOICES LIST (InvoicesList.vue)
   ============================================================ */
.nav-tabs .nav-item.ms-auto {
    padding: 0.5rem 0;
}

/* ============================================================
   INVOICE DETAIL (InvoiceDetail.vue)
   ============================================================ */
.text-prewrap {
    white-space: pre-wrap;
}

/* ============================================================
   STOCK SLIP MODAL (StockSlipModal.vue)
   ============================================================ */
.bg-primary-dark {
    background-color: #0665d0;
    color: white;
}

.bg-primary-dark .block-title {
    color: white;
}

/* ============================================================
   INVOICE MODAL (InvoiceModal.vue)
   ============================================================ */
.bg-danger-light {
    background-color: #fcebeb;
}

.bg-success-light {
    background-color: #eaf7ed;
}

html.dark .bg-danger-light {
    background-color: rgba(220, 53, 69, 0.15);
}

html.dark .bg-success-light {
    background-color: rgba(25, 135, 84, 0.15);
}

/* ============================================================
   BANK NAVBAR (BankNavbar.vue)
   ============================================================ */
.nav-main-item.open > .nav-main-submenu {
    display: block;
}

/* ============================================================
   ACCOUNTING RESPONSIVE
   ============================================================ */
@media (max-width: 1199.98px) {
    .acc-stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .acc-actions-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

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

    .acc-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Horizontal scrollable nav on mobile (Finance, TransactionCash, StockManagement, BankNavbar, Reports) */
    .accounting-nav-mobile .overflow-x-auto {
        -webkit-overflow-scrolling: touch;
    }

    .accounting-nav-mobile .flex-nowrap {
        white-space: nowrap;
    }

    .accounting-nav-mobile .flex-nowrap .nav-main-link-name {
        white-space: nowrap;
    }

    .accounting-nav-mobile .flex-nowrap .nav-link {
        white-space: nowrap;
    }
}

@media (max-width: 767.98px) {
    .reports-nav-tabs .overflow-x-auto {
        -webkit-overflow-scrolling: touch;
    }

    .reports-nav-tabs .flex-nowrap {
        white-space: nowrap;
    }

    .reports-nav-tabs .flex-nowrap .nav-link {
        white-space: nowrap;
    }
}

@media (max-width: 575.98px) {
    .acc-stats-grid {
        grid-template-columns: 1fr;
    }

    .acc-actions-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .acc-stat-card__value {
        font-size: 1.1rem;
    }
}

@media print {
    .invoice-detail__print-hide {
        display: none !important;
    }

    .invoice-detail .d-print-none {
        display: none !important;
    }
}

/* ============================================================
   ACCOUNTING DARK MODE
   ============================================================ */
[data-theme='dark'] .acc-section-heading {
    color: #8b95a5;
    border-bottom-color: var(--papyrus-border);
}

[data-theme='dark'] .acc-stat-card {
    background: var(--papyrus-block-bg);
    border-color: var(--papyrus-border);
    color: var(--papyrus-text);
}

[data-theme='dark'] .acc-stat-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

[data-theme='dark'] .acc-stat-card__icon-area {
    background: #363c42;
    color: #8b95a5;
}

[data-theme='dark'] .acc-stat-card__icon-area--success { background: rgba(25, 135, 84, 0.18); }
[data-theme='dark'] .acc-stat-card__icon-area--danger { background: rgba(220, 53, 69, 0.18); }
[data-theme='dark'] .acc-stat-card__icon-area--info { background: rgba(13, 202, 240, 0.18); }
[data-theme='dark'] .acc-stat-card__icon-area--warning { background: rgba(255, 193, 7, 0.18); }
[data-theme='dark'] .acc-stat-card__icon-area--purple { background: rgba(124, 58, 237, 0.18); }

[data-theme='dark'] .acc-stat-card__value {
    color: #f0f2f5;
}
/* ==========================================================================
   Super Admin Module — SuperAdminLayout, SuperAdminDashboard,
   TenantList, TenantDetail
   ========================================================================== */

/* ============================================================
   SUPER ADMIN LAYOUT
   ============================================================ */

/* ── Variables ── */
.sa-layout {
    --sa-sidebar-width: 260px;
    --sa-sidebar-bg: #2b3136;
    --sa-sidebar-bg-hover: rgba(255, 255, 255, 0.05);
    --sa-sidebar-bg-active: rgba(72, 184, 108, 0.12);
    --sa-sidebar-text: rgba(255, 255, 255, 0.55);
    --sa-sidebar-text-active: #4ade80;
    --sa-sidebar-border: rgba(255, 255, 255, 0.06);
    --sa-accent: var(--papyrus-accent, #48b86c);
    --sa-accent-light: #4ade80;
    --sa-header-height: 60px;
    --sa-content-bg: var(--papyrus-bg, #f5f6f8);
    --sa-header-bg: var(--papyrus-header-bg, #ffffff);
    --sa-header-border: var(--papyrus-header-border, #e4e7ed);
    --sa-radius: 10px;
    --sa-transition: 0.2s ease;
}

/* ── Layout ── */
.sa-layout {
    display: flex;
    min-height: 100vh;
    background: var(--sa-content-bg);
}

/* ── Sidebar ── */
.sa-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sa-sidebar-width);
    background: var(--sa-sidebar-bg);
    color: var(--sa-sidebar-text);
    display: flex;
    flex-direction: column;
    z-index: 1050;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    overflow-x: hidden;
}

.sa-sidebar__brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1rem;
    border-bottom: 1px solid var(--sa-sidebar-border);
}

.sa-sidebar__brand-inner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sa-sidebar__logo {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--sa-accent), var(--sa-accent-light));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1rem;
    flex-shrink: 0;
}

.sa-sidebar__app-name {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.sa-sidebar__badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    background: rgba(99, 102, 241, 0.2);
    color: var(--sa-accent-light);
    line-height: 1.4;
}

.sa-sidebar__close {
    display: none;
    background: none;
    border: none;
    color: var(--sa-sidebar-text);
    font-size: 1.15rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 6px;
    transition: all var(--sa-transition);
}

.sa-sidebar__close:hover {
    color: #fff;
    background: var(--sa-sidebar-bg-hover);
}

/* ── Navigation ── */
.sa-sidebar__nav {
    flex: 1;
    padding: 0.75rem 0;
}

.sa-sidebar__nav-label {
    padding: 0.5rem 1.25rem 0.5rem;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.35);
}

.sa-sidebar__nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1.25rem;
    margin: 0.125rem 0.625rem;
    border-radius: var(--sa-radius);
    color: var(--sa-sidebar-text);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--sa-transition);
    position: relative;
}

.sa-sidebar__nav-item:hover {
    background: var(--sa-sidebar-bg-hover);
    color: var(--sa-sidebar-text-active);
}

.sa-sidebar__nav-item.is-active,
.sa-sidebar__nav-item.router-link-active {
    background: var(--sa-sidebar-bg-active);
    color: var(--sa-sidebar-text-active);
}

.sa-sidebar__nav-item.is-active::before,
.sa-sidebar__nav-item.router-link-active::before {
    content: '';
    position: absolute;
    left: -0.625rem;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: var(--sa-accent);
    border-radius: 0 3px 3px 0;
}

.sa-sidebar__nav-item i {
    font-size: 1rem;
    width: 20px;
    text-align: center;
    opacity: 0.75;
}

.sa-sidebar__nav-item.is-active i,
.sa-sidebar__nav-item.router-link-active i {
    opacity: 1;
    color: var(--sa-accent-light);
}

/* ── Sidebar Footer ── */
.sa-sidebar__footer {
    padding: 0.875rem 1rem;
    border-top: 1px solid var(--sa-sidebar-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.sa-sidebar__user {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    min-width: 0;
}

.sa-sidebar__avatar {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
    letter-spacing: 0.02em;
}

.sa-sidebar__user-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.sa-sidebar__user-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sa-sidebar__user-role {
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.4);
}

.sa-sidebar__logout {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--sa-sidebar-text);
    cursor: pointer;
    transition: all var(--sa-transition);
    flex-shrink: 0;
}

.sa-sidebar__logout:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

/* ── Overlay ── */
.sa-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    z-index: 1040;
}

/* ── Main Area ── */
.sa-main {
    flex: 1;
    margin-left: var(--sa-sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-width: 0;
}

/* ── Header ── */
.sa-header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--sa-header-height);
    padding: 0 1.5rem;
    background: var(--sa-header-bg);
    border-bottom: 1px solid var(--sa-header-border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.sa-header__left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sa-header__hamburger {
    display: none;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: var(--sa-radius);
    background: transparent;
    color: var(--papyrus-text, #374151);
    font-size: 1.1rem;
    cursor: pointer;
    transition: all var(--sa-transition);
}

.sa-header__hamburger:hover {
    background: var(--papyrus-hover-bg, #f3f4f6);
}

.sa-header__title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--bs-emphasis-color, #111827);
    margin: 0;
    white-space: nowrap;
}

.sa-header__right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sa-header__user-menu {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.625rem;
    border-radius: var(--sa-radius);
    cursor: pointer;
    transition: all var(--sa-transition);
    user-select: none;
}

.sa-header__user-menu:hover {
    background: var(--papyrus-hover-bg, #f3f4f6);
}

.sa-header__avatar {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    flex-shrink: 0;
}

.sa-header__user-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--papyrus-text, #374151);
}

.sa-header__chevron {
    font-size: 0.6rem;
    color: var(--papyrus-text-muted, #9ca3af);
    transition: transform var(--sa-transition);
}

.sa-header__chevron.is-open {
    transform: rotate(180deg);
}

/* ── Dropdown ── */
.sa-header__dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    width: 220px;
    background: var(--papyrus-block-bg, #fff);
    border-radius: var(--sa-radius);
    box-shadow:
        0 10px 15px -3px rgba(0, 0, 0, 0.1),
        0 4px 6px -4px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--papyrus-border, #e5e7eb);
    overflow: hidden;
    z-index: 200;
}

.sa-header__dropdown-header {
    padding: 0.75rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.sa-header__dropdown-header strong {
    font-size: 0.85rem;
    color: var(--bs-emphasis-color, #111827);
}

.sa-header__dropdown-header small {
    font-size: 0.7rem;
    color: var(--papyrus-text-muted, #6b7280);
}

.sa-header__dropdown-divider {
    height: 1px;
    background: var(--papyrus-border, #e5e7eb);
}

.sa-header__dropdown-item {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0.6rem 1rem;
    border: none;
    background: none;
    font-size: 0.825rem;
    color: var(--papyrus-text, #374151);
    cursor: pointer;
    transition: all var(--sa-transition);
    text-align: left;
}

.sa-header__dropdown-item:hover {
    background: var(--papyrus-hover-bg, #f3f4f6);
}

.sa-header__dropdown-item--danger {
    color: #dc2626;
}

.sa-header__dropdown-item--danger:hover {
    background: rgba(220, 53, 69, 0.1);
}

/* ── Content ── */
.sa-content {
    flex: 1;
    padding: 1.5rem;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
}

/* ── Layout Transitions ── */
.sa-page-enter-active,
.sa-page-leave-active {
    transition:
        opacity 0.15s ease,
        transform 0.15s ease;
}

.sa-page-enter-from {
    opacity: 0;
    transform: translateY(6px);
}

.sa-page-leave-to {
    opacity: 0;
    transform: translateY(-4px);
}

.sa-fade-enter-active,
.sa-fade-leave-active {
    transition: opacity 0.2s ease;
}

.sa-fade-enter-from,
.sa-fade-leave-to {
    opacity: 0;
}

.sa-dropdown-enter-active,
.sa-dropdown-leave-active {
    transition:
        opacity 0.15s ease,
        transform 0.15s ease;
}

.sa-dropdown-enter-from,
.sa-dropdown-leave-to {
    opacity: 0;
    transform: translateY(-4px) scale(0.97);
}

/* ============================================================
   SUPER ADMIN DASHBOARD
   ============================================================ */
.sa-dashboard {
    padding-bottom: 2rem;
}

/* ── Hero Stats Grid ── */
.sa-hero-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.sa-hero-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    border-radius: var(--papyrus-block-radius, 0.5rem);
    overflow: hidden;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.sa-hero-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.sa-hero-card::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.08;
    border-radius: inherit;
}

.sa-hero-blue { background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%); color: #fff; }
.sa-hero-green { background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%); color: #fff; }
.sa-hero-purple { background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%); color: #fff; }
.sa-hero-orange { background: linear-gradient(135deg, #f97316 0%, #ea580c 100%); color: #fff; }

.sa-hero-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.2);
    font-size: 1.35rem;
    flex-shrink: 0;
}

.sa-hero-content { min-width: 0; }
.sa-hero-value { font-size: 1.75rem; font-weight: 700; line-height: 1.2; }
.sa-hero-label { font-size: 0.8rem; opacity: 0.85; margin-top: 0.15rem; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }

/* ── Secondary Stats Grid ── */
.sa-secondary-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.sa-secondary-card {
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color, rgba(0, 0, 0, 0.1));
    border-radius: var(--papyrus-block-radius, 0.5rem);
    padding: var(--papyrus-block-content-padding, 1.25rem);
    box-shadow: var(--papyrus-block-shadow, 0 1px 3px rgba(0, 0, 0, 0.1));
}

.sa-card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--bs-secondary-color);
    margin-bottom: 1rem;
}

.sa-card-header i { font-size: 0.9rem; }

/* Breakdown Bar */
.sa-breakdown-bar {
    display: flex;
    height: 12px;
    border-radius: 6px;
    overflow: hidden;
    background: var(--bs-secondary-bg, #e9ecef);
    margin-bottom: 0.75rem;
}

.sa-bar-segment { height: 100%; transition: width 0.6s ease; min-width: 2px; }
.sa-bar-active { background: #22c55e; }
.sa-bar-trialing { background: #3b82f6; }
.sa-bar-inactive { background: #94a3b8; }

.sa-breakdown-legend { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.sa-legend-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    color: var(--bs-body-color);
}

.sa-legend-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.sa-dot-active { background: #22c55e; }
.sa-dot-trialing { background: #3b82f6; }
.sa-dot-inactive { background: #94a3b8; }

/* Revenue Card */
.sa-revenue-value { font-size: 1.75rem; font-weight: 700; color: #22c55e; }

/* Cancelled Card */
.sa-cancelled-card { border-left: 3px solid #ef4444; }
.sa-cancelled-value { font-size: 2rem; font-weight: 700; color: #ef4444; }

/* ── Section ── */
.sa-section { margin-bottom: 1.5rem; }

.sa-section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--bs-body-color);
    margin-bottom: 1rem;
}

.sa-section-title i { color: var(--bs-secondary-color); }

/* ── Plan Distribution Grid ── */
.sa-plan-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.sa-plan-card {
    position: relative;
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color, rgba(0, 0, 0, 0.1));
    border-radius: var(--papyrus-block-radius, 0.5rem);
    padding: 1.5rem;
    text-align: center;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sa-plan-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1); }

.sa-plan-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}

.sa-plan-blue::before { background: linear-gradient(90deg, #3b82f6, #60a5fa); }
.sa-plan-purple::before { background: linear-gradient(90deg, #8b5cf6, #a78bfa); }
.sa-plan-gold::before { background: linear-gradient(90deg, #f59e0b, #fbbf24); }

.sa-plan-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.sa-plan-blue .sa-plan-badge { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }
.sa-plan-purple .sa-plan-badge { background: rgba(139, 92, 246, 0.1); color: #8b5cf6; }
.sa-plan-gold .sa-plan-badge { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }

.sa-plan-name { font-size: 0.85rem; font-weight: 600; color: var(--bs-secondary-color); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 0.25rem; }
.sa-plan-count { font-size: 2.25rem; font-weight: 700; color: var(--bs-body-color); line-height: 1.2; }
.sa-plan-subtitle { font-size: 0.75rem; color: var(--bs-secondary-color); margin-bottom: 0.75rem; }
.sa-plan-percent { font-size: 0.85rem; font-weight: 600; color: var(--bs-body-color); }
.sa-plan-of-total { font-weight: 400; color: var(--bs-secondary-color); font-size: 0.75rem; }

/* ── Quick Actions ── */
.sa-actions-row { display: flex; gap: 1rem; flex-wrap: wrap; }

.sa-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.sa-action-primary { background: linear-gradient(135deg, #3b82f6, #1d4ed8); color: #fff; }
.sa-action-primary:hover { background: linear-gradient(135deg, #2563eb, #1e40af); color: #fff; box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3); }
.sa-action-secondary { background: var(--bs-body-bg); color: var(--bs-body-color); border: 1px solid var(--bs-border-color, rgba(0, 0, 0, 0.15)); }
.sa-action-secondary:hover { background: var(--bs-secondary-bg, #f8f9fa); color: var(--bs-body-color); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); }

/* ── Skeleton Loading ── */
.sa-skeleton-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color, rgba(0, 0, 0, 0.08));
    border-radius: var(--papyrus-block-radius, 0.5rem);
    gap: 0.75rem;
}

.sa-skeleton {
    border-radius: 0.375rem;
    background: linear-gradient(90deg, var(--bs-secondary-bg, #e9ecef) 25%, var(--bs-tertiary-bg, #f8f9fa) 50%, var(--bs-secondary-bg, #e9ecef) 75%);
    background-size: 200% 100%;
    animation: sa-shimmer 1.5s infinite ease-in-out;
}

.sa-skeleton-icon { width: 3rem; height: 3rem; border-radius: 0.75rem; }
.sa-skeleton-value { width: 60%; height: 1.5rem; }
.sa-skeleton-label { width: 80%; height: 0.75rem; }
.sa-skeleton-bar { width: 100%; height: 12px; border-radius: 6px; }

@keyframes sa-shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* ============================================================
   TENANT LIST
   ============================================================ */
.filters-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem 1.25rem;
    background: var(--bs-body-bg);
    border-radius: var(--papyrus-block-radius, 0.5rem);
    box-shadow: var(--papyrus-block-shadow, 0 1px 3px rgba(0, 0, 0, 0.1));
    border: 1px solid var(--bs-border-color-translucent);
}

.search-box { position: relative; flex: 1; min-width: 220px; }

.search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--bs-secondary-color);
    z-index: 2;
    font-size: 0.875rem;
    pointer-events: none;
}

.search-box input { padding-left: 2.25rem; }

.filter-group { display: flex; flex-direction: column; gap: 0.375rem; }

.filter-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--bs-secondary-color);
}

.filter-pills { display: flex; gap: 0.375rem; flex-wrap: wrap; }

.filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid var(--bs-border-color);
    border-radius: 2rem;
    background: transparent;
    color: var(--bs-secondary-color);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.filter-pill:hover { background: var(--bs-secondary-bg); color: var(--bs-body-color); }

.filter-pill--active { border-color: var(--bs-primary); background: rgba(var(--bs-primary-rgb), 0.1); color: var(--bs-primary); }
.filter-pill--active.filter-pill--success { border-color: #25af60; background: rgba(37, 175, 96, 0.1); color: #25af60; }
.filter-pill--active.filter-pill--danger { border-color: #dc3545; background: rgba(220, 53, 69, 0.1); color: #dc3545; }
.filter-pill--active.filter-pill--warning { border-color: #ffb300; background: rgba(255, 179, 0, 0.1); color: #ffb300; }
.filter-pill--active.filter-pill--info { border-color: #0dcaf0; background: rgba(13, 202, 240, 0.1); color: #0dcaf0; }
.filter-pill--active.filter-pill--primary { border-color: var(--bs-primary); background: rgba(var(--bs-primary-rgb), 0.1); color: var(--bs-primary); }

.filter-pill__count { font-size: 0.7rem; background: rgba(0, 0, 0, 0.1); padding: 0.1rem 0.4rem; border-radius: 1rem; }

/* Tenant Cards */
.tenant-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 1rem; transition: opacity 0.2s ease; }
.tenant-cards--loading { opacity: 0.6; pointer-events: none; }

.tenant-card {
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color-translucent);
    border-radius: var(--papyrus-block-radius, 0.5rem);
    padding: var(--papyrus-block-content-padding, 1.25rem);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tenant-card:hover { border-color: var(--bs-primary); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); transform: translateY(-2px); }

.tenant-card__header { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.75rem; }
.tenant-card__name-group { display: flex; align-items: center; gap: 0.75rem; min-width: 0; }

.tenant-card__avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.5rem;
    background: linear-gradient(135deg, var(--bs-primary), rgba(var(--bs-primary-rgb), 0.7));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.tenant-card__name { font-size: 1rem; font-weight: 600; margin: 0; color: var(--bs-body-color); line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tenant-card__subdomain { font-size: 0.8rem; color: var(--bs-secondary-color); }
.tenant-card__badges { display: flex; gap: 0.375rem; flex-shrink: 0; }
.tenant-card__body { flex: 1; }
.tenant-card__stats { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.tenant-card__stat { display: flex; align-items: center; gap: 0.375rem; font-size: 0.8rem; color: var(--bs-secondary-color); }
.tenant-card__stat i { font-size: 0.75rem; width: 1rem; text-align: center; }
.tenant-card__stat--trial { color: #ffb300; }
.tenant-card__footer { display: flex; gap: 0.5rem; padding-top: 0.75rem; border-top: 1px solid var(--bs-border-color-translucent); }

/* ============================================================
   TENANT DETAIL
   ============================================================ */
.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    background: var(--bs-body-bg);
    border-radius: var(--papyrus-block-radius, 0.5rem);
    border: 1px solid var(--bs-border-color-translucent);
    box-shadow: var(--papyrus-block-shadow, 0 1px 3px rgba(0, 0, 0, 0.1));
}

.detail-header__left { display: flex; align-items: flex-start; }
.detail-header__title-row { display: flex; align-items: center; gap: 0.625rem; flex-wrap: wrap; }
.detail-header__title { font-size: 1.5rem; font-weight: 700; margin: 0; color: var(--bs-body-color); }
.detail-header__subtitle { font-size: 0.875rem; color: var(--bs-secondary-color); margin-top: 0.25rem; display: block; }
.detail-header__actions { display: flex; gap: 0.5rem; flex-wrap: wrap; flex-shrink: 0; }

.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }

.info-card {
    background: var(--bs-body-bg);
    border-radius: var(--papyrus-block-radius, 0.5rem);
    padding: var(--papyrus-block-content-padding, 1.25rem);
    border: 1px solid var(--bs-border-color-translucent);
    box-shadow: var(--papyrus-block-shadow, 0 1px 3px rgba(0, 0, 0, 0.1));
}

.info-card--full { grid-column: 1 / -1; }

.info-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--bs-border-color-translucent);
}

.info-card__title { font-size: 1rem; font-weight: 600; margin: 0; color: var(--bs-body-color); display: flex; align-items: center; }
.info-card__title i { color: var(--bs-secondary-color); font-size: 0.9rem; }
.info-card__count { display: inline-flex; align-items: center; justify-content: center; min-width: 1.5rem; height: 1.5rem; padding: 0 0.4rem; margin-left: 0.5rem; font-size: 0.75rem; font-weight: 600; border-radius: 1rem; background: rgba(var(--bs-primary-rgb), 0.1); color: var(--bs-primary); }

.info-rows { display: flex; flex-direction: column; }
.info-row { display: flex; justify-content: space-between; align-items: center; padding: 0.625rem 0; border-bottom: 1px solid var(--bs-border-color-translucent); }
.info-row:last-child { border-bottom: none; }
.info-row__label { color: var(--bs-secondary-color); font-weight: 500; font-size: 0.875rem; }
.info-row__value { font-weight: 500; color: var(--bs-body-color); }
.info-row__value--mono { font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace; font-size: 0.85rem; }

.subscription-highlight {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, rgba(var(--bs-primary-rgb), 0.05), rgba(var(--bs-primary-rgb), 0.12));
    border-radius: 0.5rem;
    border: 1px solid rgba(var(--bs-primary-rgb), 0.15);
}

.subscription-highlight__plan { font-size: 1.25rem; font-weight: 700; color: var(--bs-primary); }
.subscription-highlight__price { font-size: 1.1rem; font-weight: 600; color: var(--bs-body-color); }
.subscription-highlight__period { font-size: 0.8rem; font-weight: 400; color: var(--bs-secondary-color); }

.detail-table { width: 100%; margin-top: 0; }
.detail-table th { text-align: left; padding: 0.625rem 0.75rem; background: var(--bs-secondary-bg); font-size: 0.8rem; font-weight: 600; color: var(--bs-secondary-color); text-transform: uppercase; letter-spacing: 0.03em; }
.detail-table td { padding: 0.625rem 0.75rem; border-top: 1px solid var(--bs-border-color-translucent); font-size: 0.875rem; }
.table-row--active { background: rgba(var(--bs-primary-rgb), 0.03); }

.user-cell { display: flex; align-items: center; gap: 0.625rem; }
.user-cell__avatar { width: 2rem; height: 2rem; border-radius: 50%; background: var(--bs-secondary-bg); color: var(--bs-secondary-color); display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 0.7rem; flex-shrink: 0; }

/* ============================================================
   SUPER ADMIN RESPONSIVE
   ============================================================ */
@media (max-width: 1199.98px) {
    .sa-hero-grid { grid-template-columns: repeat(2, 1fr); }
    .sa-secondary-grid { grid-template-columns: 1fr 1fr; }
    .sa-breakdown-card { grid-column: 1 / -1; }
}

@media (max-width: 767.98px) {
    .sa-sidebar { transform: translateX(-100%); }
    .sa-sidebar.is-open { transform: translateX(0); }
    .sa-sidebar__close { display: flex; }
    .sa-main { margin-left: 0; }
    .sa-header { padding: 0 1rem; }
    .sa-header__hamburger { display: flex; }
    .sa-content { padding: 1rem; }

    .sa-hero-grid { grid-template-columns: 1fr; }
    .sa-secondary-grid { grid-template-columns: 1fr; }
    .sa-plan-grid { grid-template-columns: 1fr; }
    .sa-actions-row { flex-direction: column; }
    .sa-action-btn { justify-content: center; }

    .filters-bar { flex-direction: column; }
    .search-box { width: 100%; }
    .tenant-cards { grid-template-columns: 1fr; }
    .tenant-card__header { flex-direction: column; }
    .tenant-card__badges { align-self: flex-start; }

    .detail-header { flex-direction: column; }
    .detail-header__actions { width: 100%; justify-content: flex-start; }
    .detail-grid { grid-template-columns: 1fr; }
    .info-row { flex-direction: column; align-items: flex-start; gap: 0.25rem; }
    .subscription-highlight { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
}

/* Tablet */
@media (min-width: 768px) and (max-width: 1023.98px) {
    .sa-content { padding: 1.25rem; }
}

/* ============================================================
   SUPER ADMIN DARK MODE
   ============================================================ */
[data-theme='dark'] .sa-layout {
    --sa-content-bg: var(--papyrus-bg);
    --sa-header-bg: var(--papyrus-header-bg);
    --sa-header-border: var(--papyrus-header-border);
}

[data-theme='dark'] .sa-header__hamburger { color: var(--papyrus-text); }
[data-theme='dark'] .sa-header__hamburger:hover { background: var(--papyrus-hover-bg); }
[data-theme='dark'] .sa-header__title { color: var(--papyrus-text); }
[data-theme='dark'] .sa-header__user-menu:hover { background: var(--papyrus-hover-bg); }
[data-theme='dark'] .sa-header__user-name { color: var(--papyrus-text); }
[data-theme='dark'] .sa-header__chevron { color: var(--papyrus-text-muted); }
[data-theme='dark'] .sa-header__dropdown { background: var(--papyrus-block-bg); border-color: var(--papyrus-border); box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -4px rgba(0, 0, 0, 0.3); }
[data-theme='dark'] .sa-header__dropdown-header strong { color: var(--papyrus-text); }
[data-theme='dark'] .sa-header__dropdown-header small { color: var(--papyrus-text-muted); }
[data-theme='dark'] .sa-header__dropdown-divider { background: var(--papyrus-border); }
[data-theme='dark'] .sa-header__dropdown-item { color: var(--papyrus-text); }
[data-theme='dark'] .sa-header__dropdown-item:hover { background: var(--papyrus-hover-bg); }
[data-theme='dark'] .sa-header__dropdown-item--danger:hover { background: rgba(220, 53, 69, 0.15); }

[data-theme='dark'] .sa-hero-card:hover { box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35); }
[data-theme='dark'] .sa-secondary-card { background: var(--papyrus-block-bg); border-color: var(--papyrus-border); }
[data-theme='dark'] .sa-card-header { color: #8b95a5; }
[data-theme='dark'] .sa-breakdown-bar { background: #363c42; }
[data-theme='dark'] .sa-legend-item { color: var(--papyrus-text); }
[data-theme='dark'] .sa-plan-card { background: var(--papyrus-block-bg); border-color: var(--papyrus-border); }
[data-theme='dark'] .sa-plan-card:hover { box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3); }
[data-theme='dark'] .sa-plan-blue .sa-plan-badge { background: rgba(59, 130, 246, 0.2); }
[data-theme='dark'] .sa-plan-purple .sa-plan-badge { background: rgba(139, 92, 246, 0.2); }
[data-theme='dark'] .sa-plan-gold .sa-plan-badge { background: rgba(245, 158, 11, 0.2); }
/* ==========================================================================
   Onboarding Module — OnboardingWizard, StepUserSettings, StepComplete
   ========================================================================== */

.onboarding-wizard {
    min-height: 100vh;
    background: var(--bs-body-bg);
}

.onboarding-step-indicator {
    flex: 1;
    position: relative;
}

.onboarding-step-indicator.clickable {
    cursor: pointer;
}

.step-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.onboarding-step-indicator.clickable:hover .step-circle {
    transform: scale(1.1);
}

/* StepUserSettings slide transition */
.onboarding-slide-enter-active,
.onboarding-slide-leave-active {
    transition: all 0.3s ease;
    overflow: hidden;
}

.onboarding-slide-enter-from,
.onboarding-slide-leave-to {
    opacity: 0;
    max-height: 0;
}

.onboarding-slide-enter-to,
.onboarding-slide-leave-from {
    max-height: 300px;
}

/* StepComplete */
.onboarding-bg-success-light {
    background-color: rgba(var(--bs-success-rgb), 0.15);
}
/* ==========================================================================
   View-level styles — Extracted from various view components
   ========================================================================== */

/* ============================================================
   CHANGELOG (ChangelogIndex.vue)
   ============================================================ */
.changelog-version-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    background-color: var(--bs-body-bg);
    border-radius: 0.375rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.changelog-version-header.is-latest {
    border-left: 3px solid var(--bs-primary);
}

.changelog-version-header:hover {
    background-color: rgba(var(--bs-primary-rgb), 0.05) !important;
}

.changelog-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    min-width: 8px;
}

.changelog-item {
    padding: 2px 0;
    font-size: 0.925rem;
    line-height: 1.5;
}

/* ============================================================
   WEB ORDERS (WebOrdersIndex.vue, WebOrderDetail.vue)
   ============================================================ */
@media (max-width: 576px) {
    .web-orders-index .block-content {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .web-orders-index .alert {
        flex-direction: column;
        gap: 8px;
    }

    .web-order-detail .block-header {
        flex-direction: column;
        align-items: flex-start !important;
    }

    .web-order-detail .table-responsive {
        font-size: 0.85rem;
    }
}

@media print {
    .web-order-detail .print-hide {
        display: none !important;
    }
}

/* ============================================================
   ORDER INFO (OrderInfo.vue)
   ============================================================ */
@media print {
    .order-info .block-header {
        display: none !important;
    }

    .order-info .content {
        margin: 0 !important;
        padding: 0 !important;
    }

    .order-info .block-content {
        padding: 1.25rem !important;
    }

    .order-info .text-dual-primary-dark,
    .order-info .text-primary,
    .order-info .h3,
    .order-info address,
    .order-info p,
    .order-info strong {
        color: var(--bs-black) !important;
    }

    .order-info .text-muted {
        color: var(--bs-secondary-color, #666) !important;
    }
}

.qr-code-wrapper {
    text-align: center;
}

.qr-code-container {
    display: inline-block;
    width: 120px;
    height: 120px;
}

.qr-code-container svg {
    width: 100%;
    height: 100%;
}

.qr-placeholder {
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed var(--bs-border-color, #dee2e6);
    border-radius: 4px;
    color: var(--bs-secondary-color, #6c757d);
    font-size: 1.5rem;
}

/* ============================================================
   NOTIFICATIONS (NotificationsIndex.vue)
   ============================================================ */
.notification-item {
    transition: background-color 0.15s ease;
}

.notification-item:hover {
    background-color: rgba(0, 0, 0, 0.04) !important;
}

.notification-item:focus-within {
    outline: 2px solid rgba(79, 70, 229, 0.3);
    outline-offset: -2px;
}

/* ============================================================
   SEARCH (SearchIndex.vue)
   ============================================================ */
.search-result-row {
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.search-result-row:hover {
    background-color: rgba(0, 0, 0, 0.04);
}

.search-result-row:focus-visible {
    outline: 2px solid rgba(79, 70, 229, 0.5);
    outline-offset: -2px;
}

/* ============================================================
   EMPLOYER ATTENDANCE (EmployerAttendance.vue)
   ============================================================ */
.sticky-col {
    position: sticky;
    left: 0;
    z-index: 1;
}

.sticky-col-bg {
    background-color: var(--papyrus-block-bg, #fff);
}

.attendance-table .table-responsive {
    max-height: 75vh;
}

@media (max-width: 575.98px) {
    .month-title {
        order: -1;
        width: 100%;
    }
}

/* ============================================================
   SETTINGS (SettingsIndex.vue)
   ============================================================ */
/* (cursor-pointer utility — defined in utilities) */

/* ============================================================
   PANEL FORM (PanelForm.vue)
   ============================================================ */
.qr-code-small {
    display: inline-block;
    width: 80px;
    height: 80px;
}

.qr-code-small svg {
    width: 100%;
    height: 100%;
}

/* ============================================================
   PRODUCTION CALENDAR (ProductionCalendar.vue)
   ============================================================ */
.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background-color: var(--papyrus-border, #e4e7ed);
    border: 1px solid var(--papyrus-border, #e4e7ed);
    border-radius: 4px;
    overflow: hidden;
}

.cal-grid--header {
    border-bottom: none;
    border-radius: 4px 4px 0 0;
    margin-bottom: 0;
}

.cal-header-cell {
    background-color: var(--papyrus-block-header-bg, #f0f2f5);
    padding: 8px 4px;
    text-align: center;
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--papyrus-text-muted, #6c757d);
    text-transform: uppercase;
}

.cal-cell {
    background-color: var(--papyrus-block-bg, #fff);
    min-height: 100px;
    padding: 4px;
    display: flex;
    flex-direction: column;
    transition: background-color 0.15s;
}

.cal-cell:hover { background-color: var(--papyrus-hover-bg, #f8f9fa); }
.cal-cell--today { background-color: rgba(6, 101, 208, 0.08); }
.cal-cell--today:hover { background-color: rgba(6, 101, 208, 0.12); }
.cal-cell--other-month { opacity: 0.4; }

.cal-cell__day {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--papyrus-text, #495057);
    margin-bottom: 4px;
    padding: 2px 4px;
}

.cal-cell--today .cal-cell__day {
    color: #fff;
    background-color: #0665d0;
    border-radius: 50%;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cal-cell__orders {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
}

/* Order Pill */
.cal-order {
    display: block;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.7rem;
    line-height: 1.3;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: opacity 0.15s;
    cursor: pointer;
}

.cal-order:hover { opacity: 0.85; text-decoration: none; }
.cal-order--active { background-color: #d6e4f0; color: #1a4d80; border-left: 3px solid #0665d0; }
.cal-order--completed { background-color: #d4edda; color: #155724; border-left: 3px solid #28a745; }
.cal-order--late { background-color: #f8d7da; color: #721c24; border-left: 3px solid #dc3545; }
.cal-order--pending { background-color: rgba(255, 193, 7, 0.15); color: #856404; border-left: 3px solid #ffc107; }
.cal-order--cancelled { background-color: #e2e3e5; color: #6c757d; border-left: 3px solid #6c757d; text-decoration: line-through; }

.cal-order__text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-order__client { font-size: 0.65rem; opacity: 0.7; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.cal-more {
    font-size: 0.7rem;
    color: #6c757d;
    padding: 1px 6px;
    cursor: pointer;
    text-align: center;
    border-radius: 3px;
    transition: background-color 0.15s;
}

.cal-more:hover { background-color: var(--papyrus-hover-bg, #e9ecef); }

/* Legend */
.cal-legend { display: inline-block; width: 10px; height: 10px; border-radius: 2px; flex-shrink: 0; }
.cal-legend--active { background-color: #0665d0; }
.cal-legend--completed { background-color: #28a745; }
.cal-legend--late { background-color: #dc3545; }
.cal-legend--pending { background-color: #ffc107; }
.cal-legend--cancelled { background-color: #6c757d; }

/* Mobile List View */
.cal-mobile-day {
    border-bottom: 1px solid var(--papyrus-border, #e4e7ed);
    padding: 12px 8px;
}

.cal-mobile-day--today {
    background-color: rgba(6, 101, 208, 0.08);
    border-radius: 6px;
    border: 1px solid rgba(6, 101, 208, 0.2);
    margin-bottom: 4px;
}

.cal-mobile-day__header {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.cal-mobile-day__orders {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cal-order--mobile {
    display: flex;
    flex-direction: column;
    padding: 6px 8px;
}

/* Calendar pills dark mode */
html.dark .cal-order--active { background-color: rgba(6, 101, 208, 0.18); color: #7db4e6; border-left-color: #3b8ad0; }
html.dark .cal-order--completed { background-color: rgba(40, 167, 69, 0.18); color: #6ec987; border-left-color: #28a745; }
html.dark .cal-order--late { background-color: rgba(220, 53, 69, 0.18); color: #e88a93; border-left-color: #dc3545; }
html.dark .cal-order--pending { background-color: rgba(255, 193, 7, 0.15); color: #d4a93e; border-left-color: #ffc107; }
html.dark .cal-order--cancelled { background-color: rgba(108, 117, 125, 0.18); color: #8b95a5; border-left-color: #6c757d; }

/* ============================================================
   PREPRINT (PrePrintIndex.vue)
   ============================================================ */
.preprint-dropdown-enter-active,
.preprint-dropdown-leave-active {
    transition:
        opacity 0.15s ease,
        transform 0.15s ease;
}

.preprint-dropdown-enter-from,
.preprint-dropdown-leave-to {
    opacity: 0;
    transform: translateY(-10px);
}

.preprint-dropdown-enter-to,
.preprint-dropdown-leave-from {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================================
   CLIENT NOTES TAB (ClientNotesTab.vue)
   ============================================================ */
.client-notes-timeline {
    position: relative;
    padding-left: 50px;
}

.client-notes-timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 22px;
    width: 2px;
    background-color: var(--bs-gray-300);
}

.timeline-event {
    position: relative;
    margin-bottom: 0;
}

.timeline-event-icon {
    position: absolute;
    left: -50px;
    top: 8px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
    z-index: 1;
}

.timeline-event-icon.bg-default {
    background-color: var(--bs-gray-500);
}

.timeline-event-block {
    margin-left: 0;
}
/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    html {
        zoom: 50%;
    }

    html,
    body {
        height: 100%;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden;
    }

    /* Hide non-essential elements when printing */
    #sidebar,
    #page-header,
    #page-footer,
    .btn-print-hide,
    .command-palette {
        display: none !important;
    }

    #main-container {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
    }

    #page-container {
        padding: 0 !important;
    }

    /* Print-friendly block styling */
    .block,
    .block-content {
        background-color: #fff !important;
        color: #000 !important;
        box-shadow: none !important;
        border: none !important;
    }

    .block-header {
        background-color: #fff !important;
        color: #000 !important;
    }

    .table {
        color: #000 !important;
    }

    .table th,
    .table td {
        color: #000 !important;
        border-color: #ccc !important;
    }

    .badge {
        border: 1px solid #999 !important;
        color: #000 !important;
    }

    a {
        color: #000 !important;
        text-decoration: none !important;
    }
}
/* ==========================================================================
   Mobile Responsive Improvements
   ========================================================================== */

/* Mobile sidebar off-canvas overlay */
@media (max-width: 991.98px) {
    #sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 1040;
        width: 260px;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        will-change: transform;
    }

    .sidebar-o-xs #sidebar {
        transform: translateX(0);
    }

    /* Backdrop overlay when sidebar is open */
    .sidebar-o-xs::after {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1035;
        animation: papyrus-fade-in 0.3s ease;
    }

    @keyframes papyrus-fade-in {
        from { opacity: 0; }
        to { opacity: 1; }
    }

    /* DataTable mobile: horizontal scroll with visual indicator */
    .papyrus-table-wrap .table-responsive {
        -webkit-overflow-scrolling: touch;
        overflow-x: auto;
        position: relative;
    }

    /* Mobile scroll shadow hint */
    .papyrus-table-wrap .table-responsive::after {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        width: 20px;
        background: linear-gradient(to left, rgba(43, 49, 54, 0.4), transparent);
        pointer-events: none;
        z-index: 1;
    }

    /* Forms single column on mobile */
    .form-group.row > [class*='col-md-'],
    .form-group.row > [class*='col-lg-'],
    .form-group.row > [class*='col-xl-'] {
        flex: 0 0 100%;
        max-width: 100%;
    }

    /* PageHeader actions stack vertically on mobile */
    .content-header {
        flex-wrap: wrap;
    }

    /* Improve mobile button spacing in flex containers — stack vertically
       Excludes spread layouts (justify-content-between) which may mix buttons with non-button content */
    .content .d-flex.gap-2.flex-wrap:not(.justify-content-between) {
        width: 100%;
        flex-direction: column;
    }

    .content .d-flex.gap-2.flex-wrap:not(.justify-content-between) > .btn,
    .content .d-flex.gap-2.flex-wrap:not(.justify-content-between) > a.btn,
    .content .d-flex.gap-2.flex-wrap:not(.justify-content-between) > a {
        width: 100%;
    }

    /* Card header actions stack vertically on mobile */
    .card-header.d-flex {
        flex-direction: column;
        align-items: stretch !important;
    }

    .card-header .d-flex.gap-2.flex-wrap {
        flex-direction: column;
    }

    .card-header .d-flex.gap-2.flex-wrap > .btn,
    .card-header .d-flex.gap-2.flex-wrap > a {
        width: 100%;
    }

    .card-header .d-flex.gap-2.flex-wrap > a > .btn {
        width: 100%;
    }

    /* Alert-based bulk action bars stack vertically on mobile */
    .alert.d-flex.justify-content-between {
        flex-direction: column;
        gap: 0.75rem;
    }

    .alert .d-flex.gap-2.flex-wrap > .btn {
        width: 100%;
    }

    /* Batch toolbar: stack vertically on mobile */
    .batch-toolbar .d-flex.justify-content-between {
        flex-direction: column;
        gap: 0.75rem;
    }

    .batch-toolbar .d-flex.justify-content-between > .d-flex {
        flex-wrap: wrap;
    }

    /* Page header action bar: ensure action row columns stack with gap */
    .page-header-actions {
        gap: 0.5rem;
    }

    .page-header-actions .btn {
        width: 100%;
    }

    .page-header-actions a {
        display: block;
        width: 100%;
    }

    /* Table cell improvements for mobile */
    td {
        max-width: none;
        font-size: 0.85rem;
    }

    /* Block header title truncation on mobile */
    .block-header .block-title {
        font-size: 0.9rem;
    }

    /* Modal improvements for mobile */
    .modal-dialog {
        margin: 0.5rem;
    }

    .modal-body {
        padding: 1rem;
    }

    /* Form action buttons stack on mobile */
    .form-group.row .text-end {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .form-group.row .text-end .btn {
        width: 100%;
    }
}

/* Very small screens: full-width stacked buttons */
@media (max-width: 575.98px) {
    /* Action bar buttons go full-width and stack */
    .page-header-actions .d-flex {
        flex-direction: column;
        width: 100%;
    }

    .page-header-actions .d-flex > .btn,
    .page-header-actions .d-flex > a {
        width: 100%;
    }

    .page-header-actions .d-flex > a .btn {
        width: 100%;
    }

    /* Action bar buttons: full width on phones (overrides col-6 col-md-3 grid) */
    .page-header-actions .row > [class*='col-6'] {
        flex: 0 0 100%;
        max-width: 100%;
    }

    /* Panel action buttons: full width on phones */
    .content .row.g-2 > .col-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    /* Batch toolbar: stack vertically on very small screens */
    .batch-toolbar .d-flex.justify-content-between {
        flex-direction: column;
        gap: 0.75rem;
    }

    .batch-toolbar .d-flex.justify-content-between > .d-flex {
        flex-wrap: wrap;
    }
}

/* Chat page layout styles are in modules/chat.css */
/* ==========================================================================
   Dark Mode / Light Mode Overrides
   Codebase framework handles button colors, alert colors, badge colors,
   form focus rings, and pagination natively. We only override:
   1. Dark mode backgrounds/text (Codebase doesn't have our dark bg tokens)
   2. CSS variable tokens for our custom components (dashboard, panel, chat)
   3. Layout tweaks specific to our SPA
   ========================================================================== */

/* ==========================================================================
   Bootstrap CSS Variable Overrides for Dark Mode
   ========================================================================== */
html.dark {
    --bs-body-bg: #1a1d23;
    --bs-body-color: #cbd2dd;
    --bs-border-color: #3d4450;
    --bs-secondary-color: #8b95a5;
    --bs-tertiary-bg: #353b42;
    --bs-tertiary-color: #a0a9b8;
    --bs-emphasis-color: #e8ecf1;
    color-scheme: dark;
}

/* Override Codebase framework #page-container and body backgrounds for dark mode */
html.dark,
html.dark body {
    background-color: var(--papyrus-bg) !important;
    color: var(--papyrus-text);
}

html.dark #page-container {
    background-color: var(--papyrus-bg) !important;
}

html.dark #main-container {
    background-color: var(--papyrus-bg) !important;
}

/* ==========================================================================
   Badge Overrides (dark mode only)
   Codebase handles alert-* dark mode natively.
   Badge .bg-light needs override since Codebase doesn't restyle it for dark.
   ========================================================================== */

/* Badge readability in dark mode */
html.dark .badge.bg-light {
    background-color: var(--papyrus-block-header-bg) !important;
    color: var(--papyrus-text) !important;
}

html.dark .badge.bg-secondary {
    background-color: #454c53 !important;
}

/* Codebase only handles btn-alt-secondary dark mode natively (line 38056).
   Other btn-alt-* variants need dark mode overrides for readability. */
html.dark .btn-alt-primary {
    background-color: rgba(2, 132, 199, 0.15);
    border-color: rgba(2, 132, 199, 0.3);
    color: #7cc8ed;
}
html.dark .btn-alt-primary:hover,
html.dark .btn-alt-primary:focus {
    background-color: rgba(2, 132, 199, 0.25);
    border-color: rgba(2, 132, 199, 0.4);
    color: #a0d9f5;
}

html.dark .btn-alt-success {
    background-color: rgba(101, 163, 13, 0.15);
    border-color: rgba(101, 163, 13, 0.3);
    color: #a3d977;
}
html.dark .btn-alt-success:hover,
html.dark .btn-alt-success:focus {
    background-color: rgba(101, 163, 13, 0.25);
    border-color: rgba(101, 163, 13, 0.4);
    color: #b8e68f;
}

html.dark .btn-alt-warning {
    background-color: rgba(217, 119, 6, 0.15);
    border-color: rgba(217, 119, 6, 0.3);
    color: #f0b060;
}
html.dark .btn-alt-warning:hover,
html.dark .btn-alt-warning:focus {
    background-color: rgba(217, 119, 6, 0.25);
    border-color: rgba(217, 119, 6, 0.4);
    color: #f5c47a;
}

html.dark .btn-alt-danger {
    background-color: rgba(220, 38, 38, 0.15);
    border-color: rgba(220, 38, 38, 0.3);
    color: #f08080;
}
html.dark .btn-alt-danger:hover,
html.dark .btn-alt-danger:focus {
    background-color: rgba(220, 38, 38, 0.25);
    border-color: rgba(220, 38, 38, 0.4);
    color: #f5a0a0;
}

html.dark .btn-alt-info {
    background-color: rgba(6, 182, 212, 0.15);
    border-color: rgba(6, 182, 212, 0.3);
    color: #67d8e8;
}
html.dark .btn-alt-info:hover,
html.dark .btn-alt-info:focus {
    background-color: rgba(6, 182, 212, 0.25);
    border-color: rgba(6, 182, 212, 0.4);
    color: #8ae4f0;
}

/* ==========================================================================
   bg-*-light Utility Overrides for Dark Mode
   Codebase framework bg-*-light classes use pastel light backgrounds that
   look wrong in dark mode. Override with semi-transparent dark-friendly variants.
   ========================================================================== */
html.dark .bg-primary-light {
    background-color: rgba(2, 132, 199, 0.15) !important;
}

html.dark .bg-success-light {
    background-color: rgba(101, 163, 13, 0.15) !important;
}

html.dark .bg-warning-light {
    background-color: rgba(217, 119, 6, 0.15) !important;
}

html.dark .bg-danger-light {
    background-color: rgba(220, 38, 38, 0.15) !important;
}

html.dark .bg-info-light {
    background-color: rgba(6, 182, 212, 0.15) !important;
}

/* ==========================================================================
   Miscellaneous Overrides
   ========================================================================== */

/* Slim scrollbar */
div.slimScrollBar {
    opacity: 0.4 !important;
}

.slimScrollBar {
    background: var(--papyrus-text-muted) !important;
    width: 6px !important;
    border-radius: 3px !important;
    opacity: 0.3 !important;
}

.slimScrollRail {
    width: 6px !important;
}

/* Web inspector hide shortcut */
.__web-inspector-hide-shortcut__,
.__web-inspector-hide-shortcut__ *,
.__web-inspector-hidebefore-shortcut__::before,
.__web-inspector-hideafter-shortcut__::after {
    visibility: hidden !important;
}

/* d-none utility */
.d-none {
    display: none;
}

/* Type pointer */
.type-pointer {
    font-size: 12pt;
    width: 100px;
    height: auto;
    padding-top: 10px;
    padding-bottom: 10px;
}

/* Blocker overlay */
.blocker {
    position: relative;
    overflow: hidden;
}

.blocker::after {
    content: 'Yapim Asamasinda!';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    font-size: 24px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1050;
    pointer-events: all;
    border-radius: 0.75rem;
}

/* User links */
.user-link {
    opacity: 1;
    transition:
        opacity 0.3s,
        font-weight 0.3s;
}

.user-link.active-user {
    opacity: 1;
    font-weight: bold;
}

.user-link.inactive-user {
    opacity: 0.75;
}

/* Focus-visible: Let Codebase/Bootstrap handle focus rings natively.
   No custom accent color overrides needed. */
