:root {
    --primary-color: #004d40;
    --primary-hover: #00332a;
    --primary-light: #00695c;
    --secondary-color: #ffcd29;
    --bg-color: #f1f8f6;
    --sidebar-bg: #ffffff;
    --text-color: #1a2e29;
    --text-light: #5c7c75;
    --white: #ffffff;
    --border-color: #cbd5d2;
    --shadow: 0 4px 6px -1px rgba(0, 77, 64, 0.1), 0 2px 4px -1px rgba(0, 77, 64, 0.06);
    --radius: 0.5rem;
    --font-header: 'Poppins', sans-serif;
    --font-body: 'Lora', serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-header);
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    font-size: 1rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* Layout */
.wrapper {
    display: flex;
    width: 100%;
}

.sidebar {
    width: 260px;
    background-color: var(--primary-color);
    color: var(--white);
    height: 100vh;
    position: fixed;
    border-right: none;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
}

.sidebar-header {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-header);
}

.nav-links li {
    margin-bottom: 0.75rem;
}

.nav-links a {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    transition: all 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
    background-color: var(--primary-light);
    color: var(--secondary-color);
    border-left: 4px solid var(--secondary-color);
    padding-left: calc(1rem - 4px);
}

.main-content {
    margin-left: 260px;
    flex: 1;
    padding: 2rem;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.header h1 {
    font-size: 1.75rem;
    font-weight: 600;
    font-family: var(--font-header);
}

.card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.95rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: var(--radius);
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    font-size: 0.95rem;
    font-family: var(--font-header);
}

.btn:hover {
    background-color: var(--primary-hover);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: #1a2e29;
}

.btn-secondary:hover {
    background-color: #e6b800;
}

.btn-danger {
    background-color: #ef4444;
}

.btn-danger:hover {
    background-color: #dc2626;
}

/* Login Page specific */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: linear-gradient(135deg, var(--primary-color) 0%, #00251a 100%);
    width: 100%;
}

.login-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 1rem;
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 400px;
}

.login-title {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-color);
    font-family: var(--font-header);
}

/* Utilities */
.text-center {
    text-align: center;
}

.mt-4 {
    margin-top: 1rem;
}

.d-flex {
    display: flex;
}

.justify-between {
    justify-content: space-between;
}

.align-center {
    align-items: center;
}

.gap-2 {
    gap: 0.5rem;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background-color: #e0f2f1;
    font-weight: 600;
    color: var(--text-color);
}

.badge {
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success {
    background-color: #d1fae5;
    color: #065f46;
}

.badge-warning {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-danger {
    background-color: #fee2e2;
    color: #991b1b;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
        z-index: 50;
        width: 250px;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        padding: 1.5rem;
        padding-top: 5rem;
    }

    .wrapper {
        flex-direction: column;
    }

    .d-flex {
        flex-direction: column !important;
        gap: 1.5rem !important;
    }

    .card {
        padding: 1rem;
    }

    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    table {
        min-width: 600px;
    }

    .mobile-menu-btn {
        display: flex !important;
        position: fixed;
        top: 1rem;
        left: 1rem;
        z-index: 49;
        background: var(--white);
        border: 1px solid var(--border-color);
        padding: 0.5rem;
        border-radius: var(--radius);
        box-shadow: var(--shadow);
        cursor: pointer;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }

    .overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 40;
        display: none;
        backdrop-filter: blur(2px);
    }

    .overlay.active {
        display: block;
    }

    .header h1 {
        font-size: 1.5rem;
        margin-left: 3rem;
        /* Push title to right of hamburger */
    }
}

.mobile-menu-btn,
.overlay {
    display: none;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}