/* ==========================================================
   FEB UBK ENTERPRISE ADMIN THEME & DESIGN SYSTEM
   Modern, Intuitive, Glassmorphism, Cross-Browser Perfection
   ========================================================== */

:root {
    --adm-bg-main: #0b0f19;
    --adm-bg-sidebar: #0f172a;
    --adm-bg-card: rgba(30, 41, 59, 0.7);
    --adm-border: rgba(255, 255, 255, 0.08);
    --adm-border-hover: rgba(56, 189, 248, 0.3);
    --adm-text-main: #f8fafc;
    --adm-text-muted: #94a3b8;
    --adm-primary: #2563eb;
    --adm-primary-hover: #1d4ed8;
    --adm-accent: #38bdf8;
    --adm-success: #10b981;
    --adm-danger: #ef4444;
    --adm-warning: #f59e0b;
    --adm-radius: 14px;
    --adm-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body.admin-body {
    background-color: var(--adm-bg-main);
    color: var(--adm-text-main);
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-height: 100vh;
    display: flex;
    overflow-x: hidden;
}

/* ==========================================
   SIDEBAR
   ========================================== */
.admin-sidebar {
    width: 280px;
    background: var(--adm-bg-sidebar);
    border-right: 1px solid var(--adm-border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar-brand {
    padding: 24px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    border-bottom: 1px solid var(--adm-border);
}

.sidebar-brand img {
    height: 42px;
    width: auto;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5));
}

.sidebar-brand-text h2 {
    font-size: 17px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.5px;
    line-height: 1.2;
}

.sidebar-brand-text p {
    font-size: 11px;
    color: var(--adm-accent);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 20px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-header {
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    padding: 14px 12px 6px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: 10px;
    color: var(--adm-text-muted);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.nav-item i {
    font-size: 16px;
    width: 22px;
    text-align: center;
    color: #64748b;
    transition: color 0.2s;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
}

.nav-item:hover i {
    color: var(--adm-accent);
}

.nav-item.active {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.2), rgba(56, 189, 248, 0.1));
    color: #38bdf8;
    border-left: 3px solid #38bdf8;
    font-weight: 600;
}

.nav-item.active i {
    color: #38bdf8;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--adm-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ==========================================
   MAIN CONTENT WRAPPER
   ========================================== */
.admin-main {
    margin-left: 280px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: radial-gradient(circle at top right, rgba(37, 99, 235, 0.08), transparent 40%),
                radial-gradient(circle at bottom left, rgba(6, 182, 212, 0.05), transparent 40%);
}

/* Topbar Header */
.admin-topbar {
    height: 72px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--adm-border);
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 900;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.sidebar-toggle-btn {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
}

.page-title {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Language Switcher */
.lang-switcher {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--adm-border);
    border-radius: 8px;
    padding: 3px;
}

.lang-btn {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    color: var(--adm-text-muted);
    transition: all 0.2s;
}

.lang-btn.active {
    background: #2563eb;
    color: #ffffff;
}

/* User Pill */
.user-pill {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 14px 6px 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--adm-border);
    border-radius: 30px;
    text-decoration: none;
    color: #fff;
}

.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb, #38bdf8);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: #fff;
}

.user-info {
    text-align: left;
    line-height: 1.2;
}

.user-name {
    font-size: 13px;
    font-weight: 600;
}

.user-role {
    font-size: 11px;
    color: var(--adm-accent);
}

/* ==========================================
   DEFAULT PASSWORD WARNING BANNER (Requirement 7)
   ========================================== */
.default-pass-alert {
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.2), rgba(245, 158, 11, 0.15));
    border-bottom: 1px solid rgba(239, 68, 68, 0.3);
    padding: 12px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #fca5a5;
    font-size: 13px;
    animation: pulseGlow 2s infinite alternate;
}

.default-pass-alert .alert-text {
    display: flex;
    align-items: center;
    gap: 10px;
}

.default-pass-alert .btn-change-pass {
    background: #ef4444;
    color: #ffffff;
    padding: 6px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 12px;
    transition: all 0.2s;
}

.default-pass-alert .btn-change-pass:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

/* Content Body */
.admin-content {
    flex: 1;
    padding: 32px;
}

/* Footer */
.admin-footer {
    padding: 20px 32px;
    border-top: 1px solid var(--adm-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: var(--adm-text-muted);
}

/* ==========================================
   CARDS & CONTAINERS
   ========================================== */
.admin-card {
    background: var(--adm-bg-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--adm-border);
    border-radius: var(--adm-radius);
    padding: 24px;
    box-shadow: var(--adm-shadow);
    margin-bottom: 24px;
    transition: border-color 0.2s;
}

.admin-card:hover {
    border-color: var(--adm-border-hover);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--adm-border);
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.stat-box {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid var(--adm-border);
    border-radius: var(--adm-radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    backdrop-filter: blur(12px);
    transition: all 0.25s ease;
}

.stat-box:hover {
    transform: translateY(-3px);
    border-color: rgba(56, 189, 248, 0.4);
    box-shadow: 0 10px 25px rgba(0,0,0,0.4);
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.stat-icon.blue { background: rgba(37, 99, 235, 0.15); color: #3b82f6; }
.stat-icon.emerald { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.stat-icon.cyan { background: rgba(6, 182, 212, 0.15); color: #06b6d4; }
.stat-icon.amber { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }

.stat-info h3 {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
}

.stat-info p {
    font-size: 12.5px;
    color: var(--adm-text-muted);
    margin: 2px 0 0;
}

/* ==========================================
   INPUTS & TEXTBOXES (Requirement 8)
   Consistent, Professional, Elegant Styling
   ========================================== */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #cbd5e1;
    margin-bottom: 8px;
}

.form-label.required::after {
    content: " *";
    color: var(--adm-danger);
}

.form-control,
.form-input,
.form-select,
.form-textarea {
    width: 100%;
    height: 44px;
    padding: 10px 16px;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    color: #ffffff;
    font-family: inherit;
    font-size: 14px;
    box-sizing: border-box;
    transition: all 0.25s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.form-textarea {
    height: auto;
    min-height: 100px;
    resize: vertical;
}

.form-control:focus,
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--adm-accent);
    background: rgba(15, 23, 42, 0.9);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

.form-control::placeholder,
.form-input::placeholder,
.form-textarea::placeholder {
    color: #64748b;
}

/* Custom Checkbox & Radio */
.form-check {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    cursor: pointer;
}

.form-check-input {
    width: 18px;
    height: 18px;
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(15, 23, 42, 0.8);
    cursor: pointer;
    accent-color: #2563eb;
}

.form-check-label {
    font-size: 13.5px;
    color: #e2e8f0;
    cursor: pointer;
}

/* ==========================================
   BUTTONS (Requirement 14)
   Consistent Across All Browsers
   ========================================== */
.btn {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border: none;
    outline: none;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 500;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    line-height: 1.2;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
}

.btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.btn-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 8px;
}

/* ==========================================
   DATA TABLES
   ========================================== */
.table-responsive {
    overflow-x: auto;
    border-radius: var(--adm-radius);
}

.adm-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13.5px;
    text-align: left;
}

.adm-table th {
    background: rgba(15, 23, 42, 0.85);
    color: #94a3b8;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 11.5px;
    letter-spacing: 0.5px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--adm-border);
}

.adm-table td {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #f1f5f9;
    vertical-align: middle;
}

.adm-table tr:hover td {
    background: rgba(255, 255, 255, 0.03);
}

.badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    display: inline-block;
}

.badge-success { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-danger { background: rgba(239, 68, 68, 0.15); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }
.badge-blue { background: rgba(37, 99, 235, 0.15); color: #60a5fa; border: 1px solid rgba(37, 99, 235, 0.3); }

/* ==========================================
   TABS SYSTEM (Settings Module)
   ========================================== */
.adm-tabs {
    display: flex;
    gap: 8px;
    border-bottom: 1px solid var(--adm-border);
    margin-bottom: 24px;
}

.adm-tab-btn {
    background: none;
    border: none;
    color: var(--adm-text-muted);
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    padding: 12px 20px;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.adm-tab-btn:hover {
    color: #ffffff;
}

.adm-tab-btn.active {
    color: #38bdf8;
    border-bottom-color: #38bdf8;
    font-weight: 600;
}

.tab-pane {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-pane.active {
    display: block;
}

/* Modal Dialog Styling */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(11, 15, 25, 0.75);
    backdrop-filter: blur(14px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    background: var(--adm-bg-sidebar);
    border: 1px solid var(--adm-border);
    border-radius: var(--adm-radius);
    padding: 28px;
    max-width: 650px;
    width: 100%;
    box-shadow: var(--adm-shadow);
    transform: scale(0.95);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    max-height: 90vh;
    overflow-y: auto;
}

.modal-overlay.active .modal-card {
    transform: scale(1);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--adm-border);
    margin-bottom: 20px;
}

.modal-title {
    font-size: 17px;
    font-weight: 600;
    color: #fff;
}

.modal-close {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 18px;
    cursor: pointer;
    transition: color 0.2s;
}

.modal-close:hover {
    color: #fff;
}

/* Mobile responsive */
@media (max-width: 991px) {
    .admin-sidebar {
        transform: translateX(-100%);
    }
    .admin-sidebar.open {
        transform: translateX(0);
    }
    .admin-main {
        margin-left: 0;
    }
    .sidebar-toggle-btn {
        display: block;
    }
}
