:root {
    --bg-color: #0f172a; /* Dark blue-gray */
    --card-bg: rgba(30, 41, 59, 0.7); /* Glassmorphism background */
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --danger: #ef4444;
    --success: #10b981;
    --border: 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(--bg-color);
    background-image: radial-gradient(circle at top right, rgba(59, 130, 246, 0.15), transparent 400px),
                      radial-gradient(circle at bottom left, rgba(16, 185, 129, 0.1), transparent 400px);
    background-attachment: fixed;
    color: var(--text-main);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    width: 100%;
    flex: 1;
}

main.container {
    position: relative;
    z-index: 1;
}

/* Glassmorphism Cards */
.card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1;
}

/* Typography */
h1, h2, h3, h4 {
    margin-bottom: 1rem;
    font-weight: 600;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

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

input[type="text"],
input[type="password"],
input[type="number"],
input[type="time"],
input[type="date"],
select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-main);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.2s;
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--accent);
    color: white;
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-1px);
}

.btn-danger {
    background-color: transparent;
    border: 1px solid var(--danger);
    color: var(--danger);
}

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

/* Navbar */
.navbar {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 9999;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0;
    padding-bottom: 0;
    flex-wrap: wrap;
}

.navbar-brand {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--text-main);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Hamburger Menu Button */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 110;
}

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

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

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

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

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent);
}

/* Body scroll lock when nav is open */
body.nav-open {
    overflow: hidden;
}

body.nav-open main,
body.nav-open main.container {
    position: relative;
    z-index: 1;
}

/* Mobile Responsive Navbar */
@media (max-width: 992px) {
    .nav-toggle {
        display: flex;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        background: rgba(15, 23, 42, 0.98);
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        bottom: 0;
        padding: 1rem;
        gap: 0;
        overflow-y: auto;
        z-index: 9998;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links a,
    .nav-links span {
        padding: 1rem 1rem;
        width: 100%;
        border-bottom: 1px solid var(--border);
        font-size: 1.1rem;
    }

    .nav-links a:last-child {
        border-bottom: none;
    }

    .nav-links .btn {
        margin-top: 1rem;
        width: 100%;
    }

    .navbar .container {
        position: relative;
    }

    .navbar {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
    }

    body {
        padding-top: 60px;
    }
}

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

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

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

th {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.875rem;
}

tbody tr {
    transition: background-color 0.2s;
}

tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

/* Utilities */
.text-center { text-align: center; }
.mt-4 { margin-top: 1rem; }
.mb-4 { margin-bottom: 1rem; }
.grid { display: grid; gap: 1.5rem; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 768px) {
    .grid-cols-2 { grid-template-columns: 1fr; }
}

.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px solid;
}
.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}
.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.2);
    color: #6ee7b7;
}

/* Mobile Responsive - General */
@media (max-width: 768px) {
    .container {
        padding: 1rem 0.75rem;
    }

    .card {
        padding: 1rem;
        border-radius: 12px;
    }

    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.25rem;
    }

    /* Mobile Table Styles */
    table {
        font-size: 0.875rem;
    }

    th, td {
        padding: 0.5rem 0.4rem;
    }

    /* Make tables scroll horizontally on mobile */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -0.75rem;
        padding: 0 0.75rem;
    }

    /* Buttons on mobile */
    .btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }

    /* Form inputs on mobile */
    input[type="text"],
    input[type="password"],
    input[type="number"],
    input[type="time"],
    input[type="date"],
    select {
        padding: 0.6rem 0.8rem;
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0.75rem 0.5rem;
    }

    .card {
        padding: 0.75rem;
    }

    th, td {
        padding: 0.4rem 0.3rem;
        font-size: 0.8rem;
    }

    .btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }
}
