/**
 * HotMik - Stylesheet Utama
 * Tema: Biru gelap (#1a237e) + aksen cyan (#00bcd4)
 */

/* ===== Google Fonts ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ===== CSS Variables ===== */
:root {
    --primary: #1d4ed8;       /* Blue 700 */
    --primary-light: #2563eb; /* Blue 600 */
    --primary-dark: #1e3a8a;  /* Blue 900 */
    --accent: #4b5563;        /* Gray 600 */
    --accent-light: #6b7280;
    --accent-dark: #374151;
    
    --success: #059669;       /* Emerald 600 */
    --success-bg: #d1fae5;
    --warning: #d97706;       /* Amber 600 */
    --warning-bg: #fef3c7;
    --danger: #dc2626;        /* Red 600 */
    --danger-bg: #fee2e2;
    --info: #2563eb;          /* Blue 600 */
    --info-bg: #dbeafe;
    
    --bg-body: #f3f4f6;       /* Gray 100 */
    --bg-card: #ffffff;
    --bg-sidebar: #111827;    /* Gray 900 */
    --bg-sidebar-hover: #1f2937;
    --bg-sidebar-active: #374151;
    --bg-topbar: #ffffff;
    
    --text-primary: #111827;  /* Gray 900 */
    --text-secondary: #4b5563; /* Gray 600 */
    --text-muted: #9ca3af;    /* Gray 400 */
    --text-sidebar: #d1d5db;  /* Gray 300 */
    --text-sidebar-active: #ffffff;
    
    --border-color: #e5e7eb;  /* Gray 200 */
    --border-radius: 6px;
    --border-radius-sm: 4px;
    --border-radius-lg: 8px;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --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-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    --sidebar-width: 250px;
    --topbar-height: 64px;
    
    --transition-fast: 0.15s ease-in-out;
    --transition-normal: 0.25s ease-in-out;
    --transition-slow: 0.4s ease-in-out;
}

/* ===== Dark Mode ===== */
[data-theme="dark"] {
    --bg-body: #020617;       /* Slate 950 */
    --bg-card: #0f172a;       /* Slate 900 */
    --bg-sidebar: #020617;
    --bg-topbar: rgba(15, 23, 42, 0.85);
    
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    
    --border-color: rgba(255, 255, 255, 0.06);
    
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.4);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 14px;
    overflow-x: hidden;
    min-height: 100vh;
}

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

a:hover {
    color: var(--accent-light);
}

/* ===== Scrollbar Custom ===== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.25);
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
}

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

.main-content {
    flex: 1;
    min-width: 0;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: margin-left var(--transition-normal);
}

.main-content.sidebar-collapsed {
    margin-left: 72px;
}

.page-content {
    padding: 24px;
    padding-top: calc(var(--topbar-height) + 24px);
    width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}

/* ===== Sidebar ===== */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-sidebar);
    border-right: 1px solid #1f2937;
    z-index: 1040;
    transition: width var(--transition-normal);
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

.sidebar.collapsed {
    width: 72px;
}

.sidebar-brand {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    min-height: 70px;
}

.sidebar-brand .brand-icon {
    width: 32px;
    height: 32px;
    background: var(--primary);
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    flex-shrink: 0;
}

.sidebar-brand .brand-text {
    font-size: 20px;
    font-weight: 800;
    color: white;
    letter-spacing: -0.5px;
    white-space: nowrap;
}

.sidebar-brand .brand-text span {
    color: var(--accent);
}

.collapsed .brand-text {
    display: none;
}

.sidebar-nav {
    padding: 12px 10px;
    flex: 1;
}

.sidebar-nav .nav-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.3);
    padding: 16px 14px 8px;
    white-space: nowrap;
}

.collapsed .nav-label {
    text-align: center;
    font-size: 0;
    padding: 12px 0;
}

.collapsed .nav-label::after {
    content: '•••';
    font-size: 10px;
    color: rgba(255, 255, 255, 0.2);
}

.sidebar-nav .nav-item {
    margin-bottom: 2px;
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    color: var(--text-sidebar);
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-fast);
    font-size: 13.5px;
    font-weight: 500;
    white-space: nowrap;
    position: relative;
}

.sidebar-nav .nav-link:hover {
    background: var(--bg-sidebar-hover);
    color: white;
}

.sidebar-nav .nav-link.active {
    background: var(--bg-sidebar-active);
    color: var(--accent-light);
}

.sidebar-nav .nav-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 24px;
    background: var(--accent);
    border-radius: 0 4px 4px 0;
}

.sidebar-nav .nav-link i {
    font-size: 18px;
    width: 22px;
    text-align: center;
    flex-shrink: 0;
    opacity: 0.85;
}

.sidebar-nav .nav-link.active i {
    opacity: 1;
}

.collapsed .nav-link span {
    display: none;
}

.collapsed .nav-link {
    justify-content: center;
    padding: 12px;
}

/* ===== Topbar ===== */
.topbar {
    position: fixed;
    top: 0;
    right: 0;
    left: var(--sidebar-width);
    height: var(--topbar-height);
    background: var(--bg-topbar);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 1030;
    transition: left var(--transition-normal);
}

.sidebar-collapsed .topbar {
    left: 72px;
}

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

.topbar-left .toggle-sidebar {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--bg-body);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    font-size: 18px;
}

.topbar-left .toggle-sidebar:hover {
    background: var(--primary);
    color: white;
}

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

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

.topbar-right .btn-theme {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    font-size: 16px;
}

.topbar-right .btn-theme:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.topbar-right .tenant-badge {
    background: var(--info-bg);
    color: var(--info);
    padding: 6px 14px;
    border-radius: var(--border-radius);
    font-size: 12px;
    font-weight: 600;
}

.topbar-right .user-dropdown .dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.topbar-right .user-dropdown .dropdown-toggle:hover {
    border-color: var(--accent);
}

.topbar-right .user-dropdown .dropdown-toggle::after {
    display: none;
}

.topbar-right .user-avatar {
    width: 32px;
    height: 32px;
    background: var(--primary);
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 13px;
}

/* ===== Stat Cards ===== */
.stat-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 24px;
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: transparent;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 4px;
}

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

.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 .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 16px;
}

.stat-card.accent .stat-icon {
    background: rgba(0, 188, 212, 0.12);
    color: var(--accent);
}

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

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

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

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

.stat-card .stat-value {
    font-size: 28px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 4px;
    letter-spacing: -0.5px;
}

.stat-card .stat-label {
    font-size: 12.5px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ===== Cards ===== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    transition: box-shadow var(--transition-normal), transform var(--transition-normal);
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(0,0,0,0.04);
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header h5, .card-header h6, .card-header .card-title {
    font-weight: 600;
    font-size: 15px;
    margin: 0;
    color: var(--text-primary);
}

.card-body {
    padding: 20px 24px;
}

/* ===== Tables ===== */
.table {
    color: var(--text-primary);
    margin-bottom: 0;
}

.table thead th {
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-secondary);
    border-bottom: 2px solid var(--border-color);
    padding: 12px 16px;
    white-space: nowrap;
}

.table tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
    font-size: 13.5px;
}

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

.table tbody tr:hover {
    background: rgba(0, 188, 212, 0.03);
}

[data-theme="dark"] .table tbody tr:hover {
    background: rgba(0, 188, 212, 0.06);
}

/* ===== Buttons ===== */
.btn {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 13.5px;
    border-radius: var(--border-radius-sm);
    padding: 10px 20px;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    letter-spacing: 0.02em;
    border: none;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    color: white;
}

.btn-accent {
    background: var(--accent);
    color: white;
}

.btn-accent:hover {
    background: var(--accent-dark);
    color: white;
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: #047857;
    color: white;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

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

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

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

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

.btn-icon {
    width: 34px;
    height: 34px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius-sm);
}

.btn-icon.btn-sm {
    width: 28px;
    height: 28px;
}

/* ===== Forms ===== */
.form-control, .form-select {
    font-family: 'Inter', sans-serif;
    font-size: 13.5px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 10px 14px;
    color: var(--text-primary);
    background: var(--bg-card);
    transition: all var(--transition-fast);
}

.form-control:focus, .form-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0, 188, 212, 0.15);
}

.form-label {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    letter-spacing: 0.2px;
}

/* ===== Badges ===== */
.badge {
    font-weight: 600;
    font-size: 11px;
    letter-spacing: 0.3px;
    padding: 4px 10px;
    border-radius: 6px;
}

.badge.bg-online, .badge-online {
    background: var(--success-bg);
    color: var(--success);
}

.badge.bg-offline, .badge-offline {
    background: var(--danger-bg);
    color: var(--danger);
}

.badge-role-superadmin {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: white;
}

.badge-role-admin {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
}

.badge-role-kasir {
    background: var(--warning-bg);
    color: #f57f17;
}

/* ===== Status Dot ===== */
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.online {
    background: var(--success);
    box-shadow: 0 0 8px rgba(0, 200, 83, 0.5);
    animation: pulse-green 2s infinite;
}

.status-dot.offline {
    background: var(--danger);
}

@keyframes pulse-green {
    0%, 100% { box-shadow: 0 0 4px rgba(0, 200, 83, 0.4); }
    50% { box-shadow: 0 0 12px rgba(0, 200, 83, 0.7); }
}

/* ===== Toast Notification ===== */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

.toast-custom {
    min-width: 320px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    animation: slideInRight 0.3s ease;
    border-left: 4px solid var(--accent);
}

.toast-custom.toast-success {
    border-left-color: var(--success);
}

.toast-custom.toast-error {
    border-left-color: var(--danger);
}

.toast-custom.toast-warning {
    border-left-color: var(--warning);
}

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

/* ===== Loading Spinner ===== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.loading-overlay.show {
    opacity: 1;
    visibility: visible;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(0, 188, 212, 0.2);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ===== Login Page ===== */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    background: var(--bg-body);
    position: relative;
}

.login-card {
    width: 100%;
    max-width: 400px;
    margin: auto;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 1;
}

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

.login-logo {
    text-align: center;
    margin-bottom: 36px;
}

.login-logo .logo-icon {
    width: 48px;
    height: 48px;
    background: var(--primary);
    border-radius: var(--border-radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    margin-bottom: 16px;
}

.login-logo h1 {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.5px;
}

.login-logo h1 span {
    color: var(--accent);
}

.login-logo p {
    color: var(--text-secondary);
    font-size: 13px;
    margin-top: 4px;
}

/* ===== Voucher Print Styles ===== */
.voucher-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px;
    justify-content: center;
}

.voucher-item {
    break-inside: avoid;
    page-break-inside: avoid;
}

.voucher-grid-a4 {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px;
    justify-content: center;
}

.voucher-card {
    border: 1.5px dashed var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 16px;
    text-align: center;
    break-inside: avoid;
    page-break-inside: avoid;
}

.voucher-card .voucher-header {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.voucher-card .voucher-body p {
    margin: 4px 0;
    font-size: 13px;
}

.voucher-card .voucher-footer {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid var(--border-color);
    font-size: 11px;
    color: var(--text-muted);
}

.voucher-thermal {
    width: 58mm;
    padding: 5mm;
    font-size: 11px;
    break-inside: avoid;
    page-break-inside: avoid;
}

@media print {
    .voucher-wrap {
        gap: 6px;
        padding: 0;
    }
    .voucher-item {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}

/* ===== DataTables Override ===== */
.card-body.p-0 .dataTables_wrapper {
    padding-top: 16px;
    padding-bottom: 16px;
}

.card-body.p-0 .dataTables_wrapper > .row {
    margin-left: 0;
    margin-right: 0;
    padding-left: 14px;
    padding-right: 14px;
}

.card-body.p-0 .table td:first-child, 
.card-body.p-0 .table th:first-child {
    padding-left: 24px !important;
}

.card-body.p-0 .table td:last-child, 
.card-body.p-0 .table th:last-child {
    padding-right: 24px !important;
}

.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 6px 12px;
    color: var(--text-primary);
    background: var(--bg-card);
}

.dataTables_wrapper .dataTables_filter input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0, 188, 212, 0.15);
    outline: none;
}

.dataTables_wrapper .dataTables_info {
    font-size: 12.5px;
    color: var(--text-secondary);
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: var(--border-radius-sm) !important;
    border: none !important;
    font-size: 13px !important;
    padding: 6px 12px !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: var(--primary) !important;
    color: white !important;
    border: none !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: var(--bg-body) !important;
    color: var(--text-primary) !important;
    border: none !important;
}

/* ===== Modal Overrides ===== */
.modal-content {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-xl);
    background: var(--bg-card);
}

/* Improve Table Responsiveness */
.table-responsive .table td,
.table-responsive .table th {
    white-space: nowrap;
}

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

.modal-title {
    font-weight: 700;
    font-size: 16px;
}

.modal-body {
    padding: 24px;
}

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

/* ===== Responsive ===== */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-width) !important;
    }
    
    .sidebar.mobile-show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0 !important;
    }
    
    .topbar {
        left: 0 !important;
    }
    
    .page-content {
        padding: 16px;
        padding-top: calc(var(--topbar-height) + 16px);
    }
    
    .stat-card .stat-value {
        font-size: 22px;
    }
    
    .voucher-grid-a4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Overlay saat sidebar terbuka di mobile */
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1039;
    }
    
    .sidebar-overlay.show {
        display: block;
    }

    /* ===== Responsive: Hide heavy columns on mobile ===== */
    /* Profile: keep only #, Nama, Rate Limit, Aksi — hide Session Timeout, Shared Users, Address Pool, Paket Harga */
    #profilesTable th:nth-child(4), #profilesTable td:nth-child(4),
    #profilesTable th:nth-child(5), #profilesTable td:nth-child(5),
    #profilesTable th:nth-child(6), #profilesTable td:nth-child(6),
    #profilesTable th:nth-child(7), #profilesTable td:nth-child(7) { display: none; }
    /* Also fix DataTable wrapper overflow */
    .dataTables_wrapper { overflow-x: hidden; }
    .dataTables_scrollBody { overflow-x: auto; }
    table.dataTable { width: 100% !important; }

    /* Paket Harga table: hide Limit Data (4), Deskripsi (6) — keep #, Nama, Durasi, Harga, Status, Aksi */
    #hargaTable th:nth-child(4), #hargaTable td:nth-child(4),
    #hargaTable th:nth-child(6), #hargaTable td:nth-child(6) { display: none; }

    /* IP Binding: hide Hostname, Comment */
    #bindingsTable th:nth-child(4), #bindingsTable td:nth-child(4),
    #bindingsTable th:nth-child(6), #bindingsTable td:nth-child(6) { display: none; }

    /* Active Users: hide MAC, Download, Upload, Comment */
    #activeTable th:nth-child(3), #activeTable td:nth-child(3),
    #activeTable th:nth-child(5), #activeTable td:nth-child(5),
    #activeTable th:nth-child(6), #activeTable td:nth-child(6),
    #activeTable th:nth-child(7), #activeTable td:nth-child(7) { display: none; }

    /* Host Monitor: hide Hostname, MAC, Download, Upload */
    #hostsTable th:nth-child(2), #hostsTable td:nth-child(2),
    #hostsTable th:nth-child(4), #hostsTable td:nth-child(4),
    #hostsTable th:nth-child(7), #hostsTable td:nth-child(7),
    #hostsTable th:nth-child(8), #hostsTable td:nth-child(8) { display: none; }

    /* Log: hide Paket, Harga, Pesan */
    #logTable th:nth-child(5), #logTable td:nth-child(5),
    #logTable th:nth-child(6), #logTable td:nth-child(6),
    #logTable th:nth-child(8), #logTable td:nth-child(8) { display: none; }

    /* Filter bars collapse to vertical */
    .filter-bar {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
    }
    .filter-bar .form-select,
    .filter-bar input[type="text"],
    .filter-bar .btn { width: 100% !important; }
}

@media (max-width: 576px) {
    .login-card {
        margin: 20px;
        padding: 32px 24px;
    }
    
    .voucher-grid-a4 {
        grid-template-columns: 1fr;
    }
    
    .topbar-right .tenant-badge {
        display: none;
    }
}

/* ===== Print Styles ===== */
@media print {
    .sidebar, .topbar, .no-print {
        display: none !important;
    }
    
    .main-content {
        margin: 0 !important;
    }
    
    .page-content {
        padding: 0 !important;
    }
    
    .voucher-grid-a4 {
        padding: 0;
    }
    
    .voucher-card {
        border: 1px dashed #ccc;
        break-inside: avoid;
    }
}

/* ===== Utility Animations ===== */
.fade-in {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.slide-up {
    animation: slideUp 0.3s ease;
}

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

/* ===== Premium Additions ===== */
.form-control, .form-select {
    padding: 10px 16px;
    font-size: 14px;
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-color);
    background-color: var(--bg-card);
    color: var(--text-primary);
    transition: all var(--transition-fast);
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.02);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
    background-color: var(--bg-card);
    outline: none;
}

.dropdown-menu {
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    background-color: var(--bg-card);
    padding: 8px;
}

.dropdown-item {
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 13.5px;
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

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

.table-responsive {
    border-radius: var(--border-radius);
    overflow: hidden;
}
