/* 
 * assets/css/style.css
 * Master Styling File for Regal Project
 * Colors: Purple, Golden, White
 */

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

@tailwind base;
@tailwind components;
@tailwind utilities;

:root {
    /* --- Dark Mode (Default) --- */
    --regal-purple: #1a1032;
    --regal-purple-light: #2a1c4a;
    --regal-purple-dark: #0f051d;
    --regal-golden: #ffd700;
    --regal-golden-light: #ffeb3b;
    --regal-white: #ffffff;
    --regal-lavender: #a0a0c0;

    /* Semantic UI Tokens - Dark */
    --bg-main: var(--regal-purple);
    --bg-surface: var(--regal-purple-light);
    --bg-surface-lighter: #3c2a5e;
    --text-primary: var(--regal-white);
    --text-secondary: var(--regal-lavender);
    --border-color: #4a3c6a;
    --glass-bg: rgba(28, 15, 46, 0.95);
    --glass-border: rgba(255, 255, 255, 0.1);
    --shadow-premium: 0 20px 50px rgba(0, 0, 0, 0.5);

    /* Typography */
    --font-main: 'Inter', sans-serif;
    --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* Input Tokens - Dark */
    --input-bg: var(--bg-surface-lighter);
    --input-border: var(--border-color);
    --input-text: var(--text-primary);
    --input-placeholder: rgba(255, 255, 255, 0.4);
    --input-focus-border: var(--regal-golden);
    --input-label: var(--text-secondary);
}

.light-mode {
    /* --- Light Mode Tokens --- */
    --bg-main: #f3f4f6;
    --bg-surface: #ffffff;
    --bg-surface-lighter: #e5e7eb;
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --border-color: #d1d5db;
    --regal-golden: #4C1D95;
    /* Using Royal Purple as primary accent in light mode */
    --regal-purple: #ffffff;
    /* For button text contrast */
    --regal-white: #111827;
    /* Inverting white for nav links etc */
    --glass-bg: rgba(255, 255, 255, 0.9);
    --glass-border: rgba(0, 0, 0, 0.1);
    --shadow-premium: 0 10px 30px rgba(0, 0, 0, 0.05);
    --regal-lavender: #4b5563;

    /* Input Tokens - Light */
    --input-bg: #f9fafb;
    --input-border: #d1d5db;
    --input-text: #111827;
    --input-placeholder: #9ca3af;
    --input-focus-border: #4C1D95;
    --input-label: #374151;
}

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

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* --- Layout Components --- */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 768px) {
    .container {
        padding: 0 1rem;
    }
}

.section-padding {
    padding: 60px 0;
}

@media (min-width: 768px) {
    .section-padding {
        padding: 100px 0;
    }
}

/* --- Typography System --- */
.text-display {
    font-size: clamp(1.5rem, 8vw, 3.5rem);
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 1.1;
}

.text-h1 {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.2;
}

.text-h2 {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.3;
}

/* --- Navigation Fixes --- */
.site-nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

@media (min-width: 1200px) {
    .site-nav {
        gap: 3rem;
    }
}

/* --- Stats Grid Mobile Fix --- */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 3rem;
    }
}

/* --- Mobile Utility --- */
@media (max-width: 1023px) {
    .hide-mobile {
        display: none !important;
    }
}

.text-h3 {
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.4;
}

.text-description {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.text-small {
    font-size: 0.8rem;
    font-weight: 500;
}

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

.gradient-text {
    color: var(--regal-golden);
    display: inline-block;
}

/* --- Utility Classes --- */
.text-\[8px\] {
    font-size: 8px;
}

.text-\[9px\] {
    font-size: 9px;
}

.text-\[10px\] {
    font-size: 10px;
}

.text-\[11px\] {
    font-size: 11px;
}

.text-\[12px\] {
    font-size: 12px;
}

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

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

.text-lg {
    font-size: 1.125rem;
}

.text-xl {
    font-size: 1.25rem;
}

.font-medium {
    font-weight: 500;
}

.font-semibold {
    font-weight: 600;
}

.font-bold {
    font-weight: 700;
}

.font-extrabold {
    font-weight: 800;
}

.font-black {
    font-weight: 900;
}

.uppercase {
    text-transform: uppercase;
}

.tracking-tight {
    letter-spacing: -0.025em;
}

.tracking-wide {
    letter-spacing: 0.025em;
}

.tracking-wider {
    letter-spacing: 0.05em;
}

.tracking-widest {
    letter-spacing: 0.1em;
}

.rounded {
    border-radius: 0.25rem;
}

.rounded-md {
    border-radius: 0.375rem;
}

.rounded-lg {
    border-radius: 0.5rem;
}

.rounded-xl {
    border-radius: 0.75rem;
}

.rounded-2xl {
    border-radius: 1rem;
}

.rounded-full {
    border-radius: 9999px;
}

.p-1 {
    padding: 0.25rem;
}

.p-2 {
    padding: 0.5rem;
}

.p-3 {
    padding: 0.75rem;
}

.p-4 {
    padding: 1rem;
}

.px-1 {
    padding-left: 0.25rem;
    padding-right: 0.25rem;
}

.px-2 {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.px-3 {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

.px-5 {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

.px-6 {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.py-0\.5 {
    padding-top: 0.125rem;
    padding-bottom: 0.125rem;
}

.py-1 {
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

.py-1\.5 {
    padding-top: 0.375rem;
    padding-bottom: 0.375rem;
}

.py-2 {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.py-3 {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.mr-1 {
    margin-right: 0.25rem;
}

.mr-2 {
    margin-right: 0.5rem;
}

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

.mb-2 {
    margin-bottom: 0.5rem;
}

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

.mt-2 {
    margin-top: 0.5rem;
}

.inline-block {
    display: inline-block;
}

.flex {
    display: flex;
}

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

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

.gap-1 {
    gap: 0.25rem;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 0.75rem;
}

.gap-4 {
    gap: 1rem;
}

.w-full {
    width: 100%;
}

.h-full {
    height: 100%;
}

.bg-blue-500\/20 {
    background-color: rgba(59, 130, 246, 0.2);
}

.bg-yellow-500\/20 {
    background-color: rgba(234, 179, 8, 0.2);
}

.bg-purple-500\/20 {
    background-color: rgba(168, 85, 247, 0.2);
}

.bg-green-500\/20 {
    background-color: rgba(34, 197, 94, 0.2);
}

.bg-red-500\/20 {
    background-color: rgba(239, 68, 68, 0.2);
}

.text-blue-400 {
    color: #60a5fa;
}

.text-yellow-500 {
    color: #eab308;
}

.text-purple-400 {
    color: #c084fc;
}

.text-green-500 {
    color: #22c55e;
}

.text-red-400 {
    color: #f87171;
}

.border-blue-500\/20 {
    border-color: rgba(59, 130, 246, 0.2);
}

.border-yellow-500\/20 {
    border-color: rgba(234, 179, 8, 0.2);
}

.border-purple-500\/20 {
    border-color: rgba(168, 85, 247, 0.2);
}

.border-green-500\/20 {
    border-color: rgba(34, 197, 94, 0.2);
}

.border-red-500\/20 {
    border-color: rgba(239, 68, 68, 0.2);
}

/* --- Components --- */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 2rem;
    box-shadow: var(--shadow-premium);
    padding: 1.5rem;
    /* Default mobile padding */
}

@media (min-width: 768px) {
    .glass-card {
        padding: 2.5rem;
        /* Desktop padding */
    }
}

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

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-label {
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
    font-size: 0.7rem;
    color: var(--input-label);
    margin-bottom: 0.5rem;
}

.form-control,
.theme-input {
    width: 100%;
    padding: 0.75rem 1.25rem;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 0.75rem;
    color: var(--input-text);
    font-family: var(--font-main);
    font-size: 0.95rem;
    transition: var(--transition-base);
    outline: none;
}

.form-control::placeholder,
.theme-input::placeholder {
    color: var(--input-placeholder);
    opacity: 1;
}

.form-control:focus,
.theme-input:focus {
    border-color: var(--input-focus-border);
    background: var(--bg-surface);
    box-shadow: 0 0 0 4px rgba(255, 215, 0, 0.1);
}

.light-mode .form-control:focus,
.light-mode .theme-input:focus {
    box-shadow: 0 0 0 4px rgba(76, 29, 149, 0.1);
}

/* Specific Select Styling */
select.form-control,
select.theme-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1rem;
    padding-right: 2.5rem;
}

.form-control-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    border-radius: 0.5rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: var(--transition-base);
    border: none;
    font-family: var(--font-main);
    font-size: 0.85rem;
}

.btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.8rem;
}

.btn-primary {
    background: var(--regal-golden);
    color: var(--regal-purple);
    box-shadow: 0 10px 20px rgba(255, 215, 0, 0.2);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(255, 215, 0, 0.4);
    filter: brightness(1.1);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--regal-golden);
    color: var(--regal-golden);
}

.btn-outline:hover {
    background: var(--regal-golden);
    color: var(--regal-purple);
}

.btn-sm {
    padding: 0.4rem 1rem;
    font-size: 0.75rem;
}

.btn-xs {
    padding: 0.2rem 0.6rem;
    font-size: 0.65rem;
    letter-spacing: 0.5px;
}

.btn-purple {
    background: #4C1D95;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-purple:hover {
    background: #5b21b6;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(76, 29, 149, 0.4);
}

.btn-sm {
    padding: 0.6rem 1.5rem;
    font-size: 0.8rem;
}

.btn-xs {
    padding: 0.4rem 1rem;
    font-size: 0.7rem;
    border-radius: 8px;
}

.btn-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

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

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--regal-white);
    border: 1px solid var(--glass-border);
}

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

/* --- Header & Nav --- */
.site-header {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-link {
    color: var(--regal-white);
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition-base);
    position: relative;
    padding: 0.5rem 0;
}

.nav-link:hover,
.nav-link.active,
.group:hover .nav-link {
    color: var(--regal-golden) !important;
}

/* Submenu Styling */
.submenu-item {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--regal-white) !important;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 0.75rem;
    transition: var(--transition-base);
    text-decoration: none;
}

.submenu-item:hover,
.submenu-item.active {
    background: var(--bg-surface-lighter);
    color: var(--regal-golden) !important;
}

/* Submenu Styling */
.submenu-item {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--regal-white) !important;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 0.75rem;
    transition: var(--transition-base);
    text-decoration: none;
}

.submenu-item:hover,
.submenu-item.active {
    background: var(--bg-surface-lighter);
    color: var(--regal-golden) !important;
}

/* --- Tables & Lists --- */
.table-container {
    background: var(--bg-surface);
    border-radius: 1.5rem;
    overflow: hidden;
    border: 1px solid var(--glass-border);
}

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

.data-table th {
    background: var(--bg-surface-lighter);
    padding: 1rem;
    text-align: left;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--regal-golden);
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--glass-border);
}

.data-table tr:last-child td {
    border-bottom: none;
}

.status-badge {
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

/* --- Utilities --- */
.text-regal-golden {
    color: var(--regal-golden);
}

.bg-main {
    background-color: var(--bg-main);
}

.bg-surface {
    background-color: var(--bg-surface);
}

.shadow-premium {
    box-shadow: var(--shadow-premium);
}

.overflow-x-auto {
    overflow-x: auto;
}

/* --- Admin Enhanced Layout --- */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.admin-card {
    background: var(--bg-surface);
    border: 1px solid var(--glass-border);
    border-radius: 1.5rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

@media (min-width: 1024px) {
    .admin-card {
        padding: 2rem;
    }
}

.admin-section-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
    flex-wrap: wrap;
}

.admin-section-header h2 {
    margin-bottom: 0;
}

.admin-section-header p {
    margin-bottom: 0.2rem;
}

/* --- Admin Grid System --- */
.admin-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 1024px) {
    .admin-grid {
        grid-template-columns: repeat(12, 1fr);
    }

    .admin-col-4 {
        grid-column: span 4 / span 4;
    }

    .admin-col-5 {
        grid-column: span 5 / span 5;
    }

    .admin-col-6 {
        grid-column: span 6 / span 6;
    }

    .admin-col-7 {
        grid-column: span 7 / span 7;
    }

    .admin-col-8 {
        grid-column: span 8 / span 8;
    }

    .admin-col-12 {
        grid-column: span 12 / span 12;
    }
}

.form-control-sm {
    width: 100%;
    padding: 0.5rem 0.75rem;
    background: var(--bg-surface-lighter);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 0.85rem;
    transition: var(--transition-base);
}

.form-control-sm:focus {
    outline: none;
    border-color: var(--regal-golden);
    background: var(--bg-surface);
}

/* --- Modal System --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 5, 29, 0.9);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: none;
    /* Controlled by JS */
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.modal-overlay.active {
    display: flex;
    animation: fadeIn 0.3s ease-out;
}

.modal-container {
    background: var(--bg-surface);
    width: 100%;
    max-width: 650px;
    max-height: 90vh;
    border-radius: 2rem;
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-premium);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease-out;
}

.modal-container.modal-fixed-height {
    height: 80vh;
    max-height: 80vh;
}

.modal-container form {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.modal-header {
    padding: 2rem 2.5rem;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-surface-lighter);
}

.modal-body {
    padding: 2.5rem;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.modal-footer {
    padding: 1.5rem 2.5rem;
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    background: var(--bg-surface-lighter);
}

.close-modal {
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition-base);
}

.close-modal:hover {
    color: var(--regal-golden);
}

/* --- Header Fix: Always Dark --- */
.site-header {
    background: #1a1032 !important;
    /* Force dark background */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.site-header .nav-link {
    color: rgba(255, 255, 255, 0.7) !important;
    /* Soft white for inactive */
}

.site-header .nav-link:hover,
.site-header .nav-link.active {
    color: #ffffff !important;
    /* Pure white for active/hover */
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.site-header .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: #ffffff;
    border-radius: 2px;
}

/* Ensure Logo text stays white in header */
.site-header .gradient-text {
    color: #ffffff !important;
    background: none !important;
    -webkit-text-fill-color: #ffffff !important;
}

/* Theme Toggle Button in Header (Always Dark Background) */
.site-header .theme-toggle {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
}

.site-header .theme-toggle:hover {
    background: rgba(255, 255, 255, 0.2) !important;
}

/* --- Light Mode Specific Adjustments (Rest of the Page) --- */
.light-mode .glass-card {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.light-mode .text-muted {
    color: #4b5563;
    opacity: 0.8;
}

.light-mode .form-control {
    background: #ffffff;
    color: #111827;
    border-color: #d1d5db;
}

.light-mode .btn-primary {
    background: #4C1D95;
    /* Deep Purple */
    color: #ffffff;
    box-shadow: 0 10px 20px rgba(76, 29, 149, 0.2);
}

/* --- New Admin Sidebar Layout --- */
.admin-layout {
    display: grid !important;
    grid-template-columns: 280px 1fr !important;
    min-height: 100vh;
    background: var(--bg-main);
}

.admin-sidebar {
    width: 280px;
    background: var(--bg-surface);
    border-right: 1px solid var(--glass-border);
    height: 100vh;
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: var(--transition-base);
    overflow: hidden;
}

.sidebar-header {
    padding: 2rem 1.5rem;
    border-bottom: 1px solid var(--glass-border);
    flex-shrink: 0;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem 0;
    scrollbar-width: thin;
    scrollbar-color: var(--glass-border) transparent;
}

.nav-category {
    padding: 1.5rem 1.5rem 0.5rem;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-muted);
}

.nav-category:first-child {
    padding-top: 0;
}

.nav-item {
    display: block;
    width: 100%;
}

.nav-link-item {
    display: flex !important;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition-base);
    border-left: 3px solid transparent;
}

.nav-link-item i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

.nav-link-item:hover {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
}

.nav-link-item:hover i {
    color: var(--regal-golden);
}

.nav-link-item.active {
    background: rgba(139, 92, 246, 0.1);
    color: var(--regal-golden);
    border-left-color: var(--regal-golden);
}

.nav-link-item.active i {
    color: var(--regal-golden);
}

.has-submenu {
    position: relative;
}

.submenu-trigger {
    cursor: pointer;
    justify-content: space-between;
}

.submenu-arrow {
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

.nav-item.open .submenu-arrow {
    transform: rotate(90deg);
}

.nav-submenu {
    display: none;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.5rem 0;
    flex-direction: column;
}

.nav-item.open .nav-submenu {
    display: flex !important;
}

.submenu-link {
    display: flex !important;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1.5rem 0.6rem 3.25rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.8rem;
    transition: var(--transition-base);
}

.submenu-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.02);
}

.submenu-link.active {
    color: var(--regal-golden);
}

.admin-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: var(--bg-main);
}

.admin-topbar {
    height: 70px;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 90;
    flex-shrink: 0;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

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

    .admin-sidebar {
        position: fixed;
        left: -280px;
        z-index: 200;
        box-shadow: 20px 0 50px rgba(0, 0, 0, 0.5);
    }

    .admin-sidebar.mobile-open {
        left: 0;
    }
}

.light-mode .btn-primary:hover {
    box-shadow: 0 15px 30px rgba(76, 29, 149, 0.3);
}

/* --- Tab System --- */
.admin-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--glass-border);
}

.tab-btn {
    padding: 0.75rem 1.25rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-base);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    background: transparent;
    border-top: none;
    border-left: none;
    border-right: none;
    font-family: var(--font-main);
}

.tab-btn:hover {
    color: var(--text-primary);
}

.tab-btn.active {
    color: var(--regal-golden);
    border-bottom-color: var(--regal-golden);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

.theme-toggle {
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-surface-lighter);
}

.theme-toggle:hover {
    background: var(--bg-surface);
    transform: rotate(15deg);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

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

@keyframes slideDown {
    from {
        transform: translateY(0);
        opacity: 1;
    }

    to {
        transform: translateY(20px);
        opacity: 0;
    }
}

/* --- WhatsApp Floating Button --- */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #25d366;
    color: white;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    animation: pulse-whatsapp 2s infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    background-color: #128c7e;
    color: white;
}

@keyframes pulse-whatsapp {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
    }
}

/* --- Mobile Sidebar & Drawer --- */
.hamburger-icon {
    width: 32px !important;
    height: 32px !important;
    display: block !important;
    stroke: #ffffff !important;
    stroke-width: 2.5 !important;
}

#mobile-drawer {
    position: fixed !important;
    inset: 0 !important;
    z-index: 9999999 !important;
    visibility: hidden;
}

#mobile-drawer.drawer-active {
    visibility: visible !important;
}

#drawer-overlay {
    position: absolute !important;
    inset: 0 !important;
    background-color: rgba(0, 0, 0, 0.85) !important;
    backdrop-filter: blur(4px) !important;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#mobile-drawer.drawer-active #drawer-overlay {
    opacity: 1 !important;
}

#drawer-content {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    width: 320px !important;
    height: 100% !important;
    background-color: #0f0a1e !important;
    /* Solid background */
    box-shadow: -10px 0 50px rgba(0, 0, 0, 0.5) !important;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex !important;
    flex-direction: column !important;
    z-index: 10000 !important;
    border-left: 1px solid rgba(255, 255, 255, 0.1) !important;
}

#mobile-drawer.drawer-active #drawer-content {
    transform: translateX(0) !important;
}

/* Accordion Logic */
.mobile-accordion #mob-cat-list {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.mobile-accordion.active #mob-cat-list {
    max-height: 800px !important;
    opacity: 1 !important;
    margin-top: 1.5rem !important;
    margin-bottom: 1.5rem !important;
}

.mobile-accordion.active .dropdown-chevron {
    transform: rotate(180deg) !important;
}

@media (max-width: 767.98px) {
    #desktop-nav {
        display: none !important;
    }

    #mobile-toggle-container {
        display: flex !important;
    }
}

@media (min-width: 768px) {
    #desktop-nav {
        display: flex !important;
    }

    #mobile-toggle-container {
        display: none !important;
    }

    .site-header>.container {
        padding-top: 1rem !important;
        /* py-4 */
        padding-bottom: 1rem !important;
        /* py-4 */
    }

    .group:hover .dropdown-chevron {
        transform: rotate(180deg) !important;
    }
}

/* Card Width System */
.card-xs { width: 100%; max-width: 320px; margin: 0 auto; }
.card-sm { width: 100%; max-width: 450px; margin: 0 auto; }
.card-md { width: 100%; max-width: 560px; margin: 0 auto; }
.card-lg { width: 100%; max-width: 800px; margin: 0 auto; }
.card-xl { width: 100%; max-width: 1100px; margin: 0 auto; }
.card-full { width: 100%; max-width: 100%; margin: 0 auto; }

/* Reveal Animations */
.reveal { opacity: 0; transform: translateY(30px); transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1); }
.reveal.active { opacity: 1; transform: translateY(0); }

/* Mouse Follow Glow Effect */
.glow-card { position: relative; }
.glow-card::after { content: ''; position: absolute; inset: -1px; background: radial-gradient(400px circle at var(--mouse-x) var(--mouse-y), rgba(212, 175, 55, 0.15), transparent 40%); opacity: 0; transition: opacity 0.5s; pointer-events: none; z-index: 3; border-radius: inherit; }
.glow-card:hover::after { opacity: 1; }
