/* =========================================
   GLOBAL RESET & STRUCTURE
   ========================================= */

*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background-color: var(--bg-app);
    color: var(--text-primary);
    transition: background-color 0.2s ease, color 0.2s ease;
}

/* =========================================
   2. LAYOUT & SIDEBAR
   ========================================= */

.app-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 230px;
    background-color: var(--bg-surface);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 16px 0;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 20px 16px 20px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-logo {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary-gradient-start), var(--primary-gradient-end));
    color: var(--primary-text-on-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

.sidebar-app {
    display: flex;
    flex-direction: column;
}

.sidebar-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.sidebar-version {
    font-size: 11px;
    color: var(--text-tertiary);
}

/* Nav Logo Styles */
.nav-logo-link {
    display: block;
    text-decoration: none;
}

.nav-logo {
    max-width: 180px;
    width: 100%;
    height: auto;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.nav-logo:hover {
    transform: scale(1.02);
}

/* Dark theme logo treatment - add subtle background for visibility */
[data-theme="dark"] .nav-logo,
[data-theme="gunmetal"] .nav-logo {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 6px;
    padding: 6px 8px;
}

.sidebar-section {
    margin-top: 12px;
}

.sidebar-section-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--text-tertiary);
    padding: 6px 20px 4px 20px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    font-size: 14px;
    text-decoration: none;
    color: var(--text-secondary);
    border-left: 3px solid transparent;
    transition: background-color 0.15s;
}

    .sidebar-link:hover {
        background-color: var(--bg-app);
        color: var(--text-primary);
    }

    .sidebar-link.active {
        background-color: var(--primary-bg-light);
        border-left-color: var(--primary-color);
        color: var(--text-primary);
        font-weight: 600;
    }

/* Sidebar Dropdowns */
.sidebar-link-parent {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    background: transparent;
    border: none;
    text-align: left;
    padding: 8px 20px;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 14px;
    transition: color 0.15s ease;
}

    .sidebar-link-parent:hover {
        color: var(--text-primary);
        background-color: var(--bg-app);
    }

.sidebar-chevron {
    font-size: 0.7rem;
    opacity: 0.7;
    transition: transform 0.16s ease;
    margin-left: auto;
}

.sidebar-link-parent-open .sidebar-chevron {
    transform: rotate(90deg);
}

.sidebar-submenu {
    margin-left: 0.4rem;
    padding-left: 0.6rem;
    border-left: 1px solid var(--border-color);
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transform-origin: top;
    transform: scaleY(0.98);
    transition: max-height 0.18s ease, opacity 0.14s ease, transform 0.18s ease;
}

    .sidebar-submenu.submenu-open {
        max-height: 400px;
        opacity: 1;
        transform: scaleY(1);
    }

.sidebar-sublink {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.24rem 0.45rem;
    font-size: 0.84rem;
    color: var(--text-tertiary);
    text-decoration: none;
    border-radius: 0.45rem;
    margin: 1px 0;
    transition: background-color 0.14s ease, color 0.14s ease;
}

    .sidebar-sublink:hover {
        background-color: var(--bg-app);
        color: var(--text-primary);
        transform: translateX(1px);
    }

    .sidebar-sublink.active {
        background-color: var(--primary-bg-light);
        color: var(--primary-color);
    }

    .sidebar-sublink span:last-child {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

.sidebar-link-icon,
.sidebar-sublink-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

.sidebar-link:hover .sidebar-link-icon,
.sidebar-link.active .sidebar-link-icon,
.sidebar-sublink:hover .sidebar-sublink-icon,
.sidebar-sublink.active .sidebar-sublink-icon {
    color: var(--primary-color);
}

/* =========================================
   3. MAIN AREA & TOPBAR
   ========================================= */

.app-main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.topbar {
    height: 56px;
    background-color: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
}

.topbar-left {
    display: flex;
    flex-direction: column;
}

.topbar-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.topbar-subtitle {
    font-size: 12px;
    color: var(--text-tertiary);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-search {
    border-radius: 999px;
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    font-size: 13px;
    min-width: 220px;
    outline: none;
    background-color: var(--input-bg);
    color: var(--text-primary);
}

    .topbar-search:focus {
        border-color: var(--border-focus);
        box-shadow: 0 0 0 2px rgba(37, 99, 235, .15);
    }

.topbar-user {
    display: flex;
    align-items: center;
}

.topbar-avatar {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary-gradient-start), var(--primary-gradient-end));
    color: var(--primary-text-on-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
}

.content-area {
    flex: 1;
    padding: 16px 24px;
    overflow: auto;
}

/* =========================================
   4. TICKETS PAGE & TOOLBARS
   ========================================= */

.tickets-page {
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: 100%;
}

.tickets-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--bg-surface);
    border-radius: 10px;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
}

.tickets-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-tertiary);
}

.crumb-root {
    font-weight: 500;
    color: var(--text-secondary);
}

.crumb-current {
    color: var(--text-primary);
}

.tickets-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.tickets-subtitle {
    font-size: 12px;
    color: var(--text-tertiary);
}

.tickets-toolbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tickets-search-input {
    border-radius: 999px;
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    font-size: 13px;
    min-width: 240px;
    outline: none;
    background-color: var(--input-bg);
    color: var(--text-primary);
}

    .tickets-search-input:focus {
        border-color: var(--border-focus);
        box-shadow: 0 0 0 2px rgba(37, 99, 235, .15);
    }

/* Buttons */
.btn-primary {
    border-radius: 6px;
    border: none;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
    background: linear-gradient(135deg, var(--primary-gradient-start), var(--primary-gradient-end));
    color: var(--primary-text-on-dark);
    cursor: pointer;
}

    .btn-primary:hover {
        opacity: 0.9;
    }

.btn-secondary {
    border-radius: 6px;
    border: 1px solid var(--border-color);
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
    background-color: var(--bg-surface);
    color: var(--text-secondary);
    cursor: pointer;
}

    .btn-secondary:hover {
        background-color: var(--bg-app);
        border-color: var(--border-color-hover);
        color: var(--text-primary);
    }

.btn-primary-outline {
    border-radius: 6px;
    border: 1px solid var(--primary-color);
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
    background-color: var(--bg-surface);
    color: var(--primary-color);
    cursor: pointer;
}

    .btn-primary-outline:hover {
        background-color: var(--primary-bg-light);
    }

.btn-link {
    border: none;
    background: none;
    padding: 0;
    font-size: 13px;
    color: var(--primary-color);
    cursor: pointer;
}

.btn-primary-sm {
    border-radius: 4px;
    border: none;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 500;
    background: linear-gradient(135deg, var(--primary-gradient-start), var(--primary-gradient-end));
    color: var(--primary-text-on-dark);
    cursor: pointer;
}

.btn-xs {
    padding: 4px 10px;
    font-size: 12px;
    border-radius: 999px;
}

.btn-icon-sm {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: color 0.2s, background 0.2s;
}

    .btn-icon-sm:hover {
        color: var(--text-primary);
        background: var(--bg-surface-hover);
    }

/* Tickets layout */
.tickets-layout {
    flex: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) 320px;
    gap: 14px;
    min-height: 0;
}

.tickets-card {
    background-color: var(--bg-surface);
    border-radius: 10px;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.tickets-card-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tickets-card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.tickets-card-meta {
    font-size: 12px;
    color: var(--text-tertiary);
}

.tickets-card-body {
    padding: 0;
    overflow: auto;
}

/* =========================================
   5. TABLES
   ========================================= */

.tickets-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13px;
}

    .tickets-table thead {
        background: linear-gradient(90deg, var(--bg-surface-hover), var(--bg-app));
        box-shadow: 0 1px 0 var(--border-color);
    }

    .tickets-table th,
    .tickets-table td {
        padding: 10px 14px;
        white-space: nowrap;
        vertical-align: middle;
        border: 0;
    }

    .tickets-table th {
        text-align: left;
        font-size: 11px;
        text-transform: uppercase;
        letter-spacing: 0.08em;
        font-weight: 600;
        color: var(--text-secondary);
    }

    .tickets-table tbody tr {
        background-color: var(--bg-surface);
        transition: background-color 0.08s ease, transform 0.08s ease, box-shadow 0.08s ease;
    }

        .tickets-table tbody tr + tr td {
            border-top: 1px solid var(--border-color);
        }

        .tickets-table tbody tr:hover {
            background-color: var(--bg-surface-hover);
            transform: translateY(-1px);
            box-shadow: var(--shadow-sm);
        }

    .tickets-table tbody td {
        color: var(--text-primary);
    }

        .tickets-table tbody td:first-child {
            font-family: ui-monospace, SFMono-Regular, monospace;
            font-size: 12px;
            color: var(--text-secondary);
        }

        .tickets-table tbody td:last-child {
            text-align: right;
            color: var(--text-secondary);
        }

    .tickets-table thead th:first-child {
        border-top-left-radius: 12px;
    }

    .tickets-table thead th:last-child {
        border-top-right-radius: 12px;
    }

    .tickets-table tbody tr:last-child td:first-child {
        border-bottom-left-radius: 12px;
    }

    .tickets-table tbody tr:last-child td:last-child {
        border-bottom-right-radius: 12px;
    }

.tickets-empty {
    text-align: center;
    padding: 18px 12px;
    font-size: 13px;
    color: var(--text-secondary);
}

.ticket-pill {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 500;
}

.ticket-pill-state {
    background-color: #e5edff;
    color: #1d4ed8;
}

.ticket-pill-low {
    background-color: #ecfdf3;
    color: #15803d;
}

.ticket-pill-medium {
    background-color: #fef9c3;
    color: #92400e;
}

.ticket-pill-high {
    background-color: #fee2e2;
    color: #b91c1c;
}

.ticket-pill-urgent {
    background-color: #f97373;
    color: #ffffff;
}

/* =========================================
   6. SIDEBAR FILTERS
   ========================================= */

.tickets-filters {
    background-color: var(--bg-surface);
    border-radius: 10px;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.tickets-filters-header {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-color);
}

.filters-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.filters-subtitle {
    font-size: 12px;
    color: var(--text-tertiary);
}

.filters-body {
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
    overflow-y: auto;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

    .filter-group label {
        font-size: 12px;
        color: var(--text-secondary);
    }

.filters-footer {
    padding: 10px 14px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* =========================================
   7. INPUTS & FORMS
   ========================================= */

.form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px 14px;
    padding: 10px 14px 14px;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

    .form-field label {
        font-size: 12px;
        color: var(--text-secondary);
    }

.input-text,
.input-select,
.input-textarea {
    border-radius: 6px;
    border: 1px solid var(--border-color);
    padding: 6px 8px;
    font-size: 13px;
    font-family: inherit;
    outline: none;
    background-color: var(--input-bg);
    color: var(--text-primary);
}

    .input-text:focus,
    .input-select:focus,
    .input-textarea:focus {
        border-color: var(--border-focus);
        box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
    }

.tickets-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 10px 14px 14px;
}

/* Split Line form layouts */
.split-lines {
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-app);
    padding: 8px 10px;
}

.split-line-row {
    display: grid;
    grid-template-columns: 150px 1fr 180px;
    gap: 8px;
    align-items: center;
    margin-bottom: 6px;
}

.split-line-label {
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 2px;
}

/* =========================================
   8. MODALS
   ========================================= */

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.35);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 80px;
    z-index: 1000;
    animation: backdrop-enter 0.3s ease-out forwards;
}

.modal-card {
    background: var(--bg-surface);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    width: 640px;
    max-width: calc(100% - 40px);
    max-height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
    animation: modal-card-enter 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.modal-header {
    padding: 12px 18px;
    border-bottom: 1px solid var(--border-color);
}

.modal-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-subtitle {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.modal-body {
    padding: 12px 18px 10px;
    overflow-y: auto;
}

.modal-footer {
    padding: 10px 18px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* Modal Animations */
@keyframes backdrop-enter {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
    }

    to {
        opacity: 1;
        backdrop-filter: blur(3px);
    }
}

@keyframes modal-card-enter {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.96);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Closing States */
.modal-backdrop.closing {
    animation: backdrop-exit 0.3s ease-in forwards;
    pointer-events: none;
}

    .modal-backdrop.closing .modal-card {
        animation: modal-card-exit 0.3s ease-in forwards;
    }

@keyframes backdrop-exit {
    from {
        opacity: 1;
        backdrop-filter: blur(4px);
    }

    to {
        opacity: 0;
        backdrop-filter: blur(0px);
    }
}

@keyframes modal-card-exit {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    to {
        opacity: 0;
        transform: translateY(30px) scale(0.96);
    }
}

/* =========================================
   9. PREMIUM ANIMATED DROPDOWN
   ========================================= */

.animated-select {
    position: relative;
    min-width: 160px;
    font-size: 13px;
    user-select: none;
}

.animated-select-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: var(--input-bg);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    color: var(--text-secondary);
}

    .animated-select-display:hover {
        border-color: var(--border-color-hover);
        box-shadow: var(--shadow-md);
        transform: translateY(-1px);
        color: var(--text-primary);
    }

.animated-select-chevron {
    font-size: 10px;
    margin-left: 10px;
    opacity: 0.6;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.animated-select-open .animated-select-chevron {
    transform: rotate(180deg);
    opacity: 1;
    color: var(--primary-color);
}

.animated-select-options {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 8px);
    background: var(--bg-surface);
    border-radius: 14px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    overflow: visible !important;
    max-height: 0;
    opacity: 0;
    transform-origin: top center;
    transform: scale(0.95) translateY(-10px);
    pointer-events: none;
    z-index: 50;
    transition: max-height 0.2s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.15s ease, transform 0.15s ease;
}

.animated-select-open .animated-select-options {
    max-height: 300px;
    opacity: 1;
    pointer-events: auto;
    transform: scale(1) translateY(0);
    animation: dropdown-spring-enter 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes dropdown-spring-enter {
    0% {
        opacity: 0;
        transform: scale(0.9) translateY(-10px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.animated-select-search-container {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: var(--bg-surface);
    padding: 8px 10px;
    border-bottom: 1px solid var(--border-color);
}

.animated-select-search-input {
    width: 100%;
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    font-size: 13px;
    outline: none;
    background-color: var(--bg-app);
    color: var(--text-primary);
    transition: all 0.2s;
}

    .animated-select-search-input:focus {
        background-color: var(--input-bg);
        border-color: var(--primary-color);
    }

.animated-select-list-scroller {
    max-height: 200px;
    overflow-y: auto;
}

.animated-select-open .animated-select-list-scroller {
    max-height: 250px;
}

.animated-select-option {
    padding: 10px 16px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    border-bottom: 1px solid transparent;
    transition: background 0.15s ease, color 0.15s ease;
    opacity: 0;
    transform: translateX(-10px);
}

    .animated-select-option:hover {
        background-color: var(--bg-surface-hover);
        color: var(--text-primary);
    }

.animated-select-option-selected {
    background-color: var(--bg-surface-active);
    color: var(--primary-color);
    font-weight: 500;
}

.animated-select-open .animated-select-option {
    animation: item-slide-in 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes item-slide-in {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animated-select-open .animated-select-option:nth-child(1) {
    animation-delay: 0.05s;
}

.animated-select-open .animated-select-option:nth-child(2) {
    animation-delay: 0.08s;
}

.animated-select-open .animated-select-option:nth-child(3) {
    animation-delay: 0.11s;
}

.animated-select-open .animated-select-option:nth-child(4) {
    animation-delay: 0.14s;
}

.animated-select-open .animated-select-option:nth-child(5) {
    animation-delay: 0.17s;
}

.animated-select-open .animated-select-option:nth-child(6) {
    animation-delay: 0.20s;
}

.animated-select-open .animated-select-option:nth-child(n+7) {
    animation-delay: 0.23s;
}

/* =========================================
   10. USER MENU DROPDOWN
   ========================================= */

.user-menu-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 240px;
    background: var(--bg-surface);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    z-index: 50;
    padding: 6px;
    animation: user-menu-enter 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: top right;
}

@keyframes user-menu-enter {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-5px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.user-menu-header {
    padding: 8px 12px;
}

.user-menu-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.user-menu-email {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.user-menu-divider {
    height: 1px;
    background-color: var(--bg-app);
    margin: 6px 0;
}

.user-menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    font-size: 13px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    transition: background-color 0.15s;
    background: none;
    border: none;
    cursor: pointer;
}

    .user-menu-item:hover {
        background-color: var(--bg-surface-hover);
        color: var(--text-primary);
    }

    .user-menu-item i {
        font-size: 14px;
        opacity: 0.7;
    }

/* Ticket Details View Helpers */
.ticket-detail-label {
    color: var(--text-secondary);
}

.ticket-detail-value {
    color: var(--text-primary);
}

.ticket-detail-id {
    color: var(--text-tertiary);
}

.ticket-detail-description-pre {
    color: var(--text-primary);
}

/* =========================================
   11. ACCOUNTING / FINANCE MODULE (Airtable Style)
   ========================================= */

.accounting-layout {
    display: flex;
    height: 100%;
    overflow: hidden;
}

/* --- Sidebar --- */
.accounting-sidebar {
    width: 250px;
    background: var(--bg-surface);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-title {
    font-weight: 600;
    color: var(--text-primary);
}

.sidebar-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s;
}

    .sidebar-item:hover {
        background: var(--bg-surface-hover);
        color: var(--text-primary);
    }

    .sidebar-item.active {
        background: var(--primary-bg-light);
        color: var(--primary-color);
        font-weight: 500;
    }

.subcategory-list {
    margin-left: 28px;
    border-left: 2px solid var(--border-color);
    margin-bottom: 8px;
}

.subcategory-item {
    padding: 6px 12px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 0 4px 4px 0;
}

    .subcategory-item:hover {
        background: var(--bg-surface-hover);
    }

    .subcategory-item.active-sub {
        background: var(--bg-surface-active);
        color: var(--primary-color);
    }

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border-color);
}

/* --- Main Content --- */
.accounting-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-app);
    overflow: hidden;
}

.accounting-header {
    padding: 16px 24px;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .accounting-header h1 {
        margin: 0;
        font-size: 1.25rem;
        font-weight: 600;
    }

.view-crumb {
    color: var(--text-tertiary);
    font-weight: 400;
    margin-left: 8px;
}

/* --- THE DATA GRID --- */
.grid-wrapper {
    flex: 1;
    overflow: auto;
    padding: 24px;
    outline: none; /* Prevent focus ring on wrapper */
}

/* NOTE: tabindex="0" required in HTML for this to work */
.accounting-grid-container {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    display: inline-block; /* Allow grid to expand */
    min-width: 100%;
    position: relative;
    outline: none; /* Focus managed internally via Active Cell */
    user-select: none; /* Prevent text selection while using arrow keys */
}

.grid-table {
    border-collapse: collapse;
    font-size: 13px;
    table-layout: fixed; /* Performance optimization */
}

    /* Headers */
    .grid-table th {
        background: var(--bg-surface-hover);
        padding: 0 12px;
        height: 32px;
        text-align: left;
        font-weight: 600;
        color: var(--text-secondary);
        border-bottom: 1px solid var(--border-color);
        border-right: 1px solid var(--border-color);
        white-space: nowrap;
        user-select: none;
    }

    /* Cells */
    .grid-table td {
        border-bottom: 1px solid var(--border-color);
        border-right: 1px solid var(--border-color);
        padding: 0;
        margin: 0;
        height: 36px;
        position: relative; /* For absolute positioning of edit input */
        min-width: 120px;
    }

/* 1. VIEW MODE (The Div) - Default State */
.grid-cell-view {
    width: 100%;
    height: 100%;
    padding: 0 12px;
    display: flex;
    align-items: center;
    white-space: nowrap;
    overflow: hidden;
    color: var(--text-primary);
    cursor: cell;
    outline: none;
}

/* 2. SELECTION RANGE (Shift+Arrow) */
.grid-cell-highlight {
    background-color: rgba(37, 99, 235, 0.1) !important; /* Light Blue wash */
}

/* 3. ACTIVE CELL (The Cursor) - Navigation State */
.cell-active {
    box-shadow: inset 0 0 0 2px var(--primary-color) !important;
    background-color: transparent;
    z-index: 2; /* Sit above highlights */
}

.cell-selected {
    background-color: rgba(37, 99, 235, 0.1) !important;
}

/* 4. EDIT MODE (The Input) - Typing State */
.grid-input-edit {
    width: 100%;
    height: 100%;
    border: none;
    outline: 2px solid var(--primary-color); /* Pop out effect */
    padding: 0 12px;
    background: var(--bg-surface);
    color: var(--text-primary);
    font-family: inherit;
    font-size: inherit;
    z-index: 10; /* Top most layer */
    box-shadow: var(--shadow-md);
}

.add-col-header {
    cursor: pointer;
    color: var(--primary-color);
    text-align: center !important;
}

    .add-col-header:hover {
        background-color: var(--primary-bg-light) !important;
    }

.custom-header {
    background: rgba(14, 165, 233, 0.05);
    color: var(--primary-color);
}

/* Modals for grid (Add Column) */
.column-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.column-modal-content {
    background: var(--bg-surface);
    padding: 20px;
    border-radius: 8px;
    width: 300px;
    border: 1px solid var(--border-color);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 15px;
}

.form-control {
    width: 100%;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    margin-top: 10px;
    background: var(--bg-app);
    color: var(--text-primary);
}
/* =========================================
   MODERN SCROLLBAR OVERRIDE
   ========================================= */

/* 1. Webkit Browsers (Chrome, Edge, Opera, Safari) */
::-webkit-scrollbar {
    width: 8px; /* Vertical width */
    height: 8px; /* Horizontal height */
}

/* The "Track" (Background) - Keep transparent for a floating look */
::-webkit-scrollbar-track {
    background: transparent;
}

/* The "Thumb" (The moving part) */
::-webkit-scrollbar-thumb {
    background-color: rgba(156, 163, 175, 0.3); /* Subtle Grey, semi-transparent */
    border-radius: 20px; /* Pill shape */
    border: 2px solid transparent; /* Creates padding effect inside the track */
    background-clip: content-box; /* Ensures the border acts as padding */
}

    /* Hover State - Make it slightly more visible */
    ::-webkit-scrollbar-thumb:hover {
        background-color: rgba(156, 163, 175, 0.6);
    }

/* Corner (where vertical meets horizontal) */
::-webkit-scrollbar-corner {
    background: transparent;
}

/* 2. Firefox Support */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(156, 163, 175, 0.3) transparent;
}
/* =========================================
   12. PAGE TRANSITIONS & ANIMATIONS
   ========================================= */

/* Page entrance animation */
.content-area {
    animation: page-enter 0.3s ease-out;
}

@keyframes page-enter {
    from { 
        opacity: 0; 
        transform: translateY(8px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

/* Staggered list item animations */
.stagger-item {
    opacity: 0;
    animation: stagger-fade-in 0.4s ease forwards;
}

.stagger-item:nth-child(1) { animation-delay: 0.05s; }
.stagger-item:nth-child(2) { animation-delay: 0.1s; }
.stagger-item:nth-child(3) { animation-delay: 0.15s; }
.stagger-item:nth-child(4) { animation-delay: 0.2s; }
.stagger-item:nth-child(5) { animation-delay: 0.25s; }
.stagger-item:nth-child(n+6) { animation-delay: 0.3s; }

@keyframes stagger-fade-in {
    from { 
        opacity: 0; 
        transform: translateY(10px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

/* =========================================
   13. MODAL ANIMATIONS
   ========================================= */

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    animation: backdrop-fade 0.2s ease;
}

@keyframes backdrop-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content-animated {
    animation: modal-spring 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modal-spring {
    from { 
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to { 
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* =========================================
   14. SKELETON LOADING STATES
   ========================================= */

.skeleton {
    background: linear-gradient(
        90deg,
        var(--bg-surface) 25%,
        var(--bg-surface-hover) 50%,
        var(--bg-surface) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
    border-radius: 4px;
}

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

.skeleton-text {
    height: 14px;
    margin: 4px 0;
}

.skeleton-text-sm {
    height: 10px;
    width: 60%;
}

.skeleton-row {
    display: flex;
    gap: 12px;
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
}

/* =========================================
   15. MICRO-INTERACTIONS
   ========================================= */

button:active:not(.no-press) {
    transform: scale(0.97);
    transition: transform 0.1s;
}

input[type="checkbox"]:checked {
    animation: checkbox-pop 0.2s ease;
}

@keyframes checkbox-pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* =========================================
   16. TOAST NOTIFICATIONS
   ========================================= */

.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 12px 20px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    z-index: 9999;
    animation: toast-enter 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes toast-enter {
    from { 
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.toast-success { border-left: 4px solid #10b981; }
.toast-error { border-left: 4px solid #ef4444; }
.toast-warning { border-left: 4px solid #f59e0b; }
.toast-info { border-left: 4px solid var(--primary-color); }

/* =========================================
   17. ENHANCED GRID FEATURES (AIRTABLE-STYLE)
   ========================================= */

.col-resize-handle {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    cursor: col-resize;
    background: transparent;
    z-index: 10;
    transition: background-color 0.15s ease;
}

.col-resize-handle:hover,
.col-resize-handle.resizing {
    background-color: var(--primary-color);
}

.col-resize-handle::before {
    content: '';
    position: absolute;
    left: 2px;
    top: 50%;
    transform: translateY(-50%);
    width: 2px;
    height: 16px;
    background: var(--border-color);
    border-radius: 1px;
    transition: opacity 0.15s;
}

.col-resize-handle:hover::before {
    opacity: 0;
}

.resize-indicator {
    position: fixed;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--primary-color);
    z-index: 10000;
    pointer-events: none;
}

.cell-active {
    box-shadow: inset 0 0 0 2px var(--primary-color) !important;
    transition: box-shadow 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.grid-table tbody tr {
    transition: background-color 0.15s ease;
}

.grid-table tbody tr:hover {
    background-color: var(--bg-surface-hover);
}

.cell-edit-wrapper {
    animation: cell-expand 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes cell-expand {
    from { transform: scale(0.95); opacity: 0.8; }
    to { transform: scale(1); opacity: 1; }
}

.grid-row-new {
    animation: row-slide-in 0.3s ease-out;
}

@keyframes row-slide-in {
    from { 
        opacity: 0; 
        transform: translateY(-10px);
        background-color: var(--primary-bg-light);
    }
    to { 
        opacity: 1; 
        transform: translateY(0);
        background-color: transparent;
    }
}

.filter-row {
    background: var(--bg-surface);
    border-bottom: 2px solid var(--border-color);
}

.filter-row td {
    padding: 6px 8px;
    background: var(--bg-surface);
}

.column-filter-input {
    width: 100%;
    padding: 4px 8px;
    font-size: 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--input-bg);
    color: var(--text-primary);
    transition: all 0.15s ease;
}

.column-filter-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px var(--primary-bg-light);
}

.column-filter-input::placeholder {
    color: var(--text-tertiary);
    font-size: 11px;
}

.column-filter-active {
    border-color: var(--primary-color);
    background: var(--primary-bg-light);
}

.filter-cell-wrapper {
    position: relative;
}

.filter-clear-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 2px 4px;
    font-size: 10px;
    border-radius: 2px;
}

.filter-clear-btn:hover {
    color: var(--text-primary);
    background: var(--bg-surface-hover);
}

.sortable-header {
    cursor: pointer;
    user-select: none;
    transition: background 0.15s;
}

.sortable-header:hover {
    background: var(--bg-surface-active);
}

.sort-indicator {
    margin-left: 6px;
    font-size: 10px;
    opacity: 0.3;
    transition: opacity 0.15s, transform 0.2s;
    display: inline-block;
}

.sort-active .sort-indicator {
    opacity: 1;
    color: var(--primary-color);
}

.sort-desc .sort-indicator {
    transform: rotate(180deg);
}

.sort-index {
    font-size: 9px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    width: 14px;
    height: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 4px;
}

.row-select-checkbox {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.row-select-cell {
    width: 40px;
    min-width: 40px !important;
    max-width: 40px;
    text-align: center;
}

.row-selected {
    background-color: var(--primary-bg-light) !important;
}

.row-selected:hover {
    background-color: var(--bg-surface-active) !important;
}

.bulk-actions-bar {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: 20;
    background: var(--primary-color);
    color: white;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    border-radius: 8px;
    margin-bottom: 12px;
    animation: slide-down 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slide-down {
    from { transform: translateY(-100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.bulk-actions-count {
    font-weight: 600;
    min-width: 120px;
}

.bulk-action-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.15s, transform 0.1s;
}

.bulk-action-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.bulk-action-btn:active {
    transform: scale(0.97);
}

.bulk-actions-close {
    margin-left: auto;
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.15s;
}

.bulk-actions-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.cell-value-positive { color: #10b981; font-weight: 500; }
.cell-value-negative { color: #ef4444; font-weight: 500; }
.cell-value-warning { color: #f59e0b; font-weight: 500; }

.cell-status-approved { 
    background: #d1fae5; 
    color: #065f46; 
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    display: inline-block;
}

.cell-status-pending { 
    background: #fef3c7; 
    color: #92400e;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    display: inline-block;
}

.cell-status-rejected { 
    background: #fee2e2; 
    color: #991b1b;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    display: inline-block;
}

.virtualized-tbody {
    display: block;
    overflow-y: auto;
    overflow-x: hidden;
}

.virtualized-tbody tr {
    display: table;
    width: 100%;
    table-layout: fixed;
}

.grid-table thead {
    position: sticky;
    top: 0;
    z-index: 10;
}

.grid-table thead tr {
    display: table;
    width: 100%;
    table-layout: fixed;
}

/* =========================================
   18. LOADING & EMPTY STATES
   ========================================= */

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.spinner-sm { width: 16px; height: 16px; border-width: 2px; }
.spinner-lg { width: 40px; height: 40px; border-width: 4px; }

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

.loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    animation: fade-in 0.2s ease;
}

[data-theme="dark"] .loading-overlay,
[data-theme="blue"] .loading-overlay,
[data-theme="gunmetal"] .loading-overlay {
    background: rgba(0, 0, 0, 0.5);
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
    color: var(--text-secondary);
    animation: fade-in 0.3s ease;
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.empty-state-description {
    font-size: 14px;
    max-width: 300px;
    margin-bottom: 24px;
}

/* =========================================
   19. KEYBOARD SHORTCUTS
   ========================================= */

.kbd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 6px;
    font-size: 11px;
    font-family: ui-monospace, monospace;
    background: var(--bg-app);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    box-shadow: 0 1px 0 var(--border-color);
    color: var(--text-secondary);
}

/* =========================================
   20. FORM ENHANCEMENTS
   ========================================= */

.form-field { margin-bottom: 16px; }

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--input-bg);
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.form-input:hover { border-color: var(--border-color-hover); }

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-bg-light);
}

.form-input-error { border-color: #ef4444; }
.form-input-error:focus { box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2); }
.form-error-message { font-size: 12px; color: #ef4444; margin-top: 4px; }

/* =========================================
   21. BADGE ENHANCEMENTS
   ========================================= */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 500;
    border-radius: 9999px;
    transition: transform 0.15s ease;
}

.badge:hover { transform: scale(1.05); }

.badge-primary { background: var(--primary-bg-light); color: var(--primary-color); }
.badge-success { background: #d1fae5; color: #065f46; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-neutral { background: var(--bg-app); color: var(--text-secondary); }

/* =========================================
   22. HOVER CARD EFFECTS
   ========================================= */

.hover-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hover-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* =========================================
   AIRTABLE-STYLE DATA GRID (REVISED)
   ========================================= */

/* Grid Wrapper */
.airtable-grid-wrapper {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
    outline: none;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.airtable-grid-scroll {
    overflow: auto;
    max-height: calc(100vh - 280px);
}

/* The Table */
.airtable-grid {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    line-height: 1.4;
    table-layout: fixed;
}

/* Column Groups */
.airtable-grid .col-checkbox { width: 36px; }
.airtable-grid .col-add { width: 44px; }

/* Header Row */
.airtable-grid .header-row {
    background: #f5f5f5;
}

[data-theme="dark"] .airtable-grid .header-row,
[data-theme="blue"] .airtable-grid .header-row,
[data-theme="gunmetal"] .airtable-grid .header-row {
    background: var(--bg-surface-hover);
}

.airtable-grid .cell-header {
    height: 32px;
    padding: 0;
    font-weight: 500;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
    border-right: 1px solid transparent;
    position: relative;
    user-select: none;
    cursor: pointer;
    vertical-align: middle;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
}

.airtable-grid .cell-header:hover {
    background: rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] .airtable-grid .cell-header:hover,
[data-theme="blue"] .airtable-grid .cell-header:hover,
[data-theme="gunmetal"] .airtable-grid .cell-header:hover {
    background: rgba(255, 255, 255, 0.05);
}

.airtable-grid .cell-header.sorted {
    color: var(--primary-color);
}

.airtable-grid .cell-header .header-content {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 10px;
    height: 100%;
}

.airtable-grid .cell-header .header-label {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
}

.airtable-grid .cell-header .sort-icon {
    font-size: 10px;
    opacity: 0.7;
}

.airtable-grid .cell-header.cell-custom {
    color: var(--primary-color);
}

/* Resize Handle */
.airtable-grid .resize-handle {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    cursor: col-resize;
    background: transparent;
    z-index: 5;
}

.airtable-grid .resize-handle:hover {
    background: var(--primary-color);
}

.resize-line {
    position: fixed;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--primary-color);
    z-index: 10000;
    pointer-events: none;
}

/* Checkbox Cells */
.airtable-grid .cell-checkbox {
    width: 36px;
    min-width: 36px;
    max-width: 36px;
    text-align: center;
    vertical-align: middle;
    padding: 0;
    border-bottom: 1px solid var(--border-color);
    background: inherit;
}

.airtable-grid .cell-checkbox input[type="checkbox"] {
    width: 14px;
    height: 14px;
    margin: 0;
    cursor: pointer;
    accent-color: var(--primary-color);
}

/* Add Column Cell */
.airtable-grid .cell-add {
    width: 44px;
    min-width: 44px;
    text-align: center;
    vertical-align: middle;
    color: var(--text-tertiary);
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    font-size: 14px;
}

.airtable-grid .cell-add:hover {
    color: var(--primary-color);
    background: var(--primary-bg-light);
}

/* Filter Row */
.airtable-grid .filter-row {
    background: var(--bg-surface);
}

.airtable-grid .filter-row td {
    padding: 4px 6px;
    border-bottom: 2px solid var(--border-color);
    vertical-align: middle;
}

.airtable-grid .cell-filter {
    padding: 4px 6px;
}

.airtable-grid .filter-input {
    width: 100%;
    height: 24px;
    padding: 0 8px;
    font-size: 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-app);
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.airtable-grid .filter-input::placeholder {
    color: var(--text-tertiary);
    font-size: 11px;
}

.airtable-grid .filter-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px var(--primary-bg-light);
}

.airtable-grid .filter-input.active {
    border-color: var(--primary-color);
    background: var(--primary-bg-light);
}

/* Data Rows */
.airtable-grid .data-row {
    background: var(--bg-surface);
    transition: background-color 0.1s;
}

.airtable-grid .data-row:nth-child(even) {
    background: var(--bg-app);
}

.airtable-grid .data-row:hover {
    background: #f0f7ff;
}

[data-theme="dark"] .airtable-grid .data-row:hover,
[data-theme="blue"] .airtable-grid .data-row:hover,
[data-theme="gunmetal"] .airtable-grid .data-row:hover {
    background: rgba(59, 130, 246, 0.1);
}

.airtable-grid .data-row.selected {
    background: #e0edff !important;
}

[data-theme="dark"] .airtable-grid .data-row.selected,
[data-theme="blue"] .airtable-grid .data-row.selected,
[data-theme="gunmetal"] .airtable-grid .data-row.selected {
    background: rgba(59, 130, 246, 0.2) !important;
}

.airtable-grid .data-row.new-row {
    animation: row-highlight 1s ease-out;
}

@keyframes row-highlight {
    from { background: var(--primary-bg-light); }
}

/* Data Cells */
.airtable-grid .cell-data {
    height: 32px;
    padding: 0;
    border-bottom: 1px solid var(--border-color);
    border-right: 1px solid transparent;
    vertical-align: middle;
    position: relative;
}

.airtable-grid .cell-data.active {
    box-shadow: inset 0 0 0 2px var(--primary-color);
    z-index: 2;
}

.airtable-grid .cell-data.in-selection {
    background: rgba(59, 130, 246, 0.08);
}

/* Cell View */
.airtable-grid .cell-view {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 10px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: var(--text-primary);
    font-size: 13px;
    cursor: cell;
    outline: none;
}

/* Cell Edit */
.airtable-grid .cell-edit {
    position: absolute;
    inset: 0;
    z-index: 10;
}

.airtable-grid .edit-input {
    width: 100%;
    height: 100%;
    padding: 0 10px;
    border: none;
    outline: 2px solid var(--primary-color);
    background: var(--bg-surface);
    color: var(--text-primary);
    font-size: 13px;
    font-family: inherit;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Empty State */
.airtable-grid .empty-cell {
    padding: 40px 20px;
    text-align: center;
    border-bottom: none;
}

.airtable-grid .empty-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-tertiary);
}

.airtable-grid .empty-message i {
    font-size: 32px;
    opacity: 0.5;
}

.airtable-grid .empty-message .btn-link {
    color: var(--primary-color);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 13px;
}

/* Skeleton Loading */
.airtable-grid .skeleton-row .cell-data {
    padding: 8px 10px;
}

.airtable-grid .skeleton-box {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--bg-app) 25%, var(--bg-surface-hover) 50%, var(--bg-app) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
}

.airtable-grid .skeleton-text {
    height: 12px;
    width: 70%;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--bg-app) 25%, var(--bg-surface-hover) 50%, var(--bg-app) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
}

/* Status Badges - Airtable Style */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 500;
    border-radius: 10px;
    white-space: nowrap;
}

.status-badge.status-active {
    background: #d1fae5;
    color: #065f46;
}

.status-badge.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.status-badge.status-off {
    background: #fee2e2;
    color: #991b1b;
}

.status-badge.status-suspended {
    background: #e5e7eb;
    color: #374151;
}

/* Amount Formatting */
.amount-negative {
    color: #dc2626;
}

/* Bulk Actions Bar - Updated */
.bulk-actions-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    background: var(--primary-color);
    color: white;
    font-size: 13px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.bulk-actions-count {
    font-weight: 600;
    min-width: 100px;
}

.bulk-action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 4px;
    color: white;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.15s;
}

.bulk-action-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.bulk-actions-close {
    margin-left: auto;
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 2px 6px;
    opacity: 0.8;
}

.bulk-actions-close:hover {
    opacity: 1;
}

/* =========================================
   SIDEBAR VIEW LIST - EXPANDABLE INDICATORS
   ========================================= */

/* Accounting Sidebar Enhancements */
.accounting-sidebar .sidebar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.15s;
    position: relative;
}

.accounting-sidebar .sidebar-item:hover {
    background: var(--bg-surface-hover);
    color: var(--text-primary);
}

.accounting-sidebar .sidebar-item.active {
    background: var(--primary-bg-light);
    color: var(--primary-color);
    font-weight: 500;
}

.accounting-sidebar .sidebar-item .item-icon {
    width: 20px;
    text-align: center;
    font-size: 14px;
    flex-shrink: 0;
}

.accounting-sidebar .sidebar-item .item-label {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Expandable Indicator */
.accounting-sidebar .sidebar-item .expand-indicator {
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: var(--text-tertiary);
    transition: transform 0.2s;
    flex-shrink: 0;
}

.accounting-sidebar .sidebar-item.expandable .expand-indicator {
    opacity: 1;
}

.accounting-sidebar .sidebar-item.expanded .expand-indicator {
    transform: rotate(90deg);
}

/* Subcategory List */
.accounting-sidebar .subcategory-list {
    margin-left: 32px;
    padding-left: 12px;
    border-left: 1px solid var(--border-color);
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.25s ease;
}

.accounting-sidebar .sidebar-item.expanded + .subcategory-list {
    max-height: 200px;
}

.accounting-sidebar .subcategory-item {
    padding: 6px 12px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 4px;
    margin: 2px 0;
}

.accounting-sidebar .subcategory-item:hover {
    background: var(--bg-surface-hover);
    color: var(--text-primary);
}

.accounting-sidebar .subcategory-item.active-sub {
    color: var(--primary-color);
    font-weight: 500;
}

/* View Count Badge */
.accounting-sidebar .view-count {
    font-size: 11px;
    padding: 2px 6px;
    background: var(--bg-app);
    color: var(--text-tertiary);
    border-radius: 10px;
    margin-left: auto;
}

.accounting-sidebar .sidebar-item.active .view-count {
    background: rgba(255, 255, 255, 0.3);
    color: var(--primary-color);
}

/* Section Headers */
.accounting-sidebar .sidebar-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 12px 8px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
    font-weight: 600;
}

.accounting-sidebar .sidebar-section-header button {
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    font-size: 14px;
    padding: 2px;
    border-radius: 4px;
}

.accounting-sidebar .sidebar-section-header button:hover {
    color: var(--primary-color);
    background: var(--primary-bg-light);
}

/* =========================================
   AIRTABLE-STYLE GRID (Clean Implementation)
   Prefix: at- to avoid conflicts
   ========================================= */

.at-grid-container {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
    outline: none;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.at-grid-scroll {
    overflow: auto;
    max-height: calc(100vh - 260px);
}

.at-grid {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    line-height: 1.3;
    user-select: none;
    -webkit-user-select: none;
}

/* Header Row */
.at-header-row {
    background: var(--grid-header-bg);
}

.at-cell-head,
.at-cell-header {
    height: 28px;
    padding: 0 8px;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    position: relative;
    user-select: none;
    cursor: pointer;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-sizing: border-box;
}

.at-cell-head:hover,
.at-cell-header:hover {
    background: var(--grid-row-hover);
}

.at-cell-head.sorted,
.at-cell-header.sorted {
    color: var(--primary-color);
    background: var(--primary-bg-light);
}

/* Header Content Layout */
.at-header-content {
    display: flex;
    align-items: center;
    gap: 4px;
    height: 100%;
    padding-right: 8px;
}

.at-header-title {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
}

.at-sort {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    cursor: pointer;
    color: var(--primary-color);
    font-size: 12px;
}

.at-sort:empty {
    display: none;
}

.at-col-menu {
    display: flex;
    align-items: center;
}

.at-col-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--text-tertiary);
    cursor: pointer;
    border-radius: 3px;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.15s, background-color 0.15s, color 0.15s;
}

.at-cell-header:hover .at-col-menu-btn {
    opacity: 1;
}

.at-col-menu-btn:hover {
    background: var(--bg-surface-hover);
    color: var(--text-primary);
}

/* Add Column Button */
.at-add-col {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin: 0 auto;
    padding: 0;
    border: 1px dashed var(--border-color);
    background: transparent;
    color: var(--text-tertiary);
    cursor: pointer;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.15s;
}

.at-add-col:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: var(--primary-bg-light);
}

/* Column Dropdown Menu */
.at-col-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 4px;
    z-index: 1000;
    min-width: 200px;
    animation: at-dropdown-in 0.15s ease-out;
    transform-origin: top left;
}

/* Fixed positioning variant - escapes overflow:hidden containers */
.at-col-dropdown-fixed {
    position: fixed;
    top: auto;
    left: auto;
    margin-top: 0;
    z-index: 10000;
}

@keyframes at-dropdown-in {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-4px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.at-col-dropdown-content {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    padding: 6px 0;
    overflow: hidden;
}

.at-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 14px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 13px;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.1s, color 0.1s;
}

.at-dropdown-item:hover {
    background: var(--bg-surface-hover);
    color: var(--text-primary);
}

.at-dropdown-item:active {
    background: var(--bg-surface-active);
}

.at-dropdown-item i {
    width: 16px;
    font-size: 14px;
    text-align: center;
    color: var(--text-tertiary);
    transition: color 0.1s;
}

.at-dropdown-item:hover i {
    color: var(--text-secondary);
}

.at-dropdown-item-danger {
    color: var(--color-danger);
}

.at-dropdown-item-danger:hover {
    background: var(--color-danger-bg);
    color: var(--color-danger);
}

.at-dropdown-item-danger i {
    color: var(--color-danger);
}

.at-dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 6px 0;
}

/* Backdrop for closing dropdown on outside click */
.at-dropdown-backdrop {
    position: fixed;
    inset: 0;
    z-index: 999;
}

.at-head-text {
    display: inline-block;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: calc(100% - 20px);
}

.at-sort-icon {
    margin-left: 4px;
    font-size: 10px;
    opacity: 0.8;
}

/* Resize Handle */
.at-resize {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    cursor: col-resize;
    background: transparent;
    z-index: 5;
}
.at-resize:hover {
    background: var(--primary-color);
}
.at-resize-line {
    position: fixed;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--primary-color);
    z-index: 10000;
    pointer-events: none;
}

/* Checkbox Cell */
.at-cell-check {
    width: 36px !important;
    min-width: 36px !important;
    max-width: 36px !important;
    text-align: center;
    vertical-align: middle;
    padding: 0 !important;
    border-bottom: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    background: inherit;
    box-sizing: border-box;
}
.at-cell-check input[type="checkbox"] {
    width: 13px;
    height: 13px;
    margin: 0;
    cursor: pointer;
    accent-color: var(--primary-color);
}

/* Add Column Cell */
.at-cell-add {
    width: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
    text-align: center;
    vertical-align: middle;
    color: var(--text-tertiary);
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    box-sizing: border-box;
}
.at-cell-add:hover {
    color: var(--primary-color);
    background: var(--primary-bg-light);
}

/* Filter Row */
.at-filter-row {
    background: var(--bg-surface);
}
.at-filter-row td {
    padding: 3px 4px;
    border-bottom: 2px solid var(--border-color);
    vertical-align: middle;
}
.at-cell-filter {
    padding: 3px 4px;
    border-right: 1px solid var(--border-color);
}
.at-filter-input {
    width: 100%;
    height: 22px;
    padding: 0 6px;
    font-size: 11px;
    border: 1px solid var(--border-color);
    border-radius: 3px;
    background: var(--bg-app);
    color: var(--text-primary);
    outline: none;
    box-sizing: border-box;
}
.at-filter-input::placeholder {
    color: var(--text-tertiary);
    font-size: 10px;
}
.at-filter-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 1px var(--primary-bg-light);
}
.at-filter-input.active {
    border-color: var(--primary-color);
    background: var(--primary-bg-light);
}

/* Data Rows */
.at-row {
    background: var(--bg-surface);
}
.at-row:nth-child(even) {
    background: var(--bg-app);
}
.at-row:hover {
    background: var(--grid-row-hover);
}
.at-row.selected {
    background: var(--grid-row-selected) !important;
}

/* Data Cells */
.at-cell {
    height: 28px;
    padding: 0;
    border-bottom: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    vertical-align: middle;
    position: relative;
    box-sizing: border-box;
    overflow: hidden;
}
.at-cell.active {
    box-shadow: inset 0 0 0 2px var(--primary-color);
    z-index: 2;
}
.at-cell.in-selection {
    background: var(--grid-row-hover);
}

/* Cell View */
.at-view {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 8px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: var(--text-primary);
    font-size: 12px;
    cursor: cell;
    outline: none;
    user-select: none;
    -webkit-user-select: none;
}

/* Cell Edit */
.at-edit-wrap {
    position: absolute;
    inset: -1px;
    z-index: 10;
}
.at-edit-input {
    width: 100%;
    height: 100%;
    padding: 0 8px;
    border: 2px solid var(--primary-color);
    background: var(--bg-surface);
    color: var(--text-primary);
    font-size: 12px;
    font-family: inherit;
    outline: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    box-sizing: border-box;
    user-select: text;
    -webkit-user-select: text;
}

/* Empty State */
.at-empty {
    padding: 48px 20px;
    text-align: center;
    border-bottom: none;
    color: var(--text-tertiary);
}
.at-empty i {
    display: block;
    font-size: 36px;
    margin-bottom: 12px;
    opacity: 0.4;
}
.at-empty span {
    display: block;
    margin-bottom: 8px;
}
.at-empty button {
    color: var(--primary-color);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 12px;
    text-decoration: underline;
}

/* Skeleton Loading */
.at-skeleton-box {
    width: 13px;
    height: 13px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--bg-app) 25%, var(--bg-surface-hover) 50%, var(--bg-app) 75%);
    background-size: 200% 100%;
    animation: at-shimmer 1.5s infinite;
    margin: 0 auto;
}
.at-skeleton-text {
    height: 10px;
    width: 65%;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--bg-app) 25%, var(--bg-surface-hover) 50%, var(--bg-app) 75%);
    background-size: 200% 100%;
    animation: at-shimmer 1.5s infinite;
    margin: 0 8px;
}
@keyframes at-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Status Badges - Airtable Style */
.at-status {
    display: inline-block;
    padding: 1px 8px;
    font-size: 11px;
    font-weight: 500;
    border-radius: 10px;
    white-space: nowrap;
}
.at-status-green {
    background: #d1fae5;
    color: #065f46;
}
.at-status-yellow {
    background: #fef3c7;
    color: #92400e;
}
.at-status-red {
    background: #fee2e2;
    color: #991b1b;
}
.at-status-gray {
    background: #e5e7eb;
    color: #374151;
}
[data-theme="dark"] .at-status-green,
[data-theme="blue"] .at-status-green,
[data-theme="gunmetal"] .at-status-green {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
}
[data-theme="dark"] .at-status-yellow,
[data-theme="blue"] .at-status-yellow,
[data-theme="gunmetal"] .at-status-yellow {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}
[data-theme="dark"] .at-status-red,
[data-theme="blue"] .at-status-red,
[data-theme="gunmetal"] .at-status-red {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

/* Amount Negative */
.at-negative {
    color: #dc2626;
}

/* Bulk Actions Bar */
.at-bulk-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    background: var(--primary-color);
    color: white;
    font-size: 12px;
}
.at-bulk-count {
    font-weight: 600;
    min-width: 90px;
}
.at-bulk-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 3px;
    color: white;
    font-size: 11px;
    cursor: pointer;
}
.at-bulk-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}
.at-bulk-close {
    margin-left: auto;
    background: none;
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
    padding: 0 4px;
    opacity: 0.7;
}
.at-bulk-close:hover {
    opacity: 1;
}

/* =========================================
   SIDEBAR - Expandable Indicators
   ========================================= */

.accounting-sidebar .sidebar-list {
    padding: 8px;
}

.accounting-sidebar .sidebar-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 13px;
    transition: all 0.15s;
    margin-bottom: 2px;
}

.accounting-sidebar .sidebar-item:hover {
    background: var(--bg-surface-hover);
    color: var(--text-primary);
}

.accounting-sidebar .sidebar-item.active {
    background: var(--primary-bg-light);
    color: var(--primary-color);
    font-weight: 500;
}

.accounting-sidebar .sidebar-item .item-icon {
    font-size: 14px;
    opacity: 0.7;
}

.accounting-sidebar .sidebar-item.active .item-icon {
    opacity: 1;
}

.accounting-sidebar .sidebar-item .item-label {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Expand Indicator */
.accounting-sidebar .sidebar-item .expand-indicator {
    font-size: 10px;
    color: var(--text-tertiary);
    transition: transform 0.2s;
    opacity: 0;
}

.accounting-sidebar .sidebar-item.expandable .expand-indicator {
    opacity: 1;
}

.accounting-sidebar .sidebar-item.expanded .expand-indicator {
    transform: rotate(90deg);
}

/* Subcategory List */
.accounting-sidebar .subcategory-list {
    margin-left: 28px;
    padding-left: 10px;
    border-left: 1px solid var(--border-color);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.2s ease-out;
}

.accounting-sidebar .subcategory-list.show {
    max-height: 250px;
}

.accounting-sidebar .subcategory-item {
    padding: 6px 10px;
    font-size: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 4px;
    margin: 2px 0;
}

.accounting-sidebar .subcategory-item:hover {
    background: var(--bg-surface-hover);
    color: var(--text-primary);
}

.accounting-sidebar .subcategory-item.active-sub {
    color: var(--primary-color);
    font-weight: 500;
    background: var(--primary-bg-light);
}

/* Section Header */
.accounting-sidebar .sidebar-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 12px 8px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-tertiary);
    font-weight: 600;
}

.accounting-sidebar .sidebar-section-header button {
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    font-size: 14px;
    padding: 2px 4px;
    border-radius: 4px;
    line-height: 1;
}

.accounting-sidebar .sidebar-section-header button:hover {
    color: var(--primary-color);
    background: var(--primary-bg-light);
}

/* =========================================
   PHASE 1: TICKETING SYSTEM ANIMATIONS & POLISH
   ========================================= */

/* --- Animation Keyframes --- */
@keyframes tk-fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

@keyframes tk-scaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes tk-modalSpring {
    0% { opacity: 0; transform: translateY(20px) scale(0.95); }
    70% { transform: translateY(-4px) scale(1.01); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

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

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

@keyframes tk-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes tk-checkBounce {
    0% { transform: scale(1); }
    30% { transform: scale(0.85); }
    60% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@keyframes tk-rowEnter {
    from { opacity: 0; transform: translateX(-8px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes tk-badgePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    50% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
}

@keyframes tk-buttonPress {
    0% { transform: scale(1); }
    50% { transform: scale(0.96); }
    100% { transform: scale(1); }
}

@keyframes tk-toastSlideIn {
    from { opacity: 0; transform: translateX(100%); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes tk-toastSlideOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(100%); }
}

/* --- Page Transitions --- */
.tk-page-enter {
    animation: tk-slideUp 0.3s ease-out;
}

.tk-page-fade {
    animation: tk-fadeIn 0.25s ease-out;
}

/* --- Skeleton Loading --- */
.tk-skeleton {
    background: linear-gradient(90deg, 
        var(--bg-surface-hover) 25%, 
        var(--bg-surface) 50%, 
        var(--bg-surface-hover) 75%);
    background-size: 200% 100%;
    animation: tk-shimmer 1.5s infinite;
    border-radius: 4px;
}

.tk-skeleton-text {
    height: 14px;
    margin-bottom: 8px;
}

.tk-skeleton-text.short { width: 40%; }
.tk-skeleton-text.medium { width: 65%; }
.tk-skeleton-text.long { width: 90%; }

.tk-skeleton-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.tk-skeleton-badge {
    width: 60px;
    height: 20px;
    border-radius: 10px;
}

.tk-skeleton-row {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    gap: 16px;
    border-bottom: 1px solid var(--border-color);
}

/* --- Modern Ticket List Styles --- */
.tk-list-container {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    animation: tk-fadeIn 0.3s ease-out;
}

.tk-list-header {
    display: flex;
    align-items: center;
    padding: 0 16px;
    height: 44px;
    background: var(--bg-app);
    border-bottom: 1px solid var(--border-color);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
    user-select: none;
}

.tk-list-header-cell {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 4px 8px;
    margin: -4px -8px;
    border-radius: 4px;
    transition: background 0.15s, color 0.15s;
}

.tk-list-header-cell:hover {
    background: var(--bg-surface-hover);
    color: var(--text-primary);
}

.tk-list-header-cell.sorted {
    color: var(--primary-color);
}

.tk-list-header-cell .sort-icon {
    font-size: 10px;
    opacity: 0;
    transition: opacity 0.15s;
}

.tk-list-header-cell:hover .sort-icon,
.tk-list-header-cell.sorted .sort-icon {
    opacity: 1;
}

.tk-list-body {
    max-height: calc(100vh - 280px);
    overflow-y: auto;
}

/* --- Ticket Row --- */
.tk-row {
    display: flex;
    align-items: center;
    padding: 0 16px;
    height: 56px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease;
    animation: tk-rowEnter 0.3s ease-out backwards;
}

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

.tk-row:hover {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.04), rgba(59, 130, 246, 0.02));
}

.tk-row:active {
    transform: scale(0.995);
}

.tk-row.selected {
    background: rgba(59, 130, 246, 0.08);
}

/* Stagger animation for rows */
.tk-row:nth-child(1) { animation-delay: 0.02s; }
.tk-row:nth-child(2) { animation-delay: 0.04s; }
.tk-row:nth-child(3) { animation-delay: 0.06s; }
.tk-row:nth-child(4) { animation-delay: 0.08s; }
.tk-row:nth-child(5) { animation-delay: 0.10s; }
.tk-row:nth-child(6) { animation-delay: 0.12s; }
.tk-row:nth-child(7) { animation-delay: 0.14s; }
.tk-row:nth-child(8) { animation-delay: 0.16s; }
.tk-row:nth-child(9) { animation-delay: 0.18s; }
.tk-row:nth-child(10) { animation-delay: 0.20s; }

/* --- Row Cells --- */
.tk-cell {
    display: flex;
    align-items: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tk-cell-check {
    width: 40px;
    flex-shrink: 0;
}

.tk-cell-id {
    width: 110px;
    flex-shrink: 0;
}

.tk-cell-subject {
    flex: 1;
    min-width: 200px;
    padding-right: 16px;
}

.tk-cell-type {
    width: 100px;
    flex-shrink: 0;
}

.tk-cell-status {
    width: 90px;
    flex-shrink: 0;
}

.tk-cell-priority {
    width: 80px;
    flex-shrink: 0;
}

.tk-cell-assignee {
    width: 140px;
    flex-shrink: 0;
}

.tk-cell-date {
    width: 100px;
    flex-shrink: 0;
    text-align: right;
    justify-content: flex-end;
}

/* --- Checkbox --- */
.tk-checkbox {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    background: var(--bg-surface);
}

.tk-checkbox:hover {
    border-color: var(--primary-color);
}

.tk-checkbox.checked {
    background: var(--primary-color);
    border-color: var(--primary-color);
    animation: tk-checkBounce 0.3s ease;
}

.tk-checkbox.checked i {
    color: white;
    font-size: 11px;
}

/* --- Ticket ID --- */
.tk-id {
    font-family: ui-monospace, SFMono-Regular, monospace;
    font-size: 12px;
    font-weight: 500;
    color: var(--primary-color);
    background: var(--primary-bg-light);
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.15s;
}

.tk-row:hover .tk-id {
    background: var(--primary-color);
    color: white;
}

/* --- Subject Cell --- */
.tk-subject-wrap {
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
}

.tk-subject {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tk-requester {
    font-size: 11px;
    color: var(--text-tertiary);
    display: flex;
    align-items: center;
    gap: 4px;
}

.tk-requester i {
    font-size: 10px;
}

/* --- Type Badge --- */
.tk-type {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 4px;
    background: var(--bg-surface-hover);
    color: var(--text-secondary);
}

.tk-type.inc {
    background: #fef3c7;
    color: #92400e;
}

.tk-type.req {
    background: #dbeafe;
    color: #1e40af;
}

.tk-type.inq {
    background: #f3e8ff;
    color: #6b21a8;
}

.tk-type.pr {
    background: #fee2e2;
    color: #991b1b;
}

.tk-type i {
    font-size: 10px;
}

/* --- Status Badge --- */
.tk-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
}

.tk-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.tk-status.open .tk-status-dot { background: #3b82f6; }
.tk-status.pending .tk-status-dot { background: #f59e0b; }
.tk-status.resolved .tk-status-dot { background: #10b981; }
.tk-status.closed .tk-status-dot { background: #6b7280; }
.tk-status.on-hold .tk-status-dot { background: #8b5cf6; }

/* --- Priority Badge --- */
.tk-priority {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.tk-priority.low {
    background: #ecfdf5;
    color: #059669;
}

.tk-priority.medium {
    background: #fef3c7;
    color: #d97706;
}

.tk-priority.high {
    background: #fee2e2;
    color: #dc2626;
}

.tk-priority.urgent {
    background: #dc2626;
    color: white;
    animation: tk-badgePulse 2s infinite;
}

/* --- Assignee --- */
.tk-assignee {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tk-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-gradient-start), var(--primary-gradient-end));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    flex-shrink: 0;
}

.tk-avatar.unassigned {
    background: var(--bg-surface-hover);
    color: var(--text-tertiary);
}

.tk-assignee-name {
    font-size: 13px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tk-assignee-name.unassigned {
    color: var(--text-tertiary);
    font-style: italic;
}

/* --- Date --- */
.tk-date {
    font-size: 12px;
    color: var(--text-secondary);
}

.tk-date-relative {
    color: var(--text-tertiary);
    font-size: 11px;
}

/* --- Empty State --- */
.tk-empty-state {
    padding: 60px 40px;
    text-align: center;
    animation: tk-fadeIn 0.3s ease;
}

.tk-empty-icon {
    width: 80px;
    height: 80px;
    background: var(--bg-surface-hover);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.tk-empty-icon i {
    font-size: 32px;
    color: var(--text-tertiary);
}

.tk-empty-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.tk-empty-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

/* --- Bulk Actions Bar --- */
.tk-bulk-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: var(--primary-color);
    color: white;
    font-size: 13px;
    animation: tk-slideDown 0.2s ease;
}

.tk-bulk-bar .count {
    font-weight: 600;
    background: rgba(255,255,255,0.2);
    padding: 2px 10px;
    border-radius: 12px;
}

.tk-bulk-bar .actions {
    display: flex;
    gap: 6px;
    margin-left: auto;
}

.tk-bulk-btn {
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.3);
    background: transparent;
    color: white;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tk-bulk-btn:hover {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.5);
}

.tk-bulk-btn.danger:hover {
    background: #dc2626;
    border-color: #dc2626;
}

.tk-bulk-close {
    padding: 4px 8px;
    border: none;
    background: transparent;
    color: rgba(255,255,255,0.7);
    cursor: pointer;
    border-radius: 4px;
}

.tk-bulk-close:hover {
    color: white;
    background: rgba(255,255,255,0.1);
}

/* --- Filters Sidebar Redesign --- */
.tk-filters {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    animation: tk-fadeIn 0.3s ease;
}

.tk-filters-header {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
}

.tk-filters-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.tk-filters-subtitle {
    font-size: 12px;
    color: var(--text-tertiary);
}

.tk-filters-body {
    padding: 16px;
}

.tk-filter-group {
    margin-bottom: 16px;
}

.tk-filter-group:last-child {
    margin-bottom: 0;
}

.tk-filter-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.tk-filters-footer {
    padding: 16px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 8px;
}

.tk-filters-footer .btn-primary {
    flex: 1;
}

/* --- Quick Filter Chips --- */
.tk-quick-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.tk-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    color: var(--text-secondary);
}

.tk-chip:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.tk-chip.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.tk-chip i {
    font-size: 11px;
}

/* --- Toolbar Redesign --- */
.tk-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    animation: tk-slideDown 0.3s ease;
}

.tk-toolbar-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tk-toolbar-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.tk-toolbar-subtitle {
    font-size: 12px;
    color: var(--text-tertiary);
}

.tk-toolbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tk-search {
    position: relative;
    width: 280px;
}

.tk-search input {
    width: 100%;
    padding: 10px 16px 10px 40px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 13px;
    background: var(--bg-app);
    color: var(--text-primary);
    outline: none;
    transition: all 0.2s;
}

.tk-search input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-bg-light);
}

.tk-search input::placeholder {
    color: var(--text-tertiary);
}

.tk-search i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-tertiary);
    font-size: 14px;
}

/* --- Button Animations --- */
.tk-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    border: none;
}

.tk-btn:active {
    animation: tk-buttonPress 0.15s ease;
}

.tk-btn-primary {
    background: linear-gradient(135deg, var(--primary-gradient-start), var(--primary-gradient-end));
    color: white;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25);
}

.tk-btn-primary:hover {
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
    transform: translateY(-1px);
}

.tk-btn-secondary {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.tk-btn-secondary:hover {
    background: var(--bg-surface-hover);
    color: var(--text-primary);
    border-color: var(--border-color-hover);
}

.tk-btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.tk-btn-ghost:hover {
    background: var(--bg-surface-hover);
    color: var(--text-primary);
}

/* --- Details Page Animations --- */
.tk-detail-page {
    animation: tk-fadeIn 0.3s ease;
}

.tk-detail-header {
    animation: tk-slideDown 0.3s ease;
}

.tk-detail-content {
    animation: tk-slideUp 0.4s ease 0.1s backwards;
}

/* --- Tab Transitions --- */
.tk-tabs {
    display: flex;
    gap: 4px;
    padding: 0 4px;
}

.tk-tab {
    position: relative;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.2s;
}

.tk-tab:hover {
    color: var(--text-primary);
}

.tk-tab.active {
    color: var(--primary-color);
}

.tk-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-color);
    border-radius: 2px 2px 0 0;
    animation: tk-scaleIn 0.2s ease;
}

.tk-tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    margin-left: 6px;
    font-size: 11px;
    font-weight: 600;
    background: var(--bg-surface-hover);
    border-radius: 10px;
}

.tk-tab.active .tk-tab-count {
    background: var(--primary-bg-light);
    color: var(--primary-color);
}

/* --- Tab Content Transition --- */
.tk-tab-content {
    animation: tk-fadeIn 0.25s ease;
}

/* --- Loading Spinner --- */
.tk-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: tk-spin 0.8s linear infinite;
}

.tk-loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px;
    gap: 16px;
    color: var(--text-secondary);
    font-size: 14px;
}

/* --- SLA Indicator --- */
.tk-sla {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 500;
}

.tk-sla-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.tk-sla.on-track .tk-sla-dot { background: #10b981; }
.tk-sla.at-risk .tk-sla-dot { background: #f59e0b; }
.tk-sla.breached .tk-sla-dot { background: #ef4444; animation: tk-pulse 1s infinite; }

/* --- Quick Actions Menu --- */
.tk-quick-actions {
    position: relative;
}

.tk-quick-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 4px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    min-width: 180px;
    z-index: 100;
    animation: tk-scaleIn 0.15s ease;
    transform-origin: top right;
}

.tk-quick-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.1s;
}

.tk-quick-menu-item:first-child {
    border-radius: 8px 8px 0 0;
}

.tk-quick-menu-item:last-child {
    border-radius: 0 0 8px 8px;
}

.tk-quick-menu-item:hover {
    background: var(--bg-surface-hover);
    color: var(--text-primary);
}

.tk-quick-menu-item i {
    width: 16px;
    text-align: center;
}

.tk-quick-menu-divider {
    height: 1px;
    background: var(--border-color);
    margin: 4px 0;
}

/* --- Keyboard Shortcut Hints --- */
.tk-shortcut {
    font-size: 10px;
    font-family: ui-monospace, monospace;
    padding: 2px 6px;
    background: var(--bg-app);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-tertiary);
    margin-left: auto;
}

/* =========================================
   GLOBAL DRAG-AND-DROP STYLES
   ========================================= */

/* Global dragging state - prevents text selection everywhere */
body.is-dragging,
body.is-dragging * {
    user-select: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
}

body.is-dragging {
    cursor: grabbing !important;
}

/* Ensure no elements interfere during drag */
body.is-dragging iframe,
body.is-dragging object,
body.is-dragging embed {
    pointer-events: none !important;
}
