/* SAHU INDUSTRY — CENTRAL DESIGN SYSTEM STYLES */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

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

:root {
    --bg-color: #060f22;
    --sidebar-bg: #060e1d;
    --card-bg: rgba(255, 255, 255, 0.02);
    --card-border: rgba(255, 255, 255, 0.05);
    
    /* Premium Violet/Purple Design Accent & Gradient */
    --accent: #B040FF;
    --accent-glow: transparent;
    --accent-gradient: #B040FF;
    --hover-gradient: #C56BFF;
    
    --text-main: #ffffff;
    --text-dim: rgba(255, 255, 255, 0.5);
    --text-muted: rgba(255, 255, 255, 0.3);
    
    --success: #00ff88;
    --success-bg: rgba(0, 255, 136, 0.15);
    --success-border: rgba(0, 255, 136, 0.3);
    
    --warning: #ffcc00;
    --warning-bg: rgba(255, 204, 0, 0.15);
    --warning-border: rgba(255, 204, 0, 0.3);
    
    --danger: #ff4444;
    --danger-bg: rgba(255, 68, 68, 0.15);
    --danger-border: rgba(255, 68, 68, 0.3);

    --sidebar-width: 280px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    overflow-x: auto;
    display: flex;
}

/* ── SCROLLBARS ── */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 8px;
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, #B040FF, #7000df);
    border-radius: 8px;
    border: 1px solid rgba(176, 64, 255, 0.3);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--hover-gradient);
}

/* ── LAYOUT ── */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    border-right: 1px solid var(--card-border);
    position: fixed;
    height: 100vh;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: var(--transition);
}

.sidebar-header {
    padding: 35px 25px;
    border-bottom: 1px solid var(--card-border);
}

.logo {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.5px;
    text-decoration: none;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo span {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-nav {
    flex: 1;
    padding: 25px 15px;
    overflow-y: auto;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 20px;
    color: var(--text-dim);
    text-decoration: none;
    border-radius: 12px;
    margin-bottom: 8px;
    transition: var(--transition);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.nav-link i {
    font-style: normal;
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
    transform: translateX(4px);
}

.nav-link.active {
    background: rgba(176, 64, 255, 0.1);
    color: #fff;
    border-left: 4px solid var(--accent);
    border-radius: 0 12px 12px 0;
}

/* Accordion Nav Dropdown & Sublinks Styling */
.nav-dropdown {
    margin-bottom: 8px;
}
.nav-dropdown-toggle.active {
    background: rgba(255, 255, 255, 0.02);
    border-left: 4px solid rgba(176, 64, 255, 0.5);
    border-radius: 0 12px 12px 0;
}
.nav-dropdown-menu {
    border-left: 1px dashed rgba(176, 64, 255, 0.2);
    margin-left: 28px;
    padding-left: 10px !important;
}
.sub-nav-link {
    font-size: 13px !important;
    padding: 10px 15px !important;
    margin-bottom: 4px !important;
}
.sub-nav-link.active {
    background: rgba(176, 64, 255, 0.15) !important;
    border-left: 3px solid var(--accent) !important;
    border-radius: 0 8px 8px 0 !important;
}

.sidebar-footer {
    padding: 20px 25px;
    border-top: 1px solid var(--card-border);
}

.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    padding: 40px 60px;
    max-width: 1600px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow-x: auto;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 45px;
}

.page-title h1 {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.page-title p {
    color: var(--text-dim);
    font-size: 14px;
    margin-top: 6px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 15px;
}

.profile-info {
    text-align: right;
}

.profile-info .name {
    font-weight: 600;
    font-size: 14px;
}

.profile-info .role {
    font-size: 11px;
    color: var(--accent);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.profile-avatar {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    color: #fff;
    box-shadow: 0 4px 15px var(--accent-glow);
}

/* ── STATS GRID ── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 25px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.1);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 2px;
    background: var(--accent-gradient);
    opacity: 0;
    transition: var(--transition);
}

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

.stat-card .label {
    color: var(--text-dim);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    font-weight: 600;
}

.stat-card .value {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.stat-card .icon {
    position: absolute;
    right: 20px;
    bottom: 20px;
    font-size: 32px;
    opacity: 0.05;
}

/* ── CARDS & SECTIONS ── */
.section-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 30px;
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.section-header h2 {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ── TABLES ── */
.table-responsive {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    max-width: 100%;
    display: block;
    border-radius: 16px;
    background: rgba(10, 15, 29, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
    padding-bottom: 6px;
}

.table-responsive table {
    min-width: 1050px;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    text-align: left;
}

thead {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.01) 100%);
    position: sticky;
    top: 0;
    z-index: 2;
}

th {
    color: #94a3b8;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    padding: 16px 20px;
    border-bottom: 2px solid rgba(176, 64, 255, 0.25);
    font-weight: 700;
    white-space: nowrap;
}

th:first-child {
    border-top-left-radius: 14px;
}

th:last-child {
    border-top-right-radius: 14px;
}

tbody tr {
    transition: background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s ease;
}

tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.012);
}

tbody tr:hover {
    background: rgba(176, 64, 255, 0.05) !important;
}

td {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    font-size: 13.5px;
    color: #e2e8f0;
    vertical-align: middle;
    white-space: nowrap;
}

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

tbody tr:last-child td:first-child {
    border-bottom-left-radius: 14px;
}

tbody tr:last-child td:last-child {
    border-bottom-right-radius: 14px;
}

/* ── STATUS BADGES ── */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    backdrop-filter: blur(8px);
    white-space: nowrap;
}

.status-badge::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}

.status-badge.new, .status-badge.registered, .status-badge.assigned {
    background: rgba(234, 179, 8, 0.12);
    color: #facc15;
    border: 1px solid rgba(234, 179, 8, 0.35);
    box-shadow: 0 0 10px rgba(234, 179, 8, 0.12);
}
.status-badge.new::before, .status-badge.registered::before, .status-badge.assigned::before {
    background: #facc15;
    box-shadow: 0 0 6px #facc15;
}

.status-badge.in-progress, .status-badge.qr_generated {
    background: rgba(176, 64, 255, 0.12);
    color: #c084fc;
    border: 1px solid rgba(176, 64, 255, 0.35);
    box-shadow: 0 0 10px rgba(176, 64, 255, 0.15);
}
.status-badge.in-progress::before, .status-badge.qr_generated::before {
    background: #B040FF;
    box-shadow: 0 0 6px #B040FF;
}

.status-badge.completed, .status-badge.active, .status-badge.dispatched {
    background: rgba(34, 197, 94, 0.12);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.32);
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.12);
}
.status-badge.completed::before, .status-badge.active::before, .status-badge.dispatched::before {
    background: #22c55e;
    box-shadow: 0 0 6px #22c55e;
}

.status-badge.cancelled, .status-badge.rejected, .status-badge.inactive {
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.32);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.12);
}
.status-badge.cancelled::before, .status-badge.rejected::before, .status-badge.inactive::before {
    background: #ef4444;
    box-shadow: 0 0 6px #ef4444;
}

/* ── TABLE DATA BADGES & COMPONENTS ── */
.serial-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(176, 64, 255, 0.08);
    border: 1px solid rgba(176, 64, 255, 0.28);
    border-radius: 8px;
    padding: 5px 11px;
    font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
    font-weight: 700;
    font-size: 12.5px;
    color: #d8b4fe;
    letter-spacing: 0.4px;
    box-shadow: 0 2px 6px rgba(176, 64, 255, 0.08);
    transition: var(--transition);
}
.serial-badge:hover {
    border-color: rgba(176, 64, 255, 0.5);
    background: rgba(176, 64, 255, 0.14);
}

.batch-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 6px;
    padding: 4px 9px;
    font-family: monospace;
    font-size: 11.5px;
    color: #94a3b8;
    font-weight: 600;
}

.date-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #cbd5e1;
    font-size: 12.5px;
    font-weight: 500;
}

.warehouse-stock-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 12px;
    color: #94a3b8;
    font-weight: 500;
}
.warehouse-stock-badge .stock-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #38bdf8;
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.6);
}

.dispatch-seller-card {
    background: linear-gradient(135deg, rgba(176, 64, 255, 0.08) 0%, rgba(176, 64, 255, 0.02) 100%);
    border: 1px solid rgba(176, 64, 255, 0.28);
    border-radius: 10px;
    padding: 9px 12px;
    max-width: 290px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
.seller-card-title {
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}
.seller-card-detail {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 3px;
    display: flex;
    align-items: center;
    gap: 4px;
}
.seller-card-gst {
    font-size: 11px;
    color: #c084fc;
    font-weight: 600;
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: 4px;
}
.seller-card-addr {
    font-size: 10.5px;
    color: #94a3b8;
    margin-top: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 4px;
}
.seller-card-footer {
    font-size: 10px;
    color: #64748b;
    margin-top: 5px;
    border-top: 1px dashed rgba(255, 255, 255, 0.08);
    padding-top: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.seller-card-footer .inv-tag {
    background: rgba(255, 255, 255, 0.06);
    padding: 1px 6px;
    border-radius: 4px;
    color: #e2e8f0;
    font-family: monospace;
}

.locked-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11.5px;
    color: #64748b;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 500;
}

/* ── BUTTONS ── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    border: 1px solid var(--card-border);
    background: rgba(255, 255, 255, 0.03);
    color: #fff;
}

.btn:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--accent-gradient);
    border: none;
    color: #fff;
    box-shadow: 0 4px 15px rgba(176, 64, 255, 0.3);
}
.btn-primary:hover {
    background: var(--hover-gradient);
    box-shadow: 0 6px 20px rgba(176, 64, 255, 0.4);
    transform: translateY(-1px);
}

.btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #fff;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.25);
}
.btn-success:hover {
    background: linear-gradient(135deg, #34d399, #10b981);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35);
    transform: translateY(-1px);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fff;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.25);
}
.btn-danger:hover {
    background: linear-gradient(135deg, #f87171, #dc2626);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.35);
    transform: translateY(-1px);
}

.btn-outline-danger {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
}
.btn-outline-danger:hover {
    background: #ef4444;
    color: #fff;
    border-color: #ef4444;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
    transform: translateY(-1px);
}

.btn-outline-success {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #34d399;
}
.btn-outline-success:hover {
    background: #10b981;
    color: #fff;
    border-color: #10b981;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    transform: translateY(-1px);
}

.btn-outline-primary {
    background: rgba(176, 64, 255, 0.08);
    border: 1px solid rgba(176, 64, 255, 0.35);
    color: #c084fc;
}
.btn-outline-primary:hover {
    background: var(--accent-gradient);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(176, 64, 255, 0.35);
    transform: translateY(-1px);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 8px;
}

/* ── FORM ELEMENTS ── */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input, 
.form-group select, 
.form-group textarea {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--card-border);
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    color: #fff;
    outline: none;
    transition: var(--transition);
}

select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg fill='%23B040FF' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 45px !important;
    cursor: pointer;
}

select option {
    background-color: #08101d; /* Matches portal dark card background */
    color: #ffffff;
    font-size: 14px;
    padding: 10px;
}

.form-group input:focus, 
.form-group select:focus, 
.form-group textarea:focus {
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.04);
    box-shadow: 0 0 10px var(--accent-glow);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* ── MODALS (OVERLAYS) ── */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: #08101d;
    border: 1px solid var(--card-border);
    border-radius: 24px;
    width: 650px;
    max-width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 35px;
    position: relative;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: var(--text-dim);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--danger-bg);
    color: #fff;
}

.modal-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 25px;
    color: #fff;
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 15px;
}

/* ── TIMELINE TRACKER ── */
.timeline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    margin: 40px 0;
    padding: 0 20px;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 15px; left: 40px; right: 40px; height: 3px;
    background: var(--card-border);
    z-index: 0;
}

.timeline-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 1;
}

.timeline-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--sidebar-bg);
    border: 2px solid var(--card-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: var(--text-dim);
    font-weight: bold;
    transition: var(--transition);
}

.timeline-step.active .timeline-icon {
    background: var(--accent-gradient);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 0 15px var(--accent-glow);
}

.timeline-step.completed .timeline-icon {
    background: var(--success-bg);
    border-color: var(--success-border);
    color: var(--success);
}

.timeline-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-dim);
}

.timeline-step.active .timeline-label {
    color: #fff;
}

/* ── EMPTY STATES ── */
.empty-state {
    text-align: center;
    padding: 50px 0;
    color: var(--text-dim);
}

.empty-state i {
    font-size: 40px;
    display: block;
    margin-bottom: 15px;
    opacity: 0.2;
}

/* ── TOAST NOTIFICATIONS ── */
#toast-container {
    position: fixed;
    top: 25px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    background: var(--sidebar-bg);
    color: #fff;
    padding: 14px 25px;
    border-radius: 12px;
    border: 1px solid var(--card-border);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5), 0 0 15px var(--accent-glow);
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    backdrop-filter: blur(10px);
    pointer-events: auto;
    animation: toastSlideIn 0.35s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
}

.toast::before {
    content: '';
    width: 4px;
    height: 100%;
    position: absolute;
    left: 0; top: 0;
    border-radius: 12px 0 0 12px;
    background: var(--accent-gradient);
}

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

.toast.error::before {
    background: var(--danger);
}

.toast.warning::before {
    background: #f59e0b;
}

.toast.info::before {
    background: #38bdf8;
}

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

/* ── CUSTOM POPUP / CONFIRMATION MODALS ── */
.confirm-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(3, 8, 20, 0.78);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 1;
    animation: confirmOverlayFadeIn 0.2s ease forwards;
}

.confirm-modal-overlay.closing {
    opacity: 0;
    transition: opacity 0.18s ease;
}

.confirm-modal-card {
    background: linear-gradient(135deg, rgba(17, 24, 48, 0.96) 0%, rgba(9, 14, 28, 0.98) 100%);
    border: 1px solid rgba(176, 64, 255, 0.35);
    border-radius: 20px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7), 0 0 30px rgba(176, 64, 255, 0.18);
    max-width: 440px;
    width: 100%;
    padding: 28px 26px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    animation: confirmCardPopIn 0.28s cubic-bezier(0.18, 0.89, 0.32, 1.25) forwards;
}

.confirm-modal-card.danger {
    border-color: rgba(239, 68, 68, 0.45);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7), 0 0 35px rgba(239, 68, 68, 0.25);
}

.confirm-modal-card.warning {
    border-color: rgba(245, 158, 11, 0.45);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7), 0 0 35px rgba(245, 158, 11, 0.25);
}

.confirm-modal-overlay.closing .confirm-modal-card {
    transform: scale(0.92);
    opacity: 0;
    transition: all 0.18s ease;
}

.confirm-modal-icon-badge {
    width: 60px;
    height: 60px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 18px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.confirm-modal-icon-badge.danger {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
}

.confirm-modal-icon-badge.warning {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.4);
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.3);
}

.confirm-modal-icon-badge.info {
    background: rgba(176, 64, 255, 0.15);
    border: 1px solid rgba(176, 64, 255, 0.4);
    box-shadow: 0 0 20px rgba(176, 64, 255, 0.3);
}

.confirm-modal-content {
    margin-bottom: 24px;
    width: 100%;
}

.confirm-modal-title {
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    margin: 0 0 10px 0;
    letter-spacing: -0.3px;
}

.confirm-modal-message {
    font-size: 14px;
    color: #cbd5e1;
    line-height: 1.55;
    margin: 0;
    word-break: break-word;
}

.confirm-modal-actions {
    display: flex;
    gap: 12px;
    width: 100%;
}

.btn-confirm-cancel, .btn-confirm-accept {
    flex: 1;
    padding: 13px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
}

.btn-confirm-cancel {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #e2e8f0;
}

.btn-confirm-cancel:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
    color: #fff;
    transform: translateY(-1px);
}

.btn-confirm-accept {
    border: none;
    color: #fff;
}

.btn-confirm-accept.danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 4px 18px rgba(239, 68, 68, 0.4);
}

.btn-confirm-accept.danger:hover {
    background: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
    box-shadow: 0 6px 22px rgba(239, 68, 68, 0.55);
    transform: translateY(-1px);
}

.btn-confirm-accept.warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 0 4px 18px rgba(245, 158, 11, 0.4);
}

.btn-confirm-accept.warning:hover {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    box-shadow: 0 6px 22px rgba(245, 158, 11, 0.55);
    transform: translateY(-1px);
}

.btn-confirm-accept.info {
    background: linear-gradient(135deg, #b040ff 0%, #8b1cf5 100%);
    box-shadow: 0 4px 18px rgba(176, 64, 255, 0.4);
}

.btn-confirm-accept.info:hover {
    background: linear-gradient(135deg, #c56bff 0%, #b040ff 100%);
    box-shadow: 0 6px 22px rgba(176, 64, 255, 0.55);
    transform: translateY(-1px);
}

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

@keyframes confirmCardPopIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* ── MOBILE RESPONSIVENESS ── */
.mobile-toggle {
    display: none;
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    background: var(--accent-gradient);
    color: #fff;
    border: none;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 4px 15px var(--accent-glow);
    align-items: center;
    justify-content: center;
}

@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.show {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
        padding: 80px 20px 40px;
    }
    .mobile-toggle {
        display: flex;
    }
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .modal-content {
        padding: 20px;
    }
}
