/* ========================================
   PREMIUM ANIMATIONS & MICRO-INTERACTIONS
   ======================================== */

/* Custom Scrollbar (Webkit) */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #0a0a0a;
}

::-webkit-scrollbar-thumb {
    background: var(--color-primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary-hover);
}

/* Page Entry Animation */
@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

main {
    animation: fadeSlideUp 0.4s ease-out;
}

:root {
    /* Colors */
    --color-primary: #D92323;
    --color-primary-hover: #B01C1C;
    --color-bg: #121212;
    --color-text: #f1f5f9;
    --color-text-muted: #94a3b8;
    --color-surface: rgba(30, 41, 59, 0.7);
    --color-border: rgba(255, 255, 255, 0.1);
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    
    /* Glassmorphism */
    --glass-bg: rgba(30, 41, 59, 0.6);
    --glass-border: 1px solid rgba(255, 255, 255, 0.1);
    --glass-blur: blur(12px);
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    
    /* Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
}

html.dark {
    --color-bg: #121212;
    --color-text: #f1f5f9;
    --color-text-muted: #94a3b8;
    --color-surface: rgba(30, 41, 59, 0.7);
    --color-border: rgba(255, 255, 255, 0.1);
    --glass-bg: rgba(30, 41, 59, 0.6);
    --glass-border: 1px solid rgba(255, 255, 255, 0.1);
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.5;
    min-height: 100vh;
    background-image: url('/brand/background.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

/* Utilities */
.text-primary { color: var(--color-primary); }
.text-success { color: #34d399; }
.text-danger { color: #f87171; }

/* Components */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    padding: 1.5rem;
    transition: all 0.3s ease;
}

a.glass-panel:hover {
    transform: translateY(-3px);
    border-color: var(--glass-border-hover);
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.5);
}

.glass-panel:hover {
    border-color: var(--glass-border-hover);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-md);
}

.full-height {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.center-content {
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-sidebar {
    max-width: 50px;
    height: auto;
}

.logo-login {
    max-width: 250px;
    height: auto;
    display: block;
    margin: 0 auto;
}

.light-mode-only {
    display: none;
}

html.light .light-mode-only {
    display: block;
}

html.light .dark-mode-only {
    display: none;
}

/* Forms */
.form-group {
    margin-bottom: var(--spacing-sm);
}

.form-label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-weight: 500;
    color: var(--color-text);
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    background: rgba(0, 0, 0, 0.3);
    color: var(--color-text);
    font-size: 1rem;
    transition: all 0.2s;
}

/* Tables */
.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.table th,
.table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}

.table th {
    background: rgba(255, 255, 255, 0.05);
    font-weight: 600;
    color: var(--color-text-muted);
}

.table tbody tr {
    transition: all 0.2s ease;
}

.table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
    transform: translateY(-2px);
}

.form-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(217, 35, 35, 0.2);
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--color-primary);
    color: white;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.3);
    background-color: var(--color-primary-hover);
}

.btn-block {
    width: 100%;
}

.alert {
    padding: var(--spacing-sm);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-sm);
    font-size: 0.9rem;
}

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

/* Sidebar Navigation */
.sidebar {
    width: 250px;
    height: calc(100vh - 3rem);
    position: sticky;
    top: 1.5rem;
    margin-right: 1.5rem;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
}

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

.brand-logo {
    max-width: 150px;
    height: auto;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    color: var(--color-primary);
    text-decoration: none;
    transition: all 0.2s;
}

.nav-item:hover, .nav-item.active {
    color: var(--color-primary-hover);
}

.nav-icon {
    width: 24px;
    height: 24px;
    min-width: 24px; /* Prevent shrinking */
    color: inherit; 
}

.user-menu {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--color-border);
}

/* Pagination */
.pagination {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    height: 2rem;
    padding: 0 0.5rem;
    border-radius: 0.375rem;
    background: rgba(255, 255, 255, 0.05);
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.page-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-text);
}

.page-link.active {
    background: var(--color-primary);
    color: white;
    font-weight: 600;
}


