/* =========================================================
   ADMIN PANEL - PRECISION SPACING & VECTOR DESIGN SYSTEM
   Modern, Meaningful Typography & Interactive Responsive UI
========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400;1,600&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/all.min.css');

/* Load shared design tokens first */
@import url('tokens.css');

:root {
    /* Compatibility aliases — resolve old --admin-* names to token values */
    --admin-navy: var(--c-primary-900);
    --admin-blue: var(--c-primary-700);
    --admin-accent: var(--c-primary-500);
    --admin-bg: var(--c-neutral-100);
    --admin-surface: var(--c-neutral-0);
    --admin-border: var(--c-neutral-200);
    --admin-muted: var(--c-neutral-600);

    /* Color Palette */
    --adm-navy: #09233f;
    --adm-navy-dark: #06192e;
    --adm-blue: #0f4c81;
    --adm-blue-hover: #0c3e6b;
    --adm-blue-light: #e8f2fa;
    --adm-accent: #2563eb;
    --adm-gold: #f59e0b;
    --adm-gold-light: #fef3c7;
    --adm-bg: #f1f5f9;
    --adm-surface: #ffffff;
    --adm-surface-alt: #f8fafc;
    --adm-text: #0f172a;
    --adm-text-muted: #64748b;
    --adm-text-light: #94a3b8;
    --adm-border: #e2e8f0;
    --adm-border-hover: #cbd5e1;
    
    /* Semantic Colors */
    --adm-success: #10b981;
    --adm-success-light: #d1fae5;
    --adm-success-text: #065f46;
    --adm-danger: #ef4444;
    --adm-danger-light: #fee2e2;
    --adm-danger-text: #991b1b;
    --adm-warning: #f59e0b;
    --adm-warning-light: #fef3c7;
    --adm-warning-text: #92400e;
    --adm-info: #0284c7;
    --adm-info-light: #e0f2fe;
    --adm-info-text: #075985;

    /* Precision Spacing Scale (4px standard base rhythm) */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    --space-10: 40px;

    /* Border Radius Scale */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    /* Shadows & Elevation */
    --shadow-xs: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
    --shadow-sm: 0 2px 8px -1px rgba(15, 23, 42, 0.06), 0 1px 4px -1px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 8px 24px -4px rgba(15, 23, 42, 0.08), 0 4px 8px -2px rgba(15, 23, 42, 0.03);
    --shadow-lg: 0 16px 36px -6px rgba(15, 23, 42, 0.12), 0 8px 16px -4px rgba(15, 23, 42, 0.04);

    /* Dimensions */
    --sidebar-width: 270px;
    --header-height: 64px;

    /* Font stack */
    --font-main: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Base Reset & Typography */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    min-height: 100%;
    font-family: var(--font-main);
    font-size: 14px;
    line-height: 1.55;
    color: var(--adm-text);
    background-color: var(--adm-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.admin-body {
    background-color: var(--adm-bg);
    overflow-x: hidden;
}

/* Vector Canvas / Subtle Mesh Pattern Background */
body.admin-body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(15, 76, 129, 0.03) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(37, 99, 235, 0.03) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(245, 158, 11, 0.015) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

/* =========================================================
   LAYOUT SYSTEM (Precision Spacing)
========================================================= */
.admin-layout {
    display: flex;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* Sidebar with Vector styling */
.admin-layout .sidebar,
aside.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    height: 100vh;
    background: linear-gradient(180deg, var(--adm-navy) 0%, var(--adm-navy-dark) 100%);
    color: #ffffff;
    display: flex;
    flex-direction: column;
    z-index: 100;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-brand {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-5) var(--space-5);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.15);
    position: relative;
}

.admin-brand::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.5), transparent);
}

.admin-brand img {
    width: 42px;
    height: 42px;
    object-fit: contain;
    border-radius: var(--radius-md);
    background: #ffffff;
    padding: 3px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.admin-brand-text strong {
    display: block;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #ffffff;
}

.admin-brand-text span {
    display: block;
    font-size: 11px;
    font-weight: 500;
    color: #94a3b8;
    margin-top: 2px;
}

/* Nav Menu */
.admin-nav {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-4) var(--space-3);
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.admin-nav::-webkit-scrollbar {
    width: 4px;
}
.admin-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.admin-nav-title {
    margin: var(--space-5) var(--space-3) var(--space-2);
    color: #7dd3fc;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.85;
}
.admin-nav-title:first-child {
    margin-top: var(--space-1);
}

.admin-nav a {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: 9px var(--space-3);
    margin: 2px 0;
    border-radius: var(--radius-md);
    color: #cbd5e1;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.18s ease-in-out;
    position: relative;
}

.admin-nav a:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(3px);
}

.admin-nav a.active {
    color: #ffffff;
    background: linear-gradient(90deg, #1e40af 0%, #0f4c81 100%);
    box-shadow: 0 4px 14px rgba(15, 76, 129, 0.35);
    font-weight: 700;
}

.admin-nav a.active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 6px;
    bottom: 6px;
    width: 3px;
    background: #60a5fa;
    border-radius: 0 3px 3px 0;
}

/* Vector SVG Icon Container */
.admin-icon,
.nav-icon-svg {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    fill: currentColor;
    color: inherit;
}

.nav-icon-svg svg {
    width: 18px;
    height: 18px;
    stroke-width: 2;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.nav-badge {
    margin-left: auto;
    padding: 2px 7px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
}
.nav-badge.badge-alert {
    background: #ef4444;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
    animation: pulse-badge 2s infinite;
}
@keyframes pulse-badge {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Sidebar Footer */
.admin-user-footer {
    padding: var(--space-4) var(--space-4);
    background: rgba(0, 0, 0, 0.25);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-user-info {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-3);
}

.admin-user-avatar {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, #2563eb, #38bdf8);
    display: grid;
    place-items: center;
    color: #ffffff;
    font-weight: 800;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.admin-user-meta strong {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 170px;
}
.admin-user-meta span {
    display: block;
    font-size: 11px;
    color: #93c5fd;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.admin-footer-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2);
}

.admin-footer-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-1);
    padding: 7px var(--space-2);
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
    color: #cbd5e1;
    background: rgba(255, 255, 255, 0.06);
    transition: all 0.15s ease;
}
.admin-footer-links a:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}
.admin-footer-links a.danger {
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.12);
}
.admin-footer-links a.danger:hover {
    background: rgba(239, 68, 68, 0.25);
    color: #ffffff;
}

/* =========================================================
   MAIN CONTENT AREA (Precision Spacing)
========================================================= */
.main-content,
.admin-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    min-width: 0;
    min-height: 100vh;
    padding: var(--space-8);
    background-color: var(--adm-bg);
}

/* Page Header */
.admin-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
    padding-bottom: var(--space-4);
    border-bottom: 1px solid var(--adm-border);
    position: relative;
}

.admin-page-header h1,
.admin-page-header h2 {
    font-size: 24px;
    font-weight: 800;
    color: var(--adm-navy);
    letter-spacing: -0.02em;
    line-height: 1.25;
    margin-bottom: var(--space-1);
}

.admin-page-header p {
    font-size: 13px;
    color: var(--adm-text-muted);
    line-height: 1.5;
}

/* Breadcrumb / Category Tag */
.admin-breadcrumb {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-size: 11px;
    font-weight: 700;
    color: var(--adm-blue);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-1);
}

/* =========================================================
   CARDS & CONTAINERS (Design Canvas Accents)
========================================================= */
.admin-card,
.form-box {
    background: var(--adm-surface);
    border: 1px solid var(--adm-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: var(--space-6);
    margin-bottom: var(--space-6);
    position: relative;
    overflow: hidden;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.admin-card:hover,
.form-box:hover {
    border-color: var(--adm-border-hover);
    box-shadow: var(--shadow-md);
}

/* Subtle Canvas Vector Header inside Cards */
.admin-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    margin-bottom: var(--space-5);
    padding-bottom: var(--space-4);
    border-bottom: 1px solid var(--adm-border);
}

.admin-card-header h3,
.form-box h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--adm-navy);
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.admin-card-header p {
    font-size: 12px;
    color: var(--adm-text-muted);
    margin-top: 2px;
}

/* =========================================================
   STATISTICS & QUICK WIDGETS
========================================================= */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--space-5);
    margin-bottom: var(--space-6);
}

.stat-card {
    background: var(--adm-surface);
    border: 1px solid var(--adm-border);
    border-radius: var(--radius-lg);
    padding: var(--space-5) var(--space-6);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Geometric Vector Accent on Stat Cards */
.stat-card::after {
    content: "";
    position: absolute;
    right: -25px;
    top: -25px;
    width: 90px;
    height: 90px;
    border-radius: var(--radius-full);
    background: radial-gradient(circle, rgba(15, 76, 129, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.stat-card .stat-icon-wrapper {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: var(--adm-blue-light);
    color: var(--adm-blue);
    display: grid;
    place-items: center;
    margin-bottom: var(--space-3);
}

.stat-card h4 {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--adm-text-muted);
    margin-bottom: var(--space-1);
}

.stat-card p {
    font-size: 28px;
    font-weight: 800;
    color: var(--adm-navy);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

/* Dashboard Interactive Canvas Container */
.dashboard-canvas-card {
    background: var(--adm-surface);
    border: 1px solid var(--adm-border);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    margin-bottom: var(--space-6);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.dashboard-canvas-card .canvas-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-4);
    gap: var(--space-3);
    flex-wrap: wrap;
}

.dashboard-canvas-card canvas {
    width: 100% !important;
    max-height: 260px;
    display: block;
}

/* Quick Grid */
.quick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: var(--space-4);
    margin-bottom: var(--space-6);
}

.quick-card {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4);
    background: var(--adm-surface);
    border: 1px solid var(--adm-border);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--adm-navy);
    box-shadow: var(--shadow-xs);
    transition: all 0.18s ease;
}

.quick-card:hover {
    border-color: var(--adm-blue);
    background: #fcfdff;
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.quick-card .qicon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--adm-blue-light);
    color: var(--adm-blue);
    display: grid;
    place-items: center;
    flex-shrink: 0;
    transition: background 0.18s ease, color 0.18s ease;
}

.quick-card:hover .qicon {
    background: var(--adm-blue);
    color: #ffffff;
}

.quick-card strong {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--adm-navy);
    line-height: 1.3;
}

.quick-card span {
    display: block;
    font-size: 11px;
    color: var(--adm-text-muted);
    margin-top: 2px;
}

/* =========================================================
   FORMS & INPUTS (Precision Spacing)
========================================================= */
.admin-form-grid,
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-5);
}

.admin-field,
.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 0;
}

.admin-field.full,
.form-group.full {
    grid-column: 1 / -1;
}

.admin-field label,
.form-group label {
    font-size: 12px;
    font-weight: 700;
    color: #334155;
    letter-spacing: 0.01em;
}

.admin-field input,
.admin-field select,
.admin-field textarea,
.form-box input,
.form-box select,
.form-box textarea,
.form-control {
    width: 100%;
    min-height: 42px;
    padding: 9px var(--space-3);
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-md);
    background-color: #ffffff;
    color: #1e293b;
    font-family: inherit;
    font-size: 13px;
    line-height: 1.5;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.admin-field textarea,
.form-box textarea,
textarea.form-control {
    min-height: 100px;
    resize: vertical;
    padding: var(--space-3);
}

.admin-field input:focus,
.admin-field select:focus,
.admin-field textarea:focus,
.form-box input:focus,
.form-box select:focus,
.form-box textarea:focus,
.form-control:focus {
    border-color: var(--adm-blue);
    box-shadow: 0 0 0 3px rgba(15, 76, 129, 0.12);
}

/* Image File Preview Box */
.image-preview-container {
    margin-top: var(--space-2);
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3);
    background: var(--adm-surface-alt);
    border: 1px dashed var(--adm-border);
    border-radius: var(--radius-md);
}

.image-preview-container img {
    width: 70px;
    height: 52px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1px solid var(--adm-border);
    background: #ffffff;
}

.image-preview-container span {
    font-size: 12px;
    color: var(--adm-text-muted);
}

/* =========================================================
   BUTTONS & ACTIONS (Consistent Height, Vector Icon Flex)
========================================================= */
.admin-actions {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex-wrap: wrap;
    margin-top: var(--space-5);
}

.btn-admin,
.btn,
.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    min-height: 40px;
    padding: 8px var(--space-4);
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.18s ease-in-out;
}

.btn-admin svg,
.btn svg,
.action-btn svg {
    width: 16px;
    height: 16px;
    stroke-width: 2;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

.btn-admin:hover,
.btn:hover,
.action-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

/* Button Variants */
.btn-primary,
.btn-update {
    background: var(--adm-blue);
    color: #ffffff;
    border-color: var(--adm-blue);
}
.btn-primary:hover,
.btn-update:hover {
    background: var(--adm-blue-hover);
    color: #ffffff;
}

.btn-secondary {
    background: #ffffff;
    color: var(--adm-text);
    border-color: var(--adm-border);
}
.btn-secondary:hover {
    background: var(--adm-surface-alt);
    border-color: var(--adm-border-hover);
}

.btn-success {
    background: var(--adm-success);
    color: #ffffff;
    border-color: var(--adm-success);
}
.btn-success:hover {
    background: #059669;
    color: #ffffff;
}

.btn-danger,
.btn-delete {
    background: var(--adm-danger);
    color: #ffffff;
    border-color: var(--adm-danger);
}
.btn-danger:hover,
.btn-delete:hover {
    background: #dc2626;
    color: #ffffff;
}

.btn-warning {
    background: var(--adm-warning);
    color: #ffffff;
    border-color: var(--adm-warning);
}
.btn-warning:hover {
    background: #d97706;
    color: #ffffff;
}

/* Button Sizes */
.btn-sm,
.data-table .btn-admin,
.data-table .action-btn {
    min-height: 32px;
    padding: 5px var(--space-3);
    font-size: 12px;
    border-radius: var(--radius-sm);
}

.data-table .btn-admin svg,
.data-table .action-btn svg {
    width: 14px;
    height: 14px;
}

/* Table Action Cell Layout */
.table-actions {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    white-space: nowrap;
}

/* =========================================================
   LIVE SEARCH & FILTER TOOLBAR
========================================================= */
.crud-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    margin-bottom: var(--space-4);
    flex-wrap: wrap;
    background: var(--adm-surface);
    border: 1px solid var(--adm-border);
    border-radius: var(--radius-md);
    padding: var(--space-3) var(--space-4);
    box-shadow: var(--shadow-xs);
}

.toolbar-search {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 240px;
    flex: 1;
    max-width: 400px;
}

.toolbar-search svg {
    position: absolute;
    left: var(--space-3);
    width: 16px;
    height: 16px;
    stroke: var(--adm-text-light);
    pointer-events: none;
}

.toolbar-search input {
    width: 100%;
    min-height: 36px;
    padding: 7px var(--space-3) 7px 36px;
    border: 1px solid var(--adm-border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    background: var(--adm-surface-alt);
    outline: none;
    transition: all 0.18s ease;
}

.toolbar-search input:focus {
    background: #ffffff;
    border-color: var(--adm-blue);
    box-shadow: 0 0 0 3px rgba(15, 76, 129, 0.1);
}

.toolbar-actions {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex-wrap: wrap;
}

.toolbar-filter-select {
    min-height: 36px;
    padding: 6px var(--space-3);
    border: 1px solid var(--adm-border);
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    color: var(--adm-text);
    background-color: var(--adm-surface-alt);
    outline: none;
    cursor: pointer;
}
.toolbar-filter-select:focus {
    border-color: var(--adm-blue);
}

.toolbar-counter {
    font-size: 12px;
    font-weight: 700;
    color: var(--adm-text-muted);
}

/* =========================================================
   DATA TABLES (Precision Spacing)
========================================================= */
.admin-table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--adm-border);
    border-radius: var(--radius-lg);
    background: var(--adm-surface);
    box-shadow: var(--shadow-sm);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    text-align: left;
}

.data-table th {
    padding: var(--space-3) var(--space-4);
    background: #f8fafc;
    color: #334155;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--adm-border);
    white-space: nowrap;
}

.data-table td {
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    vertical-align: middle;
}

.data-table tbody tr {
    transition: background-color 0.15s ease;
}

.data-table tbody tr:hover {
    background-color: #f8fbff;
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.data-table img {
    border-radius: var(--radius-sm);
    border: 1px solid var(--adm-border);
    background: #ffffff;
}

/* Empty State */
.admin-empty {
    padding: var(--space-10) var(--space-6);
    text-align: center;
    color: var(--adm-text-light);
}

.admin-empty svg {
    width: 48px;
    height: 48px;
    stroke: var(--adm-text-light);
    stroke-width: 1.5;
    margin-bottom: var(--space-3);
    opacity: 0.7;
}

.admin-empty p {
    font-size: 14px;
    font-weight: 600;
    color: var(--adm-text-muted);
}

/* =========================================================
   STATUS BADGES
========================================================= */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.3;
    white-space: nowrap;
}

.status-badge::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.status-Pending,
.status-warning {
    background: var(--adm-warning-light);
    color: var(--adm-warning-text);
}

.status-Diterima,
.status-success,
.status-active,
.status-1 {
    background: var(--adm-success-light);
    color: var(--adm-success-text);
}

.status-Ditolak,
.status-danger,
.status-inactive,
.status-0 {
    background: var(--adm-danger-light);
    color: var(--adm-danger-text);
}

/* =========================================================
   ALERTS & NOTIFICATIONS
========================================================= */
.alert {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-4);
    border-radius: var(--radius-md);
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: var(--space-5);
    border: 1px solid transparent;
}

.alert svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 1px;
    stroke: currentColor;
    stroke-width: 2;
}

.alert.success {
    background-color: var(--adm-success-light);
    color: var(--adm-success-text);
    border-color: #a7f3d0;
}

.alert.danger {
    background-color: var(--adm-danger-light);
    color: var(--adm-danger-text);
    border-color: #fecaca;
}

.alert.warning {
    background-color: var(--adm-warning-light);
    color: var(--adm-warning-text);
    border-color: #fde68a;
}

.alert.info {
    background-color: var(--adm-info-light);
    color: var(--adm-info-text);
    border-color: #bae6fd;
}

/* Interactive Toast System */
#adm-toast-container {
    position: fixed;
    top: var(--space-5);
    right: var(--space-5);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    pointer-events: none;
}

.adm-toast {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: var(--space-3);
    min-width: 280px;
    max-width: 420px;
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    background: #ffffff;
    color: var(--adm-text);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--adm-border);
    font-size: 13px;
    font-weight: 600;
    animation: toast-in 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.adm-toast.toast-closing {
    opacity: 0;
    transform: translateX(100%);
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateY(-12px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* =========================================================
   INTERACTIVE CONFIRMATION MODAL
========================================================= */
.adm-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(3px);
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: var(--space-4);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

.adm-modal-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.adm-modal-dialog {
    background: #ffffff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    max-width: 440px;
    width: 100%;
    padding: var(--space-6);
    text-align: center;
    transform: scale(0.95);
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.adm-modal-backdrop.active .adm-modal-dialog {
    transform: scale(1);
}

.adm-modal-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-full);
    background: var(--adm-danger-light);
    color: var(--adm-danger);
    display: grid;
    place-items: center;
    margin: 0 auto var(--space-4);
}

.adm-modal-icon svg {
    width: 26px;
    height: 26px;
    stroke: currentColor;
    stroke-width: 2;
}

.adm-modal-dialog h3 {
    font-size: 18px;
    font-weight: 800;
    color: var(--adm-navy);
    margin-bottom: var(--space-2);
}

.adm-modal-dialog p {
    font-size: 13px;
    color: var(--adm-text-muted);
    line-height: 1.5;
    margin-bottom: var(--space-6);
}

.adm-modal-actions {
    display: flex;
    gap: var(--space-3);
    justify-content: center;
}

/* =========================================================
   RESPONSIVE DESIGN SYSTEM
========================================================= */
@media (max-width: 1100px) {
    :root {
        --sidebar-width: 240px;
    }
    .main-content,
    .admin-main {
        padding: var(--space-6);
    }
}

@media (max-width: 840px) {
    .admin-layout {
        display: block;
    }
    .admin-layout .sidebar,
    aside.sidebar {
        position: relative;
        width: 100%;
        min-width: 0;
        height: auto;
        box-shadow: none;
    }
    .main-content,
    .admin-main {
        margin-left: 0;
        width: 100%;
        padding: var(--space-4);
    }
    .admin-nav {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 4px;
        max-height: none;
        overflow: visible;
    }
    .admin-nav-title {
        grid-column: 1 / -1;
    }
    .admin-user-footer {
        grid-column: 1 / -1;
    }
    .admin-form-grid,
    .form-grid {
        grid-template-columns: 1fr;
    }
    .crud-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    .toolbar-search {
        max-width: none;
    }
}

@media (max-width: 540px) {
    .admin-nav {
        grid-template-columns: 1fr;
    }
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .quick-grid {
        grid-template-columns: 1fr;
    }
    .admin-page-header {
        flex-direction: column;
        align-items: stretch;
    }
    .admin-page-header h1,
    .admin-page-header h2 {
        font-size: 20px;
    }
    .admin-card,
    .form-box {
        padding: var(--space-4);
    }
}
