@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

/* ==========================================================================
   DU-WARE ENTERPRISE DESIGN SYSTEM (v1.0)
   DUWARE - Rent of Utility & Scaffolding
   ========================================================================== */

:root {
    --dw-font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --dw-font-mono: 'JetBrains Mono', monospace;

    /* Dark Theme Surface Colors */
    --dw-bg: #070a12;
    --dw-surface: #0b1120;
    --dw-card-bg: rgba(13, 20, 36, 0.85);
    --dw-card-solid: #0d1424;
    --dw-border: rgba(255, 255, 255, 0.08);
    --dw-border-subtle: rgba(255, 255, 255, 0.04);
    --dw-border-hover: rgba(245, 158, 11, 0.4);

    /* Text */
    --dw-text: #f8fafc;
    --dw-text-secondary: #cbd5e1;
    --dw-muted: #94a3b8;
    --dw-subtle: #64748b;

    /* Brand Accents (Industrial Amber & Gold) */
    --dw-primary: #f59e0b;
    --dw-primary-hover: #d97706;
    --dw-primary-glow: #fbbf24;
    --dw-primary-light: rgba(245, 158, 11, 0.12);

    /* Semantic Status */
    --dw-success: #10b981;
    --dw-success-light: rgba(16, 185, 129, 0.12);
    --dw-danger: #f43f5e;
    --dw-danger-light: rgba(244, 63, 94, 0.12);
    --dw-warning: #f59e0b;
    --dw-warning-light: rgba(245, 158, 11, 0.12);
    --dw-info: #06b6d4;
    --dw-info-light: rgba(6, 182, 212, 0.12);

    /* Entity Accents */
    --dw-investor: #8b5cf6;
    --dw-investor-light: rgba(139, 92, 246, 0.12);
    --dw-intern: #10b981;
    --dw-intern-light: rgba(16, 185, 129, 0.12);

    /* Dimensions */
    --dw-sidebar-width: 260px;
    --dw-sidebar-collapsed-width: 78px;
    --dw-radius: 12px;
    --dw-radius-lg: 16px;
}

* {
    box-sizing: border-box;
}

body.finance-dark-app {
    font-family: var(--dw-font);
    background-color: var(--dw-bg);
    color: var(--dw-text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
    -webkit-font-smoothing: antialiased;
    position: relative;
    overflow-x: hidden;
}

/* Ambient Canvas Background Glows */
.ambient-canvas {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.aurora-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(140px);
    opacity: 0.22;
    animation: slowFloat 28s infinite alternate ease-in-out;
}

.blob-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, #b45309 0%, #78350f 100%);
    top: -160px;
    left: -140px;
}

.blob-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #1e3a8a 0%, #172554 100%);
    bottom: -150px;
    right: -100px;
    animation-duration: 32s;
    animation-delay: -8s;
}

.blob-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #047857 0%, #064e3b 100%);
    top: 45%;
    right: 35%;
    opacity: 0.14;
}

@keyframes slowFloat {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(40px, 30px) scale(1.08); }
}

.grid-overlay {
    position: fixed;
    inset: 0;
    background-image: 
        linear-gradient(to right, rgba(255, 255, 255, 0.015) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: 0;
}

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

/* Sidebar */
.app-sidebar {
    width: var(--dw-sidebar-width);
    background: rgba(11, 17, 32, 0.95);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--dw-border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1020;
    transition: width 0.25s ease, transform 0.25s ease;
}

.sidebar-header {
    height: 72px;
    padding: 0 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--dw-border);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--dw-text);
}

.sidebar-logo {
    height: 38px;
    width: auto;
    object-fit: contain;
}

.sidebar-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.brand-title {
    font-weight: 800;
    font-size: 1.05rem;
    letter-spacing: 0.03em;
    color: #fbbf24;
}

.brand-subtitle {
    font-size: 0.65rem;
    color: var(--dw-muted);
    font-weight: 600;
    letter-spacing: 0.08em;
}

.sidebar-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem 0.85rem;
}

.sidebar-heading {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--dw-subtle);
    font-weight: 700;
    padding: 0.6rem 0.75rem 0.35rem;
}

.sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
}

.sidebar-item {
    margin-bottom: 0.25rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.65rem 0.85rem;
    color: var(--dw-text-secondary);
    text-decoration: none;
    border-radius: var(--dw-radius);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.sidebar-link:hover {
    color: #ffffff;
    background: rgba(245, 158, 11, 0.08);
}

.sidebar-link.active {
    color: #ffffff;
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.25) 0%, rgba(245, 158, 11, 0.08) 100%);
    border-left: 3px solid #f59e0b;
    font-weight: 600;
}

.sidebar-icon {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

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

.sidebar-status-box {
    background: rgba(245, 158, 11, 0.06);
    border: 1px solid rgba(245, 158, 11, 0.15);
    border-radius: 10px;
    padding: 0.65rem 0.85rem;
    margin-bottom: 0.65rem;
}

.status-box-title {
    font-size: 0.72rem;
    font-weight: 700;
    color: #fbbf24;
}

.live-indicator {
    font-size: 0.65rem;
    font-weight: 700;
    color: #10b981;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.live-dot {
    width: 6px;
    height: 6px;
    background: #10b981;
    border-radius: 50%;
    animation: pulse 1.8s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(1.3); }
}

.status-box-desc {
    font-size: 0.7rem;
    color: var(--dw-muted);
}

/* Sidebar Collapsed State */
.sidebar-collapsed .app-sidebar {
    width: var(--dw-sidebar-collapsed-width);
}

.sidebar-collapsed .brand-title,
.sidebar-collapsed .brand-subtitle,
.sidebar-collapsed .sidebar-label,
.sidebar-collapsed .sidebar-heading,
.sidebar-collapsed .sidebar-status-box,
.sidebar-collapsed .sidebar-collapse-text {
    display: none !important;
}

.sidebar-collapsed .sidebar-link {
    justify-content: center;
    padding: 0.75rem 0;
}

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

.btn-sidebar-collapse {
    width: 100%;
    background: transparent;
    border: 1px solid var(--dw-border);
    color: var(--dw-muted);
    border-radius: 8px;
    padding: 0.45rem;
    font-size: 0.78rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.btn-sidebar-collapse:hover {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.2);
}

/* Main Content Area */
.app-main {
    flex: 1;
    margin-left: var(--dw-sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.25s ease;
}

/* Topbar */
.app-topbar {
    height: 72px;
    background: rgba(11, 17, 32, 0.8);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--dw-border);
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.topbar-title {
    font-weight: 700;
    font-size: 1.15rem;
    color: #ffffff;
    margin: 0;
}

.topbar-subtitle {
    font-size: 0.78rem;
    color: var(--dw-muted);
    margin: 0;
}

/* App Content */
.app-content {
    flex: 1;
    padding: 1.5rem;
}

/* Cards & Surfaces */
.card-dw {
    background: var(--dw-card-bg);
    border: 1px solid var(--dw-border);
    border-radius: var(--dw-radius-lg);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    transition: all 0.25s ease;
}

.card-dw:hover {
    border-color: rgba(245, 158, 11, 0.2);
}

.card-header-dw {
    padding: 1.15rem 1.35rem;
    border-bottom: 1px solid var(--dw-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.02);
    border-top-left-radius: var(--dw-radius-lg);
    border-top-right-radius: var(--dw-radius-lg);
}

/* Stat Metric Cards */
.stat-card {
    position: relative;
    overflow: hidden;
    padding: 1.25rem 1.35rem;
    background: var(--dw-card-bg);
    border: 1px solid var(--dw-border);
    border-radius: var(--dw-radius-lg);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    border-color: rgba(245, 158, 11, 0.3);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--dw-primary);
}

.stat-card.stat-kas::before { background: #10b981; }
.stat-card.stat-omset::before { background: #f59e0b; }
.stat-card.stat-investor::before { background: #8b5cf6; }
.stat-card.stat-intern::before { background: #06b6d4; }
.stat-card.stat-piutang::before { background: #f43f5e; }

.stat-label {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--dw-muted);
    margin-bottom: 0.4rem;
}

.stat-value {
    font-family: var(--dw-font-mono);
    font-size: 1.55rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
    margin-bottom: 0.35rem;
}

.stat-hint {
    font-size: 0.74rem;
    color: var(--dw-subtle);
}

/* Modern Tables */
.table-dw {
    color: var(--dw-text-secondary);
    border-color: var(--dw-border);
    margin-bottom: 0;
    vertical-align: middle;
}

.table-dw thead th {
    background: rgba(255, 255, 255, 0.03);
    color: var(--dw-text);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--dw-border);
    padding: 0.85rem 1rem;
    white-space: nowrap;
}

.table-dw tbody td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    font-size: 0.86rem;
}

.table-dw tbody tr:hover td {
    background: rgba(255, 255, 255, 0.025);
}

.font-mono {
    font-family: var(--dw-font-mono);
}

/* Badges */
.badge-status {
    padding: 0.35em 0.75em;
    font-size: 0.72rem;
    font-weight: 600;
    border-radius: 6px;
    letter-spacing: 0.03em;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.badge-lunas {
    background: var(--dw-success-light);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.badge-sebagian {
    background: var(--dw-warning-light);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.badge-belum {
    background: var(--dw-danger-light);
    color: #fb7185;
    border: 1px solid rgba(244, 63, 94, 0.25);
}

.badge-kepemilikan {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.25em 0.6em;
    border-radius: 4px;
}

.badge-duware {
    background: rgba(6, 182, 212, 0.12);
    color: #22d3ee;
    border: 1px solid rgba(6, 182, 212, 0.2);
}

.badge-bangzaki {
    background: rgba(139, 92, 246, 0.12);
    color: #c084fc;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.badge-mitra {
    background: rgba(245, 158, 11, 0.12);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

/* Form Controls */
.form-control, .form-select {
    background-color: #0b1120;
    border-color: rgba(255, 255, 255, 0.12);
    color: #f8fafc;
    border-radius: 8px;
    font-size: 0.88rem;
    padding: 0.55rem 0.85rem;
}

.form-control:focus, .form-select:focus {
    background-color: #0e172a;
    border-color: #f59e0b;
    color: #ffffff;
    box-shadow: 0 0 0 0.25rem rgba(245, 158, 11, 0.18);
}

/* Login Card */
.login-card {
    width: 100%;
    max-width: 440px;
    background: rgba(13, 20, 36, 0.92);
    backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
}

/* Print Rules */
@media print {
    body {
        background: #ffffff !important;
        color: #000000 !important;
    }
    .app-sidebar, .app-topbar, .ambient-canvas, .grid-overlay, .btn-no-print {
        display: none !important;
    }
    .app-main {
        margin-left: 0 !important;
        padding: 0 !important;
    }
    .app-content {
        padding: 0 !important;
    }
}

/* Responsive */
@media (max-width: 991.98px) {
    .app-sidebar {
        transform: translateX(-100%);
    }
    .app-sidebar.show-mobile {
        transform: translateX(0);
    }
    .app-main {
        margin-left: 0 !important;
    }
}

/* Segmented Radio Toggle */
.btn-toggle-jenis {
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}
.btn-toggle-jenis:hover {
    background: rgba(255, 255, 255, 0.05);
}
.btn-toggle-jenis.active.text-danger {
    background: rgba(244, 63, 94, 0.15) !important;
    border-color: rgba(244, 63, 94, 0.4) !important;
    color: #fb7185 !important;
}
.btn-toggle-jenis.active.text-success {
    background: rgba(16, 185, 129, 0.15) !important;
    border-color: rgba(16, 185, 129, 0.4) !important;
    color: #34d399 !important;
}

/* Modal Stacking & Backdrop Fix */
.modal {
    z-index: 1060 !important;
}
.modal-backdrop {
    z-index: 1050 !important;
}
.modal-dialog {
    z-index: 1065 !important;
    position: relative;
}
.modal-content {
    border-radius: 16px !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8) !important;
    background-color: #0b1120 !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

/* ==========================================================================
   ACCOUNTING & VOUCHER CODES (SAK & BUKU KAS BAKU DUWARE)
   ========================================================================== */

.badge-voucher {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: var(--dw-font-mono);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.4px;
    padding: 2px 7px;
    border-radius: 5px;
    white-space: nowrap;
    text-transform: uppercase;
}

.badge-voucher-bkm {
    background: rgba(16, 185, 129, 0.22);
    color: #ffffff;
    border: 1px solid rgba(52, 211, 153, 0.45);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.12);
}

.badge-voucher-bkm i {
    color: #34d399;
}

.badge-voucher-bkk {
    background: rgba(244, 63, 94, 0.12);
    color: #fb7185;
    border: 1px solid rgba(244, 63, 94, 0.32);
    box-shadow: 0 0 10px rgba(244, 63, 94, 0.08);
}

.badge-coa {
    display: inline-flex;
    align-items: center;
    font-family: var(--dw-font-mono);
    font-size: 0.70rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    padding: 1px 6px;
    border-radius: 4px;
    white-space: nowrap;
}

.badge-coa-rev {
    background: rgba(56, 189, 248, 0.12);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.28);
}

.badge-coa-cogs {
    background: rgba(249, 115, 22, 0.12);
    color: #fb923c;
    border: 1px solid rgba(249, 115, 22, 0.28);
}

.badge-coa-opex {
    background: rgba(244, 63, 94, 0.12);
    color: #f87171;
    border: 1px solid rgba(244, 63, 94, 0.28);
}

.badge-coa-other {
    background: rgba(168, 85, 247, 0.12);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.28);
}

.badge-coa-asset {
    background: rgba(148, 163, 184, 0.12);
    color: #cbd5e1;
    border: 1px solid rgba(148, 163, 184, 0.28);
}

.badge-coa-liab {
    background: rgba(225, 29, 72, 0.12);
    color: #fb7185;
    border: 1px solid rgba(225, 29, 72, 0.28);
}

.badge-coa-equity {
    background: rgba(6, 182, 212, 0.12);
    color: #22d3ee;
    border: 1px solid rgba(6, 182, 212, 0.28);
}

/* ==========================================================================
   UNIFIED FINANCE & COA UI SYSTEM (DUWARE & FINANCE PARITY)
   ========================================================================== */

.card-custom {
    background: var(--dw-card-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--dw-border);
    border-radius: var(--dw-radius-lg);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.7);
    margin-bottom: 1.5rem;
    overflow: hidden;
    transition: border-color 0.2s ease;
}

.card-custom:hover {
    border-color: rgba(255, 255, 255, 0.12);
}

.card-custom-header {
    background: rgba(11, 17, 32, 0.7);
    border-bottom: 1px solid var(--dw-border);
    padding: 1.15rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-custom-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.card-custom-body {
    padding: 1.5rem;
}

.table-finance {
    margin: 0;
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    --bs-table-color: #f1f5f9 !important;
    --bs-table-bg: transparent !important;
    --bs-table-border-color: rgba(255, 255, 255, 0.08) !important;
    background-color: transparent !important;
    color: #f1f5f9 !important;
}

.table-finance > :not(caption) > * > * {
    background-color: transparent !important;
    box-shadow: none !important;
}

.table-finance thead th {
    background: rgba(11, 17, 32, 0.95);
    color: var(--dw-muted);
    font-family: var(--dw-font-mono);
    font-size: 0.725rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.95rem 1.15rem;
    border-top: none;
    border-bottom: 1px solid var(--dw-border);
    white-space: nowrap;
}

.table-finance tbody td {
    padding: 1rem 1.15rem;
    font-size: 0.885rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--dw-border-subtle);
    color: #cbd5e1 !important;
    background-color: transparent !important;
    transition: background-color 0.15s ease;
}

.table-finance tbody tr:hover td {
    background-color: rgba(255, 255, 255, 0.035) !important;
    color: #ffffff !important;
}

.table-finance tbody tr.tr-highlight-active {
    background-color: rgba(37, 99, 235, 0.08) !important;
}

.cell-mono {
    font-family: var(--dw-font-mono);
}

.badge-masuk {
    font-family: var(--dw-font-mono);
    background: rgba(16, 185, 129, 0.22);
    color: #ffffff;
    border: 1px solid rgba(52, 211, 153, 0.45);
    font-weight: 600;
    padding: 0.3rem 0.65rem;
    border-radius: 9999px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.badge-keluar {
    font-family: var(--dw-font-mono);
    background: rgba(244, 63, 94, 0.12);
    color: #fb7185;
    border: 1px solid rgba(244, 63, 94, 0.25);
    font-weight: 600;
    padding: 0.3rem 0.65rem;
    border-radius: 9999px;
}

.badge-tech {
    background: rgba(255, 255, 255, 0.06);
    border: none !important;
    color: var(--dw-text-secondary);
    font-family: var(--dw-font-mono);
    font-size: 0.72rem;
    padding: 0.25rem 0.55rem;
    border-radius: 6px;
    box-shadow: none !important;
}

.badge-coa-sub {
    background: rgba(37, 99, 235, 0.14);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge-success-glow {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(52, 211, 153, 0.3);
}

.btn-finance-primary {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #ffffff;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    padding: 0.55rem 1.15rem;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.btn-finance-primary:hover {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-xs {
    padding: 0.18rem 0.45rem;
    font-size: 0.75rem;
    border-radius: 6px;
}

.sub-list-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    width: 100%;
}

.sub-badge-item {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.22rem 0.55rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 6px;
    font-size: 0.8rem;
    color: #cbd5e1;
    transition: all 0.15s ease;
    max-width: 100%;
    white-space: normal;
    text-align: left;
}

.sub-badge-item:hover {
    background: rgba(255, 255, 255, 0.075);
    border-color: rgba(59, 130, 246, 0.3);
    color: #ffffff;
}

.sub-badge-item .sub-name-text {
    font-weight: 500;
    color: #e2e8f0;
}

.btn-sub-adder {
    background: rgba(37, 99, 235, 0.12);
    border: 1px dashed rgba(59, 130, 246, 0.5);
    color: #60a5fa;
    font-family: var(--dw-font-mono, monospace);
    font-size: 0.72rem;
    padding: 0.18rem 0.55rem;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    line-height: 1.4;
    display: inline-flex;
    align-items: center;
}

.btn-sub-adder:hover {
    background: rgba(37, 99, 235, 0.28);
    border-color: #3b82f6;
    color: #ffffff;
    transform: translateY(-1px);
}

.quick-add-sub-wrapper {
    background: rgba(13, 20, 36, 0.95);
    border: 1px solid rgba(59, 130, 246, 0.35);
    border-radius: 10px;
    padding: 8px 10px;
    box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.5), 0 0 12px rgba(37, 99, 235, 0.15);
    animation: fadeInQuickAdd 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.badge-pop-in {
    animation: badgePopIn 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes badgePopIn {
    0% { opacity: 0; transform: scale(0.75); }
    100% { opacity: 1; transform: scale(1); }
}

/* AI Consultant Dialog */
.modal-ai-dialog {
    max-width: 680px;
}

.modal-ai-content {
    background: rgba(11, 17, 32, 0.96) !important;
    backdrop-filter: blur(25px);
    border: 1px solid rgba(56, 189, 248, 0.35) !important;
    box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.8), 0 0 30px rgba(56, 189, 248, 0.15) !important;
    border-radius: 16px;
}

.ai-sparkle-pill {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.25), rgba(56, 189, 248, 0.25));
    border: 1px solid rgba(56, 189, 248, 0.4);
    color: #38bdf8;
    font-size: 0.72rem;
    font-weight: 600;
    border-radius: 20px;
}

.ai-prompt-chip {
    background: rgba(30, 41, 59, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    font-size: 0.75rem;
    padding: 0.28rem 0.65rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    user-select: none;
}

.ai-prompt-chip:hover {
    background: rgba(56, 189, 248, 0.2);
    border-color: rgba(56, 189, 248, 0.5);
    color: #ffffff;
    transform: translateY(-1px);
}

.ai-result-card {
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 12px;
    padding: 18px;
    animation: fadeInQuickAdd 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.ai-pulse-glow {
    animation: pulseGlow 2s infinite ease-in-out;
}

@keyframes pulseGlow {
    0%, 100% { opacity: 0.7; transform: scale(0.99); }
    50% { opacity: 1; transform: scale(1.01); }
}



