:root {
    --primary: #0d9488;
    --primary-hover: #0f766e;
    --bg-color: #f0fdfa;
    --card-bg: #ffffff;
    --text-color: #134e4a;
    --text-muted: #64748b;
    --border-color: #ccfbf1;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --radius: 12px;
    --shadow: 0 4px 6px -1px rgba(13, 148, 136, 0.1), 0 2px 4px -1px rgba(13, 148, 136, 0.06);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
}

/* Auth Pages */
.auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    /* Overlay with Teal base + Image */
    background: linear-gradient(rgba(13, 148, 136, 0.6), rgba(15, 118, 110, 0.8)), url('bg_login_cartoon.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.auth-card {
    background: rgba(255, 255, 255, 0.95);
    padding: 2.5rem;
    border-radius: var(--radius);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    width: 100%;
    max-width: 400px;
    backdrop-filter: blur(10px);
}

.auth-title {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--primary);
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-color);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    width: 100%;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-danger {
    background-color: var(--danger);
    color: white;
}

/* Dashboard */
.header {
    background: var(--card-bg);
    padding: 1rem 0;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    margin-left: 1.5rem;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--primary);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: transform 0.2s;
}

.card:hover {
    transform: translateY(-2px);
}

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.activity-item {
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.activity-info h4 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.activity-time {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-valid {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.status-invalid {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.status-pending {
    background-color: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    font-weight: 600;
    color: var(--text-muted);
    background-color: #f9fafb;
}

/* Utilities */
.text-center {
    text-align: center;
}

.mt-4 {
    margin-top: 1rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.w-full {
    width: 100%;
}

/* Admin Nav Desktop */
.admin-nav-links {
    display: flex;
    align-items: center;
}

/* Filter Form */
.filter-form {
    display: flex;
    gap: 10px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    /* Navigation */
    .nav {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .nav-links {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .nav-links span {
        margin-bottom: 0.5rem;
        display: block;
    }

    .nav-links a {
        margin: 0;
        display: block;
        padding: 0.5rem;
        background: #fff;
        border-radius: 8px;
    }

    /* Admin Nav specific */
    .admin-nav .container {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch !important;
    }

    .admin-nav-links {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        justify-content: center;
    }

    .admin-nav a {
        margin: 0 !important;
        padding: 0.5rem 0.75rem;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 6px;
        font-size: 0.85rem;
        white-space: nowrap;
    }

    /* Cards & Grid */
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .card-title {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    /* Filter Form */
    .filter-form {
        flex-direction: column;
        width: 100%;
    }

    .filter-form input,
    .filter-form button,
    .filter-form a {
        width: 100% !important;
        margin-bottom: 0.5rem;
    }

    /* Activity Item */
    .activity-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .activity-item>div {
        width: 100%;
    }

    .activity-item div[style="text-align: right;"] {
        text-align: left !important;
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-top: 0.5rem;
    }

    /* Forms */
    form[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }

    .form-group {
        margin-bottom: 1rem !important;
    }

    /* Tables */
    th,
    td {
        padding: 0.75rem 0.5rem;
        font-size: 0.85rem;
    }

    .status-badge {
        font-size: 0.7rem;
        padding: 0.2rem 0.5rem;
    }
}