@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Mukta:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #FF9933; /* Saffron touch */
    --primary-hover: #e68a2e;
    --secondary: #138808; /* Green touch */
    --bg-gradient: linear-gradient(135deg, #fff5eb 0%, #f1f8f3 100%);
    --card-bg: rgba(255, 255, 255, 0.95);
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: rgba(226, 232, 240, 0.8);
    --input-focus: rgba(255, 153, 51, 0.2);
}

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

body {
    font-family: 'Mukta', 'Inter', sans-serif;
    background: var(--bg-gradient);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    position: relative;
}

/* Add a subtle Indian tricolor bar at the top of the page */
body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(to right, #FF9933 0%, #FF9933 33%, #FFFFFF 33%, #FFFFFF 66%, #138808 66%, #138808 100%);
}

.container {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 3rem;
    width: 100%;
    max-width: 650px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.1), 0 10px 25px -5px rgba(0,0,0,0.05);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.container:hover {
    transform: translateY(-8px);
    box-shadow: 0 30px 60px -15px rgba(0,0,0,0.12), 0 15px 30px -10px rgba(0,0,0,0.08);
}

.flag {
    text-align: center;
    margin-bottom: 0.5rem;
    display: inline-block;
}

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

.header h1 {
    font-size: 2.2rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}

.header p {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.6;
}

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

label {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #334155;
}

input[type="text"],
input[type="email"],
input[type="password"],
select,
textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-main);
    transition: all 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 4px var(--input-focus);
}

textarea {
    resize: vertical;
    min-height: 120px;
}

.radio-group {
    display: flex;
    gap: 2rem;
    margin-top: 0.5rem;
}

.radio-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
}

.radio-option input {
    display: none;
}

.radio-option .custom-radio {
    width: 22px;
    height: 22px;
    border: 2px solid #cbd5e1;
    border-radius: 50%;
    margin-right: 0.6rem;
    position: relative;
    transition: all 0.2s;
    background: #fff;
}

.radio-option input:checked + .custom-radio {
    border-color: var(--primary);
    background: var(--primary);
}

.radio-option input:checked + .custom-radio::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
}

/* Checkboxes */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-top: 0.5rem;
}

.checkbox-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
}

.checkbox-option input {
    display: none;
}

.checkbox-option .custom-checkbox {
    width: 22px;
    height: 22px;
    border: 2px solid #cbd5e1;
    border-radius: 6px;
    margin-right: 0.8rem;
    position: relative;
    transition: all 0.2s;
    background: #fff;
    flex-shrink: 0;
}

.checkbox-option input:checked + .custom-checkbox {
    border-color: var(--primary);
    background: var(--primary);
}

.checkbox-option input:checked + .custom-checkbox::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 6px;
    width: 4px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.btn-submit {
    width: 100%;
    padding: 1.125rem;
    background: linear-gradient(to right, #FF9933, #e68a2e);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 1rem;
    box-shadow: 0 10px 15px -3px rgba(255, 153, 51, 0.3);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 20px -3px rgba(255, 153, 51, 0.4);
}

.btn-submit:active {
    transform: translateY(0);
}

/* Success / Error Messages */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    display: none;
}
.alert.success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
    display: block;
}
.alert.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
    display: block;
}

/* Admin Dashboard Specific */
.admin-container {
    max-width: 95%; /* Make card much wider */
    width: 100%;
}

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

.dashboard-header h1 {
    font-size: 2.2rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.025em;
    margin: 0;
}

/* Analytics Leaderboard */
.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.stat-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
    text-align: center;
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: #cbd5e1;
}

.stat-card h3 {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-card .stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.2;
}

.data-table-wrapper {
    overflow-x: auto;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.05);
    border: 1px solid #e2e8f0;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 1.25rem 1rem;
    text-align: left;
    border-bottom: 1px solid #f1f5f9;
}

.data-table th {
    background: #f8fafc;
    font-weight: 700;
    color: #475569;
    font-size: 0.9rem;
    white-space: nowrap;
}

.data-table td {
    font-size: 0.95rem;
    color: #334155;
}

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

.data-table tr:hover td {
    background: #f8fafc;
}

.badge {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge.two-wheeler {
    background: #e0e7ff;
    color: #3730a3;
}

.badge.four-wheeler {
    background: #ffedd5;
    color: #9a3412;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background: white;
    color: #475569;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
}

.btn-secondary:hover {
    background: #f8fafc;
    color: #0f172a;
    border-color: #94a3b8;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}

.btn-primary-outline {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background: white;
    color: var(--primary);
    border: 1px solid var(--primary);
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
}

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

.btn-doc {
    color: #2563eb;
    border-color: #2563eb;
}
.btn-doc:hover {
    background: #2563eb;
    color: white;
}

.btn-pdf {
    color: #dc2626;
    border-color: #dc2626;
}
.btn-pdf:hover {
    background: #dc2626;
    color: white;
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

/* Print Styles for PDF Download */
@media print {
    body {
        background: white !important;
        padding: 0 !important;
        font-family: Arial, sans-serif;
    }
    body::before {
        display: none !important;
    }
    .hide-on-print {
        display: none !important;
    }
    .admin-container {
        max-width: 100% !important;
        box-shadow: none !important;
        border: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    .print-header {
        display: block !important;
    }
    .data-table-wrapper {
        box-shadow: none !important;
        border: none !important;
        overflow: visible !important;
    }
    .data-table th, .data-table td {
        border: 1px solid #000 !important;
        padding: 8px !important;
        white-space: normal !important;
        color: #000 !important;
    }
    .badge {
        border: 1px solid #000;
        background: transparent !important;
        color: #000 !important;
    }
}
