:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-glow: rgba(99, 102, 241, 0.3);
    --secondary: #0ea5e9;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --bg-dark: #020617;
    --sidebar-bg: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --border-color: rgba(255, 255, 255, 0.08);
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --radius-lg: 1rem;
    --radius-md: 0.6rem;
    --font-main: 'Outfit', sans-serif;
    --glass: backdrop-filter: blur(12px) saturate(180%);
    
    /* Spacing System */
    --space-xs: 0.35rem;
    --space-sm: 0.75rem;
    --space-md: 1.15rem;
    --space-lg: 1.5rem;
    --space-xl: 2.25rem;
}

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

body {
    font-family: var(--font-main);
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow: hidden;
    height: 100vh;
    position: relative;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

.glass {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    --glass;
}

/* Spacing Utilities */
.mt-1 { margin-top: var(--space-xs); }
.mt-2 { margin-top: var(--space-sm); }
.mt-3 { margin-top: var(--space-md); }
.mt-4 { margin-top: var(--space-lg); }
.mt-6 { margin-top: var(--space-xl); }

.mb-1 { margin-bottom: var(--space-xs); }
.mb-2 { margin-bottom: var(--space-sm); }
.mb-3 { margin-bottom: var(--space-md); }
.mb-4 { margin-bottom: var(--space-lg); }
.mb-6 { margin-bottom: var(--space-xl); }
.mb-8 { margin-bottom: 4rem; }
.mb-10 { margin-bottom: 5rem; }
.mb-12 { margin-bottom: 6rem; }
.mb-14 { margin-bottom: 7rem; }
.mb-16 { margin-bottom: 8rem; }
.mb-20 { margin-bottom: 10rem; }

.clickable { cursor: pointer; transition: all 0.3s ease; }
.clickable:hover { transform: translateY(-5px); filter: brightness(1.1); box-shadow: 0 10px 20px rgba(0,0,0,0.3); }
.clickable:active { transform: translateY(-2px); }

.ml-auto { margin-left: auto; }
.mr-auto { margin-right: auto; }

.p-2 { padding: var(--space-sm); }
.p-4 { padding: var(--space-lg); }
.p-6 { padding: var(--space-xl); }

.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center { display: flex; justify-content: center; align-items: center; }
.gap-1 { gap: var(--space-xs); }
.gap-2 { gap: var(--space-sm); }
.gap-4 { gap: var(--space-lg); }

#app {
    display: flex;
    height: 100vh;
}

.screen {
    display: none;
    width: 100%;
    height: 100%;
}

.screen.active {
    display: flex;
}

/* Sidebar Premium */
.sidebar {
    width: 280px;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1001;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

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

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-bottom: 2rem;
}

.brand-logo {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px var(--primary-glow);
}

.brand-logo i {
    color: white;
    width: 22px;
}

#header-company-name {
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.025em;
}

.nav-item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    gap: 0.85rem;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-md);
    color: var(--text-muted);
    text-decoration: none;
    transition: 0.3s;
    margin-bottom: 0.25rem;
    cursor: pointer;
    font-weight: 500;
}

.nav-item span {
    flex: 1;
    text-align: left;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}

.nav-item.active {
    background: linear-gradient(90deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.nav-group {
    margin-bottom: 0.5rem;
}

.nav-toggle {
    justify-content: flex-start;
}

.nav-toggle span {
    flex: 1;
    text-align: left;
}

.nav-toggle .chevron {
    margin-left: auto;
    flex-shrink: 0;
}

.sidebar-user {
    margin-top: auto;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.user-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem;
}

.user-avatar {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.user-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.user-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 0.05em;
}

.btn-logout-full {
    width: 100%;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.15);
    color: #ef4444;
    padding: 0.8rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: 0.3s;
    font-weight: 800;
    font-size: 0.7rem;
    letter-spacing: 0.05em;
}

.btn-logout-full:hover {
    background: #ef4444;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(239, 68, 68, 0.3);
}

.btn-logout-full i {
    width: 16px;
    height: 16px;
}

.nav-group.collapsed .nav-submenu-wrapper {
    display: none;
}

.nav-group.collapsed .chevron {
    transform: rotate(-90deg);
}

.nav-submenu {
    padding-left: 1.5rem;
    margin-top: 0.25rem;
    border-left: 1px solid var(--border-color);
    margin-left: 1rem;
}

.nav-submenu-item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    gap: 0.75rem;
    padding: 0.65rem 1rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: 0.2s;
    border-radius: var(--radius-md);
}

.nav-submenu-item span {
    text-align: left;
}

.nav-submenu-item:hover,
.nav-submenu-item.active {
    color: var(--primary);
    background: rgba(99, 102, 241, 0.08);
}

/* Main Content Area */
.content {
    flex: 1;
    overflow-y: auto;
    padding: 3rem 4rem;
    background:
        radial-gradient(ellipse at top right, rgba(99, 102, 241, 0.07) 0%, transparent 55%),
        radial-gradient(ellipse at bottom left, rgba(16, 185, 129, 0.04) 0%, transparent 50%);
    transition: all 0.3s ease;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.top-bar h2 {
    font-size: 1.85rem;
    font-weight: 800;
    background: linear-gradient(135deg, #f1f5f9 30%, #94a3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.03em;
}

/* Entry animations for dashboard cards */
@keyframes fadeSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.dashboard-grid .stat-card:nth-child(1) { animation: fadeSlideUp 0.5s ease both; }
.dashboard-grid .stat-card:nth-child(2) { animation: fadeSlideUp 0.5s 0.1s ease both; }
.dashboard-grid .stat-card:nth-child(3) { animation: fadeSlideUp 0.5s 0.2s ease both; }

.monitoring-grid .monitoring-card:nth-child(1) { animation: fadeSlideUp 0.5s 0.3s ease both; }
.monitoring-grid .monitoring-card:nth-child(2) { animation: fadeSlideUp 0.5s 0.4s ease both; }

/* Dashboard Stat Cards */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
    gap: 1rem;
    padding: 0.75rem;
    overflow-y: auto;
    flex: 1;
}

/* =========================================
   PREMIUM DASHBOARD STAT CARDS
   ========================================= */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.stat-card {
    padding: 1.75rem 2rem;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(255,255,255,0.07);
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.25);
}

/* Gradient accent bar on left edge */
.stat-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    border-radius: 20px 0 0 20px;
    background: linear-gradient(180deg, var(--accent-top, #10b981), var(--accent-bottom, #059669));
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Ambient glow in background */
.stat-card::after {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--accent-glow, rgba(16,185,129,0.12)), transparent 70%);
    pointer-events: none;
    transition: all 0.4s ease;
}

.stat-card:hover {
    transform: translateY(-6px);
    border-color: rgba(255,255,255,0.14);
    box-shadow: 0 20px 50px rgba(0,0,0,0.35), 0 0 0 1px rgba(255,255,255,0.05);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-card:hover::after {
    width: 160px;
    height: 160px;
    top: -60px;
    right: -60px;
}

/* Stat card color variants */
.stat-card.card-sales { --accent-top: #10b981; --accent-bottom: #059669; --accent-glow: rgba(16,185,129,0.15); }
.stat-card.card-sales:hover { border-color: rgba(16,185,129,0.25); }

.stat-card.card-purchases { --accent-top: #0ea5e9; --accent-bottom: #0284c7; --accent-glow: rgba(14,165,233,0.15); }
.stat-card.card-purchases:hover { border-color: rgba(14,165,233,0.25); }

.stat-card.card-products { --accent-top: #6366f1; --accent-bottom: #4f46e5; --accent-glow: rgba(99,102,241,0.15); }
.stat-card.card-products:hover { border-color: rgba(99,102,241,0.25); }

/* Stat Icon — Premium pill */
.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    transition: transform 0.3s ease;
}

.stat-card:hover .stat-icon {
    transform: scale(1.1) rotate(-3deg);
}

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

.stat-icon.sales {
    background: linear-gradient(135deg, rgba(16,185,129,0.2), rgba(16,185,129,0.05));
    color: #34d399;
    border: 1px solid rgba(16,185,129,0.2);
    box-shadow: 0 4px 16px rgba(16,185,129,0.15);
}

.stat-icon.purchases {
    background: linear-gradient(135deg, rgba(14,165,233,0.2), rgba(14,165,233,0.05));
    color: #38bdf8;
    border: 1px solid rgba(14,165,233,0.2);
    box-shadow: 0 4px 16px rgba(14,165,233,0.15);
}

.stat-icon.info {
    background: linear-gradient(135deg, rgba(14,165,233,0.2), rgba(14,165,233,0.05));
    color: #38bdf8;
    border: 1px solid rgba(14,165,233,0.2);
    box-shadow: 0 4px 16px rgba(14,165,233,0.15);
}

.stat-icon.products {
    background: linear-gradient(135deg, rgba(99,102,241,0.2), rgba(99,102,241,0.05));
    color: #818cf8;
    border: 1px solid rgba(99,102,241,0.2);
    box-shadow: 0 4px 16px rgba(99,102,241,0.15);
}

/* Stat Info Text */
.stat-info {
    flex: 1;
    min-width: 0;
}

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

.stat-info .value {
    font-size: 1.7rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1;
    background: linear-gradient(135deg, #f1f5f9, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Trend pill under stat value */
.stat-trend {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.72rem;
    font-weight: 700;
    margin-top: 0.4rem;
    padding: 0.2rem 0.55rem;
    border-radius: 100px;
    letter-spacing: 0.03em;
}
.stat-trend.up { background: rgba(16,185,129,0.12); color: #34d399; }
.stat-trend.neutral { background: rgba(148,163,184,0.12); color: #94a3b8; }

/* Table Premium */
.section-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: var(--space-lg);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.action-bar {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    text-align: left;
    padding: 1rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border-color);
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.95rem;
}

.data-table tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* Buttons & Inputs */
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 12px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px var(--primary-glow);
    filter: brightness(1.1);
}

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

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: 0.3s;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

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

.input-wrapper i {
    position: absolute;
    left: 1rem;
    color: var(--text-muted);
    width: 18px;
}

.input-wrapper input {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-main);
    padding: 0.75rem 1rem 0.75rem 2.75rem;
    width: 100%;
    outline: none;
    transition: 0.3s;
}

.input-wrapper input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

input,
select,
textarea {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-main);
    padding: 0.75rem 1rem;
    width: 100%;
    outline: none;
    font-family: inherit;
    transition: 0.3s;
}

select option {
    background-color: #0f172a;
    color: #f1f5f9;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
}

/* Modal Premium */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(2, 6, 23, 0.8);
    --glass;
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: 0.3s;
}

.modal.hidden {
    display: none;
    pointer-events: none;
    opacity: 0;
}

.modal-content {
    width: 95%;
    max-width: 650px;
    background: #0f172a;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: modalSlide 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

@keyframes modalSlide {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }

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

.modal-content form {
    overflow-y: auto;
    padding-right: 0.5rem;
    margin-right: -0.5rem;
}

.modal-content.wide {
    max-width: 1200px;
}

/* Compact Form Grid */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.monitor-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

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

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

@media (max-width: 768px) {
    .monitor-stats.monitor-grid {
        grid-template-columns: 1fr;
    }
    
    .monitor-grid {
        grid-template-columns: 1fr;
    }
}

.form-group {
    margin-bottom: 0.75rem;
}

.form-group label {
    margin-bottom: 0.25rem;
    font-size: 0.8rem;
}

input,
select,
textarea {
    padding: 0.6rem 0.85rem;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr !important;
    }

    .modal-content {
        padding: 1.25rem;
    }
}

.hidden {
    display: none !important;
}

.badge-sp {
    background: var(--primary);
    color: white;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.65rem;
    font-weight: 700;
    margin-left: 6px;
    box-shadow: 0 2px 5px var(--primary-glow);
}

.badge-tp {
    background: var(--warning);
    color: white;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.65rem;
    font-weight: 700;
    margin-left: 6px;
    box-shadow: 0 2px 5px rgba(245, 158, 11, 0.3);
}

/* Payment Method Buttons */
.payment-methods-grid .pay-method-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 0.6rem;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.payment-methods-grid .pay-method-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
}

.payment-methods-grid .pay-method-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 4px 12px var(--primary-glow);
}

/* Fullscreen Modal */
.modal.fullscreen-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 100000;
    background: #020617;
    padding: 0 !important;
}

.fullscreen-modal .fullscreen-content {
    width: 100%;
    height: 100%;
    animation: slideUp 0.4s cubic-bezier(0, 0.55, 0.45, 1);
}

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

/* Elegant Cards */
.elegant-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--primary) !important;
    background: rgba(255, 255, 255, 0.05) !important;
    box-shadow: 0 15px 30px rgba(0,0,0,0.3);
}

.cart-item-modern {
    transition: 0.3s;
}

.cart-item-modern:hover {
    background: rgba(255, 255, 255, 0.06) !important;
    border-color: var(--primary-glow) !important;
}

.ci-qty-box {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.ci-qty-box button {
    background: transparent;
    border: none;
    color: var(--text-main);
    width: 30px;
    height: 100%;
    cursor: pointer;
    transition: 0.2s;
}

.ci-qty-box button:hover {
    background: rgba(255, 255, 255, 0.1);
}

.ci-qty-box input {
    background: transparent;
    border: none;
    color: var(--text-main);
    text-align: center;
    font-weight: 700;
}

.ci-qty-box input::-webkit-inner-spin-button {
    display: none;
}

/* Scrollbar Thin for Modals */
.modal-content div::-webkit-scrollbar {
    width: 4px;
}
.modal-content div::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

/* POS Layout */
.pos-container {
    display: grid;
    grid-template-columns: 1fr 450px;
    gap: 1.5rem;
    height: calc(100vh - 140px);
}

@media (max-width: 1200px) {
    .pos-container {
        grid-template-columns: 1fr 400px;
    }
}

@media (max-width: 1024px) {
    .pos-container {
        grid-template-columns: 1fr;
        height: auto;
    }
    
    .pos-sidebar {
        border-left: none !important;
        border-top: 1px solid rgba(255,255,255,0.1);
        height: auto !important;
    }
    
    .pos-main {
        height: 60vh !important;
    }
}

.pos-main {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.search-bar-pos {
    padding: 0.5rem;
    border-radius: 16px;
    margin-bottom: 1rem;
}

.pos-sidebar {
    display: flex;
    flex-direction: column;
    padding: 0.75rem;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.8);
    height: 100%;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    scrollbar-width: thin;
}

.sidebar-header-pos {
    flex-shrink: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 1rem;
    padding-right: 8px;
    scroll-behavior: smooth;
}

.cart-items::-webkit-scrollbar {
    width: 4px;
}

.cart-items::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.empty-state-cart {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    opacity: 0.5;
}

.empty-state-cart i {
    width: 60px;
    height: 60px;
    margin-bottom: 1rem;
}

.cart-item-modern {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.4rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.cart-item-modern:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: var(--primary);
    transform: translateX(4px);
}

.ci-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.ci-name {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-main);
    letter-spacing: -0.01em;
}

.ci-price {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.ci-price input {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    padding: 2px 6px;
    border-radius: 6px;
    width: 90px;
    font-weight: 700;
    text-align: right;
    transition: 0.3s;
}

.ci-price input:focus {
    border-color: var(--primary);
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 10px var(--primary-glow);
}

.ci-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.ci-unit-select select, .ci-map-select select {
    padding: 0.25rem 0.4rem;
    font-size: 0.7rem;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255,255,255,0.05);
}

.ci-qty-box {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 1px;
}

.ci-qty-box button {
    width: 22px;
    height: 22px;
    border: none;
    background: transparent;
    color: white;
    cursor: pointer;
    border-radius: 6px;
}

.ci-qty-box button:hover {
    background: var(--primary);
}

.ci-qty-box input {
    width: 50px;
    text-align: center;
    border: none;
    background: transparent;
    font-weight: 700;
    font-size: 0.8rem;
    -moz-appearance: textfield;
}

.ci-qty-box input::-webkit-outer-spin-button,
.ci-qty-box input::-webkit-inner-spin-button,
.ci-price-edit input::-webkit-outer-spin-button,
.ci-price-edit input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.save-sp-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
    color: var(--primary);
    cursor: pointer;
    background: rgba(99, 102, 241, 0.1);
    padding: 2px 8px;
    border-radius: 20px;
    border: 1px solid rgba(99, 102, 241, 0.2);
    margin-left: 8px;
    transition: 0.3s;
}

.save-sp-toggle:hover {
    background: var(--primary);
    color: white;
}

.save-sp-toggle input {
    width: 12px !important;
    height: 12px !important;
    margin: 0 !important;
}

.save-sp-toggle i {
    width: 14px;
    height: 14px;
}

.ci-price-edit {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(0, 0, 0, 0.2);
    padding: 2px 6px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.ci-price-edit input {
    width: 95px;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-weight: 700;
    font-size: 0.8rem;
    text-align: right;
    padding: 0 4px;
}

.ci-price-edit input:focus {
    box-shadow: none;
    color: var(--primary);
}

.ci-subtotal {
    margin-left: auto;
    font-weight: 700;
    color: var(--primary);
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-remove-item {
    background: rgba(239, 68, 68, 0.1);
    border: none;
    color: #ef4444;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
}

.btn-remove-item:hover {
    background: #ef4444;
    color: white;
}

.cart-summary-box {
    flex-shrink: 0;
    border-top: 1px dashed var(--border-color);
    padding-top: 1rem;
    background: transparent;
}

.summary-line {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center;
    margin-bottom: 0.25rem;
    width: 100%;
}

.summary-line .label {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
}

.summary-line .val {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-main);
}

.summary-line.grand-total .label {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
}

.summary-line.grand-total .val {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
}

.val.primary {
    color: var(--primary);
    text-shadow: 0 0 20px var(--primary-glow);
}

.discount-section {
    display: flex;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    padding: 0.4rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    align-items: center;
}

.discount-toggle {
    display: flex;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 2px;
    flex-shrink: 0;
}

.d-tab {
    border: none;
    background: transparent;
    color: var(--text-muted);
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.75rem;
}

.d-tab.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 2px 8px var(--primary-glow);
}

#discount-input {
    background: transparent;
    border: none;
    text-align: right;
    font-weight: 700;
    font-size: 1rem;
    padding: 0 0.5rem;
    color: var(--primary);
    width: 100%;
}

#discount-input:focus {
    outline: none;
}

.product-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.75rem;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    height: 190px;
    gap: 0.4rem;
    position: relative;
    overflow: visible; /* changed from hidden to allow zoomed image/elements to overflow nicely if needed, or keep hidden if we want clean boundaries. Let's keep it visible so it scales nicely, or hidden if the image shouldn't clip. Actually, let's keep overflow: hidden but let the whole card scale. If card scales, overflow: hidden is fine. Let's keep overflow: hidden. */
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-4px) scale(1.25);
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.05);
    z-index: 10;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.pc-image {
    width: 100%;
    height: 85px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.pc-image i {
    width: 40px;
    height: 40px;
    opacity: 0.3;
}

.pc-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    justify-content: space-between;
}

.pc-name {
    font-weight: 700;
    font-size: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pc-stock {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.pc-price {
    font-weight: 800;
    color: var(--primary);
    font-size: 0.95rem;
}

/* Status Tags */
.status-tag {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-tag.info {
    background: rgba(14, 165, 233, 0.15);
    color: #38bdf8;
}

.status-tag.success {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
}

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

.p-thumb {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.p-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-upload-box {
    width: 100%;
    height: 100%;
    min-height: 180px;
    border: 2px dashed var(--border-color);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.3s;
    background: rgba(15, 23, 42, 0.3);
}

.image-upload-box:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.image-preview {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

/* Utilities */
.text-right {
    text-align: right;
}

.text-center {
    text-align: center;
}

.mt-4 {
    margin-top: 1rem;
}

.mt-6 {
    margin-top: 1.5rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.btn-icon {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
}

.btn-icon.delete:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.w-100 {
    width: 100%;
}

.loading {
    padding: 3rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 1.1rem;
}

.error-msg {
    padding: 2rem;
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border-radius: 12px;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* User Profile in Sidebar */
.sidebar-user {
    margin-top: auto;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    flex-shrink: 0;
}

.user-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    padding: 0.75rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: 0.3s;
}

.user-card:hover {
    background: rgba(255, 255, 255, 0.06);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-name {
    display: block;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.user-role {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.logout-btn {
    color: var(--danger);
    opacity: 0.6;
    transition: 0.3s;
    cursor: pointer;
    width: 18px;
    height: 18px;
}

.logout-btn:hover {
    opacity: 1;
    transform: translateX(2px);
}

/* Transaction Toggle */
.transaction-type-toggle {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    padding: 5px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.type-btn {
    flex: 1;
    padding: 10px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-weight: 700;
    cursor: pointer;
    border-radius: 8px;
    transition: 0.3s;
    font-size: 0.85rem;
}

.type-btn.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.type-btn#type-piutang.active {
    background: var(--danger);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.page-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 8px 20px var(--primary-glow);
}

.page-btn:disabled {
    opacity: 0.2;
    cursor: not-allowed;
    filter: grayscale(1);
}

.page-btn i {
    width: 18px;
    height: 18px;
}

.page-dots {
    color: var(--text-muted);
    padding: 0 4px;
    font-weight: 800;
    letter-spacing: 2px;
}

/* Professional Table & Dashboard Styles */
.table-modern {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
}

.table-modern th {
    padding: 1.25rem 1rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    border-bottom: 2px solid var(--border-color);
}

.table-modern tbody tr {
    background: rgba(255, 255, 255, 0.02);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.table-modern tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: scale(1.002) translateX(4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.table-modern td {
    padding: 1.25rem 1rem;
    vertical-align: middle;
}

.table-modern td:first-child { border-radius: 12px 0 0 12px; }
.table-modern td:last-child { border-radius: 0 12px 12px 0; }

.status-tag {
    padding: 0.4rem 0.85rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.status-tag.success { background: rgba(16, 185, 129, 0.1); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.2); }
.status-tag.warning { background: rgba(245, 158, 11, 0.1); color: #f59e0b; border: 1px solid rgba(245, 158, 11, 0.2); }
.status-tag.danger { background: rgba(239, 68, 68, 0.1); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.2); }
.status-tag.info { background: rgba(14, 165, 233, 0.1); color: #0ea5e9; border: 1px solid rgba(14, 165, 233, 0.2); }
.status-tag.paid { background: rgba(16, 185, 129, 0.1); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.2); }
.status-tag.primary { background: rgba(99, 102, 241, 0.1); color: #6366f1; border: 1px solid rgba(99, 102, 241, 0.2); }
.status-tag.secondary { background: rgba(148, 163, 184, 0.1); color: #94a3b8; border: 1px solid rgba(148, 163, 184, 0.2); }

/* Bank System Specific */
.bank-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.bank-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: 0.3s;
}

.bank-card:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
}

.btn-icon.delete:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-muted { color: var(--text-muted); }
.text-right { text-align: right; }
.text-center { text-align: center; }
.w-100 { width: 100%; }
.font-bold { font-weight: 700; }
.primary { color: var(--primary); }

/* Clickable cards */
.clickable {
    cursor: pointer;
    transition: all 0.3s ease;
}
.clickable:hover {
    transform: translateY(-6px);
    border-color: var(--primary) !important;
    box-shadow: 0 12px 30px rgba(99,102,241,0.2);
}

/* Stat Icon */
.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}
.stat-icon svg { width: 28px; height: 28px; }

/* Border color variants */
.border-success { border-color: rgba(34, 197, 94, 0.4) !important; }
.border-warning { border-color: rgba(234, 179, 8, 0.4) !important; }
.border-danger  { border-color: rgba(239, 68, 68, 0.4) !important; }
.border-primary { border-color: rgba(99, 102, 241, 0.4) !important; }

/* Report Date Filter Bar */
.report-filter-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}
.report-filter-bar label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
    white-space: nowrap;
}
.report-filter-bar input[type="date"] {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 0.5rem 1rem;
    border-radius: 10px;
    font-size: 0.9rem;
    cursor: pointer;
}
.report-filter-bar input[type="date"]:focus {
    outline: none;
    border-color: var(--primary);
}

/* Print styles */
@media print {
    .sidebar, .mobile-header, .top-bar, .action-bar, .report-filter-bar button,
    .btn-primary, .btn-secondary { display: none !important; }
    .content { padding: 0 !important; overflow: visible !important; height: auto !important; }
    body { background: #fff !important; color: #000 !important; }
    .section-card, .stat-card { background: #fff !important; border: 1px solid #ccc !important; color: #000 !important; box-shadow: none !important; }
    #app { display: block !important; }
    .data-table th, .data-table td { color: #000 !important; }
}

.empty-state {
    padding: 4rem 2rem;
    text-align: center;
    color: var(--text-muted);
    background: rgba(255,255,255,0.02);
    border-radius: var(--radius-lg);
    border: 2px dashed var(--border-color);
}

.badge.glass-danger { background: rgba(239, 68, 68, 0.1); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.1); }
.badge.glass-info { background: rgba(14, 165, 233, 0.1); color: #0ea5e9; border: 1px solid rgba(14, 165, 233, 0.1); }

.progress-sleek {
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 100px;
    overflow: hidden;
    width: 120px;
    margin-left: auto;
}

.progress-bar-gradient {
    height: 100%;
    border-radius: 100px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: width 1s ease-in-out;
}

/* Mobile Header & Toggle */
.mobile-header {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: var(--sidebar-bg);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.menu-toggle {
    background: none;
    border: none;
    color: var(--text-main);
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
}

/* Responsive Tables */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Media Queries */
@media (max-width: 1024px) {
    .content {
        padding: 2rem;
    }
    
    .dashboard-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    #app {
        flex-direction: column;
    }

    .sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        bottom: 0;
        height: 100vh;
        width: 280px;
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        transform: translateX(0);
    }

    .sidebar.active {
        transform: translateX(280px);
    }

    .mobile-header {
        display: flex;
    }

    .content {
        padding: 1.5rem;
        height: calc(100vh - 65px); /* Adjusted for mobile header */
    }

    .top-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        margin-bottom: 1.5rem;
    }

    .top-bar h2 {
        font-size: 1.5rem;
    }

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

    .stat-card {
        padding: 1.25rem;
    }

    .action-bar {
        flex-direction: column;
        gap: 0.75rem;
        align-items: stretch !important;
    }

    .search-wrapper {
        width: 100% !important;
        margin-left: 0 !important;
    }

    /* POS Mobile Adjustments */
    .pos-container {
        grid-template-columns: 1fr;
        height: auto;
        overflow: visible;
    }

    .pos-sidebar {
        height: auto;
        min-height: 400px;
        margin-top: 1.5rem;
    }

    .pos-products-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }

    .product-card {
        height: 220px;
    }

    .p-img-wrapper {
        height: 120px;
    }

    /* Modal Mobile Adjustments */
    .modal-content {
        padding: 1.5rem 1.25rem;
        width: 95%;
        margin: 10px;
    }

    .modal-content.wide {
        width: 95%;
    }

    .form-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }

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

    .unit-row-item {
        grid-template-columns: 1fr 1fr !important;
        border-bottom: 1px solid var(--border-color);
        padding-bottom: 1rem;
    }
    
    .unit-row-item > div:last-of-type {
        grid-column: span 2;
    }

    .unit-row-item button.delete {
        grid-column: span 2;
        width: 100%;
        margin-top: 0.5rem;
        background: rgba(239, 68, 68, 0.1);
        color: var(--danger);
    }
    
    .sidebar-overlay.active {
        display: block;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    .content {
        padding: 1rem;
    }

    .top-bar h2 {
        font-size: 1.25rem;
    }

    .btn-primary, .btn-secondary {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }

    .stat-info .value {
        font-size: 1.25rem;
    }
}

/* =========================================
   PREMIUM DASHBOARD MONITORING SECTION
   ========================================= */
.monitoring-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.monitoring-card {
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255,255,255,0.07);
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    overflow: hidden;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.monitoring-card:hover {
    border-color: rgba(255,255,255,0.12);
    box-shadow: 0 16px 48px rgba(0,0,0,0.3);
}

/* Card header bar with subtle gradient */
.monitoring-card .card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255,255,255,0.02);
}

.monitoring-card .card-header h3 {
    font-size: 0.9rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}

.monitoring-card .card-header h3 svg,
.monitoring-card .card-header h3 i {
    width: 16px;
    height: 16px;
    color: var(--primary);
    opacity: 0.9;
}

/* Chart card body */
.chart-card .chart-container {
    padding: 1.25rem 1.5rem 1.5rem;
    flex: 1;
}

.chart-container {
    height: 280px;
    position: relative;
}

/* Table card body */
.table-card .table-responsive {
    padding: 0.5rem 0;
}

/* Premium Monitoring Table */
.monitoring-table {
    width: 100%;
    border-collapse: collapse;
}

.monitoring-table thead tr {
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.monitoring-table th {
    text-align: left;
    padding: 0.8rem 1.5rem;
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.monitoring-table tbody tr {
    border-bottom: 1px solid rgba(255,255,255,0.03);
    transition: background 0.2s ease;
}

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

.monitoring-table tbody tr:hover {
    background: rgba(255,255,255,0.04);
}

.monitoring-table td {
    padding: 0.9rem 1.5rem;
    font-size: 0.88rem;
    vertical-align: middle;
}

/* Mobile Responsive System */
.mobile-toggle-btn {
    display: none;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}
.mobile-toggle-btn:hover { background: rgba(255,255,255,0.1); }

.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(2, 6, 23, 0.7);
    backdrop-filter: blur(4px);
    z-index: 999;
}

@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 1000;
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 20px 0 50px rgba(0,0,0,0.5);
    }
    .sidebar.active {
        transform: translateX(0);
    }
    .content {
        margin-left: 0 !important;
        padding: 1rem !important;
        width: 100% !important;
        height: auto;
        overflow-y: auto;
    }
    .mobile-toggle-btn {
        display: flex;
    }
    .mobile-overlay.active {
        display: block;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }
    .monitoring-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
    }
    .top-bar {
        padding: 1rem !important;
        margin-bottom: 1.5rem !important;
    }
    #page-title {
        font-size: 1.2rem;
    }
}

/* SweetAlert2 Overrides */
.swal2-container {
    z-index: 1000001 !important;
}
.focus-highlight:focus {
    outline: 2px solid var(--primary) !important;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
    border-color: var(--primary) !important;
}

/* =========================================
   PHOTO ZOOM ON HOVER (Admin Table)
   ========================================= */
.user-photo-zoom {
    display: inline-block;
    position: relative;
    z-index: 1;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.25s ease,
                z-index 0s;
    cursor: zoom-in;
    border-radius: 10px;
}

.user-photo-zoom:hover {
    transform: scale(2.5);
    z-index: 100;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5),
                0 0 0 2px rgba(99, 102, 241, 0.6);
}

/* Pastikan td tidak clip overflow */
.data-table td {
    overflow: visible;
}

/* =========================================
   PREMIUM PAGINATION STYLING
   ========================================= */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    width: 100%;
}

.page-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    min-width: 38px;
    height: 38px;
    padding: 0 0.75rem;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none;
}

.page-btn:hover:not(:disabled) {
    background: rgba(99, 102, 241, 0.1);
    color: var(--text-main);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.page-btn:active:not(:disabled) {
    transform: translateY(0);
}

.page-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white !important;
    border-color: transparent;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.page-btn:disabled {
    opacity: 0.25;
    cursor: not-allowed;
    background: rgba(255, 255, 255, 0.01);
}

.page-btn i, .page-btn svg {
    width: 16px;
    height: 16px;
    stroke-width: 2.5px;
    color: inherit;
}

.pagination span {
    color: var(--text-muted);
    font-weight: 600;
    padding: 0 0.5rem;
    user-select: none;
    font-size: 0.9rem;
}

