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

:root {
    --color-base: #0a0a0f;
    --color-surface: #111118;
    --color-surface-2: #16161f;
    --accent-blue: #3B82F6;
    --accent-purple: #8B5CF6;
    --accent-pink: #EC4899;
    --accent-cyan: #06B6D4;
    --accent-green: #10B981;
    --accent-red: #EF4444;
    --accent-yellow: #F59E0B;
    --gradient-primary: linear-gradient(135deg, #3B82F6 0%, #8B5CF6 50%, #EC4899 100%);
    --gradient-secondary: linear-gradient(135deg, #10B981 0%, #3B82F6 100%);
    --gradient-glow: linear-gradient(135deg, rgba(59,130,246,0.4), rgba(139,92,246,0.4), rgba(236,72,153,0.4));
    --glass-bg: rgba(255,255,255,0.05);
    --glass-bg-hover: rgba(255,255,255,0.08);
    --glass-border: rgba(255,255,255,0.1);
    --glass-border-hover: rgba(255,255,255,0.18);
    --glass-blur: blur(20px);
    --text-primary: #ffffff;
    --text-secondary: rgba(255,255,255,0.7);
    --text-muted: rgba(255,255,255,0.5);
    --shadow-sm: 0 4px 12px rgba(0,0,0,0.25);
    --shadow-md: 0 8px 30px rgba(0,0,0,0.35);
    --shadow-lg: 0 16px 50px rgba(0,0,0,0.4);
    --shadow-glow: 0 0 30px rgba(59,130,246,0.15);
    --shadow-glow-hover: 0 0 40px rgba(59,130,246,0.25), 0 0 80px rgba(139,92,246,0.1);
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 24px;
    --sidebar-width: 260px;
    --header-height: 64px;
    --ease-out: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--color-base);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

::selection {
    background: rgba(59,130,246,0.35);
    color: #fff;
}

img {
    max-width: 100%;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    outline: none;
}

input, textarea, select {
    font-family: inherit;
    outline: none;
}


/* ==========================================================
   1. LOGIN PAGE
   ========================================================== */

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

.login-page::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(59,130,246,0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(139,92,246,0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(236,72,153,0.05) 0%, transparent 50%);
    pointer-events: none;
}

.login-card {
    position: relative;
    width: 100%;
    max-width: 420px;
    padding: 2.5rem;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    animation: loginFadeIn 0.6s var(--ease-out) forwards;
    opacity: 0;
    transform: translateY(20px);
}

.login-card::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: var(--radius-lg);
    padding: 1px;
    background: var(--gradient-primary);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.4;
    pointer-events: none;
}

@keyframes loginFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.login-logo p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
}

.login-form .form-group {
    margin-bottom: 1.25rem;
}

.login-form .form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.login-form .form-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all 0.3s var(--ease-out);
}

.login-form .form-group input::placeholder {
    color: var(--text-muted);
}

.login-form .form-group input:focus {
    border-color: var(--accent-blue);
    background: rgba(59,130,246,0.06);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.12);
}

.login-form .login-btn {
    width: 100%;
    padding: 0.8rem;
    background: var(--gradient-primary);
    border: none;
    border-radius: var(--radius-sm);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s var(--ease-out);
    position: relative;
    overflow: hidden;
}

.login-form .login-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(59,130,246,0.3), 0 4px 12px rgba(139,92,246,0.2);
}

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

.login-error {
    background: rgba(239,68,68,0.1);
    border: 1px solid rgba(239,68,68,0.3);
    border-radius: var(--radius-sm);
    padding: 0.65rem 1rem;
    margin-bottom: 1.25rem;
    font-size: 0.85rem;
    color: #FCA5A5;
    display: none;
}

.login-error.active {
    display: block;
    animation: shakeError 0.4s var(--ease-out);
}

@keyframes shakeError {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}


/* ==========================================================
   2. DASHBOARD LAYOUT
   ========================================================== */

.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

.admin-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.3s var(--ease-out);
}

.admin-content {
    flex: 1;
    padding: 2rem;
    margin-top: var(--header-height);
}


/* ==========================================================
   3. SIDEBAR
   ========================================================== */

.admin-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: rgba(17,17,24,0.95);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: transform 0.3s var(--ease-out);
}

.sidebar-logo {
    padding: 1.5rem 1.25rem;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-logo .logo-icon {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.sidebar-logo .logo-text h2 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.sidebar-logo .logo-text span {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0.75rem;
    overflow-y: auto;
}

.sidebar-nav-label {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.75rem 0.75rem 0.4rem;
}

.sidebar-nav a,
.sidebar-nav button.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.75rem;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s var(--ease-out);
    position: relative;
    background: transparent;
    width: 100%;
    text-align: left;
    border: none;
    cursor: pointer;
}

.sidebar-nav a i,
.sidebar-nav button.nav-link i {
    width: 20px;
    text-align: center;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.sidebar-nav a:hover,
.sidebar-nav button.nav-link:hover {
    background: var(--glass-bg-hover);
    color: var(--text-primary);
}

.sidebar-nav a.active {
    background: rgba(59,130,246,0.12);
    color: var(--text-primary);
}

.sidebar-nav a.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: var(--gradient-primary);
    border-radius: 0 3px 3px 0;
}

.sidebar-footer {
    padding: 0.75rem;
    border-top: 1px solid var(--glass-border);
}

.sidebar-footer .logout-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.65rem 0.75rem;
    border-radius: var(--radius-sm);
    background: transparent;
    border: none;
    color: var(--accent-red);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s var(--ease-out);
}

.sidebar-footer .logout-btn i {
    width: 20px;
    text-align: center;
    font-size: 0.95rem;
}

.sidebar-footer .logout-btn:hover {
    background: rgba(239,68,68,0.1);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s var(--ease-out);
}

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


/* ==========================================================
   4. HEADER BAR
   ========================================================== */

.admin-header {
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    height: var(--header-height);
    background: rgba(17,17,24,0.85);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    z-index: 900;
    transition: left 0.3s var(--ease-out);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.hamburger-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s var(--ease-out);
}

.hamburger-btn:hover {
    background: var(--glass-bg-hover);
    color: var(--text-primary);
}

.header-title h1 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.header-title p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-search {
    position: relative;
}

.header-search input {
    width: 220px;
    padding: 0.5rem 0.75rem 0.5rem 2.25rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.8rem;
    transition: all 0.3s var(--ease-out);
}

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

.header-search input:focus {
    border-color: var(--accent-blue);
    background: rgba(59,130,246,0.06);
    width: 280px;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

.header-search i {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.8rem;
    pointer-events: none;
}

.header-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    transition: box-shadow 0.2s var(--ease-out);
    border: 2px solid transparent;
    flex-shrink: 0;
}

.header-avatar:hover {
    box-shadow: 0 0 0 3px rgba(59,130,246,0.25);
}

.header-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}


/* ==========================================================
   5. SECTION CARDS
   ========================================================== */

.section-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s var(--ease-out);
    animation: cardFadeIn 0.4s var(--ease-out) forwards;
    opacity: 0;
    transform: translateY(12px);
}

.section-card:nth-child(1) { animation-delay: 0s; }
.section-card:nth-child(2) { animation-delay: 0.05s; }
.section-card:nth-child(3) { animation-delay: 0.1s; }
.section-card:nth-child(4) { animation-delay: 0.15s; }
.section-card:nth-child(5) { animation-delay: 0.2s; }
.section-card:nth-child(6) { animation-delay: 0.25s; }

@keyframes cardFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-card:hover {
    border-color: var(--glass-border-hover);
    box-shadow: var(--shadow-md);
}

.section-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.section-card-header h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-card-header h2 i {
    font-size: 1rem;
    color: var(--accent-blue);
}

.section-card-header .item-count {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--glass-bg);
    padding: 0.2rem 0.6rem;
    border-radius: 50px;
    border: 1px solid var(--glass-border);
}


/* ==========================================================
   6. DATA TABLES
   ========================================================== */

.admin-table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-md);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.admin-table thead th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 1px solid var(--glass-border);
    background: rgba(255,255,255,0.02);
    white-space: nowrap;
}

.admin-table tbody tr {
    border-bottom: 1px solid rgba(255,255,255,0.04);
    transition: background 0.15s var(--ease-out);
}

.admin-table tbody tr:nth-child(even) {
    background: rgba(255,255,255,0.015);
}

.admin-table tbody tr:hover {
    background: var(--glass-bg-hover);
}

.admin-table tbody td {
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    vertical-align: middle;
}

.admin-table tbody td:first-child {
    color: var(--text-primary);
    font-weight: 500;
}

.admin-table .table-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
}

.admin-table .table-img {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    border: 1px solid var(--glass-border);
}


/* ==========================================================
   7. FORMS
   ========================================================== */

.admin-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 0.7rem 1rem;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: all 0.3s var(--ease-out);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-muted);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    border-color: var(--accent-blue);
    background: rgba(59,130,246,0.06);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.12);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
    line-height: 1.6;
}

.form-select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M3 4.5L6 7.5L9 4.5' stroke='rgba(255,255,255,0.5)' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2.5rem;
    cursor: pointer;
}

.form-select option {
    background: var(--color-surface);
    color: var(--text-primary);
}

.form-hint {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

.form-error {
    font-size: 0.72rem;
    color: var(--accent-red);
    margin-top: 0.15rem;
}

.form-input.error,
.form-textarea.error,
.form-select.error {
    border-color: var(--accent-red);
    box-shadow: 0 0 0 3px rgba(239,68,68,0.12);
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    justify-content: flex-end;
    padding-top: 0.5rem;
}


/* ==========================================================
   8. BUTTONS
   ========================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.25s var(--ease-out);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.btn i {
    font-size: 0.85rem;
}

.btn-primary {
    background: var(--gradient-primary);
    color: #fff;
    border: none;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(59,130,246,0.3), 0 4px 12px rgba(139,92,246,0.2);
}

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

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

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

.btn-danger {
    background: rgba(239,68,68,0.15);
    color: #FCA5A5;
    border: 1px solid rgba(239,68,68,0.25);
}

.btn-danger:hover {
    background: rgba(239,68,68,0.25);
    border-color: rgba(239,68,68,0.4);
    color: #fff;
}

.btn-sm {
    padding: 0.35rem 0.7rem;
    font-size: 0.75rem;
    border-radius: var(--radius-sm);
}

.btn-sm i {
    font-size: 0.7rem;
}

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

.btn-icon i {
    font-size: 0.8rem;
}

.btn-edit {
    background: rgba(59,130,246,0.12);
    color: #93C5FD;
    border: 1px solid rgba(59,130,246,0.2);
}

.btn-edit:hover {
    background: rgba(59,130,246,0.22);
    border-color: rgba(59,130,246,0.35);
    color: #fff;
}

.btn-delete {
    background: rgba(239,68,68,0.12);
    color: #FCA5A5;
    border: 1px solid rgba(239,68,68,0.2);
}

.btn-delete:hover {
    background: rgba(239,68,68,0.22);
    border-color: rgba(239,68,68,0.35);
    color: #fff;
}

.btn-success {
    background: rgba(16,185,129,0.15);
    color: #6EE7B7;
    border: 1px solid rgba(16,185,129,0.25);
}

.btn-success:hover {
    background: rgba(16,185,129,0.25);
    border-color: rgba(16,185,129,0.4);
    color: #fff;
}

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


/* ==========================================================
   9. MODAL
   ========================================================== */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s var(--ease-out);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-card {
    width: 100%;
    max-width: 600px;
    max-height: 85vh;
    background: var(--color-surface);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg), 0 0 60px rgba(59,130,246,0.08);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(20px) scale(0.97);
    transition: transform 0.3s var(--ease-spring);
}

.modal-overlay.active .modal-card {
    transform: translateY(0) scale(1);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--glass-border);
}

.modal-header h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-header h3 i {
    color: var(--accent-blue);
    font-size: 0.95rem;
}

.modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s var(--ease-out);
}

.modal-close:hover {
    background: rgba(239,68,68,0.15);
    border-color: rgba(239,68,68,0.25);
    color: var(--accent-red);
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--glass-border);
}


/* ==========================================================
   10. TOAST NOTIFICATIONS
   ========================================================== */

.toast-container {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.8rem 1.25rem;
    border-radius: var(--radius-sm);
    background: var(--color-surface);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-md);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 500;
    min-width: 280px;
    max-width: 400px;
    pointer-events: auto;
    animation: toastSlideIn 0.35s var(--ease-spring) forwards;
    opacity: 0;
    transform: translateX(30px);
}

@keyframes toastSlideIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast.toast-exit {
    animation: toastSlideOut 0.3s var(--ease-out) forwards;
}

@keyframes toastSlideOut {
    to {
        opacity: 0;
        transform: translateX(30px);
    }
}

.toast-icon {
    font-size: 1rem;
    flex-shrink: 0;
}

.toast-message {
    flex: 1;
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.75rem;
    cursor: pointer;
    padding: 0.2rem;
    flex-shrink: 0;
    transition: color 0.15s var(--ease-out);
}

.toast-close:hover {
    color: var(--text-primary);
}

.toast-success {
    border-color: rgba(16,185,129,0.3);
    background: linear-gradient(135deg, rgba(16,185,129,0.08), var(--color-surface));
}

.toast-success .toast-icon {
    color: var(--accent-green);
}

.toast-error {
    border-color: rgba(239,68,68,0.3);
    background: linear-gradient(135deg, rgba(239,68,68,0.08), var(--color-surface));
}

.toast-error .toast-icon {
    color: var(--accent-red);
}

.toast-info {
    border-color: rgba(59,130,246,0.3);
    background: linear-gradient(135deg, rgba(59,130,246,0.08), var(--color-surface));
}

.toast-info .toast-icon {
    color: var(--accent-blue);
}

.toast-warning {
    border-color: rgba(245,158,11,0.3);
    background: linear-gradient(135deg, rgba(245,158,11,0.08), var(--color-surface));
}

.toast-warning .toast-icon {
    color: var(--accent-yellow);
}


/* ==========================================================
   11. EMPTY STATES
   ========================================================== */

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
    text-align: center;
}

.empty-state-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-md);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.empty-state h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.35rem;
}

.empty-state p {
    font-size: 0.85rem;
    color: var(--text-muted);
    max-width: 320px;
    margin-bottom: 1.25rem;
    line-height: 1.5;
}


/* ==========================================================
   12. RESPONSIVE
   ========================================================== */

@media (max-width: 1024px) {
    .admin-content {
        padding: 1.5rem;
    }

    .header-search input {
        width: 180px;
    }

    .header-search input:focus {
        width: 220px;
    }
}

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

    .admin-sidebar.open {
        transform: translateX(0);
    }

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

    .admin-header {
        left: 0;
    }

    .hamburger-btn {
        display: flex;
    }

    .admin-content {
        padding: 1.25rem;
    }

    .header-search {
        display: none;
    }

    .section-card {
        padding: 1.25rem;
    }

    .section-card-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .modal-card {
        max-height: 90vh;
    }

    .admin-table {
        font-size: 0.8rem;
    }

    .admin-table thead th,
    .admin-table tbody td {
        padding: 0.6rem 0.75rem;
    }

    .toast-container {
        left: 1rem;
        right: 1rem;
    }

    .toast {
        min-width: auto;
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .admin-content {
        padding: 1rem;
    }

    .admin-header {
        padding: 0 1rem;
    }

    .section-card {
        padding: 1rem;
        border-radius: var(--radius-md);
    }

    .login-card {
        margin: 1rem;
        padding: 1.75rem;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn {
        width: 100%;
    }

    .modal-overlay {
        padding: 0.75rem;
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}


/* ==========================================================
   13. ANIMATIONS
   ========================================================== */

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

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

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

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

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

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

.animate-fade-in {
    animation: fadeIn 0.4s var(--ease-out) forwards;
}

.animate-fade-in-up {
    animation: fadeInUp 0.4s var(--ease-out) forwards;
}

.animate-slide-in-left {
    animation: slideInLeft 0.3s var(--ease-out) forwards;
}

.animate-slide-in-right {
    animation: slideInRight 0.3s var(--ease-out) forwards;
}

.animate-pulse {
    animation: pulse 1.5s var(--ease-out) infinite;
}

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--glass-border);
    border-top-color: var(--accent-blue);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.loading-spinner-lg {
    width: 36px;
    height: 36px;
    border-width: 3px;
}


/* ==========================================================
   14. BADGES / TAGS
   ========================================================== */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.65rem;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: nowrap;
    line-height: 1.6;
}

.badge-primary {
    background: rgba(59,130,246,0.15);
    color: #93C5FD;
    border: 1px solid rgba(59,130,246,0.2);
}

.badge-purple {
    background: rgba(139,92,246,0.15);
    color: #C4B5FD;
    border: 1px solid rgba(139,92,246,0.2);
}

.badge-pink {
    background: rgba(236,72,153,0.15);
    color: #F9A8D4;
    border: 1px solid rgba(236,72,153,0.2);
}

.badge-green {
    background: rgba(16,185,129,0.15);
    color: #6EE7B7;
    border: 1px solid rgba(16,185,129,0.2);
}

.badge-red {
    background: rgba(239,68,68,0.15);
    color: #FCA5A5;
    border: 1px solid rgba(239,68,68,0.2);
}

.badge-cyan {
    background: rgba(6,182,212,0.15);
    color: #67E8F9;
    border: 1px solid rgba(6,182,212,0.2);
}

.badge-yellow {
    background: rgba(245,158,11,0.15);
    color: #FCD34D;
    border: 1px solid rgba(245,158,11,0.2);
}

.badge-neutral {
    background: var(--glass-bg);
    color: var(--text-secondary);
    border: 1px solid var(--glass-border);
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}


/* ==========================================================
   UTILITY CLASSES
   ========================================================== */

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

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

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

.text-success {
    color: var(--accent-green);
}

.text-danger {
    color: var(--accent-red);
}

.text-info {
    color: var(--accent-blue);
}

.text-sm {
    font-size: 0.8rem;
}

.text-xs {
    font-size: 0.7rem;
}

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

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

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.d-flex {
    display: flex;
}

.d-grid {
    display: grid;
}

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

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

.w-full {
    width: 100%;
}

.flex-1 {
    flex: 1;
}

.hidden {
    display: none;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border-width: 0;
}

.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.divider {
    height: 1px;
    background: var(--glass-border);
    margin: 1rem 0;
    border: none;
}

.grid-cols-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.grid-cols-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.grid-cols-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .grid-cols-2,
    .grid-cols-3,
    .grid-cols-4 {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .grid-cols-3,
    .grid-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}


/* ==========================================================
   STAT CARDS (dashboard overview)
   ========================================================== */

.stat-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s var(--ease-out);
}

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

.stat-card-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.stat-card-icon.blue {
    background: rgba(59,130,246,0.12);
    color: var(--accent-blue);
}

.stat-card-icon.purple {
    background: rgba(139,92,246,0.12);
    color: var(--accent-purple);
}

.stat-card-icon.pink {
    background: rgba(236,72,153,0.12);
    color: var(--accent-pink);
}

.stat-card-icon.green {
    background: rgba(16,185,129,0.12);
    color: var(--accent-green);
}

.stat-card-icon.cyan {
    background: rgba(6,182,212,0.12);
    color: var(--accent-cyan);
}

.stat-card-info h4 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.stat-card-info p {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}


/* ==========================================================
   CONFIRM DIALOG
   ========================================================== */

.confirm-dialog {
    text-align: center;
    padding: 0.5rem 0;
}

.confirm-dialog .confirm-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(239,68,68,0.12);
    border: 1px solid rgba(239,68,68,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: var(--accent-red);
    margin: 0 auto 1rem;
}

.confirm-dialog h4 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
}

.confirm-dialog p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

.confirm-dialog .confirm-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}


/* ==========================================================
   IMAGE UPLOAD PREVIEW
   ========================================================== */

.image-upload-area {
    border: 2px dashed var(--glass-border);
    border-radius: var(--radius-md);
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s var(--ease-out);
}

.image-upload-area:hover {
    border-color: var(--accent-blue);
    background: rgba(59,130,246,0.04);
}

.image-upload-area i {
    font-size: 1.5rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.image-upload-area p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.image-upload-area span {
    color: var(--accent-blue);
    font-weight: 500;
}

.image-preview {
    position: relative;
    display: inline-block;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--glass-border);
}

.image-preview img {
    max-width: 200px;
    max-height: 150px;
    object-fit: cover;
    display: block;
}

.image-preview .remove-image {
    position: absolute;
    top: 0.35rem;
    right: 0.35rem;
    width: 24px;
    height: 24px;
    background: rgba(239,68,68,0.85);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 0.65rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s var(--ease-out);
}

.image-preview .remove-image:hover {
    background: var(--accent-red);
}


/* ==========================================================
   SCROLLBAR
   ========================================================== */

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

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

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

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