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

:root {
    --font-heading: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Color Palette */
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: #eef2ff;
    --primary-gradient: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    
    --success: #10b981;
    --success-light: #ecfdf5;
    --warning: #f59e0b;
    --warning-light: #fffbeb;
    --danger: #ef4444;
    --danger-light: #fef2f2;
    --info: #06b6d4;
    --info-light: #ecfeff;

    --surface-bg: #f8fafc;
    --card-bg: #ffffff;
    --card-border: #e2e8f0;
    --card-border-hover: #cbd5e1;
    
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-light: #94a3b8;

    --sidebar-width: 260px;
    --sidebar-collapsed-width: 72px;
    --header-height: 68px;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 20px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -4px rgba(0, 0, 0, 0.03);
    --shadow-hover: 0 12px 28px -4px rgba(79, 70, 229, 0.12), 0 6px 12px -4px rgba(0, 0, 0, 0.04);
}

html {
    max-width: 100%;
    overflow-x: hidden;
    overflow-x: clip;
}

body {
    font-family: var(--font-body);
    background-color: var(--surface-bg);
    color: var(--text-main);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    max-width: 100%;
    overflow-x: hidden;
    overflow-x: clip;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6, .fw-bold, .sidebar-brand {
    font-family: var(--font-heading);
    letter-spacing: -0.02em;
}

/* Scrollbar Customization */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* App Layout */
.app-wrapper {
    display: block;
    min-height: 100vh;
    position: relative;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    overflow-x: clip;
}

/* Sidebar Styling - Deep Midnight Navy SaaS Theme */
.app-sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, #0f172a 0%, #1e1b4b 60%, #0f172a 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1050;
    transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1), transform 0.25s ease;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 24px rgba(15, 23, 42, 0.18);
}

.sidebar-brand {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(15, 23, 42, 0.6);
    text-decoration: none;
}

.brand-icon-box {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.45);
}

.brand-text {
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1.1;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 1.1rem 0.85rem;
}

/* Custom scrollbar for dark sidebar */
.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}
.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 99px;
}
.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.sidebar-heading {
    font-size: 0.68rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: #818cf8;
    padding: 0.95rem 0.75rem 0.35rem;
    opacity: 0.9;
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    padding: 0.68rem 0.85rem;
    color: #94a3b8;
    font-weight: 500;
    font-size: 0.875rem;
    border-radius: 10px;
    margin-bottom: 4px;
    transition: all 0.18s ease-in-out;
    position: relative;
}

.sidebar-nav .nav-link i {
    font-size: 1.15rem;
    margin-right: 0.85rem;
    color: #64748b;
    transition: transform 0.18s ease, color 0.18s ease;
}

.sidebar-nav .nav-link:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.08);
}

.sidebar-nav .nav-link:hover i {
    color: #a5b4fc;
    transform: scale(1.1);
}

.sidebar-nav .nav-link.active {
    color: #ffffff;
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
    font-weight: 600;
    box-shadow: 0 4px 16px rgba(79, 70, 229, 0.4);
}

.sidebar-nav .nav-link.active i {
    color: #ffffff;
}

.sidebar-nav .nav-link.active::before {
    content: '';
    position: absolute;
    left: -0.85rem;
    top: 6px;
    bottom: 6px;
    width: 4px;
    background: #38bdf8;
    border-radius: 0 4px 4px 0;
    box-shadow: 0 0 10px #38bdf8;
}

/* ========================================================
   Pusat Keamanan (WAF) Sidebar Menu Styling (Matching Mockup)
   ======================================================== */
.sidebar-security-toggle {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0.72rem 0.85rem;
    color: #cbd5e1;
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: 10px;
    background: transparent;
    border: none;
    text-align: left;
    margin-bottom: 4px;
    transition: all 0.2s ease-in-out;
    position: relative;
    cursor: pointer;
}

.sidebar-security-toggle i.security-main-icon {
    font-size: 1.15rem;
    margin-right: 0.85rem;
    color: #f59e0b;
    transition: transform 0.2s ease;
}

.sidebar-security-toggle:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.08);
}

.sidebar-security-toggle:hover i.security-main-icon {
    transform: scale(1.1);
}

.sidebar-security-toggle.is-active,
.sidebar-security-toggle:not(.collapsed) {
    color: #ffffff;
    background: #0f2d59;
}

.sidebar-security-toggle.is-active::before,
.sidebar-security-toggle:not(.collapsed)::before {
    content: '';
    position: absolute;
    left: -0.85rem;
    top: 4px;
    bottom: 4px;
    width: 5px;
    background: #f59e0b;
    border-radius: 0 6px 6px 0;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.7);
}

.sidebar-security-toggle .security-chevron {
    margin-left: auto;
    font-size: 0.8rem;
    color: #94a3b8;
    transition: transform 0.25s ease;
}

.sidebar-security-toggle:not(.collapsed) .security-chevron {
    transform: rotate(180deg);
    color: #f59e0b;
}

/* Submenu container with vertical guide line */
.sidebar-security-submenu {
    border-left: 1.5px solid rgba(255, 255, 255, 0.15);
    margin-left: 1.35rem;
    padding-left: 0.75rem;
    margin-top: 0.25rem;
    margin-bottom: 0.5rem;
}

.sidebar-security-link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.45rem 0.6rem;
    color: #94a3b8;
    font-size: 0.815rem;
    font-weight: 500;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.18s ease;
}

.sidebar-security-link .sec-dot {
    width: 6.5px;
    height: 6.5px;
    border-radius: 50%;
    background-color: #64748b;
    transition: all 0.18s ease;
    flex-shrink: 0;
}

.sidebar-security-link:hover {
    color: #ffffff;
    transform: translateX(2px);
}

.sidebar-security-link:hover .sec-dot {
    background-color: #f59e0b;
    transform: scale(1.2);
}

.sidebar-security-link.active {
    color: #fbbf24 !important;
    font-weight: 600;
    background: rgba(245, 158, 11, 0.1);
}

.sidebar-security-link.active .sec-dot {
    background-color: #f59e0b !important;
    box-shadow: 0 0 8px #f59e0b;
    transform: scale(1.2);
}

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

.app-sidebar.collapsed .nav-link-text,
.app-sidebar.collapsed .brand-text,
.app-sidebar.collapsed .sidebar-heading,
.app-sidebar.collapsed .user-info-text,
.app-sidebar.collapsed .sidebar-security-toggle .nav-link-text,
.app-sidebar.collapsed .sidebar-security-toggle .security-chevron,
.app-sidebar.collapsed .sidebar-security-submenu {
    display: none !important;
}

.app-sidebar.collapsed .sidebar-brand {
    justify-content: center;
    padding: 0;
}

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

.app-sidebar.collapsed .nav-link i {
    margin-right: 0 !important;
    font-size: 1.25rem;
}

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

.sidebar-footer {
    padding: 0.85rem 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(15, 23, 42, 0.7);
}

/* Main Area */
.app-main {
    min-width: 0;
    width: calc(100% - var(--sidebar-width));
    max-width: calc(100% - var(--sidebar-width));
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: margin-left 0.25s cubic-bezier(0.4, 0, 0.2, 1), width 0.25s ease, max-width 0.25s ease;
    overflow-x: hidden;
    overflow-x: clip;
    box-sizing: border-box;
}

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

/* Header */
.app-header {
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.75rem;
    position: sticky;
    top: 0;
    z-index: 1040 !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
    min-width: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.app-content {
    flex: 1 1 auto;
    padding: 2rem 2.25rem;
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
    overflow-x: clip !important;
}

/* Card Modern SaaS */
.card-saas {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

#responseTableView,
#responseSlideshowView {
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

.card-saas:hover {
    border-color: var(--card-border-hover);
    box-shadow: var(--shadow-md);
}

/* Stat Cards */
.stat-card {
    background: #ffffff;
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    padding: 1.35rem;
    position: relative;
    overflow: hidden;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.stat-card:hover {
    transform: translateY(-2px);
    border-color: #cbd5e1;
    box-shadow: var(--shadow-hover);
}

.stat-icon-box {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

/* Badges */
.badge {
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* Modern Form Builder Customizations */
.builder-canvas {
    max-width: 860px;
    margin: 0 auto;
}

.section-block {
    border-radius: var(--radius-lg);
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    margin-bottom: 1.75rem;
    background: #ffffff;
}

.section-block .section-header-bar {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 0.75rem 1.25rem;
}

.question-card {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: var(--radius-md);
    margin-bottom: 1.25rem;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
    position: relative;
}

.question-card:hover {
    border-color: #94a3b8;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.question-card.active, .question-card:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12), 0 6px 16px rgba(0, 0, 0, 0.04);
}

.question-drag-handle {
    cursor: grab;
    color: #94a3b8;
    padding: 6px;
    border-radius: 6px;
    transition: background 0.15s ease, color 0.15s ease;
}

.question-drag-handle:hover {
    background: #f1f5f9;
    color: var(--primary);
}

.question-drag-handle:active {
    cursor: grabbing;
}

/* Component Palette */
.component-grid-btn {
    display: flex;
    align-items: center;
    padding: 0.55rem 0.75rem;
    border-radius: 8px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    font-size: 0.82rem;
    font-weight: 500;
    color: #334155;
    text-align: left;
    transition: all 0.15s ease;
    width: 100%;
}

.component-grid-btn i {
    font-size: 1rem;
    margin-right: 0.6rem;
    width: 20px;
    text-align: center;
}

.component-grid-btn:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateX(2px);
}

.component-category-badge {
    font-size: 0.68rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: #94a3b8;
    margin-top: 0.75rem;
    margin-bottom: 0.35rem;
}

/* Buttons Polish */
.btn {
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: all 0.15s ease;
}

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

/* Nav Pills Custom */
.nav-pills .nav-link {
    color: #475569;
    font-weight: 600;
    border-radius: var(--radius-sm);
    transition: all 0.15s ease;
}

.nav-pills .nav-link:hover {
    color: var(--primary);
    background: #f1f5f9;
}

.nav-pills .nav-link.active {
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(79, 70, 229, 0.3);
}

/* Tables */
.table thead th {
    background-color: #f8fafc;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    color: #64748b;
    border-bottom: 1px solid var(--card-border);
    padding: 0.75rem 1rem;
}

.table tbody td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--card-border);
    vertical-align: middle;
}

.table tbody tr:hover {
    background-color: #f8fafc;
}

/* Star Rating */
.star-rating {
    display: inline-flex;
    flex-direction: row-reverse;
    font-size: 1.85rem;
}

.star-rating input {
    display: none;
}

.star-rating label {
    color: #cbd5e1;
    cursor: pointer;
    padding: 0 0.15rem;
    transition: color 0.15s ease;
}

.star-rating label:hover,
.star-rating label:hover ~ label,
.star-rating input:checked ~ label {
    color: #f59e0b;
}

/* Signature Pad Canvas */
.signature-pad-canvas {
    border: 2px dashed #cbd5e1;
    border-radius: var(--radius-sm);
    background: #f8fafc;
    width: 100%;
    height: 180px;
    cursor: crosshair;
}

/* Mobile Responsive Drawer Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1045;
}

/* ==========================================================================
   Comprehensive Mobile & Tablet Auto-Responsiveness
   ========================================================================== */

/* Tablets & Small Laptops (max-width: 991.98px) */
@media (max-width: 991.98px) {
    .app-sidebar {
        width: 280px;
        max-width: 85vw;
        transform: translateX(-100%);
        box-shadow: 4px 0 24px rgba(15, 23, 42, 0.4);
    }
    .app-sidebar.show-mobile {
        transform: translateX(0);
    }
    .sidebar-overlay.active {
        display: block;
    }
    .app-main {
        margin-left: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    .app-content {
        padding: 1.25rem 1rem;
    }
    .builder-palette-sticky {
        position: static !important;
        top: auto !important;
    }
}

/* Mobile Smartphones (max-width: 767.98px) */
@media (max-width: 767.98px) {
    /* Responsive Header */
    .app-header {
        height: auto !important;
        min-height: 58px;
        padding: 0.5rem 0.85rem !important;
        flex-wrap: wrap !important;
        gap: 0.4rem !important;
    }
    .header-left {
        flex: 1 1 auto;
        min-width: 0;
    }
    .header-title-box {
        max-width: calc(100vw - 150px);
    }
    .header-title {
        font-size: 0.95rem !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .header-right {
        display: contents !important;
    }
    .header-actions-wrapper {
        width: 100% !important;
        order: 3 !important;
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 0.35rem !important;
        padding-top: 0.4rem !important;
        border-top: 1px solid rgba(226, 232, 240, 0.8) !important;
    }
    .header-actions-wrapper .btn {
        font-size: 0.75rem !important;
        padding: 0.35rem 0.65rem !important;
        flex: 1 1 auto;
        text-align: center;
        justify-content: center;
    }
    .header-right .dropdown {
        order: 2 !important;
        margin-left: auto !important;
    }

    /* Content Area */
    .app-content {
        padding: 0.85rem 0.65rem !important;
    }

    /* Stat Cards (Fintech 2-Column Mobile Grid) */
    .stat-card {
        padding: 0.85rem !important;
        border-radius: 10px !important;
        margin-bottom: 0.25rem !important;
    }
    .stat-card .fs-3 {
        font-size: 1.35rem !important;
    }
    .stat-card .stat-icon-box {
        width: 38px !important;
        height: 38px !important;
        font-size: 1.1rem !important;
    }

    /* Card Modern SaaS */
    .card-saas {
        border-radius: 10px !important;
    }
    .card-saas .card-header {
        padding: 0.75rem 0.85rem !important;
    }
    .card-saas .card-body {
        padding: 0.85rem !important;
    }

    /* Tables (Horizontal Touch Scrolling) */
    .table-responsive {
        -webkit-overflow-scrolling: touch;
        border-radius: 8px;
    }
    .table thead th {
        padding: 0.6rem 0.65rem !important;
        font-size: 0.7rem !important;
        white-space: nowrap;
    }
    .table tbody td {
        padding: 0.6rem 0.65rem !important;
        font-size: 0.78rem !important;
    }
    .signature-box {
        max-width: 105px !important;
    }
    .signature-box img {
        max-height: 36px !important;
    }

    /* Builder Navigation Tabs & Palette Grid */
    #builderTab {
        width: 100% !important;
        display: flex !important;
    }
    #builderTab .nav-item {
        flex: 1 1 50%;
    }
    #builderTab .nav-link {
        width: 100% !important;
        text-align: center;
        padding: 0.5rem 0.25rem !important;
        font-size: 0.8rem !important;
    }
    .builder-palette-sticky .d-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 6px !important;
    }
    .component-grid-btn {
        padding: 0.45rem 0.5rem !important;
        font-size: 0.75rem !important;
    }
    .component-grid-btn i {
        font-size: 0.9rem !important;
        margin-right: 0.35rem !important;
    }

    /* Question Cards in Builder */
    .question-builder-card {
        padding: 0.85rem !important;
        border-radius: 10px !important;
    }
    .question-builder-card .card-footer {
        flex-wrap: wrap !important;
        gap: 0.5rem !important;
    }

    /* Public Form Elements */
    .public-card {
        border-radius: 12px !important;
        margin-bottom: 1rem !important;
    }
    .form-theme-banner {
        height: 120px !important;
        border-top-left-radius: 12px !important;
        border-top-right-radius: 12px !important;
    }
    .form-custom-banner {
        max-height: 150px !important;
    }
    .form-logos-header {
        gap: 1rem !important;
        margin-bottom: 1rem !important;
        padding-bottom: 0.75rem !important;
    }
    .form-logos-header img {
        max-height: 40px !important;
    }
    .public-card .p-4, .public-card .p-md-5 {
        padding: 1.15rem 1rem !important;
    }
    .floating-timer {
        top: 8px !important;
        right: 8px !important;
        padding: 4px 12px !important;
        font-size: 0.78rem !important;
        border-radius: 20px !important;
    }
    .signature-pad-canvas {
        height: 150px !important;
    }
    .star-rating {
        font-size: 2.1rem !important;
    }
    .star-rating label {
        padding: 0 0.25rem !important;
    }
    .btn-group .btn {
        padding: 0.35rem 0.5rem !important;
        font-size: 0.8rem !important;
    }

    /* Confirmation Page */
    .confirmation-card {
        border-radius: 16px !important;
    }
    .confirmation-card .p-4, .confirmation-card .p-md-5 {
        padding: 1.5rem 1.15rem !important;
    }
    .success-icon-badge {
        width: 68px !important;
        height: 68px !important;
        font-size: 1.8rem !important;
    }
    .score-display {
        font-size: 2.6rem !important;
    }

    /* Direct Form Input on User Dashboard */
    #directLinkForm .input-group {
        flex-direction: column;
    }
    #directLinkForm .input-group-text {
        display: none;
    }
    #directLinkForm input {
        border-radius: 8px !important;
        margin-bottom: 0.4rem;
    }
    #directLinkForm button {
        border-radius: 8px !important;
        width: 100%;
    }
}

/* Extra Small Phones (max-width: 480px) */
@media (max-width: 480px) {
    .header-title-box {
        max-width: calc(100vw - 130px);
    }
    .header-title {
        font-size: 0.88rem !important;
    }
    .stat-card .fs-3 {
        font-size: 1.2rem !important;
    }
    .stat-card .small {
        font-size: 0.7rem !important;
    }
    .btn {
        font-size: 0.8rem;
    }
    .builder-palette-sticky .d-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Modern Table Action Dropdown & Hover Polish */
.table .dropdown-menu {
    border: 1px solid var(--card-border) !important;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.12), 0 8px 10px -6px rgba(15, 23, 42, 0.06) !important;
    z-index: 1060 !important;
}

.table .dropdown-item {
    font-size: 0.82rem;
    transition: all 0.15s ease;
    border-radius: 6px;
    margin: 1px 0;
}

.table .dropdown-item:hover {
    background-color: #f1f5f9;
}

.table .dropdown-item.text-danger:hover {
    background-color: #fef2f2;
}

/* Builder Sticky Component Palette & Action Bars */
.builder-palette-sticky {
    position: -webkit-sticky !important;
    position: sticky !important;
    top: calc(var(--header-height, 68px) + 16px) !important;
    z-index: 1015 !important;
}

@media (max-width: 991.98px) {
    .builder-palette-sticky {
        position: static !important;
        top: auto !important;
    }
}

/* ==========================================================================
   Manual Book & Documentation System
   ========================================================================== */
.manual-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #312e81 100%);
    border-radius: var(--radius-lg);
    padding: 2.25rem 2rem;
    color: #ffffff;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.25);
}

.manual-hero::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 380px;
    height: 380px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.25) 0%, transparent 70%);
    pointer-events: none;
}

.manual-search-box {
    position: relative;
    max-width: 640px;
}

.manual-search-box input {
    background: rgba(255, 255, 255, 0.96);
    border: 2px solid transparent;
    padding: 0.85rem 1.25rem 0.85rem 3rem;
    border-radius: 99px;
    font-size: 0.95rem;
    font-weight: 500;
    color: #0f172a;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
}

.manual-search-box input:focus {
    background: #ffffff;
    border-color: #4f46e5;
    outline: none;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.25);
}

.manual-search-icon {
    position: absolute;
    left: 1.15rem;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 1.15rem;
    pointer-events: none;
}

.manual-nav-sticky {
    position: -webkit-sticky;
    position: sticky;
    top: calc(var(--header-height, 68px) + 20px);
    max-height: calc(100vh - 110px);
    overflow-y: auto;
}

.manual-nav-link {
    display: flex;
    align-items: center;
    padding: 0.55rem 0.85rem;
    font-size: 0.84rem;
    font-weight: 500;
    color: #475569;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.15s ease;
    margin-bottom: 2px;
}

.manual-nav-link i {
    font-size: 1rem;
    margin-right: 0.65rem;
    color: #94a3b8;
    transition: color 0.15s ease;
}

.manual-nav-link:hover {
    color: var(--primary);
    background-color: var(--primary-light);
}

.manual-nav-link:hover i {
    color: var(--primary);
}

.manual-nav-link.active {
    color: var(--primary);
    background-color: var(--primary-light);
    font-weight: 600;
    border-left: 3px solid var(--primary);
}

.manual-nav-link.active i {
    color: var(--primary);
}

.manual-section {
    scroll-margin-top: calc(var(--header-height, 68px) + 20px);
    margin-bottom: 2rem;
}

.manual-card {
    background: #ffffff;
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    padding: 1.75rem;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
    position: relative;
}

.manual-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--card-border-hover);
}

.manual-card-accent-primary {
    border-left: 4px solid var(--primary);
}

.manual-card-accent-success {
    border-left: 4px solid var(--success);
}

.manual-card-accent-warning {
    border-left: 4px solid var(--warning);
}

.manual-step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--primary-gradient);
    color: #ffffff;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.8rem;
    margin-right: 0.6rem;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(79, 70, 229, 0.3);
}

.manual-step-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.25rem;
}

.manual-step-content {
    flex-grow: 1;
}

.manual-tip {
    background-color: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-left: 4px solid #16a34a;
    border-radius: var(--radius-sm);
    padding: 0.85rem 1.15rem;
    margin: 1rem 0;
    font-size: 0.85rem;
    color: #14532d;
}

.manual-warning {
    background-color: #fffbeb;
    border: 1px solid #fde68a;
    border-left: 4px solid #d97706;
    border-radius: var(--radius-sm);
    padding: 0.85rem 1.15rem;
    margin: 1rem 0;
    font-size: 0.85rem;
    color: #78350f;
}

.manual-component-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.65rem;
    font-size: 0.78rem;
    font-weight: 600;
    border-radius: 6px;
    background-color: #f1f5f9;
    color: #334155;
    border: 1px solid #e2e8f0;
    margin: 3px;
}

.manual-component-badge i {
    margin-right: 0.4rem;
    color: var(--primary);
}

.manual-role-tab {
    padding: 0.75rem 1.25rem;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 10px;
    color: #475569;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.manual-role-tab:hover {
    color: var(--primary);
    background-color: #f1f5f9;
}

.manual-role-tab.active {
    background: #ffffff;
    color: var(--primary);
    border-color: var(--card-border);
    box-shadow: var(--shadow-sm);
}

@media print {
    .app-sidebar, .app-header, .sidebar-overlay, .manual-nav-sticky, .manual-hero .manual-search-box, .btn, .nav-tabs, .header-actions {
        display: none !important;
    }
    .app-main {
        margin-left: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    .app-content {
        padding: 0 !important;
    }
    .manual-card {
        box-shadow: none !important;
        border: 1px solid #cbd5e1 !important;
        page-break-inside: avoid;
        margin-bottom: 1.5rem !important;
    }
    .manual-section {
        page-break-before: auto;
    }
    body {
        background: #ffffff !important;
        color: #000000 !important;
    }
}

/* ==========================================================================
   Modern Pagination Styling
   ========================================================================== */
.pagination {
    margin-bottom: 0;
    gap: 4px;
}

.pagination .page-item .page-link {
    color: var(--text-main);
    background-color: #ffffff;
    border: 1px solid var(--card-border);
    border-radius: var(--radius-sm);
    padding: 0.38rem 0.75rem;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.15s ease-in-out;
}

.pagination .page-item .page-link:hover {
    color: var(--primary);
    background-color: var(--primary-light);
    border-color: #c7d2fe;
}

.pagination .page-item.active .page-link {
    color: #ffffff;
    background-color: var(--primary);
    border-color: var(--primary);
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(79, 70, 229, 0.25);
}

.pagination .page-item.disabled .page-link {
    color: var(--text-light);
    background-color: #f8fafc;
    border-color: var(--card-border);
}

/* ============================================================
   RESPONSIVE TABLE SLIDER & CURSOR GRAB SYSTEM
   ============================================================ */
.table-scroll-container {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    display: block !important;
    overflow-x: scroll !important; /* Selalu tampilkan scrollbar landscape */
    overflow-y: hidden !important;
    contain: inline-size;
    cursor: grab;
    user-select: none;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    position: relative;
    background-color: #ffffff;
    scrollbar-width: thin;
    scrollbar-color: #94a3b8 #f1f5f9;
}

.table-scroll-container table {
    width: max-content !important;
    min-width: 100% !important;
    margin-bottom: 0 !important;
}

.table-scroll-container.is-dragging {
    cursor: grabbing !important;
}

.table-scroll-container.is-dragging a,
.table-scroll-container.is-dragging button,
.table-scroll-container.is-dragging form {
    pointer-events: none !important;
}

/* Landscape Horizontal Scrollbar under Table Area */
.table-scroll-container::-webkit-scrollbar {
    height: 14px !important;
    display: block !important;
}

.table-scroll-container::-webkit-scrollbar-track {
    background: #f1f5f9 !important;
    border-top: 1px solid #e2e8f0 !important;
    border-radius: 0 0 var(--radius-md) var(--radius-md) !important;
}

.table-scroll-container::-webkit-scrollbar-thumb {
    background: #94a3b8 !important;
    border-radius: 99px !important;
    border: 3px solid #f1f5f9 !important;
    cursor: grab;
    transition: background-color 0.2s ease;
}

.table-scroll-container::-webkit-scrollbar-thumb:hover {
    background: #4f46e5 !important;
}

.table-scroll-container::-webkit-scrollbar-thumb:active {
    background: #3730a3 !important;
    cursor: grabbing;
}

/* Sticky Columns */
.table-sticky-col.col-idx {
    position: sticky;
    left: 0;
    width: 48px;
    min-width: 48px;
    max-width: 48px;
    z-index: 10;
    background-color: #ffffff;
}

.table-sticky-col.col-time {
    position: sticky;
    left: 48px;
    width: 155px;
    min-width: 155px;
    max-width: 155px;
    z-index: 10;
    background-color: #ffffff;
    box-shadow: 4px 0 8px -2px rgba(15, 23, 42, 0.08);
    border-right: 2px solid #e2e8f0 !important;
}

.table-sticky-col.col-action {
    position: sticky;
    right: 0;
    width: 126px !important;
    min-width: 126px !important;
    max-width: 126px !important;
    z-index: 10;
    background-color: #ffffff;
    box-shadow: -4px 0 8px -2px rgba(15, 23, 42, 0.08);
    border-left: 2px solid #e2e8f0 !important;
    text-align: center !important;
    vertical-align: middle !important;
    padding: 0.75rem 0.5rem !important;
}

.table-scroll-container .table thead th.col-action {
    width: 126px !important;
    min-width: 126px !important;
    max-width: 126px !important;
    text-align: center !important;
    vertical-align: middle !important;
}

/* Table Row Action Buttons System */
.action-btn-group {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    vertical-align: middle;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    font-size: 0.92rem;
    line-height: 1;
    cursor: pointer;
    transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    padding: 0;
}

.action-btn:hover {
    transform: translateY(-1.5px);
    box-shadow: 0 3px 8px rgba(15, 23, 42, 0.12);
}

.action-btn:active {
    transform: translateY(0);
}

/* Detail Button */
.action-btn-view {
    color: #4f46e5;
    background-color: #ffffff;
    border-color: #e0e7ff;
}

.action-btn-view:hover {
    background-color: #4f46e5;
    border-color: #4f46e5;
    color: #ffffff !important;
}

/* PDF Button */
.action-btn-pdf {
    color: #e11d48;
    background-color: #ffffff;
    border-color: #ffe4e6;
}

.action-btn-pdf:hover {
    background-color: #e11d48;
    border-color: #e11d48;
    color: #ffffff !important;
}

/* Delete Button */
.action-btn-delete {
    color: #ef4444;
    background-color: #ffffff;
    border-color: #fee2e2;
}

.action-btn-delete:hover {
    background-color: #dc2626;
    border-color: #dc2626;
    color: #ffffff !important;
}

thead .table-sticky-col {
    z-index: 20 !important;
    background-color: #f8fafc !important;
}

tbody tr:hover .table-sticky-col {
    background-color: #f8fafc !important;
}

/* ============================================================
   TABLE HEADERS & CELLS: RATA KIRI, KIRI ATAS & SEJAJAR (TOP-LEFT)
   ============================================================ */
.table.align-top th,
.table.align-top td,
.table-scroll-container .table thead th,
.table-scroll-container .table tbody td,
.question-header-cell,
.answer-cell {
    vertical-align: top !important;
    text-align: left !important;
}

.table-scroll-container .table thead th.col-idx,
.table-scroll-container .table tbody td.col-idx {
    text-align: center !important;
}

.table-scroll-container .table thead th.col-action,
.table-scroll-container .table tbody td.col-action {
    text-align: center !important;
}

/* Question Header Card styling */
.question-header-cell {
    background-color: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
    padding: 0.75rem 0.85rem !important;
    vertical-align: top !important;
    text-align: left !important;
}

.question-header-title {
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.45;
    color: #1e293b;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left !important;
    min-height: 52px; /* Menyamakan tinggi baseline teks pertanyaan agar sejajar */
}

.question-header-title:hover {
    color: var(--primary);
}

/* Answer Value Cards & Badges */
.answer-cell {
    padding: 0.75rem 0.85rem !important;
    vertical-align: top !important;
    text-align: left !important;
}

/* ============================================================
   RESPONSES SLIDESHOW MODE STYLES
   ============================================================ */
.slideshow-container {
    background: #ffffff;
    border-radius: var(--radius-md);
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.slideshow-slide {
    display: none;
    animation: fadeInSlide 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.slideshow-slide.active {
    display: block;
}

@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-q-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    padding: 1.25rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    text-align: left;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.slide-q-card:hover {
    border-color: #cbd5e1;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
    transform: translateY(-2px);
}

.slide-q-header {
    text-align: left;
    min-height: 76px; /* Menyamakan tinggi header soal agar divider dan jawaban sejajar horizontal */
}

.slide-dot {
    width: 10px;
    height: 10px;
    border-radius: 99px;
    background: #cbd5e1;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    padding: 0;
}

.slide-dot.active {
    background: var(--primary);
    width: 28px;
    border-radius: 99px;
}

.slide-dot:hover:not(.active) {
    background: #94a3b8;
}

/* ============================================================
   MODERN RESPONSE VIEW MODE SWITCHER & TABLE NAVIGATOR
   ============================================================ */

/* Segmented Control Pill for View Mode Switcher */
.response-mode-switcher-container {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 50rem;
    padding: 4px;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.response-mode-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.45rem 1.15rem;
    font-size: 0.84rem;
    font-weight: 600;
    color: #64748b;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 50rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    text-decoration: none;
    user-select: none;
    line-height: 1.35;
}

.response-mode-btn i {
    font-size: 0.95rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.response-mode-btn:hover {
    color: #1e293b;
    background-color: #ffffff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

/* Active State: Mode Tabel Data */
.response-mode-btn.active-table {
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
    color: #ffffff !important;
    border-color: transparent;
    box-shadow: 0 2px 6px rgba(79, 70, 229, 0.35);
}

.response-mode-btn.active-table i {
    color: #ffffff !important;
}

/* Active State: Tab Grafik & Diagram */
.response-mode-btn.active-analytics {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff !important;
    border-color: transparent;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.35);
}

.response-mode-btn.active-analytics i {
    color: #ffffff !important;
}

/* Badge inside Mode Switcher */
.response-mode-badge {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    padding: 0.15rem 0.55rem;
    border-radius: 50rem;
    line-height: 1.2;
    transition: all 0.2s ease;
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
    display: inline-flex;
    align-items: center;
}

.response-mode-btn.active-analytics .response-mode-badge {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.4);
}

/* Unified Table Scroll Navigation Pill Group */
.table-nav-pill-group {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 50rem;
    padding: 3px;
    gap: 3px;
    display: inline-flex;
    align-items: center;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.table-nav-pill-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0.75rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: #475569;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 50rem;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    line-height: 1.25;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    user-select: none;
}

.table-nav-pill-btn:hover:not(:disabled) {
    color: #1e293b;
    background: #f1f5f9;
    border-color: #cbd5e1;
    transform: translateY(-0.5px);
}

.table-nav-pill-btn:active:not(:disabled) {
    transform: translateY(0);
}

/* Primary Button Accent (Scroll Right on Responses) */
.table-nav-pill-btn.table-nav-pill-primary {
    background: #eef2ff;
    color: #4f46e5;
    border-color: #c7d2fe;
    font-weight: 700;
}

.table-nav-pill-btn.table-nav-pill-primary:hover:not(:disabled) {
    background: #4f46e5;
    color: #ffffff;
    border-color: #4f46e5;
}

.table-nav-pill-btn.table-nav-pill-primary:hover:not(:disabled) i {
    color: #ffffff;
}

/* Success Button Accent (Scroll Right on Attendance) */
.table-nav-pill-btn.table-nav-pill-success {
    background: #ecfdf5;
    color: #059669;
    border-color: #a7f3d0;
    font-weight: 700;
}

.table-nav-pill-btn.table-nav-pill-success:hover:not(:disabled) {
    background: #10b981;
    color: #ffffff;
    border-color: #10b981;
}

.table-nav-pill-btn.table-nav-pill-success:hover:not(:disabled) i {
    color: #ffffff;
}

/* Disabled State for Pill Buttons */
.table-nav-pill-btn:disabled {
    opacity: 0.42;
    cursor: not-allowed;
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #94a3b8;
    box-shadow: none;
    transform: none;
}

/* Table Scroll Percentage Pill Indicator */
.table-nav-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.32rem 0.65rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: #334155;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 50rem;
    min-width: 58px;
    letter-spacing: 0.02em;
    user-select: none;
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.02);
}

.table-nav-indicator i {
    font-size: 0.72rem;
}

/* Responsive Rules for Small Devices (Mobile / Small Tablet) */
@media (max-width: 575.98px) {
    .response-mode-switcher-container {
        width: 100%;
        display: flex;
        justify-content: stretch;
    }
    .response-mode-btn {
        flex: 1 1 50%;
        padding: 0.45rem 0.65rem;
        font-size: 0.78rem;
        gap: 0.35rem;
    }
    .response-mode-badge {
        display: none;
    }
    .table-nav-pill-group {
        width: 100%;
        justify-content: space-between;
        padding: 2px;
        gap: 2px;
    }
    .table-nav-pill-btn {
        padding: 0.35rem 0.55rem;
        font-size: 0.75rem;
    }
    .table-nav-indicator {
        padding: 0.25rem 0.45rem;
        min-width: 48px;
        font-size: 0.72rem;
    }
}

/* ============================================================
   ANALYTICS TAB ACTION BANNER & CHART TYPE SWITCHERS
   ============================================================ */

/* Hero Icon Box for Analytics Banner */
.analytics-hero-icon-box {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 1px solid #fcd34d;
    color: #b45309;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.btn-analytics-pdf {
    background: linear-gradient(135deg, #e11d48 0%, #be123c 100%);
    border: 1px solid #be123c;
    color: #ffffff !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-analytics-pdf:hover {
    background: linear-gradient(135deg, #be123c 0%, #9f1239 100%);
    box-shadow: 0 4px 12px rgba(225, 29, 72, 0.32) !important;
    transform: translateY(-1px);
    color: #ffffff !important;
}

/* Question Chart Type Pill Toggle */
.chart-type-pill-group {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 50rem;
    padding: 3px;
    gap: 3px;
    display: inline-flex;
    align-items: center;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.03);
}

.chart-type-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0.85rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: #64748b;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 50rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    line-height: 1.25;
    user-select: none;
}

.chart-type-btn:hover {
    color: #1e293b;
    background: rgba(255, 255, 255, 0.7);
}

.chart-type-btn.active {
    background: #4f46e5;
    color: #ffffff !important;
    box-shadow: 0 2px 6px rgba(79, 70, 229, 0.3);
}

.chart-type-btn.active i {
    color: #ffffff !important;
}

/* Copy Chart Button */
.chart-copy-btn {
    transition: all 0.2s ease;
    background: #ffffff;
}

.chart-copy-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1 !important;
    color: #1e293b !important;
    transform: translateY(-0.5px);
}

/* ============================================================
   EXPORT RICH DROPDOWN & HEADER ACTION BUTTONS
   ============================================================ */

/* Header Action Pill Buttons */
.header-action-pill {
    border-radius: 50rem !important;
    padding: 0.42rem 0.95rem !important;
    font-size: 0.82rem !important;
    font-weight: 600 !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;
    display: inline-flex !important;
    align-items: center !important;
}

.header-action-pill i {
    margin-right: 0.5rem !important;
    font-size: 0.95rem;
}

.header-action-pill:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 3px 8px rgba(15, 23, 42, 0.08) !important;
}

/* Rich Export Dropdown Menu */
.export-rich-dropdown {
    min-width: 360px !important;
    border-radius: 14px !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 14px 34px -4px rgba(15, 23, 42, 0.12), 0 4px 12px -2px rgba(15, 23, 42, 0.06) !important;
    padding: 0.6rem !important;
    background: #ffffff !important;
    z-index: 1060;
}

.export-dropdown-header {
    padding: 0.45rem 0.75rem !important;
}

.export-dropdown-header i {
    margin-right: 0.5rem !important;
    font-size: 0.85rem;
}

.export-dropdown-item {
    border-radius: 10px !important;
    padding: 0.6rem 0.85rem !important;
    margin-bottom: 3px !important;
    transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1) !important;
    text-decoration: none;
    border: 1px solid transparent;
    display: flex !important;
    align-items: center !important;
}

.export-dropdown-item:hover,
.export-dropdown-item:focus {
    background-color: #f8fafc !important;
    border-color: #e2e8f0 !important;
    transform: translateX(3px);
}

.export-item-icon-box {
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
    margin-right: 0.75rem !important;
    transition: transform 0.18s ease;
}

.export-dropdown-item:hover .export-item-icon-box {
    transform: scale(1.08);
}

.export-item-title {
    font-size: 0.835rem;
    font-weight: 600;
    line-height: 1.25;
}

.export-item-desc {
    font-size: 0.71rem;
    line-height: 1.35;
    margin-top: 2px;
}

.export-item-chevron {
    font-size: 0.75rem;
    opacity: 0.35;
    margin-left: 0.5rem;
    transition: all 0.18s ease;
}

.export-dropdown-item:hover .export-item-chevron {
    opacity: 0.9;
    transform: translateX(2px);
    color: var(--primary) !important;
}

.bg-emerald-subtle {
    background-color: #ecfdf5 !important;
}
.text-emerald {
    color: #059669 !important;
}
.border-emerald-subtle {
    border-color: #a7f3d0 !important;
}

.bg-rose-subtle {
    background-color: #fff1f2 !important;
}

/* Custom Spacing Helpers for Half Steps */
.gap-1\.5 { gap: 0.375rem !important; }
.gap-2\.5 { gap: 0.625rem !important; }
.gap-3\.5 { gap: 0.875rem !important; }
.me-1\.5 { margin-right: 0.375rem !important; }
.me-2\.5 { margin-right: 0.625rem !important; }
.ms-1\.5 { margin-left: 0.375rem !important; }
.px-3\.5 { padding-left: 0.875rem !important; padding-right: 0.875rem !important; }
.py-1\.5 { padding-top: 0.375rem !important; padding-bottom: 0.375rem !important; }
.py-2\.5 { padding-top: 0.625rem !important; padding-bottom: 0.625rem !important; }







