/* =============================================
   EBSit - IT Equipment Borrowing System
   Premium Dark Mode Design System
   ============================================= */

/* ===== CSS Variables ===== */
:root {
    /* Colors */
    --bg-primary: #0a0e1a;
    --bg-secondary: #111827;
    --bg-card: rgba(17, 24, 39, 0.8);
    --bg-card-hover: rgba(31, 41, 55, 0.9);
    --bg-sidebar: rgba(15, 23, 42, 0.95);
    --bg-input: rgba(31, 41, 55, 0.6);
    --bg-modal: rgba(0, 0, 0, 0.7);

    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-white: #ffffff;

    --border-color: rgba(148, 163, 184, 0.12);
    --border-light: rgba(148, 163, 184, 0.06);

    --accent-cyan: #06b6d4;
    --accent-blue: #3b82f6;
    --accent-purple: #8b5cf6;
    --accent-green: #10b981;
    --accent-amber: #f59e0b;
    --accent-red: #ef4444;
    --accent-pink: #ec4899;

    --gradient-primary: linear-gradient(135deg, #06b6d4, #3b82f6);
    --gradient-success: linear-gradient(135deg, #10b981, #06b6d4);
    --gradient-warning: linear-gradient(135deg, #f59e0b, #f97316);
    --gradient-danger: linear-gradient(135deg, #ef4444, #ec4899);
    --gradient-purple: linear-gradient(135deg, #8b5cf6, #ec4899);

    /* Glass */
    --glass-bg: rgba(255, 255, 255, 0.04);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);

    /* Sizing */
    --sidebar-width: 260px;
    --sidebar-collapsed: 70px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;

    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Kanit', 'Inter', -apple-system, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    overflow-x: hidden;
}

a { color: var(--accent-cyan); text-decoration: none; transition: var(--transition-fast); }
a:hover { color: var(--accent-blue); }

code {
    background: var(--bg-input);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.85em;
    color: var(--accent-cyan);
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--text-muted); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-secondary); }

/* ===== Sidebar ===== */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: var(--transition);
}

.sidebar-header {
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-white);
}

.sidebar-logo i {
    font-size: 1.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-toggle {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
    display: none;
}

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

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 400;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--gradient-primary);
    border-radius: 0 4px 4px 0;
    opacity: 0;
    transition: var(--transition);
}

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

.nav-item.active {
    background: rgba(6, 182, 212, 0.1);
    color: var(--accent-cyan);
    font-weight: 500;
}

.nav-item.active::before { opacity: 1; }

.nav-item i {
    width: 22px;
    text-align: center;
    font-size: 1.05rem;
}

.nav-divider {
    height: 1px;
    background: var(--border-color);
    margin: 12px 0;
}

.nav-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    padding: 4px 16px;
    font-weight: 500;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border-color);
}

.user-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: var(--radius-md);
    background: var(--glass-bg);
}

.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-white);
    font-size: 0.9rem;
    flex-shrink: 0;
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-name {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    display: block;
    font-size: 0.72rem;
    color: var(--text-muted);
}

.btn-logout {
    color: var(--text-muted);
    padding: 6px 8px;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.btn-logout:hover {
    color: var(--accent-red);
    background: rgba(239, 68, 68, 0.1);
}

/* ===== Main Content ===== */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: var(--transition);
}

.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 30px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.page-title {
    font-size: 1.4rem;
    font-weight: 600;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.current-date {
    color: var(--text-secondary);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.current-date i {
    color: var(--accent-cyan);
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.3rem;
    cursor: pointer;
    padding: 6px;
}

.content-wrapper {
    padding: 30px;
}

/* ===== Stats Grid ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
}

.stat-card-total::before { background: var(--gradient-primary); }
.stat-card-available::before { background: var(--gradient-success); }
.stat-card-borrowed::before { background: var(--gradient-warning); }
.stat-card-overdue::before { background: var(--gradient-danger); }

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

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

.stat-card-total .stat-icon { background: rgba(6, 182, 212, 0.15); color: var(--accent-cyan); }
.stat-card-available .stat-icon { background: rgba(16, 185, 129, 0.15); color: var(--accent-green); }
.stat-card-borrowed .stat-icon { background: rgba(245, 158, 11, 0.15); color: var(--accent-amber); }
.stat-card-overdue .stat-icon { background: rgba(239, 68, 68, 0.15); color: var(--accent-red); }

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    font-family: 'Inter', sans-serif;
}

.stat-label {
    display: block;
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* ===== Cards ===== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(10px);
    margin-bottom: 24px;
    animation: fadeInUp 0.4s ease;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.card-header h2 {
    font-size: 1.1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-header h2 i {
    color: var(--accent-cyan);
}

.card-body {
    padding: 24px;
}

/* ===== Tables ===== */
.table-responsive {
    overflow-x: auto;
}

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

.table th {
    background: rgba(6, 182, 212, 0.08);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 14px 16px;
    text-align: left;
    white-space: nowrap;
    border-bottom: 1px solid var(--border-color);
}

.table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.9rem;
    vertical-align: middle;
}

.table tbody tr {
    transition: var(--transition-fast);
}

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

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

.row-overdue {
    background: rgba(239, 68, 68, 0.05) !important;
}

.equipment-name-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.equipment-cell-icon {
    color: var(--accent-cyan);
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

/* ===== Badges ===== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
}

.badge-success { background: rgba(16, 185, 129, 0.15); color: var(--accent-green); }
.badge-warning { background: rgba(245, 158, 11, 0.15); color: var(--accent-amber); }
.badge-danger { background: rgba(239, 68, 68, 0.15); color: var(--accent-red); }
.badge-info { background: rgba(6, 182, 212, 0.15); color: var(--accent-cyan); }
.badge-primary { background: rgba(59, 130, 246, 0.15); color: var(--accent-blue); }
.badge-secondary { background: rgba(148, 163, 184, 0.15); color: var(--text-secondary); }

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    text-decoration: none;
}

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
    background: var(--gradient-primary);
    color: var(--text-white);
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.3);
}
.btn-primary:hover { box-shadow: 0 6px 20px rgba(6, 182, 212, 0.5); color: var(--text-white); }

.btn-secondary {
    background: var(--bg-input);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}
.btn-secondary:hover { background: rgba(51, 65, 85, 0.6); color: var(--text-primary); }

.btn-success {
    background: var(--gradient-success);
    color: var(--text-white);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}
.btn-success:hover { box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5); color: var(--text-white); }

.btn-warning {
    background: var(--gradient-warning);
    color: var(--text-white);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}
.btn-warning:hover { box-shadow: 0 6px 20px rgba(245, 158, 11, 0.5); color: var(--text-white); }

.btn-danger {
    background: var(--gradient-danger);
    color: var(--text-white);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}
.btn-danger:hover { box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5); color: var(--text-white); }

.btn-tapee {
    background: #ffffff;
    color: #3c4043;
    border: 1px solid #dadce0;
    font-weight: 500;
}
.btn-tapee:hover { background: #f8f9fa; color: #3c4043; box-shadow: 0 1px 3px rgba(60,64,67,0.3); }
.google-icon {
    width: 18px;
    height: 18px;
    margin-right: 8px;
}

.btn-block { display: flex; width: 100%; }
.btn-sm { padding: 7px 14px; font-size: 0.82rem; }
.btn-xs { padding: 5px 10px; font-size: 0.75rem; }

.btn-group {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.btn-group-vertical {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* ===== Forms ===== */
.form-modern {
    max-width: 700px;
}

.form-group {
    margin-bottom: 18px;
    flex: 1;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    transition: var(--transition);
    outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.15);
}

.form-group select {
    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'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

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

.form-row {
    display: flex;
    gap: 16px;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.input-icon {
    position: relative;
}

.input-icon i:first-child {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.9rem;
    pointer-events: none;
}

.input-icon input {
    padding-left: 42px !important;
}

.toggle-password {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
}

.toggle-password:hover { color: var(--text-primary); }

/* ===== Filter Bar ===== */
.filter-bar {
    margin-bottom: 24px;
}

.filter-form {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-group {
    min-width: 160px;
}

.filter-group select,
.filter-group .input-icon input {
    padding: 10px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.85rem;
    width: 100%;
    outline: none;
    transition: var(--transition);
}

.filter-group select {
    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'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.filter-group select:focus,
.filter-group .input-icon input:focus {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1);
}

.filter-group .input-icon input {
    padding-left: 38px;
}

.filter-group .input-icon i {
    font-size: 0.8rem;
}

/* ===== Equipment Grid ===== */
.equipment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.equipment-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: var(--transition);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(10px);
    animation: fadeInUp 0.4s ease;
}

.equipment-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--glass-shadow);
    border-color: rgba(6, 182, 212, 0.2);
}

.equipment-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 20px 12px;
}

.equipment-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: rgba(6, 182, 212, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-cyan);
    font-size: 1.3rem;
}

.equipment-card-body {
    padding: 0 20px 12px;
    flex: 1;
}

.equipment-card-body h3 {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 8px;
    line-height: 1.4;
}

.equipment-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 8px;
}

.equipment-meta span {
    font-size: 0.78rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.equipment-meta span i {
    width: 14px;
    text-align: center;
    color: var(--text-muted);
}

.equipment-desc {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.equipment-card-footer {
    padding: 12px 20px 20px;
}

/* ===== Modal ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg-modal);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    padding: 20px;
}

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

.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9) translateY(20px);
    transition: var(--transition);
}

.modal-lg { max-width: 700px; }

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

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 1.1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-header h3 i { color: var(--accent-cyan); }

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    transition: var(--transition-fast);
}

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

.modal-body { padding: 24px; }
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
}

/* ===== Alerts ===== */
.alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    font-size: 0.9rem;
    animation: fadeInDown 0.4s ease;
    position: relative;
}

.alert-floating {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 3000;
    min-width: 300px;
    box-shadow: var(--glass-shadow);
}

.alert-success { background: rgba(16, 185, 129, 0.12); border: 1px solid rgba(16, 185, 129, 0.2); color: var(--accent-green); }
.alert-danger { background: rgba(239, 68, 68, 0.12); border: 1px solid rgba(239, 68, 68, 0.2); color: var(--accent-red); }
.alert-info { background: rgba(6, 182, 212, 0.12); border: 1px solid rgba(6, 182, 212, 0.2); color: var(--accent-cyan); }

.alert-link {
    margin-left: auto;
    font-weight: 500;
    white-space: nowrap;
}

.alert-close {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: inherit;
    font-size: 1.3rem;
    cursor: pointer;
    opacity: 0.6;
    padding: 4px;
    line-height: 1;
}

.alert-close:hover { opacity: 1; }

/* ===== Empty State ===== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.3;
}

.empty-state p {
    font-size: 1rem;
    margin-bottom: 20px;
}

/* ===== Text Helpers ===== */
.text-muted { color: var(--text-muted) !important; }
.text-danger { color: var(--accent-red) !important; }
.text-success { color: var(--accent-green) !important; }

/* ===== Auth Pages ===== */
.auth-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--bg-primary);
    padding: 20px;
}

.auth-container {
    position: relative;
    width: 100%;
    max-width: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    backdrop-filter: blur(20px);
    padding: 40px 36px;
    width: 100%;
    animation: fadeInUp 0.6s ease;
    position: relative;
    z-index: 2;
}

.auth-card-wide {
    max-width: 550px;
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo {
    width: 150px;
    height: 150px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 4px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.auth-form .input-icon input {
    width: 100%;
    padding: 14px 16px 14px 46px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition);
}

.auth-form .input-icon input:focus {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.15);
}

.auth-form .btn-block {
    margin-top: 8px;
    padding: 14px;
    font-size: 1rem;
}

.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 10px 0;
    color: var(--text-muted);
}
.auth-divider::before, .auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}
.auth-divider span {
    padding: 0 10px;
    font-size: 0.85rem;
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.auth-footer p {
    color: var(--text-secondary);
    font-size: 0.88rem;
}

.auth-footer a {
    color: var(--accent-cyan);
    font-weight: 500;
}

.auth-footer a:hover {
    color: var(--accent-blue);
}

/* Auth background shapes */
.auth-bg-shapes {
    position: fixed;
    inset: 0;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.15;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: var(--accent-cyan);
    top: -100px;
    right: -100px;
    animation: float 8s ease-in-out infinite;
}

.shape-2 {
    width: 350px;
    height: 350px;
    background: var(--accent-purple);
    bottom: -80px;
    left: -80px;
    animation: float 10s ease-in-out infinite reverse;
}

.shape-3 {
    width: 250px;
    height: 250px;
    background: var(--accent-blue);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: float 12s ease-in-out infinite;
}

/* ===== Animations ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    33% { transform: translate(30px, -30px); }
    66% { transform: translate(-20px, 20px); }
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
        box-shadow: 10px 0 40px rgba(0, 0, 0, 0.5);
    }

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

    .mobile-toggle {
        display: block;
    }

    .content-wrapper {
        padding: 20px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .equipment-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
}

@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 0;
    }

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

    .filter-group {
        width: 100%;
        min-width: auto;
    }

    .top-bar {
        padding: 14px 16px;
    }

    .page-title {
        font-size: 1.1rem;
    }

    .table {
        font-size: 0.82rem;
    }

    .table th, .table td {
        padding: 10px 12px;
    }

    .auth-card {
        padding: 30px 24px;
    }

    .auth-container {
        max-width: 100%;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .stat-card {
        padding: 16px;
        gap: 14px;
    }

    .stat-icon {
        width: 44px;
        height: 44px;
        font-size: 1.1rem;
    }

    .stat-number {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .equipment-grid {
        grid-template-columns: 1fr;
    }

    .btn-group {
        flex-direction: column;
    }
}
