/* Rolling Forecast v2 - Styles */

/* ============ Reset & Base ============ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f8fafc;
    color: #1e293b;
    line-height: 1.5;
    min-height: 100vh;
    margin: 0;
}

/* ============ App Layout ============ */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* ============ Sidebar ============ */
.sidebar {
    width: var(--sidebar-width, 200px);
    min-width: var(--sidebar-width, 200px);
    background: #0f172a;
    color: #e2e8f0;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 200;
    transition: transform 0.25s ease, width 0.25s ease, min-width 0.25s ease;
}

.sidebar-brand {
    padding: 14px 16px 12px;
    border-bottom: 1px solid #1e293b;
    flex-shrink: 0;
}

.sidebar-brand a {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-logo {
    height: 24px;
    width: auto;
    flex-shrink: 0;
}

/* Tenant branding: logo + "Orbital" / "for OrgName" */
.sidebar-brand-tenant {
    gap: 10px !important;
    line-height: 1.2;
}

.sidebar-logo-large {
    height: 36px;
    width: auto;
    flex-shrink: 0;
}

.sidebar-brand-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.sidebar-brand-top {
    font-size: 18px;
    font-weight: 700;
}

.sidebar-brand-for {
    font-weight: 400;
    font-size: 12px;
    opacity: 0.5;
}

.sidebar-brand-org {
    font-size: 13px;
    font-weight: 600;
    color: #94a3b8;
    letter-spacing: 0;
}

.login-logo {
    height: 56px;
    width: auto;
    margin-bottom: 12px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    padding: 8px 6px;
    gap: 1px;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0; /* Allow flex child to shrink for scroll */
}

/* Custom scrollbar for sidebar */
.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}
.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}
.sidebar-nav::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 4px;
}
.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 10px;
    color: #94a3b8;
    text-decoration: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.15s;
}

.sidebar-link:hover {
    background: #1e293b;
    color: #e2e8f0;
}

.sidebar-link.active {
    background: #1e3a5f;
    color: #fff;
    border-left: 3px solid #3b82f6;
    padding-left: 7px;
}

.sidebar-link svg {
    flex-shrink: 0;
    opacity: 0.7;
    width: 18px;
    height: 18px;
}

.sidebar-link.active svg {
    opacity: 1;
}

/* ============ Sidebar Group (Accordion) ============ */

.sidebar-group {
    margin-bottom: 1px;
}

.sidebar-group-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 10px;
    width: 100%;
    border: none;
    background: none;
    color: #94a3b8;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.15s;
    text-align: left;
    font-family: inherit;
}

.sidebar-group-header:hover {
    background: #1e293b;
    color: #e2e8f0;
}

.sidebar-group-header.active {
    color: #e2e8f0;
    background: #162032;
}

.sidebar-group-header svg {
    flex-shrink: 0;
    opacity: 0.7;
    width: 18px;
    height: 18px;
}

.sidebar-group-header.active svg {
    opacity: 1;
}

.sidebar-group-chevron {
    margin-left: auto;
    transition: transform 0.2s ease;
    opacity: 0.5;
}

.sidebar-group.expanded .sidebar-group-chevron {
    transform: rotate(180deg);
}

.sidebar-group-items {
    max-height: 0;
    overflow: hidden;
    /* No transition by default — prevents flicker on page load.
       The .animated class is added by JS after first paint. */
}

.sidebar-group-items.animated {
    transition: max-height 0.25s ease;
}

.sidebar-group.expanded .sidebar-group-items {
    max-height: 300px;
}

/* Nesting indicator: vertical line on the left inside the expanded group */
.sidebar-group-items-inner {
    margin-left: 16px;
    padding-left: 10px;
    border-left: 2px solid #1e293b;
    padding-top: 2px;
    padding-bottom: 2px;
}

.sidebar-section-label {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #64748b;
    padding: 6px 0 2px;
    font-weight: 700;
}

.sidebar-sublink {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 8px;
    color: #cbd5e1;
    text-decoration: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 400;
    transition: all 0.15s;
    margin: 1px 0;
}

.sidebar-sublink:hover {
    background: #1e293b;
    color: #f1f5f9;
}

.sidebar-sublink.active {
    background: #1e3a5f;
    color: #fff;
    border-left: 3px solid #3b82f6;
    padding-left: 5px;
    font-weight: 500;
}

.sidebar-sublink svg {
    flex-shrink: 0;
    opacity: 0.5;
    width: 14px;
    height: 14px;
}

.sidebar-sublink.active svg {
    opacity: 0.9;
}

.sidebar-sublink-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
    line-height: 1.3;
}

.sidebar-sublink-desc {
    font-size: 10px;
    color: #94a3b8;
    font-weight: 400;
    letter-spacing: 0.01em;
}

.sidebar-sublink.active .sidebar-sublink-desc {
    color: #bfdbfe;
}

/* ============ Sidebar Resize Handle ============ */
.sidebar-resize-handle {
    position: absolute;
    top: 0;
    right: -3px;
    width: 6px;
    height: 100%;
    cursor: col-resize;
    z-index: 201;
    background: transparent;
    transition: background 0.15s;
}

.sidebar-resize-handle:hover,
.sidebar-resize-handle.dragging {
    background: #3b82f6;
}

.sidebar.resizing,
.sidebar.resizing ~ .main-content {
    transition: none;
}

body.sidebar-resizing {
    cursor: col-resize;
    user-select: none;
    -webkit-user-select: none;
}

body.sidebar-resizing * {
    cursor: col-resize !important;
}

.sidebar-footer {
    padding: 8px 16px;
    border-top: 1px solid #1e293b;
    font-size: 10px;
    color: #475569;
    flex-shrink: 0;
}

/* ============ Sidebar Mobile Toggle ============ */
.sidebar-mobile-toggle {
    display: none; /* Hidden on desktop */
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 250;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #0f172a;
    color: #e2e8f0;
    border: 1px solid #1e293b;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.sidebar-mobile-toggle svg {
    width: 20px;
    height: 20px;
}

/* Sidebar overlay for mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 199;
}

/* ============ Sidebar Compact: hide descriptions at short viewport ============ */
@media (max-height: 700px) {
    .sidebar-sublink-desc {
        display: none;
    }
    .sidebar-section-label {
        padding: 4px 0 1px;
    }
    .sidebar-brand {
        padding: 10px 14px 8px;
    }
    .sidebar-link, .sidebar-group-header {
        padding: 6px 10px;
    }
    .sidebar-sublink {
        padding: 4px 8px;
    }
    .sidebar-user {
        padding: 4px 10px;
    }
    .sidebar-footer {
        padding: 4px 16px;
    }
}

/* ============ Sidebar Responsive: mobile collapse ============ */
@media (max-width: 768px) {
    .sidebar-mobile-toggle {
        display: flex;
    }
    .sidebar {
        transform: translateX(-100%);
        width: 240px;
        min-width: 240px;
    }
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    .sidebar-overlay.visible {
        display: block;
    }
    .main-content {
        margin-left: 0 !important;
    }
    /* Wider top padding to make room for hamburger */
    .main-content .container {
        padding-top: 56px;
    }
    .sidebar-resize-handle {
        display: none;
    }
}

/* ============ Main Content ============ */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width, 200px);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.25s ease;
}

/* ============ Container ============ */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
    flex: 1;
    width: 100%;
}

/* ============ Page Header ============ */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.page-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: #0f172a;
}

.back-link {
    display: inline-block;
    color: #64748b;
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 8px;
}

.back-link:hover {
    color: #2563eb;
}

.subtitle {
    color: #64748b;
    font-size: 14px;
    margin-top: 4px;
}

/* ============ Buttons ============ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary {
    background: #2563eb;
    color: white;
}

.btn-primary:hover {
    background: #1d4ed8;
}

.btn-primary:disabled {
    background: #94a3b8;
    cursor: not-allowed;
}

.btn-secondary {
    background: #f1f5f9;
    color: #475569;
}

.btn-secondary:hover {
    background: #e2e8f0;
}

.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-large {
    padding: 14px 28px;
    font-size: 16px;
}

.btn-icon {
    padding: 8px;
    background: transparent;
    color: #64748b;
}

.btn-icon:hover {
    background: #f1f5f9;
    color: #ef4444;
}

.link-btn {
    background: none;
    border: none;
    color: #2563eb;
    cursor: pointer;
    text-decoration: underline;
    font-size: inherit;
}

.link-btn:hover {
    color: #1d4ed8;
}

/* ============ Cards ============ */
.card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.section {
    margin-bottom: 24px;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ============ Summary Cards ============ */
.summary-card {
    text-align: center;
    padding: 24px;
}

.summary-card.positive {
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    border: 1px solid #86efac;
}

.summary-card.warning {
    background: linear-gradient(135deg, #fefce8, #fef08a);
    border: 1px solid #fde047;
}

.summary-card.negative {
    background: linear-gradient(135deg, #fef2f2, #fecaca);
    border: 1px solid #fca5a5;
}

.summary-card.neutral {
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    border: 1px solid #cbd5e1;
}

.summary-label {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-value {
    font-size: 32px;
    font-weight: 700;
}

.summary-detail {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 4px;
}

/* ============ Grid System ============ */
.grid {
    display: grid;
    gap: 20px;
    margin-bottom: 24px;
}

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

@media (max-width: 1024px) {
    .grid-4, .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

/* ============ Tables ============ */
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

th {
    background: #f1f5f9;
    padding: 12px 10px;
    text-align: left;
    font-weight: 600;
    color: #475569;
    font-size: 11px;
    text-transform: uppercase;
}

td {
    padding: 12px 10px;
    border-bottom: 1px solid #e2e8f0;
}

th.right, td.right {
    text-align: right;
}

tr:hover td {
    background: #f8fafc;
}

tr.total td {
    background: #f1f5f9;
    font-weight: 700;
}

tr.negative td {
    background: #fef2f2;
}

.font-bold {
    font-weight: 700;
}

/* ============ Text Colors ============ */
.text-green { color: #16a34a; }
.text-red { color: #dc2626; }
.text-yellow { color: #ca8a04; }

/* ============ Info Boxes ============ */
.info-box {
    padding: 16px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.6;
}

.info-box.blue { background: #eff6ff; border-left: 4px solid #3b82f6; }
.info-box.yellow { background: #fffbeb; border-left: 4px solid #f59e0b; }
.info-box.green { background: #f0fdf4; border-left: 4px solid #22c55e; }
.info-box.red { background: #fef2f2; border-left: 4px solid #ef4444; }

.info-box strong {
    color: #0f172a;
}

.big-number {
    font-size: 24px;
    font-weight: 700;
    display: block;
    margin-top: 8px;
}

/* ============ Forms ============ */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}

/* ============ Controls ============ */
.controls {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

@media (max-width: 768px) {
    .controls { grid-template-columns: repeat(2, 1fr); }
}

.control-group {
    background: #f8fafc;
    padding: 12px;
    border-radius: 8px;
}

.control-group label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: #64748b;
    margin-bottom: 6px;
}

.control-group input[type="number"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
}

.control-group input[type="range"] {
    width: 100%;
    margin-top: 4px;
}

.control-value {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    margin-top: 4px;
}

.control-group.highlight {
    background: #ecfdf5;
    border: 2px solid #86efac;
}

.control-group.highlight label {
    color: #166534;
}

.controls-row {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 16px;
    padding: 12px;
    background: #f0f9ff;
    border-radius: 8px;
}

.controls-row label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

/* ============ Charts ============ */
.chart-container {
    height: 300px;
    position: relative;
}

/* ============ Modals ============ */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: white;
    border-radius: 12px;
    padding: 24px;
    max-width: 560px;
    width: 95%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px rgba(0,0,0,0.25);
}

.modal-wide {
    max-width: 800px;
}

.modal-xl {
    max-width: 960px;
}

.modal-small {
    max-width: 400px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.modal-header h2 {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #64748b;
    line-height: 1;
}

.modal-close:hover {
    color: #0f172a;
}

.modal-body {
    font-size: 14px;
    line-height: 1.7;
}

/* ============ Status Badges (unified, pill-shape) ============ */
.status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

/* Run statuses */
.status-badge.complete {
    background: #dcfce7;
    color: #166534;
}

/* Invoice / billing statuses */
.status-badge.draft { background: #f1f5f9; color: #64748b; }
.status-badge.approved { background: #dbeafe; color: #2563eb; }
.status-badge.sent_to_exact { background: #fef3c7; color: #d97706; }
.status-badge.invoiced { background: #dbeafe; color: #2563eb; }
.status-badge.paid { background: #dcfce7; color: #16a34a; }
.status-badge.planned { background: #f1f5f9; color: #64748b; }
.status-badge.credited { background: #fae8ff; color: #9333ea; }

/* Contract statuses */
.status-badge.active { background: #dcfce7; color: #16a34a; }
.status-badge.expired { background: #fef3c7; color: #d97706; }
.status-badge.cancelled { background: #fee2e2; color: #dc2626; }
.status-badge.archived { background: #f1f5f9; color: #64748b; }

/* PO statuses — same as contract (active, expired, cancelled) */

/* Budget version statuses (uppercase) */
.status-badge.DRAFT { background: #fef3c7; color: #92400e; }
.status-badge.APPROVED { background: #dbeafe; color: #1d4ed8; }
.status-badge.LOCKED { background: #fce7f3; color: #be185d; }
.status-badge.ARCHIVED { background: #e5e7eb; color: #6b7280; }

/* Contract special statuses */
.status-badge.paused { background: #e0e7ff; color: #3730a3; }
.status-badge.completed { background: #d1fae5; color: #059669; }

/* Credit note specific (Sessie 91) */
.cd-status-btn.credited { background: #fae8ff; color: #9333ea; border-color: #d8b4fe; }
.cd-status-btn.credited:hover { background: #f5d0fe; }

.credit-info-banner {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 16px; background: #fdf4ff;
    border: 1px solid #e9d5ff; border-radius: 8px;
    margin-bottom: 12px; font-size: 13px; color: #7c3aed;
}
.credit-info-banner a { color: #7c3aed; font-weight: 600; text-decoration: underline; }
.credit-info-banner a:hover { color: #6d28d9; }

/* Invoice list: credit note rows */
.inv-table tbody tr.row-credit { background: #fdf4ff; }
.inv-table tbody tr.row-credit:hover { background: #fae8ff; }
.inv-table tbody tr.row-credited { opacity: 0.65; }

.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 12px;
}

.empty-state h3 {
    color: #64748b;
    font-weight: 500;
    margin-bottom: 8px;
}

.empty-state p {
    color: #94a3b8;
    font-size: 14px;
}

/* ============ Upload Page ============ */
.upload-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

@media (max-width: 900px) {
    .upload-grid { grid-template-columns: 1fr; }
}

.upload-section h2 {
    font-size: 16px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 16px;
}

.upload-card {
    background: white;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.upload-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.upload-icon {
    width: 40px;
    height: 40px;
    background: #eff6ff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2563eb;
}

.upload-icon.optional {
    background: #f1f5f9;
    color: #64748b;
}

.upload-info {
    flex: 1;
}

.upload-info h3 {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
}

.upload-info p {
    font-size: 12px;
    color: #64748b;
}

.upload-status {
    padding: 0 8px;
}

.status-indicator {
    display: inline-block;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    position: relative;
}

.status-indicator.pending {
    background: #e2e8f0;
}

.status-indicator.valid {
    background: #22c55e;
}

.status-indicator.valid::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 14px;
}

.status-indicator.invalid {
    background: #ef4444;
}

.status-indicator.invalid::after {
    content: '✕';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 14px;
}

.status-indicator.uploading {
    background: #3b82f6;
    animation: pulse 1s infinite;
}

.status-indicator.optional {
    background: #f1f5f9;
    border: 2px dashed #cbd5e1;
}

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

.upload-dropzone {
    border: 2px dashed #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    color: #64748b;
    font-size: 14px;
    transition: all 0.2s;
    cursor: pointer;
}

.upload-dropzone:hover,
.upload-dropzone.dragover {
    border-color: #2563eb;
    background: #eff6ff;
}

.upload-result {
    margin-top: 12px;
}

.file-result {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 6px;
    font-size: 13px;
}

.file-result.valid {
    background: #f0fdf4;
}

.file-result.invalid {
    background: #fef2f2;
    flex-direction: column;
    align-items: flex-start;
}

.file-name {
    flex: 1;
    font-weight: 500;
}

.row-count {
    color: #16a34a;
    font-size: 12px;
}

.error-list {
    list-style: disc;
    margin: 8px 0 8px 20px;
    color: #dc2626;
    font-size: 12px;
}

.error-text {
    color: #dc2626;
    font-size: 13px;
}

.uploading-text {
    color: #2563eb;
    font-size: 13px;
}

.upload-footer {
    position: sticky;
    bottom: 0;
    background: white;
    padding: 20px 24px;
    margin: 24px -24px -24px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.upload-summary {
    font-size: 14px;
    color: #64748b;
}

/* ============ Dashboard ============ */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    gap: 20px;
}

.header-left h1 {
    font-size: 28px;
    font-weight: 700;
    color: #0f172a;
}

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


.dashboard-loading {
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#dashboard-content {
    display: block;
    width: 100%;
}

#dashboard-content:not(.dashboard-loading) {
    display: block;
}

/* Dashboard sections should stack vertically */
#dashboard-content > .grid,
#dashboard-content > .card {
    margin-bottom: 24px;
}

#dashboard-content > .card.section {
    margin-bottom: 24px;
}

/* Ensure nested grids inside cards don't have extra bottom margin */
.card .grid {
    margin-bottom: 0;
}

/* Fix table overflow */
.table-wrapper {
    overflow-x: auto;
}

.card table {
    min-width: 100%;
}

/* Better spacing for info boxes in grid */
.grid .info-box {
    height: 100%;
}

/* ============ Loading & Error States ============ */
.loading {
    text-align: center;
    color: #64748b;
    padding: 40px;
}

.error {
    text-align: center;
    color: #dc2626;
    padding: 40px;
    background: #fef2f2;
    border-radius: 8px;
}

/* ============ Notifications ============ */
.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s;
    z-index: 1100;
}

.notification.show {
    transform: translateY(0);
    opacity: 1;
}

.notification-info {
    background: #eff6ff;
    color: #1d4ed8;
}

.notification-success {
    background: #f0fdf4;
    color: #166534;
}

.notification-error {
    background: #fef2f2;
    color: #dc2626;
}

/* ============ Tooltips ============ */
.tooltip {
    position: fixed;
    background: #0f172a;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    z-index: 1200;
    pointer-events: none;
}

/* ============ Date Badge ============ */
.date-badge {
    display: inline-block;
    background: #e0f2fe;
    color: #0369a1;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    margin-top: 8px;
}

/* ============ Year Badge (ARR section) ============ */
.year-badge {
    display: inline-block;
    background: #dbeafe;
    color: #1d4ed8;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 8px;
    vertical-align: middle;
}

/* ============ Clickable Elements ============ */
.clickable {
    cursor: pointer;
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 3px;
    transition: opacity 0.2s;
}

.clickable:hover {
    opacity: 0.7;
}

.card.clickable:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* ============ Source Tag ============ */
.source-tag {
    display: inline-block;
    background: #e0e7ff;
    color: #4338ca;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    margin-top: 12px;
}

/* ============ Orange Info Box ============ */
.info-box.orange {
    background: #fff7ed;
    border-left: 4px solid #f97316;
}

/* ============ BTW Indicator ============ */
.btw-indicator {
    margin-left: auto;
    padding: 4px 12px;
    background: #dbeafe;
    border-radius: 4px;
    font-size: 12px;
}

/* ============ Formula Box ============ */
.formula {
    background: #f1f5f9;
    padding: 12px;
    border-radius: 6px;
    font-family: monospace;
    margin: 12px 0;
    line-height: 1.8;
}

/* ============ Text Utility Classes ============ */
.text-muted {
    color: #94a3b8;
}

/* ============ Safe Zone Indicators ============ */
.safe-zone-ok {
    color: #16a34a;
}

.safe-zone-warning {
    color: #dc2626;
    font-weight: 600;
}

.safe-zone-legend {
    font-size: 12px;
    color: #64748b;
}

/* ============ Modal Enhancements ============ */
.modal-body h4 {
    margin-top: 16px;
    margin-bottom: 8px;
    color: #1e293b;
}

.modal-body table {
    font-size: 13px;
    margin: 12px 0;
}

.modal-body table th {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: #64748b;
    padding: 8px 10px;
    border-bottom: 2px solid #e2e8f0;
}

.modal-body table td {
    padding: 8px 10px;
    border-bottom: 1px solid #f1f5f9;
}

.modal-body table tr.total td {
    font-weight: 600;
    border-top: 2px solid #e2e8f0;
}

.modal-body table.compact {
    font-size: 12px;
}

.modal-body table.compact th,
.modal-body table.compact td {
    padding: 6px 8px;
}

.modal-body td.truncate {
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Modal section organization */
.modal-section {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
}

.modal-section:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.modal-section-title {
    margin: 0 0 10px;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.modal-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
    margin: 12px 0;
}

.modal-kpi-grid .info-box {
    margin: 0;
}

.modal-body .source {
    color: #64748b;
    font-size: 12px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
}

/* ============ App-wide Modal (Sessie 92) ============ */
/* Vervangt browser alert(), confirm(), prompt() door gestijlde modals */
.app-modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 10000;
    display: flex; align-items: center; justify-content: center;
    animation: appModalFadeIn .15s ease;
}
@keyframes appModalFadeIn { from { opacity: 0; } to { opacity: 1; } }

.app-modal {
    background: #fff; border-radius: 12px; padding: 24px; max-width: 440px;
    width: 90%; box-shadow: 0 20px 60px rgba(0,0,0,0.3); text-align: center;
    animation: appModalSlideIn .15s ease;
}
@keyframes appModalSlideIn { from { transform: translateY(-12px); opacity: 0; } to { transform: none; opacity: 1; } }

.app-modal h3 { margin: 0 0 8px; font-size: 16px; }
.app-modal h3.modal-title-info { color: #1e40af; }
.app-modal h3.modal-title-warn { color: #92400e; }
.app-modal h3.modal-title-error { color: #991b1b; }
.app-modal h3.modal-title-success { color: #166534; }

.app-modal .modal-body { color: #4b5563; font-size: 13px; margin-bottom: 16px; line-height: 1.5; text-align: left; }
.app-modal .modal-body p { margin: 0; }

.app-modal .modal-actions { display: flex; gap: 8px; justify-content: flex-end; }
.app-modal .modal-actions button {
    padding: 8px 20px; border-radius: 6px; font-size: 13px; cursor: pointer; border: none; font-weight: 500;
    transition: background .15s;
}
.app-modal .btn-modal-primary { background: #3b82f6; color: #fff; }
.app-modal .btn-modal-primary:hover { background: #2563eb; }
.app-modal .btn-modal-danger { background: #ef4444; color: #fff; }
.app-modal .btn-modal-danger:hover { background: #dc2626; }
.app-modal .btn-modal-warn { background: #f59e0b; color: #fff; }
.app-modal .btn-modal-warn:hover { background: #d97706; }
.app-modal .btn-modal-cancel { background: #f3f4f6; color: #374151; border: 1px solid #d1d5db; }
.app-modal .btn-modal-cancel:hover { background: #e5e7eb; }

.app-modal input[type="text"], .app-modal input[type="number"], .app-modal textarea {
    width: 100%; padding: 8px 12px; border: 1px solid #d1d5db; border-radius: 6px;
    font-size: 13px; margin-bottom: 12px; box-sizing: border-box; font-family: inherit;
}
.app-modal input:focus, .app-modal textarea:focus {
    outline: none; border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

/* ============ Print Styles ============ */
@media print {
    html, body {
        background: white;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        margin: 0 !important;
        padding: 0 !important;
    }
    .sidebar, .btn, .controls, .run-dropdown, .modal-overlay { display: none !important; }
    .main-content {
        margin-left: 0 !important;
    }
    .container {
        max-width: 100%;
        padding: 16px !important;
        margin: 0 !important;
    }
    .card { break-inside: avoid; box-shadow: none; border: 1px solid #e2e8f0; }
    .chart-container { height: 250px; }
    .grid { gap: 12px; }
    header { margin-bottom: 16px; }
    .section { margin-bottom: 16px; }
    .info-box { padding: 12px; }
    .deep-link-banner { display: none !important; }
    .kpi-tabs, .kpi-calc-btn, .kpi-cell input { display: none !important; }
}

/* ============ Deep-Link Filter Banner ============ */
.deep-link-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    font-size: 12px;
    color: #1e40af;
    margin-bottom: 12px;
}
.deep-link-banner .deep-link-icon {
    font-size: 14px;
}
.deep-link-banner .deep-link-clear {
    margin-left: auto;
    background: none;
    border: 1px solid #93c5fd;
    border-radius: 4px;
    color: #2563eb;
    cursor: pointer;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
}
.deep-link-banner .deep-link-clear:hover {
    background: #dbeafe;
}

/* ============ Audit History Panel (Shared) ============ */
.audit-history {
    margin-top: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
}
.audit-history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    cursor: pointer;
    user-select: none;
}
.audit-history-header:hover {
    background: #f1f5f9;
}
.audit-history-title {
    font-weight: 600;
    font-size: 13px;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 6px;
}
.audit-history-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    background: #e2e8f0;
    color: #475569;
}
.audit-history-chevron {
    font-size: 12px;
    color: #94a3b8;
    transition: transform 0.2s;
}
.audit-history.expanded .audit-history-chevron {
    transform: rotate(90deg);
}
.audit-history-body {
    display: none;
    max-height: 400px;
    overflow-y: auto;
}
.audit-history.expanded .audit-history-body {
    display: block;
}
.audit-history-empty {
    padding: 16px;
    text-align: center;
    color: #94a3b8;
    font-size: 12px;
    font-style: italic;
}
.audit-history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}
.audit-history-table th {
    text-align: left;
    padding: 6px 10px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    color: #64748b;
    font-weight: 600;
    font-size: 11px;
    position: sticky;
    top: 0;
    z-index: 1;
}
.audit-history-table td {
    padding: 5px 10px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    vertical-align: top;
}
.audit-history-table tr:hover td {
    background: #f8fafc;
}
.audit-history-table .history-time {
    color: #94a3b8;
    white-space: nowrap;
    font-size: 11px;
}
.audit-history-table .history-summary {
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.audit-history-table .history-detail {
    color: #64748b;
    font-size: 11px;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: help;
}
/* Operation badges — shared with pipeline history */
.history-op-badge {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    white-space: nowrap;
}
.history-op-badge.op-create { background: #d1fae5; color: #065f46; }
.history-op-badge.op-update { background: #e0e7ff; color: #3730a3; }
.history-op-badge.op-delete { background: #fee2e2; color: #991b1b; }
.history-op-badge.op-import { background: #fef3c7; color: #92400e; }
.history-op-badge.op-status_change { background: #ede9fe; color: #5b21b6; }
.history-op-badge.op-generate { background: #d5f5f6; color: #0e7490; }
.history-op-badge.op-reconcile { background: #fce7f3; color: #9d174d; }
.history-op-badge.op-from_billings { background: #f0fdf4; color: #166534; }
.history-op-badge.op-reschedule { background: #fff7ed; color: #9a3412; }
.history-op-badge.op-rename { background: #fdf4ff; color: #86198f; }
.history-op-badge.op-start { background: #dbeafe; color: #1e40af; }
.history-op-badge.op-deactivate { background: #fef2f2; color: #b91c1c; }
/* Pagination */
.audit-history-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    font-size: 11px;
    color: #64748b;
}
.audit-history-footer button {
    padding: 2px 8px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    background: #fff;
    color: #475569;
    font-size: 11px;
    cursor: pointer;
}
.audit-history-footer button:hover {
    background: #f1f5f9;
}
.audit-history-footer button:disabled {
    opacity: 0.5;
    cursor: default;
}
/* Print: hide audit panels */
@media print {
    .audit-history { display: none !important; }
}

/* ============ Currency Support ============ */
.currency-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    padding: 1px 5px;
    border-radius: 3px;
    margin-left: 4px;
    vertical-align: middle;
}
.currency-badge.usd {
    background: #dbeafe;
    color: #1e40af;
}
.currency-badge.eur {
    background: #d1fae5;
    color: #065f46;
}
.currency-select {
    padding: 2px 4px;
    font-size: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    background: white;
    min-width: 70px;
}
.non-eur-info-box {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 8px;
    padding: 10px 14px;
    margin-top: 10px;
    font-size: 13px;
    color: #92400e;
}
.non-eur-info-box .non-eur-title {
    font-weight: 600;
    margin-bottom: 4px;
}
.non-eur-info-box .non-eur-amount {
    font-weight: 600;
    font-size: 14px;
}

/* ===== Page Help Panel ===== */
.page-help-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.15);
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}
.page-help-overlay.open {
    opacity: 1;
    pointer-events: auto;
}
.page-help-panel {
    position: fixed;
    top: 0; right: -540px; bottom: 0;
    width: 520px;
    max-width: 90vw;
    background: #fff;
    z-index: 201;
    display: flex;
    flex-direction: column;
    box-shadow: -4px 0 24px rgba(0,0,0,0.12);
    transition: right 0.3s ease;
}
.page-help-panel.open {
    right: 0;
}
.page-help-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: #f0f9ff;
    border-bottom: 1px solid #e0f2fe;
    flex-shrink: 0;
}
.page-help-header h3 {
    margin: 0;
    font-size: 16px;
    color: #1e3a5f;
}
.page-help-close {
    background: none;
    border: none;
    font-size: 22px;
    color: #64748b;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    line-height: 1;
}
.page-help-close:hover {
    background: #e0f2fe;
    color: #1e3a5f;
}
.page-help-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}
.page-help-footer {
    padding: 12px 20px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
    flex-shrink: 0;
    text-align: center;
}
.page-help-footer a {
    color: #2563eb;
    text-decoration: none;
    font-size: 13px;
}
.page-help-footer a:hover {
    text-decoration: underline;
}
.btn-help {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #64748b;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    flex-shrink: 0;
}
.btn-help:hover {
    border-color: #3b82f6;
    color: #3b82f6;
    background: #eff6ff;
}

/* Help Content CSS (shared with help.html) */
.help-section {
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.help-section h2 {
    font-size: 18px;
    color: #1e3a5f;
    margin: 0 0 16px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #e2e8f0;
}
.help-section h3 {
    font-size: 15px;
    color: #334155;
    margin: 20px 0 12px 0;
}
.help-section p {
    color: #475569;
    line-height: 1.6;
    margin-bottom: 12px;
}
.help-section ul, .help-section ol {
    color: #475569;
    line-height: 1.6;
    margin-bottom: 12px;
    padding-left: 20px;
}
.formula-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px 20px;
    font-family: 'Menlo', 'Monaco', monospace;
    font-size: 13px;
    margin: 16px 0;
    overflow-x: auto;
}
.formula-box .highlight { color: #2563eb; font-weight: 600; }
.formula-box .green { color: #16a34a; }
.formula-box .red { color: #dc2626; }
.formula-box .orange { color: #ea580c; }
.info-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 13px;
}
.info-table th {
    background: #f1f5f9;
    text-align: left;
    padding: 10px 12px;
    font-weight: 600;
    color: #334155;
    border-bottom: 2px solid #e2e8f0;
}
.info-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #e2e8f0;
    color: #475569;
}
.info-table tr:last-child td { border-bottom: none; }
.icon-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin: 16px 0;
}
.icon-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8fafc;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
}
.icon-item .icon { font-size: 16px; }
.example-box {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
}
.example-box strong { color: #92400e; }
.tip-box {
    background: #ecfdf5;
    border: 1px solid #6ee7b7;
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
}
.tip-box strong { color: #065f46; }
.warning-box {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
}
.warning-box strong { color: #991b1b; }

/* In help panel, help-sections have no shadow (panel provides container) */
.page-help-body .help-section {
    box-shadow: none;
    padding: 16px 0;
    border-radius: 0;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 0;
}
.page-help-body .help-section:last-child {
    border-bottom: none;
}

/* Print: hide help panel and button */
@media print {
    .page-help-overlay, .page-help-panel, .btn-help { display: none !important; }
}

/* ============================================
   AUTH / LOGIN STYLES
   ============================================ */

/* Login page */
.login-page {
    margin: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-card {
    background: #fff;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.15);
}

.login-brand {
    text-align: center;
    margin-bottom: 28px;
}

.login-brand h1 {
    font-size: 28px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 4px 0;
}

.login-brand p {
    font-size: 13px;
    color: #64748b;
    margin: 0;
}

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

.login-field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 4px;
}

.login-field input,
.login-field select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
    color: #1e293b;
    background: #f8fafc;
    box-sizing: border-box;
    transition: border-color 0.15s;
}

.login-field input:focus,
.login-field select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
    background: #fff;
}

.login-btn {
    width: 100%;
    padding: 11px;
    background: #3b82f6;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.login-btn:hover { background: #2563eb; }
.login-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.login-btn-secondary {
    background: #64748b;
}
.login-btn-secondary:hover { background: #475569; }

.login-error {
    background: #fef2f2;
    color: #dc2626;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 16px;
    border: 1px solid #fecaca;
}

.login-success {
    background: #f0fdf4;
    color: #16a34a;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 16px;
    border: 1px solid #bbf7d0;
}

.login-divider {
    text-align: center;
    margin: 20px 0;
    border-top: 1px solid #e2e8f0;
    position: relative;
}
.login-divider span {
    background: #fff;
    padding: 0 12px;
    font-size: 12px;
    color: #94a3b8;
    position: relative;
    top: -9px;
}

.login-footer {
    text-align: center;
    margin-top: 20px;
}
.login-footer a {
    font-size: 13px;
    color: #3b82f6;
    text-decoration: none;
}
.login-footer a:hover { text-decoration: underline; }

.field-hint {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 4px;
    display: block;
}

/* Change password page */
.change-pw-container {
    max-width: 480px;
    margin: 40px auto;
    padding: 0 20px;
}

.change-pw-card {
    background: #fff;
    border-radius: 8px;
    padding: 28px;
    border: 1px solid #e2e8f0;
}

.change-pw-card h2 {
    font-size: 20px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 20px 0;
}

.change-pw-notice {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #eff6ff;
    color: #1d4ed8;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 20px;
    border: 1px solid #bfdbfe;
}

/* Password strength */
.pw-strength {
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    margin: -8px 0 8px 0;
    overflow: hidden;
}
.pw-strength-bar {
    height: 100%;
    border-radius: 2px;
    width: 0;
    transition: width 0.3s, background 0.3s;
}
.pw-strength-bar.weak { background: #dc2626; }
.pw-strength-bar.fair { background: #f59e0b; }
.pw-strength-bar.good { background: #3b82f6; }
.pw-strength-bar.strong { background: #16a34a; }

.pw-requirements {
    margin-bottom: 16px;
}
.pw-req {
    font-size: 12px;
    color: #94a3b8;
    padding: 2px 0;
}
.pw-req.met { color: #16a34a; }
.pw-req-icon {
    display: inline-block;
    width: 16px;
    text-align: center;
}

/* ============================================
   ADMIN STYLES
   ============================================ */

.admin-container {
    max-width: 1100px;
    margin: 0 auto;
}

.admin-section {
    margin-bottom: 32px;
}
.admin-section-header {
    margin-bottom: 12px;
}
.admin-section-title {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.admin-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 20px;
}

.admin-tab {
    padding: 10px 20px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}
.admin-tab:hover { color: #1e293b; }
.admin-tab.active {
    color: #3b82f6;
    border-bottom-color: #3b82f6;
    font-weight: 600;
}

.admin-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.admin-panel-header h4 {
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}
.admin-panel-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.admin-table th {
    text-align: left;
    padding: 8px 10px;
    background: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
    font-weight: 600;
    color: #475569;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.admin-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
}
.admin-table tr:hover td { background: #f8fafc; }
.admin-table .inactive-row td { opacity: 0.5; }

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

.btn-icon-sm {
    background: none;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 2px 6px;
    cursor: pointer;
    font-size: 12px;
    color: #64748b;
    transition: background 0.15s;
}
.btn-icon-sm:hover { background: #f1f5f9; color: #1e293b; }
.btn-danger-sm { color: #dc2626; }
.btn-danger-sm:hover { background: #fef2f2; color: #dc2626; }
.btn-success-sm { color: #16a34a; }
.btn-success-sm:hover { background: #f0fdf4; color: #16a34a; }

.role-badge {
    background: #eff6ff;
    color: #3b82f6;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.system-badge {
    background: #f1f5f9;
    color: #64748b;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 500;
}

.perm-badge {
    display: inline-block;
    background: #f0fdf4;
    color: #16a34a;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
    margin: 1px 2px;
}

/* status-badge is defined globally above — admin uses .active/.expired variants */
.status-active { background: #f0fdf4; color: #16a34a; }
.status-inactive { background: #f1f5f9; color: #94a3b8; }

/* Admin modals */
.admin-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.admin-modal {
    background: #fff;
    border-radius: 10px;
    width: 480px;
    max-width: 90vw;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}
.admin-modal-sm { width: 400px; }

.admin-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
}
.admin-modal-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}
.admin-modal-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #94a3b8;
    cursor: pointer;
    padding: 0 4px;
}
.admin-modal-close:hover { color: #1e293b; }

.admin-modal form,
.admin-modal-body {
    padding: 20px;
}

.admin-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 16px;
}

.admin-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 20px;
    border-top: 1px solid #e2e8f0;
}

.permission-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}
.permission-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #334155;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
}
.permission-item:hover { background: #f8fafc; }
.permission-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #3b82f6;
}

/* RBAC Matrix Table (Sessie 91) */
.rbac-matrix-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}
.rbac-matrix-table thead th {
    background: #f8fafc;
    padding: 6px 4px;
    border-bottom: 2px solid #e2e8f0;
    font-weight: 600;
    color: #64748b;
    position: sticky;
    top: 0;
    z-index: 1;
}
.rbac-matrix-table tbody td {
    padding: 3px 4px;
    border-bottom: 1px solid #f1f5f9;
}
.rbac-matrix-table .rbac-module-header td {
    padding: 6px 10px;
}
.rbac-matrix-table input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: #3b82f6;
    cursor: pointer;
}
.rbac-matrix-table .rbac-module-toggle {
    accent-color: #6366f1;
}
.rbac-matrix-table .rbac-row-toggle {
    accent-color: #22c55e;
}
.perm-badge-partial {
    background: #fef3c7 !important;
    color: #92400e !important;
}

/* Exact Online sync cards */
.exact-sync-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 12px;
}
.exact-sync-card:hover {
    border-color: #cbd5e1;
}
.exact-sync-count {
    font-size: 11px;
    color: #64748b;
    background: #e2e8f0;
    padding: 1px 6px;
    border-radius: 10px;
}
.exact-sync-result {
    font-size: 11px;
    margin-top: 8px;
    padding: 6px 8px;
    background: #f1f5f9;
    border-radius: 4px;
}

/* GL Account & Article Code badges (Sessie 67) */
.gl-type-badge {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
}
.gl-ref-badge {
    display: inline-block;
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
    background: #e2e8f0;
    color: #475569;
    white-space: nowrap;
}
.article-badge {
    display: inline-block;
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
    background: #ccfbf1;
    color: #0d9488;
    white-space: nowrap;
}
.gl-code-badge {
    display: inline-block;
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
    background: #f1f5f9;
    color: #64748b;
    white-space: nowrap;
}

/* ID badges for entity traceability */
.id-badge {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    background: #f1f5f9;
    color: #64748b;
    white-space: nowrap;
    margin-right: 4px;
    vertical-align: middle;
    letter-spacing: 0.3px;
    line-height: 1.4;
}

/* Larger ID badge for detail page headers */
.id-badge-lg {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 600;
    background: #f1f5f9;
    color: #475569;
    white-space: nowrap;
    margin-right: 8px;
    vertical-align: middle;
    letter-spacing: 0.3px;
    line-height: 1.5;
    font-family: monospace;
}

/* ID badge color variants for entity types */
.id-badge-contract { background: #f1f5f9; color: #475569; }
.id-badge-line { background: #f3f0ff; color: #7c3aed; }
.id-badge-billing { background: #fef3c7; color: #92400e; }
.id-badge-invoice { background: #dbeafe; color: #1d4ed8; }
.id-badge-po { background: #e0f2fe; color: #0369a1; }

.reset-url-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 10px 12px;
    font-family: monospace;
    font-size: 12px;
    word-break: break-all;
    color: #334155;
}

/* Activity badges */
.activity-op {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 3px;
    text-transform: uppercase;
}
.activity-op.op-create { background: #f0fdf4; color: #16a34a; }
.activity-op.op-update { background: #eff6ff; color: #3b82f6; }
.activity-op.op-delete { background: #fef2f2; color: #dc2626; }
.activity-op.op-login { background: #faf5ff; color: #7c3aed; }
.activity-op.op-logout { background: #f1f5f9; color: #64748b; }
.activity-op.op-login_failed { background: #fffbeb; color: #d97706; }
.activity-op.op-password_change { background: #eff6ff; color: #3b82f6; }
.activity-op.op-password_reset { background: #faf5ff; color: #7c3aed; }

/* Sidebar user info */
.sidebar-user {
    padding: 6px 10px;
    border-top: 1px solid #1e293b;
    flex-shrink: 0;
}
.sidebar-user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}
.sidebar-user-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #3b82f6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}
.sidebar-user-name {
    font-size: 12px;
    color: #e2e8f0;
    font-weight: 500;
    line-height: 1.3;
}
.sidebar-user-role {
    font-size: 10px;
    color: #94a3b8;
    display: block;
}
.sidebar-user-actions {
    display: flex;
    gap: 8px;
    font-size: 11px;
}
.sidebar-user-actions a {
    color: #94a3b8;
    text-decoration: none;
}
.sidebar-user-actions a:hover {
    color: #e2e8f0;
}

/* Generic btn classes for admin */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #334155;
    border-radius: 6px;
    font-size: 13px;
    padding: 6px 12px;
    cursor: pointer;
    transition: background 0.15s;
}
.btn:hover { background: #f8fafc; }
.btn-sm { font-size: 12px; padding: 5px 10px; }
.btn-primary {
    background: #3b82f6;
    color: #fff;
    border-color: #3b82f6;
}
.btn-primary:hover { background: #2563eb; }

/* ============ KPI Page ============ */
.kpi-tabs          { display: flex; gap: 0; border-bottom: 2px solid #e2e8f0; margin-bottom: 16px; }
.kpi-tab           { padding: 8px 16px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; color: #64748b; font-size: 13px; font-weight: 500; transition: all 0.15s; background: none; border-top: none; border-left: none; border-right: none; }
.kpi-tab:hover     { color: #334155; }
.kpi-tab.active    { border-bottom-color: #3b82f6; font-weight: 600; color: #1e40af; }

.kpi-grid          { width: 100%; border-collapse: collapse; font-size: 12px; }
.kpi-grid th       { background: #f8fafc; padding: 6px 8px; text-align: left; border-bottom: 2px solid #e2e8f0; position: sticky; top: 0; z-index: 10; font-weight: 600; color: #475569; white-space: nowrap; }
.kpi-grid td       { padding: 4px 8px; border-bottom: 1px solid #f1f5f9; }
.kpi-grid th.col-value, .kpi-grid td.col-value { text-align: right; }
.kpi-grid .kpi-dept-header td { font-weight: 700; font-size: 13px; padding-top: 12px; background: #f8fafc; }
.kpi-grid .kpi-strategy-row td { font-weight: 600; font-size: 11px; color: #64748b; padding-top: 8px; text-transform: uppercase; letter-spacing: 0.05em; }

.kpi-cell            { min-width: 56px; text-align: right; cursor: pointer; padding: 3px 6px !important; border-radius: 3px; transition: background 0.1s; }
.kpi-cell:hover      { background: #f1f5f9; }
.kpi-cell.green      { background: #dcfce7; color: #166534; }
.kpi-cell.red        { background: #fee2e2; color: #991b1b; }
.kpi-cell.auto       { font-style: italic; }
.kpi-cell.empty      { color: #cbd5e1; }
.kpi-cell input      { width: 60px; padding: 2px 4px; border: 1px solid #93c5fd; border-radius: 3px; font-size: 12px; text-align: right; outline: none; }

.kpi-norm-badge      { display: inline-block; padding: 1px 6px; border-radius: 3px; background: #f3f4f6; font-size: 10px; color: #6b7280; white-space: nowrap; }
.kpi-auto-badge      { display: inline-block; padding: 1px 4px; border-radius: 2px; background: #dbeafe; font-size: 9px; color: #1d4ed8; margin-left: 4px; }
.kpi-direction-badge { display: inline-block; padding: 1px 4px; border-radius: 2px; font-size: 9px; margin-left: 2px; }
.kpi-direction-badge.higher { background: #dcfce7; color: #166534; }
.kpi-direction-badge.lower  { background: #fef3c7; color: #92400e; }

/* Department border-left accents */
.kpi-dept-finance td:first-child    { border-left: 4px solid #3b82f6; }
.kpi-dept-sales td:first-child      { border-left: 4px solid #22c55e; }
.kpi-dept-operations td:first-child { border-left: 4px solid #8b5cf6; }
.kpi-dept-product td:first-child    { border-left: 4px solid #f59e0b; }

/* KPI Q-cell for quarterly view */
.kpi-q-header { text-align: center; font-size: 11px; }
.kpi-q-sub    { font-size: 10px; color: #94a3b8; font-weight: 400; }
.kpi-q-cell   { text-align: right; min-width: 50px; }
.kpi-q-cell.target { color: #64748b; }
.kpi-q-cell.actual { font-weight: 600; }

/* KPI Beheer tab */
.kpi-admin-table       { width: 100%; border-collapse: collapse; font-size: 12px; }
.kpi-admin-table th    { background: #f8fafc; padding: 8px; text-align: left; border-bottom: 2px solid #e2e8f0; font-weight: 600; }
.kpi-admin-table td    { padding: 6px 8px; border-bottom: 1px solid #f1f5f9; }
.kpi-admin-table tr:hover td { background: #f8fafc; }

/* KPI Calc button */
.kpi-calc-btn { background: #dbeafe; color: #1d4ed8; border: 1px solid #93c5fd; border-radius: 6px; padding: 5px 12px; font-size: 12px; cursor: pointer; font-weight: 500; }
.kpi-calc-btn:hover { background: #bfdbfe; }

/* Timestamp button (Sessie 78) — used next to notes labels */
.btn-timestamp { background: none; border: none; cursor: pointer; font-size: 14px; padding: 0 4px; vertical-align: middle; opacity: 0.6; }
.btn-timestamp:hover { opacity: 1; }

/* Override indicator (Sessie 78) — shows deviation from customer defaults */
.override-indicator { color: #f59e0b; font-size: 11px; cursor: help; margin-left: 4px; }

/* ============ Slide-in Detail Panel (Sessie 82 — shared) ============ */
.detail-panel-overlay {
    position: fixed;
    top: 0; right: 0; bottom: 0; left: 0;
    background: rgba(0,0,0,0.15);
    z-index: 100;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}
.detail-panel-overlay.open {
    opacity: 1;
    pointer-events: auto;
}
.detail-panel {
    position: fixed;
    top: 0;
    right: -600px;
    width: 600px;
    height: 100vh;
    background: white;
    box-shadow: -8px 0 24px rgba(0,0,0,0.12);
    z-index: 101;
    transition: right 0.25s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.detail-panel.open { right: 0; }
.detail-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
    flex-shrink: 0;
}
.detail-panel-header h2 { margin: 0; font-size: 17px; font-weight: 700; color: #1e293b; }
.detail-panel-header .subtitle { font-size: 12px; color: #64748b; font-weight: 400; margin-top: 2px; }
.detail-panel-actions { display: flex; gap: 6px; align-items: center; }
.panel-close {
    background: none; border: none; font-size: 22px; cursor: pointer;
    color: #94a3b8; padding: 0; line-height: 1;
}
.panel-close:hover { color: #1e293b; }

/* Panel tabs */
.panel-tabs {
    display: flex;
    border-bottom: 1px solid #e2e8f0;
    padding: 0 20px;
    flex-shrink: 0;
    background: white;
}
.panel-tab {
    padding: 10px 14px; font-size: 13px; font-weight: 500;
    color: #64748b; cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.15s; white-space: nowrap;
}
.panel-tab:hover { color: #1e293b; }
.panel-tab.active { color: #3b82f6; border-bottom-color: #3b82f6; }
.panel-body { flex: 1; overflow-y: auto; padding: 20px; }

/* Panel field rows */
.field-section { margin-bottom: 20px; }
.field-section h4 {
    font-size: 11px; font-weight: 700; color: #94a3b8;
    text-transform: uppercase; letter-spacing: 0.5px; margin: 0 0 10px 0;
}
.field-row {
    display: flex; align-items: baseline; padding: 7px 0;
    border-bottom: 1px solid #f1f5f9; font-size: 13px;
}
.field-row .label { width: 140px; color: #64748b; flex-shrink: 0; }
.field-row .value { flex: 1; color: #1e293b; font-weight: 500; }
.field-row .value.empty { color: #cbd5e1; font-style: italic; font-weight: 400; }

/* Mini table in panel */
.mini-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.mini-table th {
    text-align: left; font-weight: 600; color: #475569; font-size: 11px;
    text-transform: uppercase; padding: 6px 8px; border-bottom: 1px solid #e2e8f0;
}
.mini-table td { padding: 8px 8px; border-bottom: 1px solid #f1f5f9; color: #334155; }
.mini-table tr:hover td { background: #f8fafc; }
.mini-table .clickable-row { cursor: pointer; }
.mini-table .clickable-row:hover td { background: #eff6ff; }

/* Invoice status badges in panel */
.inv-status { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; }
.inv-status.draft { background: #f1f5f9; color: #64748b; }
.inv-status.approved { background: #dbeafe; color: #2563eb; }
.inv-status.sent_to_exact { background: #fef3c7; color: #92400e; }
.inv-status.invoiced { background: #dcfce7; color: #16a34a; }
.inv-status.paid { background: #d1fae5; color: #065f46; }

.link-btn { display: inline-block; margin-top: 10px; color: #3b82f6; text-decoration: none; font-weight: 500; font-size: 13px; }
.link-btn:hover { text-decoration: underline; }

/* ============ Multi-Select Dropdown Component (Sessie 82c) ============ */
.ms-container { position: relative; display: inline-block; min-width: 140px; }
.ms-trigger {
    display: flex; align-items: center; gap: 6px;
    padding: 7px 12px; width: 100%;
    border: 1px solid #e2e8f0; border-radius: 8px;
    background: white; cursor: pointer;
    font-size: 14px; color: #1e293b;
    transition: border-color 0.15s, box-shadow 0.15s;
    user-select: none; white-space: nowrap;
}
.ms-trigger:hover { border-color: #cbd5e1; }
.ms-trigger.active { border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1); }
.ms-trigger-text { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.ms-trigger-text.placeholder { color: #94a3b8; }
.ms-badge { background: #dbeafe; color: #1e40af; font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: 10px; }
.ms-chevron { font-size: 10px; color: #94a3b8; transition: transform 0.15s; margin-left: 2px; }
.ms-trigger.active .ms-chevron { transform: rotate(180deg); }
.ms-clear { font-size: 14px; color: #94a3b8; cursor: pointer; line-height: 1; padding: 0 2px; }
.ms-clear:hover { color: #ef4444; }
.ms-dropdown {
    position: absolute; top: calc(100% + 4px); left: 0; right: 0;
    min-width: 180px;
    background: white; border: 1px solid #e2e8f0;
    border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 1000; display: none;
    max-height: 280px; overflow-y: auto;
}
.ms-dropdown.open { display: block; }
.ms-search {
    display: block; width: 100%; padding: 8px 12px;
    border: none; border-bottom: 1px solid #e2e8f0;
    font-size: 13px; outline: none;
    border-radius: 8px 8px 0 0;
}
.ms-search::placeholder { color: #94a3b8; }
.ms-option {
    display: flex; align-items: center; gap: 8px;
    padding: 7px 12px; cursor: pointer;
    font-size: 13px; color: #374151;
    transition: background 0.1s;
}
.ms-option:hover { background: #f1f5f9; }
.ms-option.selected { background: #eff6ff; }
.ms-option input[type="checkbox"] {
    width: 15px; height: 15px; accent-color: #3b82f6;
    cursor: pointer; flex-shrink: 0;
}
.ms-option label { cursor: pointer; flex: 1; }

/* ============ Column Header Filter Dropdowns (Sessie 93) ============ */
.th-label { display: inline-flex; align-items: center; gap: 4px; }
.th-filter-dot {
    display: inline-block; width: 6px; height: 6px;
    border-radius: 50%; background: #3b82f6;
    margin-left: 4px; vertical-align: middle;
}
.col-dropdown {
    position: absolute; top: 100%; left: 0; min-width: 200px;
    background: white; border: 1px solid #e2e8f0; border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12); z-index: 100;
    padding: 6px 0; text-transform: none; letter-spacing: 0;
    font-weight: 400; font-size: 13px; color: #1e293b; display: none;
}
.col-dropdown.open { display: block; }
.col-dropdown.align-right { left: auto; right: 0; }
.col-dd-item {
    display: flex; align-items: center; gap: 8px;
    padding: 7px 14px; cursor: pointer; white-space: nowrap;
    transition: background 0.1s;
}
.col-dd-item:hover { background: #f1f5f9; }
.col-dd-item.active { background: #eff6ff; color: #2563eb; font-weight: 600; }
.col-dd-item .dd-icon { width: 16px; text-align: center; font-size: 12px; flex-shrink: 0; }
.col-dd-divider { height: 1px; background: #e2e8f0; margin: 4px 0; }
.col-dd-label {
    padding: 6px 14px; font-size: 11px; color: #64748b;
    font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px;
}
.col-dd-input {
    margin: 4px 10px 6px; padding: 6px 8px;
    border: 1px solid #cbd5e1; border-radius: 4px;
    font-size: 12px; background: white;
    width: calc(100% - 20px); box-sizing: border-box;
}
.col-dd-input:focus { border-color: #3b82f6; outline: none; box-shadow: 0 0 0 2px rgba(59,130,246,0.15); }
.col-dd-search {
    margin: 4px 10px 4px; padding: 6px 8px 6px 28px;
    border: 1px solid #cbd5e1; border-radius: 4px;
    font-size: 12px; background: white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='M21 21l-4.35-4.35'/%3E%3C/svg%3E") no-repeat 8px center;
    width: calc(100% - 20px); box-sizing: border-box;
}
.col-dd-search:focus { border-color: #3b82f6; outline: none; box-shadow: 0 0 0 2px rgba(59,130,246,0.15); }
.col-dd-checklist { max-height: 200px; overflow-y: auto; margin: 2px 0; }
.col-dd-check-item {
    display: flex; align-items: center; gap: 8px;
    padding: 5px 14px; cursor: pointer; font-size: 12px;
    transition: background 0.1s; white-space: nowrap;
}
.col-dd-check-item:hover { background: #f1f5f9; }
.col-dd-check-item input[type="checkbox"] { width: 14px; height: 14px; accent-color: #3b82f6; cursor: pointer; flex-shrink: 0; }
.col-dd-check-item.hidden { display: none; }
.col-dd-count {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px;
    background: #3b82f6; color: white; font-size: 10px; font-weight: 700; margin-left: 4px;
}
.col-dd-clear {
    padding: 6px 14px; font-size: 12px; color: #dc2626;
    cursor: pointer; display: flex; align-items: center; gap: 6px;
}
.col-dd-clear:hover { background: #fef2f2; }

