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

:root {
    --primary: #d4a574;
    --primary-dark: #c4956a;
    --bg-dark: #1a1a2e;
    --bg-darker: #16213e;
    --bg-card: #0f3460;
    --text: #ffffff;
    --text-muted: #a0a0a0;
    --success: #4ade80;
    --danger: #ef4444;
    --warning: #f59e0b;
    --sidebar-width: 250px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-darker) 50%, var(--bg-card) 100%);
    color: var(--text);
}

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.login-box {
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 2.5rem;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.3);
}

.logo {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 16px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    box-shadow: 0 10px 40px rgba(212, 165, 116, 0.3);
}

h1 {
    text-align: center;
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #fff 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

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

label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

input[type="text"],
input[type="password"],
input[type="email"],
select {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    background: rgba(255,255,255,0.05);
    color: var(--text);
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(212, 165, 116, 0.2);
}

.btn {
    display: inline-block;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    text-align: center;
}

.btn-primary {
    width: 100%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #1a1a2e;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(212, 165, 116, 0.3);
}

.btn-danger {
    background: var(--danger);
    color: white;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-success {
    background: var(--success);
    color: #1a1a2e;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-small {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
}

/* Desktop Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: rgba(0,0,0,0.2);
    padding: 1.5rem;
    border-right: 1px solid rgba(255,255,255,0.1);
    z-index: 100;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-logo .logo {
    width: 40px;
    height: 40px;
    font-size: 1.25rem;
    margin: 0;
    border-radius: 10px;
}

.sidebar-logo span {
    font-weight: 600;
    font-size: 1.1rem;
}

.sidebar .user-badge {
    padding: 1rem;
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.sidebar .user-badge .username {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.sidebar .user-badge .role {
    font-size: 0.85rem;
    color: var(--primary);
}

.nav-menu {
    list-style: none;
}

.nav-menu li {
    margin-bottom: 0.5rem;
}

.nav-menu a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.2s, color 0.2s;
}

.nav-menu a:hover,
.nav-menu a.active {
    background: rgba(255,255,255,0.1);
    color: var(--text);
}

/* Mobile Navbar */
.navbar {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(10px);
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    z-index: 1000;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text);
}

.navbar-brand .logo {
    width: 36px;
    height: 36px;
    font-size: 1.1rem;
    margin: 0;
    border-radius: 8px;
}

.navbar-brand span {
    font-weight: 600;
    font-size: 1.1rem;
}

.hamburger {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    cursor: pointer;
    z-index: 1001;
}

.hamburger span {
    display: block;
    height: 3px;
    width: 100%;
    background: var(--text);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    position: fixed;
    top: 60px;
    right: -300px;
    width: 280px;
    height: calc(100vh - 60px);
    background: rgba(15, 52, 96, 0.98);
    backdrop-filter: blur(10px);
    transition: right 0.3s ease;
    z-index: 999;
    padding: 1.5rem;
    border-left: 1px solid rgba(255,255,255,0.1);
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu .nav-menu {
    margin-top: 1rem;
}

.mobile-menu .nav-menu a {
    padding: 1rem;
    font-size: 1.1rem;
}

.mobile-menu .user-badge {
    padding: 1rem;
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    margin-bottom: 1rem;
}

.mobile-menu .user-badge .username {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.mobile-menu .user-badge .role {
    font-size: 0.85rem;
    color: var(--primary);
}

/* Overlay */
.menu-overlay {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 998;
}

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

/* Dashboard Layout - Desktop */
.dashboard {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
}

.main-content {
    padding: 2rem;
    max-width: 1200px;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.header h2 {
    font-size: 1.5rem;
}

/* Cards */
.card {
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
}

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

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

.table th,
.table td {
    padding: 0.875rem;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.table th {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.85rem;
    text-transform: uppercase;
}

.table tr:hover {
    background: rgba(255,255,255,0.02);
}

/* Status Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-success {
    background: rgba(74, 222, 128, 0.2);
    color: var(--success);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

/* Alert Messages */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.alert-success {
    background: rgba(74, 222, 128, 0.2);
    color: var(--success);
    border: 1px solid rgba(74, 222, 128, 0.3);
}

.alert-danger {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Grid */
.grid {
    display: grid;
    gap: 1.5rem;
}

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

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

/* Mobile Responsive */
@media (max-width: 968px) {
    /* Hide Desktop Sidebar */
    .sidebar {
        display: none;
    }

    /* Show Mobile Navbar & Menu */
    .navbar {
        display: flex;
    }

    .mobile-menu {
        display: block;
    }

    .menu-overlay {
        display: block;
    }

    /* Adjust Dashboard Layout */
    .dashboard {
        margin-left: 0;
        padding-top: 60px;
    }

    .main-content {
        padding: 1.5rem;
    }

    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }

    .header h2 {
        font-size: 1.25rem;
    }

    .card {
        padding: 1rem;
    }
}
