@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&display=swap');

:root {
    /* Color Palette */
    --bg-main: #0a0b0e;
    --bg-surface: #12141c;
    --bg-surface-elevated: #1a1e2a;
    --border-color: rgba(197, 160, 89, 0.15);
    --border-color-focus: rgba(212, 175, 55, 0.6);
    
    /* Brand Colors (Gold & Dark Luxury) */
    --gold-primary: #d4af37;
    --gold-secondary: #b8860b;
    --gold-dark: #8c6212;
    --gold-light: #f3e5ab;
    --gold-gradient: linear-gradient(135deg, #f3e5ab 0%, #d4af37 50%, #b8860b 100%);
    --gold-glow: 0 0 15px rgba(212, 175, 55, 0.25);
    
    /* Semantic Colors */
    --text-primary: #f5f6f8;
    --text-secondary: #8b949e;
    --text-muted: #626a73;
    
    --success: #2ea44f;
    --danger: #cf222e;
    --warning: #d29922;
    --info: #58a6ff;
    
    /* Layout Constants */
    --sidebar-width: 260px;
    --navbar-height: 70px;
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --border-radius-lg: 20px;
    
    /* Shadow / Blur Effects */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5);
    --glass-bg: rgba(18, 20, 28, 0.65);
    --glass-blur: blur(12px);
    
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.5;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    letter-spacing: -0.02em;
    color: #ffffff;
}

.font-serif {
    font-family: 'Playfair Display', serif;
}

a {
    color: var(--gold-primary);
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover {
    color: var(--gold-light);
}

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

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

@keyframes pulseGold {
    0% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(212, 175, 55, 0); }
    100% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0); }
}

/* Utility Classes */
.animate-fade-in {
    animation: fadeIn var(--transition-normal);
}

.animate-slide-up {
    animation: slideUp var(--transition-normal);
}

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

/* Glassmorphism Container */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.65rem 1.25rem;
    border-radius: var(--border-radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-primary {
    background: var(--gold-gradient);
    color: #0a0b0e;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--gold-glow);
}

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

.btn-secondary:hover {
    background: rgba(197, 160, 89, 0.08);
    border-color: var(--gold-primary);
}

.btn-danger {
    background: rgba(207, 34, 46, 0.15);
    color: #ff7b72;
    border-color: rgba(207, 34, 46, 0.4);
}

.btn-danger:hover {
    background: var(--danger);
    color: #ffffff;
}

/* Inputs and Forms */
.form-group {
    margin-bottom: 1.25rem;
}

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

.form-control {
    width: 100%;
    background-color: rgba(10, 11, 14, 0.6);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: #ffffff;
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    padding: 0.75rem 1rem;
    transition: var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--border-color-focus);
    box-shadow: var(--gold-glow);
}

/* Checkbox */
.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.form-check input {
    accent-color: var(--gold-primary);
}

/* Alerts */
.alert {
    padding: 0.75rem 1.25rem;
    border-radius: var(--border-radius-sm);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid transparent;
}

.alert-danger {
    background-color: rgba(207, 34, 46, 0.15);
    border-color: rgba(207, 34, 46, 0.3);
    color: #ff7b72;
}

.alert-success {
    background-color: rgba(46, 164, 79, 0.15);
    border-color: rgba(46, 164, 79, 0.3);
    color: #56d364;
}

.alert-info {
    background-color: rgba(88, 166, 255, 0.15);
    border-color: rgba(88, 166, 255, 0.3);
    color: #79c0ff;
}

/* --- LOGIN PAGE SPECIAL STYLE --- */
.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 1.5rem;
    position: relative;
}

.login-wrapper::before {
    content: '';
    position: absolute;
    top: 15%;
    left: 20%;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.15) 0%, rgba(0,0,0,0) 70%);
    z-index: 0;
}

.login-wrapper::after {
    content: '';
    position: absolute;
    bottom: 15%;
    right: 20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(184, 134, 11, 0.1) 0%, rgba(0,0,0,0) 70%);
    z-index: 0;
}

.login-container {
    width: 100%;
    max-width: 440px;
    position: relative;
    z-index: 1;
}

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

.login-logo {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.login-card {
    padding: 2.5rem;
}

.login-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* --- SYSTEM LAYOUT --- */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-surface);
    border-right: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    transition: var(--transition-normal);
}

.sidebar-brand {
    height: var(--navbar-height);
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.brand-text {
    font-size: 1.3rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-menu {
    list-style: none;
    padding: 1.5rem 0.75rem;
    overflow-y: auto;
    flex-grow: 1;
}

.menu-item {
    margin-bottom: 0.35rem;
}

.menu-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius-sm);
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition-fast);
}

.menu-link i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.menu-link:hover, .menu-item.active .menu-link {
    color: #ffffff;
    background-color: rgba(197, 160, 89, 0.08);
}

.menu-item.active .menu-link {
    border-left: 3px solid var(--gold-primary);
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    color: var(--gold-primary);
}

.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.user-profile-summary {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: var(--bg-surface-elevated);
    border: 1px solid var(--gold-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--gold-primary);
    overflow: hidden;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-info-text {
    line-height: 1.2;
}

.user-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #ffffff;
}

.user-role {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: capitalize;
}

.logout-icon-btn {
    color: var(--text-muted);
    font-size: 1.1rem;
    transition: var(--transition-fast);
}

.logout-icon-btn:hover {
    color: var(--danger);
}

/* Main Content Area */
.main-content {
    margin-left: var(--sidebar-width);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Navbar */
.navbar {
    height: var(--navbar-height);
    background-color: rgba(10, 11, 14, 0.75);
    backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--border-color);
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 99;
}

.navbar-title {
    font-size: 1.2rem;
    font-weight: 600;
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* Page Body */
.page-body {
    padding: 2rem;
    flex-grow: 1;
}

/* --- DASHBOARD WIDGETS --- */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--border-radius-sm);
    background: rgba(197, 160, 89, 0.1);
    color: var(--gold-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    border: 1px solid var(--border-color);
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0.25rem 0;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-trend {
    font-size: 0.75rem;
    font-weight: 500;
}

.trend-up { color: var(--success); }
.trend-down { color: var(--danger); }

/* --- DATA TABLE STYLING --- */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.custom-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    background-color: var(--bg-surface);
}

.custom-table th {
    background-color: rgba(197, 160, 89, 0.04);
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.custom-table td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(197, 160, 89, 0.08);
    font-size: 0.95rem;
    color: var(--text-secondary);
    vertical-align: middle;
}

.custom-table tr:hover td {
    background-color: rgba(197, 160, 89, 0.02);
    color: #ffffff;
}

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

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.badge-success {
    background-color: rgba(46, 164, 79, 0.15);
    color: #56d364;
    border: 1px solid rgba(46, 164, 79, 0.3);
}

.badge-danger {
    background-color: rgba(207, 34, 46, 0.15);
    color: #ff7b72;
    border: 1px solid rgba(207, 34, 46, 0.3);
}

.badge-warning {
    background-color: rgba(210, 153, 34, 0.15);
    color: #e3b341;
    border: 1px solid rgba(210, 153, 34, 0.3);
}

.badge-info {
    background-color: rgba(88, 166, 255, 0.15);
    color: #79c0ff;
    border: 1px solid rgba(88, 166, 255, 0.3);
}

/* Pagination */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
}

/* Card General */
.card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.card-title {
    font-size: 1.1rem;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-normal);
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content-wrapper {
    width: 100%;
    max-width: 500px;
    transform: translateY(20px);
    transition: var(--transition-normal);
}

.modal-overlay.active .modal-content-wrapper {
    transform: translateY(0);
}

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

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
}

.modal-close:hover {
    color: #ffffff;
}

/* --- Page Header & Actions --- */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    gap: 1rem;
    flex-wrap: wrap;
}
.page-title {
    font-size: 1.8rem;
    font-weight: 700;
}
.page-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-top: 0.25rem;
}
.page-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

/* --- Dashboard Tables Grid --- */
.dashboard-tables-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* --- Empty States --- */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
    color: var(--text-muted);
    text-align: center;
    background-color: var(--bg-surface);
    border-radius: var(--border-radius);
    border: 1px dashed var(--border-color);
}
.empty-state i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: rgba(197, 160, 89, 0.25);
}

/* --- Detail Layouts --- */
.detail-grid {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 1.5rem;
    align-items: start;
}
@media (max-width: 992px) {
    .detail-grid {
        grid-template-columns: 1fr;
    }
}

.profile-card {
    text-align: center;
    padding: 2rem 1.5rem;
}
.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--gold-gradient);
    color: #0a0b0e;
    font-size: 2.2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    box-shadow: var(--gold-glow);
}
.profile-name {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}
.profile-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: rgba(197, 160, 89, 0.08);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    font-size: 0.8rem;
    color: var(--gold-primary);
    margin-bottom: 1.5rem;
}
.profile-info {
    text-align: left;
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
    margin-top: 1.5rem;
}
.info-item {
    margin-bottom: 1rem;
}
.info-item:last-child {
    margin-bottom: 0;
}
.info-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}
.info-value {
    font-size: 0.95rem;
    color: var(--text-primary);
    word-break: break-all;
}

/* --- Metrics Grid --- */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.metric-box {
    background: rgba(10, 11, 14, 0.4);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 1rem;
}
.metric-box-title {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}
.metric-box-value {
    font-size: 1.4rem;
    font-weight: 700;
}

/* --- Tab Control --- */
.tabs-wrapper {
    margin-top: 1.5rem;
}
.tabs-header {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
    gap: 1.5rem;
}
.tab-link {
    padding: 0.75rem 0.5rem;
    color: var(--text-secondary);
    font-weight: 500;
    cursor: pointer;
    position: relative;
    border-bottom: 2px solid transparent;
    transition: var(--transition-fast);
}
.tab-link:hover, .tab-link.active {
    color: #ffffff;
}
.tab-link.active {
    border-color: var(--gold-primary);
    color: var(--gold-primary);
}
.tab-pane {
    display: none;
}
.tab-pane.active {
    display: block;
    animation: fadeIn var(--transition-normal);
}

/* --- Filter & Search Controls --- */
.search-filter-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    align-items: center;
    flex-wrap: wrap;
}
.search-input-wrapper {
    position: relative;
    flex-grow: 1;
    max-width: 400px;
}
.search-input-wrapper i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}
.search-input-wrapper .form-control {
    padding-left: 2.5rem;
}

/* Responsiveness */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.active {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
    }
}

