/* Variables for Government Theme */
:root {
    --primary-color: #0c2d48; /* Deep Navy Blue */
    --accent-orange: #FF9933; /* Saffron */
    --accent-green: #138808; /* India Green */
    --bg-color: #f4f7f6;
    --text-color: #333333;
    --border-color: #cccccc;
    --white: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Modern Header Styles */
.gov-header-modern {
    background: linear-gradient(135deg, #0c2d48 0%, #1a4a76 100%);
    color: white;
    padding: 20px 30px;
    border-bottom: 4px solid var(--accent-orange);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.gov-header::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 5px;
    background-color: var(--accent-green);
    z-index: -1; 
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.header-left, .header-right {
    flex: 1;
}

.header-right {
    display: flex;
    justify-content: flex-end;
}

.header-center {
    flex: 2;
    text-align: center;
}

.main-title {
    font-size: 30px;
    font-weight: 700;
    margin: 0;
    letter-spacing: 1px;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
}

.page-subtitle {
    text-align: center;
    font-size: 18px;
    font-weight: 400;
    margin: 0;
    color: #e2e8f0;
    letter-spacing: 0.5px;
    background: rgba(255, 255, 255, 0.1);
    display: inline-block;
    padding: 6px 20px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.header-bottom {
    text-align: center;
}

/* User Profile Badge */
.user-profile {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(0, 0, 0, 0.2);
    padding: 6px 15px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.user-greeting {
    font-size: 15px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-greeting i {
    font-size: 18px;
    color: #cbd5e1;
}

.logout-btn {
    background: #ef4444;
    color: white;
    text-decoration: none;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
}

.logout-btn:hover {
    background: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(239, 68, 68, 0.4);
    color: white;
}

.home-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: white;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.15);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.home-link:hover {
    background: rgba(255,255,255,0.25);
}

@media (max-width: 768px) {
    .gov-header-modern {
        padding: 15px 15px;
    }
    .header-top {
        flex-wrap: wrap;
    }
    .header-left {
        order: 1;
        flex: 1;
        display: flex;
        justify-content: flex-start;
    }
    .header-right {
        order: 2;
        flex: 1;
        display: flex;
        justify-content: flex-end;
    }
    .header-center {
        order: 3;
        flex: 0 0 100%;
        margin-top: 15px;
    }
    .main-title {
        font-size: 24px;
    }
    .user-profile {
        padding: 4px 10px;
        gap: 8px;
    }
    .user-greeting {
        font-size: 13px;
    }
    .logout-btn, .home-link {
        font-size: 13px;
        padding: 6px 12px;
    }
    .home-link {
        margin-top: 0;
    }
    .page-subtitle {
        font-size: 15px;
        padding: 4px 15px;
    }
}

/* Container */
.container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Form Card */
.form-card {
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    overflow: hidden;
    border-top: 4px solid var(--primary-color);
}

.form-header {
    background-color: #f9fafb;
    padding: 20px 30px;
    border-bottom: 1px solid #eeeeee;
}

.form-header h2 {
    color: var(--primary-color);
    font-size: 22px;
}

.form-body {
    padding: 30px;
}

/* Form Groups */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #444;
}

.required::after {
    content: ' *';
    color: #d9534f;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 15px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(12, 45, 72, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* Form Row for Columns */
.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.form-col {
    flex: 1;
    min-width: 250px;
}

/* Button */
.btn-submit {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 14px 25px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.3s;
}

.btn-submit:hover {
    background-color: #082136;
}

/* Alert Messages */
.alert {
    padding: 15px 20px;
    margin-bottom: 25px;
    border-radius: 4px;
    font-weight: 500;
}

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

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

/* Toast Notification */
.toast-notification {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #28a745;
    color: white;
    padding: 15px 25px;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    font-weight: bold;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.5s ease, bottom 0.5s ease;
}

.toast-notification.hide {
    opacity: 0;
    bottom: 10px;
}

/* Footer */
.gov-footer {
    text-align: center;
    padding: 20px;
    margin-top: auto;
    color: #666;
    font-size: 14px;
    border-top: 1px solid #ddd;
}

/* Dashboard Grid */
.dashboard-top-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}
.dashboard-bottom-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-top: auto; /* pushes to bottom if container is flex col */
    margin-bottom: 20px;
}
@media (max-width: 768px) {
    .dashboard-top-row {
        grid-template-columns: 1fr;
    }
}

.dash-card {
    background-color: var(--white);
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    padding: 30px 20px;
    text-align: center;
    text-decoration: none;
    color: var(--text-color);
    border-top: 4px solid var(--accent-orange);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.dash-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    border-top: 4px solid var(--primary-color);
}

.dash-icon {
    font-size: 40px;
    margin-bottom: 15px;
}

.dash-card h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 20px;
}

.dash-card p {
    font-size: 14px;
    color: #666;
}

/* Responsive */
@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    .form-col {
        min-width: 100%;
    }
}

@media (max-width: 600px) {
    .form-body {
        padding: 20px;
    }
    .header-title h1 {
        font-size: 24px;
    }
}

.dash-tag {
    background-color: #f1f3f5;
    border-radius: 20px;
    padding: 8px 16px;
    text-align: center;
    text-decoration: none;
    color: #495057;
    transition: transform 0.2s, background-color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95em;
    border: 1px solid #e9ecef;
}

.dash-tag:hover {
    background-color: #e2e6ea;
    transform: translateY(-2px);
    color: var(--primary-color);
}
.dash-tag .dash-icon {
    font-size: 1.2em;
    margin-bottom: 0;
}
.dash-tag h3 {
    font-size: 1em;
    margin-bottom: 0;
    color: inherit;
}
.dash-tag p {
    display: none;
}

/* Dashboard Grid (Menu Layout) */
.dashboard-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
    padding: 20px 0;
}

.dashboard-grid > .dash-card {
    flex: 0 0 calc(33.333% - 30px);
    min-width: 250px;
    max-width: 400px;
}

@media (max-width: 768px) {
    .dashboard-grid {
        flex-direction: column;
    }
    .dashboard-grid > .dash-card {
        width: 100%;
    }
}
