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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

.topbar {
    background: #2E75F6;
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    font-size: 1.4rem;
    font-weight: 700;
    text-align: center;
}

/* ── Auth pages (login / register) two-column layout ── */
.auth-wrapper {
    display: flex;
    gap: 2.5rem;
    max-width: 1100px;
    margin: 2rem auto;
    padding: 0 1.5rem;
    align-items: flex-start;
}

.auth-left {
    flex: 1.6;
    min-width: 0;
}

.auth-right {
    flex: 1;
    min-width: 320px;
}

.auth-right .signin-card {
    background: #fff;
    border-radius: 10px;
    padding: 2rem 2rem 1.8rem;
    box-shadow: 0 4px 14px rgba(0,0,0,0.08);
}

.auth-right .signin-card h2 {
    font-size: 1.35rem;
    color: #111;
    border: none;
    padding-bottom: 0;
    margin-bottom: 1.4rem;
}

.auth-right .signin-card .reg-title {
    color: #2E75F6;
    font-size: 1.4rem;
    text-align: center;
    margin-bottom: 1.6rem;
}

/* Download / back link */
.auth-left .download-link {
    color: #2E75F6;
    font-size: 0.95rem;
    text-decoration: none;
    display: inline-block;
    margin-bottom: 1.6rem;
}

.auth-left .download-link:hover {
    text-decoration: underline;
}

.auth-left .back-link {
    color: #2E75F6;
    font-size: 0.95rem;
    text-decoration: none;
    display: inline-block;
    margin-bottom: 1.6rem;
}

.auth-left .back-link:hover {
    text-decoration: underline;
}

/* Alert block */
.auth-alert-heading {
    color: #D32F2F;
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
}

.auth-alert-body {
    color: #333;
    font-size: 0.92rem;
    line-height: 1.75;
}

.auth-alert-body .red-bold {
    color: #D32F2F;
    font-weight: 700;
}

/* Copyright */
.auth-copyright {
    color: #6B7280;
    font-size: 0.78rem;
    margin-top: 2rem;
}

/* Auth form fields */
.auth-right .field {
    margin-bottom: 1.2rem;
}

.auth-right .field label {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    color: #222;
    margin-bottom: 0.35rem;
}

.auth-right .field input {
    width: 100%;
    padding: 0.7rem 0.9rem;
    background: #EDF2F7;
    border: 1px solid #D1D5DB;
    border-radius: 6px;
    font-size: 0.95rem;
    color: #333;
    transition: border-color 0.2s;
}

.auth-right .field input:focus {
    outline: none;
    border-color: #2E75F6;
    background: #F7FAFC;
}

/* Submit + secondary link row */
.auth-submit-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.4rem;
    flex-wrap: wrap;
}

.btn-submit {
    background: #4CAF50;
    color: #fff;
    padding: 0.6rem 1.8rem;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-submit:hover {
    background: #43A047;
}

.auth-link {
    color: #2E75F6;
    font-size: 0.9rem;
    text-decoration: none;
}

.auth-link:hover {
    text-decoration: underline;
}

.forgot-link {
    display: inline-block;
    margin-top: 0.9rem;
    color: #2E75F6;
    font-size: 0.85rem;
    text-decoration: none;
}

.forgot-link:hover {
    text-decoration: underline;
}

/* Register page: login link after submit */
.auth-login-row {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #333;
}

.auth-login-row a {
    color: #2E75F6;
    text-decoration: none;
}

.auth-login-row a:hover {
    text-decoration: underline;
}

/* ── Dashboard / admin topbar (keeps old gradient) ── */
.topbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.topbar.gradient {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

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

.split {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.card {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

h2 {
    color: #1e3c72;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 0.5rem;
}

h4 {
    color: #2a5298;
    margin: 1.5rem 0 1rem 0;
}

.field {
    margin-bottom: 1.5rem;
}

.field label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #555;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    border-color: #2a5298;
}

.btn {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.btn-sm {
    background: #2a5298;
    color: white;
    padding: 0.4rem 1rem;
    border: none;
    border-radius: 4px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-sm:hover {
    background: #1e3c72;
}

.btn-sm.success {
    background: #28a745;
}

.btn-sm.success:hover {
    background: #218838;
}

.btn-sm.danger {
    background: #dc3545;
}

.btn-sm.danger:hover {
    background: #c82333;
}

.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
}

.alert.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.text-center {
    text-align: center;
    margin-top: 1rem;
}

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

table thead {
    background: #f8f9fa;
}

table th {
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    color: #555;
    border-bottom: 2px solid #dee2e6;
}

table td {
    padding: 0.75rem;
    border-bottom: 1px solid #dee2e6;
}

table tbody tr:hover {
    background: #f8f9fa;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge.active {
    background: #d4edda;
    color: #155724;
}

.badge.pending {
    background: #fff3cd;
    color: #856404;
}

.badge.rejected {
    background: #f8d7da;
    color: #721c24;
}

.profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.profile-grid div {
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 4px;
}

.user-card {
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    background: #fafbfc;
}

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

.user-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.user-actions button {
    background: #6c757d;
    color: white;
    padding: 0.4rem 1rem;
    border: none;
    border-radius: 4px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background 0.3s;
}

.user-actions button:hover {
    background: #5a6268;
}

.collapsible {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 1rem;
    margin-top: 1rem;
}

.collapsible form {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.collapsible input,
.collapsible select {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

@media (max-width: 768px) {
    .topbar {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    .auth-wrapper {
        flex-direction: column;
        gap: 1.5rem;
    }

    .auth-right {
        min-width: 0;
    }

    .dash-main {
        flex-direction: column;
    }

    .dash-sidebar {
        min-width: 0;
    }

    .user-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .user-actions {
        width: 100%;
    }

    .user-actions button {
        flex: 1;
    }

    table {
        font-size: 0.875rem;
    }

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

/* ================================================================
   DASHBOARD STYLES
   ================================================================ */
.dashboard-body, .admin-body {
    background: #f0f2f5;
    min-height: 100vh;
}

/* Header */
.dash-header {
    background: #4A90D9;
    color: #fff;
    padding: 0.8rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.dash-header-title {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.dash-header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.dash-nav-link {
    color: #fff;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    opacity: 0.9;
}

.dash-nav-link:hover {
    opacity: 1;
    text-decoration: underline;
}

.dash-nav-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    opacity: 0.9;
    padding: 0;
}

.dash-nav-btn:hover {
    opacity: 1;
    text-decoration: underline;
}

/* Main layout */
.dash-main {
    display: flex;
    gap: 0;
    min-height: calc(100vh - 52px);
}

/* Sidebar */
.dash-sidebar {
    width: 240px;
    min-width: 240px;
    background: #fff;
    border-right: 1px solid #e0e0e0;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.dash-welcome {
    font-size: 0.9rem;
    color: #555;
    text-align: center;
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

.dash-welcome strong {
    font-size: 1rem;
    color: #222;
}

.dash-empno {
    font-size: 0.82rem;
    color: #666;
    text-align: center;
    margin-bottom: 1.2rem;
}

.dash-empno strong {
    color: #333;
}

.dash-photo img {
    width: 140px;
    height: 140px;
    object-fit: cover;
    border-radius: 6px;
    border: 2px solid #e0e0e0;
}

.dash-photo-placeholder {
    width: 140px;
    height: 140px;
    border-radius: 6px;
    background: #E8F0FE;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #4A90D9;
}

.dash-photo-placeholder span {
    font-size: 3rem;
    font-weight: 700;
    color: #4A90D9;
}

/* Content area */
.dash-content {
    flex: 1;
    padding: 1.5rem 2rem;
    overflow-y: auto;
}

/* Accordion sections */
.dash-section {
    background: #fff;
    border: 1px solid #d0d5dd;
    border-radius: 6px;
    margin-bottom: 0.8rem;
    overflow: hidden;
}

.dash-section-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 1rem;
    background: #f5f7fa;
    cursor: pointer;
    border-bottom: 1px solid #e0e0e0;
    user-select: none;
    transition: background 0.15s;
}

.dash-section-header:hover {
    background: #edf0f5;
}

.dash-section-icon {
    width: 28px;
    height: 28px;
    background: #4A90D9;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.dash-section-titles {
    display: flex;
    flex-direction: column;
}

.dash-section-en {
    font-size: 0.95rem;
    font-weight: 600;
    color: #222;
}

.dash-section-hi {
    font-size: 0.8rem;
    color: #666;
}

.dash-section-body {
    padding: 0;
}

/* Field table inside sections */
.dash-field-table {
    width: 100%;
}

.dash-field-row {
    display: flex;
    border-bottom: 1px solid #f0f0f0;
    padding: 0.6rem 1rem 0.6rem 3.6rem;
}

.dash-field-row:last-child {
    border-bottom: none;
}

.dash-field-label {
    width: 180px;
    min-width: 180px;
    font-size: 0.88rem;
    font-weight: 600;
    color: #444;
}

.dash-field-value {
    flex: 1;
    font-size: 0.88rem;
    color: #333;
}

.dash-field-empty {
    padding: 1.2rem 1rem 1.2rem 3.6rem;
    color: #999;
    font-size: 0.88rem;
    font-style: italic;
}

/* ================================================================
   ADMIN DASHBOARD STYLES
   ================================================================ */
.admin-container {
    max-width: 1200px;
    margin: 1.5rem auto;
    padding: 0 1.5rem;
}

.admin-card {
    background: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid #e0e0e0;
}

.admin-card-title {
    font-size: 1.15rem;
    color: #1e3c72;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.admin-empty {
    color: #999;
    font-size: 0.9rem;
    padding: 0.5rem 0;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.5rem;
}

.admin-table thead {
    background: #f5f7fa;
}

.admin-table th {
    padding: 0.6rem 0.75rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.82rem;
    color: #555;
    border-bottom: 2px solid #dee2e6;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.admin-table td {
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid #eee;
    font-size: 0.88rem;
}

.admin-table tbody tr:hover {
    background: #f8f9fa;
}

.admin-actions-cell {
    white-space: nowrap;
}

/* User card in admin */
.admin-user-card {
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 1.2rem;
    margin-bottom: 1.2rem;
    background: #fafbfc;
}

.admin-user-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.admin-user-info {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.admin-user-id {
    font-weight: 700;
    font-size: 0.95rem;
    color: #1e3c72;
}

.admin-user-name {
    font-size: 0.9rem;
    color: #555;
}

.admin-user-btns {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

/* Collapsible sections in admin */
.admin-collapsible {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 1rem;
    margin-top: 0.8rem;
}

.admin-inline-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.admin-inline-form label {
    font-weight: 600;
    font-size: 0.88rem;
    color: #444;
}

.admin-input {
    padding: 0.5rem 0.75rem;
    border: 1px solid #d0d5dd;
    border-radius: 4px;
    font-size: 0.88rem;
    min-width: 200px;
}

.admin-sm-input {
    padding: 0.35rem 0.6rem;
    border: 1px solid #d0d5dd;
    border-radius: 4px;
    font-size: 0.82rem;
    width: 130px;
}

.admin-sm-select {
    padding: 0.35rem 0.5rem;
    border: 1px solid #d0d5dd;
    border-radius: 4px;
    font-size: 0.82rem;
}

/* Photo preview */
.admin-photo-preview {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.8rem;
}

.admin-photo-preview img {
    max-width: 120px;
    max-height: 120px;
    border-radius: 4px;
    border: 1px solid #dee2e6;
}

/* Category blocks inside admin "Manage Fields" */
.admin-cat-block {
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    margin-bottom: 0.6rem;
    overflow: hidden;
}

.admin-cat-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.8rem;
    background: #f5f7fa;
    cursor: pointer;
    user-select: none;
    border-bottom: 1px solid #e0e0e0;
}

.admin-cat-header:hover {
    background: #edf0f5;
}

.admin-cat-arrow {
    font-size: 0.75rem;
    color: #4A90D9;
}

.admin-cat-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: #222;
}

.admin-cat-hindi {
    font-size: 0.78rem;
    color: #888;
}

.admin-cat-body {
    padding: 0.8rem;
    background: #fff;
}

.admin-table-inner {
    margin-top: 0;
    margin-bottom: 0.8rem;
}

.admin-edit-form {
    display: inline;
}

.admin-add-field-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding-top: 0.6rem;
    border-top: 1px dashed #e0e0e0;
    margin-top: 0.4rem;
}
