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

*:focus {
    outline: none;
}
*:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}



:root {
    --bg: #f8fafc;
    --bg-panel: #ffffff;
    --bg-input: #f1f5f9;
    --bg-card: #ffffff;
    --bg-hover: #f8fafc;
    --border: #e2e8f0;
    --border-active: #cbd5e1;
    --text: #1e293b;
    --text-muted: #64748b;
    --text-dim: #94a3b8;
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --primary-light: #dbeafe;
    --primary-glow: rgba(59, 130, 246, 0.1);
    --accent: #8b5cf6;
    --success: #10b981;
    --success-bg: #d1fae5;
    --warning: #f59e0b;
    --warning-bg: #fef3c7;
    --danger: #ef4444;
    --danger-bg: #fee2e2;
    --info: #06b6d4;
    --info-bg: #cffafe;
    --radius: 12px;
    --radius-sm: 8px;
    --radius-xs: 6px;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-glow: 0 0 0 3px var(--primary-glow);
    --transition: 0.15s ease-out;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

html,
body {
    height: 100%;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--primary-hover);
}

.app-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

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

.topbar {
    background: var(--bg-panel);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
    height: 64px;
    flex-shrink: 0;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.topbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    margin-right: 24px;
    flex-shrink: 0;
}

.brand-icon {
    width: 36px;
    height: 36px;
    background: var(--primary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
}

.brand-icon svg {
    width: 20px;
    height: 20px;
    color: #fff;
}

.brand-name {
    font-weight: 700;
    font-size: 16px;
    color: var(--text);
    letter-spacing: -0.5px;
    white-space: nowrap;
}

.topbar-nav {
    display: flex;
    align-items: center;
    gap: 2px;
}

.topbar-nav-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all var(--transition);
    white-space: nowrap;
}

.topbar-nav-item:hover {
    background: var(--bg-hover);
    color: var(--text);
}

.topbar-nav-item.active {
    background: var(--primary-light);
    color: var(--primary-hover);
    font-weight: 600;
}

.topbar-nav-item svg {
    width: 18px;
    height: 18px;
    opacity: 0.7;
    flex-shrink: 0;
}

.topbar-nav-item:hover svg,
.topbar-nav-item.active svg {
    opacity: 1;
}

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

.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-xs);
    color: var(--text-muted);
    transition: all var(--transition);
}

.mobile-nav-toggle:hover {
    background: var(--bg-hover);
    color: var(--text);
}

.page-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.5px;
}

.mobile-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 200;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.mobile-sidebar-overlay.show {
    display: block;
    opacity: 1;
}

.mobile-sidebar {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    background: var(--bg-panel);
    z-index: 201;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    box-shadow: 4px 0 24px rgba(0,0,0,0.12);
}

.mobile-sidebar.show {
    transform: translateX(0);
}

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

.mobile-sidebar-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-xs);
    transition: all var(--transition);
}

.mobile-sidebar-close:hover {
    background: var(--bg-hover);
    color: var(--text);
}

.mobile-sidebar-nav {
    flex: 1;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow-y: auto;
}

.mobile-sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all var(--transition);
    border: none;
    background: none;
    cursor: pointer;
    width: 100%;
    font-family: var(--font);
}

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

.mobile-sidebar-item.active {
    background: var(--primary-light);
    color: var(--primary-hover);
    font-weight: 600;
}

.mobile-sidebar-item--danger {
    color: var(--danger);
}

.mobile-sidebar-item--danger:hover {
    background: var(--danger-bg);
}

.mobile-sidebar-item svg {
    width: 20px;
    height: 20px;
    opacity: 0.7;
    flex-shrink: 0;
}

.mobile-sidebar-item:hover svg,
.mobile-sidebar-item.active svg {
    opacity: 1;
}

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

@media (max-width: 768px) {
    .topbar {
        padding: 0 16px;
        min-height: 56px;
    }

    .topbar-nav {
        display: none;
    }

    .topbar-brand .brand-name {
        font-size: 14px;
    }

    .mobile-nav-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .mobile-sidebar {
        display: flex;
    }

    .user-dropdown-name {
        display: none;
    }
}

.user-dropdown {
    position: relative;
}

.user-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    background: var(--bg-input);
    padding: 8px 14px 8px 8px;
    border-radius: 24px;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all var(--transition);
}

.user-dropdown-toggle:hover {
    border-color: var(--border-active);
    background: var(--bg-hover);
}

.user-dropdown-toggle .avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    box-shadow: var(--shadow);
    flex-shrink: 0;
}

.user-dropdown-name {
    white-space: nowrap;
}

.user-dropdown-arrow {
    opacity: 0.5;
    transition: transform var(--transition);
    flex-shrink: 0;
}

.user-dropdown-menu.show ~ .user-dropdown-toggle .user-dropdown-arrow,
.user-dropdown-toggle:focus .user-dropdown-arrow {
    transform: rotate(180deg);
}

.user-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 180px;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 10px 40px rgba(0,0,0,0.12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
    z-index: 999;
    padding: 6px;
}

.user-dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    text-decoration: none;
    border-radius: var(--radius-xs);
    transition: all var(--transition);
    border: none;
    background: none;
    cursor: pointer;
    width: 100%;
    font-family: var(--font);
}

.user-dropdown-item:hover {
    background: var(--bg-hover);
}

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

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

.user-dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: 4px 0;
}

.content {
    flex: 1;
    padding: 28px;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    box-sizing: border-box;
}

.app-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 28px;
    border-top: 1px solid var(--border);
    font-size: 12px;
    color: var(--text-muted);
    background: var(--bg-hover);
    flex-shrink: 0;
}

.app-footer-links {
    display: flex;
    gap: 16px;
    align-items: center;
}

.app-footer-link {
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition);
    font-size: 12px;
}

.app-footer-link:hover {
    color: var(--primary);
}

.panel {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
    will-change: box-shadow;
}

.panel:hover {
    box-shadow: var(--shadow-md);
}

.panel--narrow {
    max-width: 520px;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid var(--primary);
    background: var(--primary);
}

.panel-title {
    font-weight: 600;
    font-size: 15px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.panel-body {
    padding: 20px;
}

.chart-toggle-wrap {
    display: flex;
    gap: 4px;
    background: rgba(0,0,0,0.15);
    border-radius: 20px;
    padding: 3px;
}

.chart-pill {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 14px;
    border-radius: 16px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    color: rgba(255,255,255,0.75);
    background: transparent;
}

.chart-pill:hover {
    color: #fff;
    background: rgba(255,255,255,0.15);
}

.chart-pill.active-chart-btn {
    background: #fff !important;
    color: var(--primary) !important;
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

.active-chart-btn {
    background: rgba(255,255,255,0.25) !important;
    color: #fff !important;
    border-color: rgba(255,255,255,0.6) !important;
}

.panel-header .btn--outline {
    color: #fff;
    border-color: rgba(255,255,255,0.5);
    background: transparent;
}

.panel-header .btn--outline:hover {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.8);
    color: #fff;
}

.panel-header [style*="color:var(--text-muted)"],
.panel-header [style*="color: var(--text-muted)"] {
    color: rgba(255,255,255,0.75) !important;
}


.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: transform var(--transition), box-shadow var(--transition);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow);
    will-change: transform;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    opacity: 1;
}

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

.stat-card--success::before {
    background: var(--success);
}

.stat-card--warning::before {
    background: var(--warning);
}

.stat-card--info::before {
    background: var(--info);
}

.stat-card--danger::before {
    background: var(--danger);
}

.stat-card:not([class*="--"])::before {
    background: var(--primary);
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon--primary {
    background: var(--primary-light);
    color: var(--primary);
}

.stat-icon--success {
    background: var(--success-bg);
    color: var(--success);
}

.stat-icon--warning {
    background: var(--warning-bg);
    color: var(--warning);
}

.stat-icon--info {
    background: var(--info-bg);
    color: var(--info);
}

.stat-icon--danger {
    background: var(--danger-bg);
    color: var(--danger);
}

.stat-icon svg {
    width: 26px;
    height: 26px;
}

.stat-value {
    font-size: 26px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.5px;
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.panel-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.table-desktop {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
}

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

.table th {
    text-align: left;
    padding: 14px 16px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--primary);
    border-bottom: none;
}

.table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
}

.table tr:last-child td {
    border-bottom: none;
}

.table tbody tr {
    transition: background var(--transition);
}

.table tbody tr:nth-child(even) {
    background: #eff6ff;
}

.table tbody tr:hover {
    background: #dbeafe;
}

.table--info td.info-label {
    color: var(--text-muted);
    font-weight: 500;
    width: 140px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid;
}

.badge--pending {
    background: var(--warning-bg);
    color: #d97706;
    border-color: #fbbf24;
}

.badge--paid {
    background: var(--success-bg);
    color: #047857;
    border-color: #10b981;
}

.badge--expired {
    background: var(--danger-bg);
    color: #b91c1c;
    border-color: #ef4444;
}

.badge--cancelled {
    background: var(--danger-bg);
    color: #b91c1c;
    border-color: #ef4444;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: transform var(--transition), box-shadow var(--transition);
    text-decoration: none;
    line-height: 1;
    position: relative;
    will-change: transform;
}

.btn--primary {
    background: var(--primary);
    color: #fff;
    box-shadow: var(--shadow);
}

.btn--primary:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    color: #fff;
}

.btn--danger {
    background: var(--danger);
    color: #fff;
    box-shadow: var(--shadow);
}

.btn--danger:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    color: #fff;
}

.btn--success {
    background: var(--success);
    color: #fff;
    box-shadow: var(--shadow);
}

.btn--success:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    color: #fff;
}

.btn--outline {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}

.btn--outline:hover {
    background: var(--bg-hover);
    border-color: var(--border-active);
}

.btn--sm {
    padding: 0 14px;
    font-size: 13px;
    height: 36px;
}

.btn--full {
    width: 100%;
    justify-content: center;
    padding: 12px 20px;
}

.btn-icon {
    width: 16px;
    height: 16px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dim);
    margin-bottom: 8px;
    letter-spacing: 0.3px;
}

.form-input {
    width: 100%;
    background: #ffffff;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 11px 14px;
    color: var(--text);
    font-size: 14px;
    font-family: var(--font);
    outline: none;
    transition: all var(--transition);
}

.form-input:focus {
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
}

.form-input--mono {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
}

.form-hint {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 6px;
    display: block;
}

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

.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    border: 1px solid;
}

.alert--error {
    background: var(--danger-bg);
    border-color: #ef4444;
    color: #b91c1c;
}

.alert--success {
    background: var(--success-bg);
    border-color: #10b981;
    color: #047857;
}

.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--primary);
    position: relative;
}

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

.login-card {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow-lg);
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-icon-wrap {
    width: 72px;
    height: 72px;
    margin: 0 auto 16px;
    background: var(--primary);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
}

.login-icon-wrap svg {
    width: 36px;
    height: 36px;
    color: #fff;
}

.login-title {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 4px;
    letter-spacing: -0.5px;
}

.login-subtitle {
    font-size: 14px;
    color: var(--text-muted);
}

.page-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 12px;
    flex-wrap: wrap;
}

.mutasi-toolbar {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
}

.search-form {
    flex-shrink: 0;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0 12px;
    height: 36px;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.search-box:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.search-icon {
    color: var(--text-muted);
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}

.search-input {
    border: none;
    background: transparent;
    outline: none;
    font-size: 13px;
    font-family: var(--font);
    color: var(--text);
    width: 200px;
    min-width: 0;
}

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

.mutasi-filter-wrap {
    display: flex;
    gap: 8px;
    align-items: center;
    flex: 1;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.dashboard-filter {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-bottom: 16px;
    width: 100%;
    box-sizing: border-box;
}

.dashboard-filter form {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    width: 100%;
    justify-content: flex-end;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .page-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .mutasi-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .search-form {
        max-width: 100%;
        width: 100%;
    }

    .search-box {
        width: 100%;
    }

    .search-input {
        width: 100%;
    }

    .mutasi-filter-wrap {
        flex-direction: row;
        align-items: center;
        width: 100%;
        justify-content: flex-start;
        flex: unset;
    }

    .mutasi-filter-wrap .date-pick-box {
        flex: 1;
        min-width: 0;
        width: auto;
        max-width: 100%;
    }

    .date-pick-input {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        font-size: 12px;
    }

    .mutasi-filter-wrap .date-sep {
        flex-shrink: 0;
    }

    .dashboard-filter {
        justify-content: stretch;
        width: 100%;
    }

    .dashboard-filter form {
        flex-direction: row;
        flex-wrap: wrap;
        width: 100%;
        align-items: center;
        gap: 6px;
    }

    .dashboard-filter .date-pick-box {
        flex: 1;
        min-width: 0;
    }

    .dashboard-filter .date-sep {
        display: flex;
        align-items: center;
        flex-shrink: 0;
        font-size: 11px;
    }

    .dashboard-filter .btn {
        flex-shrink: 0;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .stat-card {
        padding: 16px;
    }
}



.empty-state {
    text-align: center;
    color: var(--text-muted);
    padding: 40px;
    font-size: 14px;
}

.pagination {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
    padding-top: 16px;
}

.page-btn--nav {
    padding: 8px 18px;
    border-radius: var(--radius-xs);
    background: var(--bg-input);
    color: var(--text);
    border: 1px solid var(--border);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition);
    cursor: pointer;
}

.page-btn--nav:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

.page-btn--disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

.page-info {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
}

.badge-unik {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary);
    border: 1px solid var(--primary);
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    padding: 1px 7px;
    letter-spacing: 0.3px;
}

.link {
    color: var(--primary);
    text-decoration: none;
}

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

.text-muted {
    color: var(--text-muted);
}

code {
    background: var(--primary-light);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--primary);
}

.tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    background: var(--bg-input);
    padding: 4px;
    border-radius: var(--radius-sm);
    width: fit-content;
}

.tab-btn {
    padding: 8px 20px;
    background: transparent;
    border: none;
    border-radius: var(--radius-xs);
    color: var(--text-dim);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
}

.tab-btn.active {
    background: var(--primary);
    color: #fff;
    box-shadow: var(--shadow);
}

.tab-btn:hover:not(.active) {
    color: var(--text);
}

.log-box {
    background: #1e293b;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    padding: 16px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: #94a3b8;
    max-height: 520px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-all;
    line-height: 1.8;
}

.log-box::-webkit-scrollbar {
    width: 6px;
}

.log-box::-webkit-scrollbar-track {
    background: transparent;
}

.log-box::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.3);
    border-radius: 3px;
}

.popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.popup-box {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    max-width: 340px;
    width: 85%;
    text-align: center;
    box-shadow: var(--shadow-lg);
    animation: popup-in 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes popup-in {
    from {
        transform: scale(0.9) translateY(10px);
        opacity: 0;
    }

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

.popup-icon svg {
    width: 48px;
    height: 48px;
    margin-bottom: 14px;
}

.popup-title {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text);
}

.popup-message {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 22px;
    line-height: 1.6;
}

.popup-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 20px;
    align-items: start;
}

.settings-section-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

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

.info-row-label {
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
}

.info-row-value {
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
}

.info-row-value code {
    font-size: 11px;
}

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
    animation: pulse-dot 2s ease-in-out infinite;
}

.status-dot--active {
    background: var(--success);
}

.status-dot--inactive {
    background: var(--danger);
    animation: none;
}

@keyframes pulse-dot {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    }

    50% {
        box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
    }
}

/* Responsive table untuk mobile */
.table-card {
    display: none;
}

.table-card .card-item {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.table-card .card-header {
    background: var(--primary);
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.table-card .card-header-invoice {
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.table-card .card-body {
    padding: 4px 0;
}

.table-card .card-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 8px 14px;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    gap: 12px;
}

.table-card .card-row:last-child {
    border-bottom: none;
    padding-bottom: 8px;
}

.table-card .card-label {
    color: var(--primary);
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 80px;
    flex-shrink: 0;
}

.table-card .card-value {
    color: var(--text);
    font-weight: 500;
    text-align: right;
    font-size: 13px;
    word-break: break-word;
    flex: 1;
}

.table-card .card-actions {
    padding: 10px 14px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 6px;
    justify-content: flex-end;
    flex-wrap: wrap;
    background: var(--bg-hover);
}

@media (max-width: 768px) {
    .table-desktop {
        display: none !important;
    }

    .table-card {
        display: block !important;
    }

    .panel-grid {
        grid-template-columns: 1fr !important;
    }
}

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

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

    .stats-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .content {
        padding: 12px;
    }

    .app-footer {
        flex-direction: column;
        gap: 4px;
        text-align: center;
        padding: 10px 16px;
        font-size: 11px;
    }

    .topbar {
        padding: 0 12px;
    }

    .page-title {
        font-size: 17px;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 12px;
        margin-bottom: 16px;
    }

    .stat-card {
        padding: 14px;
        gap: 12px;
    }

    .stat-icon {
        width: 40px;
        height: 40px;
        flex-shrink: 0;
    }

    .stat-icon svg {
        width: 20px;
        height: 20px;
    }

    .stat-value {
        font-size: 18px;
    }

    .stat-label {
        font-size: 10px;
    }

    .panel-header {
        flex-wrap: wrap;
        gap: 10px;
        padding: 12px 14px;
    }

    .panel-title {
        font-size: 13px;
    }

    .chart-toggle-wrap {
        width: 100%;
        justify-content: flex-end;
    }

    #chart-toggle-legend {
        display: none !important;
    }

    .panel-body {
        padding: 12px;
    }

    .panel {
        margin-bottom: 16px;
    }

    .dashboard-filter {
        margin-bottom: 12px;
    }

    .dashboard-filter form {
        flex-direction: row;
        flex-wrap: wrap;
        width: 100%;
        align-items: stretch;
        gap: 8px;
    }

    .dashboard-filter .date-pick-box {
        flex: 1;
        min-width: 0;
        width: auto;
    }

    .dashboard-filter .date-sep {
        display: flex;
        align-items: center;
        flex-shrink: 0;
    }

    .dashboard-filter .btn {
        flex-shrink: 0;
    }

    .date-pick-box {
        min-width: 0;
        max-width: 100%;
    }

    .date-pick-input {
        font-size: 12px !important;
        min-width: 0 !important;
    }

    input[type="date"] {
        min-width: 0;
        font-size: 12px;
        padding: 8px 10px;
    }

    input[type="date"].date-pick-input {
        font-size: 12px;
    }

    .modal-overlay {
        padding: 16px;
        box-sizing: border-box;
        align-items: center;
        justify-content: center;
    }

    .modal-box,
    .modal-box--lg {
        width: 100%;
        max-width: 100%;
        max-height: 85vh;
        border-radius: 14px;
        box-sizing: border-box;
    }

    .modal-body {
        padding: 14px;
        max-height: calc(85vh - 56px);
        -webkit-overflow-scrolling: touch;
        overflow-x: hidden;
        overflow-y: auto;
    }

    .modal-header {
        padding: 14px 16px;
        border-radius: 14px 14px 0 0;
    }

    .modal-title {
        font-size: 14px;
    }

    .modal-td-label {
        width: 90px !important;
        font-size: 11px !important;
    }

    .table--info td.info-label,
    .table--info .info-label {
        width: 100px;
        font-size: 11px;
    }

    .table--info td {
        padding: 6px 8px;
        font-size: 12px;
    }

    .page-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .search-form {
        max-width: 100%;
        width: 100%;
    }

    .btn {
        font-size: 12px;
        padding: 9px 16px;
    }

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




input[type="date"].form-input,
input[type="date"] {
    color-scheme: light;
    background: #ffffff;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: var(--font);
    font-size: 13px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all var(--transition);
    outline: none;
}

input[type="date"].form-input:focus,
input[type="date"]:focus {
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
}

input[type="date"].form-input::-webkit-calendar-picker-indicator,
input[type="date"]::-webkit-calendar-picker-indicator {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 24 24' stroke-width='2' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 012.25-2.25h13.5A2.25 2.25 0 0121 7.5v11.25m-18 0A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75m-18 0v-7.5A2.25 2.25 0 015.25 9h13.5A2.25 2.25 0 0121 11.25v7.5'/%3E%3C/svg%3E");
    cursor: pointer;
    opacity: 0.7;
    transition: opacity var(--transition);
    border-radius: 4px;
    padding: 2px;
}

input[type="date"].form-input::-webkit-calendar-picker-indicator:hover,
input[type="date"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
    background-color: var(--primary-light);
}

.file-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.file-input-wrap input[type="file"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.file-input-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--bg-input);
    border: 1.5px dashed var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    width: 100%;
    min-height: 44px;
}

.file-input-label:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

.file-input-label svg {
    flex-shrink: 0;
    opacity: 0.7;
}

.file-input-name {
    font-size: 12px;
    color: var(--text-muted);
    font-style: italic;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-input-wrap:focus-within .file-input-label {
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
    color: var(--primary);
}


.date-sep {
    color: var(--text-dim);
    font-size: 12px;
    user-select: none;
}

.date-pick-box {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0 10px;
    height: 36px;
    cursor: pointer;
    transition: border-color var(--transition), box-shadow var(--transition);
    overflow: hidden;
    box-sizing: border-box;
}

.date-pick-box svg {
    color: var(--text-muted);
    flex-shrink: 0;
    width: 13px;
    height: 13px;
}

.date-pick-input {
    border: none;
    background: transparent;
    outline: none;
    font-size: 12px;
    font-family: var(--font);
    color: var(--text);
    cursor: pointer;
    padding: 0;
    flex: 1;
    min-width: 0;
    width: 100%;
}

.date-pick-input::-webkit-calendar-picker-indicator {
    display: none;
}

.date-pick-box:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.date-pick-box:hover {
    border-color: var(--border-active);
}


.flatpickr-calendar {
    font-family: var(--font) !important;
    border-radius: var(--radius) !important;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15), 0 4px 16px rgba(0,0,0,0.08) !important;
    border: 1px solid var(--border) !important;
    background: var(--bg-panel) !important;
    width: auto !important;
}

.flatpickr-months {
    background: var(--bg-panel) !important;
    border-bottom: 1px solid var(--border) !important;
    border-radius: var(--radius) var(--radius) 0 0 !important;
}

.flatpickr-months .flatpickr-month {
    background: transparent !important;
    color: var(--text) !important;
}

.flatpickr-current-month {
    font-family: var(--font) !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    font-style: normal !important;
    color: var(--text) !important;
}

.flatpickr-current-month .flatpickr-monthDropdown-months {
    font-family: var(--font) !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    font-style: normal !important;
    color: var(--text) !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-image: none !important;
    cursor: default !important;
    outline: none !important;
    pointer-events: none !important;
}

.flatpickr-current-month .flatpickr-monthDropdown-months:hover {
    background: transparent !important;
    color: var(--text) !important;
    background-image: none !important;
    border-color: transparent !important;
}

.flatpickr-current-month .flatpickr-monthDropdown-months option {
    font-family: var(--font) !important;
    font-size: 13px !important;
    background: var(--bg-panel) !important;
    color: var(--text) !important;
    padding: 6px 10px !important;
}

.flatpickr-current-month .numInputWrapper {
    width: 58px !important;
    display: inline-flex !important;
    align-items: center !important;
}

.flatpickr-current-month .numInputWrapper input.cur-year {
    font-family: var(--font) !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    font-style: normal !important;
    color: var(--text) !important;
    padding: 0 2px !important;
    border-radius: 0 !important;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    text-align: left !important;
    cursor: default !important;
    pointer-events: none !important;
    width: 46px !important;
}

.flatpickr-current-month .numInputWrapper input.cur-year:hover,
.flatpickr-current-month .numInputWrapper input.cur-year:focus {
    border-color: transparent !important;
    box-shadow: none !important;
    outline: none !important;
}

.flatpickr-current-month .numInputWrapper span {
    display: none !important;
}

.flatpickr-current-month .numInputWrapper:hover {
    background: transparent !important;
}

.flatpickr-months .flatpickr-prev-month,
.flatpickr-months .flatpickr-next-month {
    color: var(--text-muted) !important;
    fill: var(--text-muted) !important;
    padding: 5px !important;
    border-radius: var(--radius-xs) !important;
    transition: all var(--transition) !important;
}

.flatpickr-months .flatpickr-prev-month:hover,
.flatpickr-months .flatpickr-next-month:hover {
    color: var(--primary) !important;
    fill: var(--primary) !important;
    background: var(--primary-light) !important;
}

.flatpickr-weekdays {
    background: var(--bg-hover) !important;
    border-bottom: 1px solid var(--border) !important;
    padding: 4px 0 !important;
}

span.flatpickr-weekday {
    color: var(--text-muted) !important;
    font-weight: 600 !important;
    font-size: 11px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

.flatpickr-day {
    color: var(--text) !important;
    border-radius: var(--radius-xs) !important;
    font-size: 12.5px !important;
    font-weight: 500 !important;
}

.flatpickr-day:hover {
    background: var(--primary-light) !important;
    color: var(--primary) !important;
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange {
    background: var(--primary) !important;
    color: #fff !important;
    font-weight: 600 !important;
}

.flatpickr-day.today {
    border: 1.5px solid var(--primary) !important;
    color: var(--primary) !important;
    font-weight: 600 !important;
    max-width: 34px !important;
    height: 34px !important;
    line-height: 34px !important;
    margin: 1px !important;
    transition: all 0.15s ease !important;
}

.flatpickr-day:hover {
    background: var(--primary-light) !important;
    border-color: transparent !important;
    color: var(--primary) !important;
}

.flatpickr-day.today {
    border-color: var(--primary) !important;
    color: var(--primary) !important;
    font-weight: 700 !important;
}

.flatpickr-day.selected,
.flatpickr-day.selected:hover {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: #fff !important;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.3) !important;
}

.flatpickr-day.flatpickr-disabled,
.flatpickr-day.prevMonthDay,
.flatpickr-day.nextMonthDay {
    color: var(--text-dim) !important;
    opacity: 0.4 !important;
}

.flatpickr-innerContainer {
    padding: 4px 8px 8px !important;
}

.tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 0;
}

.tab-btn {
    padding: 10px 20px;
    background: transparent;
    border: 1px solid var(--border);
    border-bottom: none;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    font-family: var(--font);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition);
}

.tab-btn:hover {
    background: var(--bg-hover);
    color: var(--text);
}

.tab-btn.active {
    background: var(--bg-panel);
    color: var(--primary);
    font-weight: 600;
    border-color: var(--border);
    border-bottom: 1px solid var(--bg-panel);
    position: relative;
    z-index: 1;
    margin-bottom: -1px;
}

.log-box {
    background: #0f172a;
    border-radius: var(--radius-sm);
    padding: 16px;
    max-height: 500px;
    overflow-y: auto;
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 12px;
    line-height: 1.7;
}

.log-box::-webkit-scrollbar {
    width: 6px;
}

.log-box::-webkit-scrollbar-track {
    background: #1e293b;
}

.log-box::-webkit-scrollbar-thumb {
    background: #475569;
    border-radius: 3px;
}

.log-line {
    padding: 2px 8px;
    border-radius: 3px;
    color: #cbd5e1;
    border-left: 3px solid transparent;
}

.log-line:hover {
    background: rgba(255, 255, 255, 0.04);
}

.log-line.log-info {
    border-left-color: #3b82f6;
}

.log-line.log-warn {
    border-left-color: #f59e0b;
    background: rgba(245, 158, 11, 0.06);
    color: #fcd34d;
}

.log-line.log-error {
    border-left-color: #ef4444;
    background: rgba(239, 68, 68, 0.08);
    color: #fca5a5;
}

.log-line.log-debug {
    border-left-color: #6b7280;
    color: #9ca3af;
}

.log-ts {
    color: #64748b;
}

.log-tag {
    font-weight: 700;
    padding: 1px 4px;
    border-radius: 3px;
    font-size: 10px;
    letter-spacing: 0.5px;
}

.log-tag--info {
    color: #60a5fa;
    background: rgba(59, 130, 246, 0.15);
}

.log-tag--warn {
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.15);
}

.log-tag--error {
    color: #f87171;
    background: rgba(239, 68, 68, 0.15);
}

.log-tag--debug {
    color: #9ca3af;
    background: rgba(107, 114, 128, 0.15);
}

.log-empty {
    color: #475569;
    font-style: italic;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    animation: fadeIn 0.15s ease;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.modal-box {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 460px;
    max-height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    animation: scaleIn 0.2s ease;
}

.modal-box--lg {
    max-width: 620px;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    background: var(--primary);
    border-radius: var(--radius) var(--radius) 0 0;
    flex-shrink: 0;
}

.modal-title {
    font-weight: 600;
    font-size: 15px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-title svg {
    opacity: 0.85;
}

.modal-close {
    background: rgba(255,255,255,0.15);
    border: none;
    font-size: 20px;
    color: #fff;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all var(--transition);
    line-height: 1;
}

.modal-close:hover {
    background: rgba(255,255,255,0.3);
    color: #fff;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.modal-section {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.modal-section-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.modal-section-title::before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 14px;
    background: var(--primary);
    border-radius: 2px;
}

.modal-table-wrap {
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--border);
}

.modal-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.modal-table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    vertical-align: top;
}

.modal-table tr:last-child td {
    border-bottom: none;
}

.modal-table .modal-td-label {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 12px;
    width: 130px;
    white-space: nowrap;
    background: var(--bg-hover);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        transform: scale(0.95);
        opacity: 0;
    }

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

.api-docs {
    padding: 24px;
}

.api-section {
    margin-bottom: 24px;
}

.api-section h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.api-section h4 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    margin: 14px 0 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.api-section p {
    color: var(--text-secondary);
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.api-code-block {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 14px 16px;
    overflow-x: auto;
    margin-bottom: 10px;
}

.api-code-block code,
.api-code-block pre {
    font-family: 'Courier New', monospace;
    font-size: 0.82rem;
    color: var(--text);
    white-space: pre;
    margin: 0;
    line-height: 1.6;
}

.api-method {
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #fff;
}

.api-method--post {
    background: #3b82f6;
}

.api-method--get {
    background: #10b981;
}

.api-method--webhook {
    background: #8b5cf6;
}

.api-divider {
    border-top: 1px solid var(--border);
    margin: 28px 0;
}

.table--info {
    width: 100%;
}

.table--info td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--border);
    font-size: 0.85rem;
}

.table--info .info-label {
    font-weight: 600;
    width: 140px;
    font-family: 'Courier New', monospace;
    font-size: 0.82rem;
    color: var(--primary);
}

.countdown-box {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.5px;
}

.countdown-box--active {
    background: var(--warning-bg);
    color: #d97706;
    border: 1px solid #fbbf24;
}

.countdown-box--danger {
    background: var(--danger-bg);
    color: #b91c1c;
    border: 1px solid #ef4444;
    animation: countdown-pulse 1s ease-in-out infinite;
}

.countdown-box--expired {
    background: var(--danger-bg);
    color: #b91c1c;
    border: 1px solid #ef4444;
}

.countdown-icon {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.countdown-digits {
    font-family: 'Inter', monospace;
    font-size: 14px;
    font-weight: 800;
}

.countdown-label {
    font-size: 11px;
    font-weight: 500;
    opacity: 0.8;
    margin-left: 2px;
}

@keyframes countdown-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

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

.status-dot--active {
    background: var(--success);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.status-dot--inactive {
    background: var(--danger);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

@media (max-width: 768px) {
    .qris-info-cell {
        min-width: 0 !important;
    }

    .grid-2col {
        grid-template-columns: 1fr !important;
    }

    .settings-2col {
        grid-template-columns: 1fr !important;
    }

    .api-docs {
        padding: 14px;
    }

    .api-code-block {
        padding: 10px 12px;
    }

    .api-code-block code,
    .api-code-block pre {
        font-size: 0.72rem;
    }

    .api-section h3 {
        font-size: 0.95rem;
    }

    textarea.form-input {
        font-size: 10px !important;
    }

    .api-toolbar {
        flex-direction: row !important;
        justify-content: flex-end !important;
        align-items: center !important;
    }

    .table-card .card-item {
        margin-bottom: 10px;
        border-radius: var(--radius-sm);
    }

    .table-card .card-header {
        padding: 10px 14px;
    }

    .table-card .card-header-invoice {
        font-size: 12px;
    }

    .table-card .card-row {
        flex-direction: column;
        gap: 3px;
        padding: 6px 14px;
        align-items: flex-start;
    }

    .table-card .card-label {
        font-size: 10px;
    }

    .table-card .card-value {
        text-align: left;
        font-size: 12px;
    }

    .table-card .card-actions {
        padding: 8px 14px;
        gap: 6px;
    }

    .table-card .card-actions .btn {
        font-size: 11px;
        padding: 5px 12px;
    }
}
