/* Candidate Portal CSS - Main Stylesheet */

/* ===== Global Styles ===== */
:root {
    --primary-color: #0066cc;
    --primary-dark: #003d99;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #17a2b8;
    --light-bg: #f8f9fa;
    --border-color: #dee2e6;
    --text-dark: #212529;
    --text-muted: #6c757d;
    --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: #ffffff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

html {
    scroll-behavior: smooth;
}

/* ===== Header ===== */
/* .global-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 1rem 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
} */

/* .header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
} */

/* .brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.brand .logo {
    height: 50px;
    width: auto;
}

.brand h1 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
} */

.global-header {
    background: white;
    border-bottom: 2px solid #0066cc;
    padding: 0px 20px;
    
    position: sticky;
    top: 0;
    z-index: 120;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);

    width: 100%; /* Set the width of the div */
    background-image: url('../images/background.png'); /* Path to your image */
    background-size: cover; /* Ensures the image covers the entire div */
    background-repeat: no-repeat; /* Prevents the image from repeating */
    background-position: center; /* Centers the image within the div */
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.global-header .brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: whitesmoke;
    background: radial-gradient(circle at center, #003d99 10%, rgba(255, 255, 255, 0) 70%);
    
}

.global-header .brand h1 {
    font-size: 25px;
    margin: 0;
    font-weight: 700;
    letter-spacing: 0.4px;
}

.global-header .spacer {
    width: 250px;
}

.global-header .logo img {
    width: 250px;
    height: auto;
}

/* Account Menu */
.account-menu {
    position: relative;
}

.account-button {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    transition: background 0.3s;
}

.account-button:hover {
    background: rgba(255, 255, 255, 0.3);
}

.account-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    min-width: 200px;
    display: none;
    z-index: 1000;
}

.account-dropdown.show {
    display: block;
}

.account-dropdown a,
.account-dropdown button {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-dark);
    text-decoration: none;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    transition: background 0.2s;
}

.account-dropdown a:hover,
.account-dropdown button:hover {
    background: var(--light-bg);
}

.account-dropdown hr {
    margin: 0.5rem 0;
    border: none;
    border-top: 1px solid var(--border-color);
}

.logout-button {
    color: var(--danger-color);
}

/* ===== Navigation ===== */
.prototype-nav {
    background: white;
    border-bottom: 2px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.prototype-nav ul {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
    list-style: none;
    display: flex;
    gap: 0;
}

.prototype-nav li {
    flex: 1;
}

.prototype-nav a {
    display: block;
    padding: 1rem 1.5rem;
    color: var(--text-dark);
    text-decoration: none;
    text-align: center;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
}

.prototype-nav li:hover a,
.prototype-nav li.active a {
    background: var(--light-bg);
    border-bottom-color: var(--primary-color);
    color: var(--primary-color);
}

/* ===== Main Container ===== */
.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
    flex: 1;
}

/* ===== Alerts ===== */
.alert {
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: opacity 0.3s;
}

.alert i {
    font-size: 1.2rem;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

/* ===== Page Header ===== */
.page-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.page-header h2 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.page-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* ===== Forms ===== */
.form-container {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.form-group .required {
    color: var(--danger-color);
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.form-control.error {
    border-color: var(--danger-color);
}

.form-text {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.text-danger {
    color: var(--danger-color);
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.form-group-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.form-group-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.form-group-checkbox label {
    margin: 0;
    cursor: pointer;
    font-weight: normal;
}

.form-actions {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

/* ===== Buttons ===== */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    font-weight: 500;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ===== Tabs ===== */
.tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
}

.tab-button {
    padding: 1rem 1.5rem;
    border: none;
    background: none;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tab-button:hover {
    color: var(--primary-color);
}

.tab-button.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.tab-content h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

/* ===== Form Sections ===== */
.form-section {
    padding-bottom: 1.5rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.form-section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.form-section h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.section-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.section-nav__label {
    font-weight: 600;
    color: var(--text-muted);
}

.section-nav__link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    background: var(--light-bg);
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.95rem;
    border: 1px solid var(--border-color);
}

.section-nav__link:hover {
    background: #e9f2ff;
}

/* ===== Tables ===== */
.evidence-table {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

thead {
    background: var(--light-bg);
}

th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-dark);
    border-bottom: 2px solid var(--border-color);
}

td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

tr:hover {
    background: var(--light-bg);
}

tr.expired {
    background: #fff5f5;
}

tr.submitted {
    background: #f0f9ff;
}

/* ===== Badges ===== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 500;
}

.badge-success {
    background: #d4edda;
    color: #155724;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
}

.badge-danger {
    background: #f8d7da;
    color: #721c24;
}

.badge-info {
    background: #d1ecf1;
    color: #0c5460;
}

.badge-required {
    background: #dc3545;
    color: white;
}

.badge-optional {
    background: #6c757d;
    color: white;
}

/* ===== Cards ===== */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: flex;
    gap: 1.5rem;
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.card-icon {
    color: var(--primary-color);
}

.card-content h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.card-content p {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

/* Compliance Summary Cards */
.compliance-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.summary-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-align: center;
}

.summary-icon {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.summary-content h3 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.summary-content p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Compliance Section */
.compliance-section {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.compliance-section h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.section-description {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* ===== Modal ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 8px;
    max-width: 600px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    animation: slideDown 0.3s;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    color: var(--primary-color);
    margin: 0;
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
}

.close-modal:hover {
    color: var(--text-dark);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* Upload Progress */
.upload-progress {
    margin-top: 1rem;
}

.progress-bar {
    width: 100%;
    height: 30px;
    background: var(--light-bg);
    border-radius: 15px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--success-color));
    transition: width 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
}

.progress-text {
    text-align: center;
    margin-top: 0.5rem;
    color: var(--text-muted);
}

/* ===== Login Page ===== */
.login-page {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
}

.login-container {
    width: 100%;
    max-width: 450px;
}

.login-box {
    background: white;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.login-header .logo {
    width: 250px;
    /* margin-bottom: 1rem; */
    flex-shrink: 0;
    min-width: 100%;
    /* min-height: 100%; */
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
    margin-bottom: 20px;
}

.login-header h2 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.login-header p {
    color: var(--text-muted);
}

.login-links {
    text-align: center;
    margin-top: 1rem;
}

.login-links a {
    color: var(--primary-color);
    text-decoration: none;
}

.login-links a:hover {
    text-decoration: underline;
}

.login-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* ===== Home Page ===== */
.home-page {
    max-width: 1000px;
    margin: 0 auto;
}

.welcome-section {
    text-align: center;
    padding: 3rem 2rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.welcome-section h2 {
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.welcome-section .lead {
    font-size: 1.2rem;
    color: var(--text-muted);
}

.info-section {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.info-section h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.info-section ul {
    list-style: none;
    padding-left: 0;
}

.info-section li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.info-section li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
}

/* ===== Footer ===== */
.global-footer {
    background: #2c3e50;
    color: white;
    padding: 2rem 0 1rem;
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding: 1rem 2rem;
    margin-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }

    .prototype-nav ul {
        flex-direction: column;
    }

    .prototype-nav li {
        width: 100%;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .dashboard-cards {
        grid-template-columns: 1fr;
    }

    .tabs {
        flex-direction: column;
    }

    .tab-button {
        border-bottom: 1px solid var(--border-color);
        border-left: 3px solid transparent;
    }

    .tab-button.active {
        border-left-color: var(--primary-color);
        border-bottom-color: var(--border-color);
    }

    .form-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .form-container {
        padding: 1rem;
    }

    .card {
        flex-direction: column;
        text-align: center;
    }
}

/* ===== Utility Classes ===== */
.text-muted {
    color: var(--text-muted);
}

.text-danger {
    color: var(--danger-color);
}

.text-center {
    text-align: center;
}

.mt-2 { margin-top: 1rem; }
.mb-2 { margin-bottom: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-3 { margin-bottom: 1.5rem; }

.error-page {
    text-align: center;
    padding: 4rem 2rem;
}

.error-page h1 {
    font-size: 3rem;
    color: var(--danger-color);
    margin-bottom: 1rem;
}
