/* =========================================
   1. GLOBAL VARIABLES & RESET
   ========================================= */
:root {
    --primary: #003366;
    --primary-dark: #002244;
    --accent: #FFD700;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --bg-light: #f1f5f9;
    --white: #ffffff;
    --border: #e2e8f0;
    --danger: #ef4444;
    --success: #22c55e;
    --warning: #f59e0b;
}

* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* =========================================
   2. SPLIT-SCREEN LOGIN PAGE
   ========================================= */
.split-screen {
    display: flex;
    height: 100vh;
    width: 100%;
    background: var(--white);
    overflow: hidden;
}

.left-panel {
    flex: 1.2;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4rem 6rem;
    position: relative;
    overflow: hidden;
    height: 100%;
}

.panel-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
}

.brand-header {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
}

.brand-logo {
    height: 48px;
    margin-right: 15px;
    filter: brightness(0) invert(1);
}

.brand-name {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.hero-title {
    font-size: 3.5rem;
    line-height: 1.1;
    font-weight: 800;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.125rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 3rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.feature-item {
    display: flex;
    align-items: flex-start;
}

.f-icon {
    font-size: 1.5rem;
    background: rgba(255, 255, 255, 0.15);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    margin-right: 15px;
    flex-shrink: 0;
}

.f-text h3 {
    margin: 0 0 5px 0;
    font-size: 1rem;
    font-weight: 600;
}

.f-text p {
    margin: 0;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
}

.overlay-graphic {
    position: absolute;
    top: -10%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 1;
    pointer-events: none;
}

.right-panel {
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 2rem;
    background: var(--white);
    height: 100%;
    overflow-y: auto;
}

.login-wrapper {
    width: 100%;
    max-width: 420px;
    padding: 1rem;
    margin: auto 0;
}

/* Logo row for the sign-in panel */
.logo-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    gap: 12px;
}

.logo-row .logo-school {
    height: 44px;
    width: auto;
    object-fit: contain;
}

.logo-row .logo-app {
    height: 52px;
    width: auto;
    object-fit: contain;
}

.login-header {
    margin-bottom: 1.75rem;
}

.login-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 0.4rem 0;
}

.login-header p {
    color: var(--text-light);
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* =========================================
   3. FORM ELEMENTS
   ========================================= */
.modern-form .input-group,
.track-form .form-group {
    margin-bottom: 1.5rem;
}

.modern-form label,
.track-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-dark);
    font-size: 0.9rem;
}

.modern-form input,
.track-form input,
.track-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f8fafc;
    transition: all 0.2s;
    box-sizing: border-box;
}

.modern-form input:focus,
.track-form input:focus,
.track-input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.1);
}

.cta-button,
.landing-button {
    width: 100%;
    padding: 14px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background 0.2s, transform 0.1s;
}

.cta-button:hover,
.landing-button:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.cta-button:active,
.landing-button:active {
    transform: translateY(0);
}

.cta-button:disabled,
.landing-button:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    transform: none;
}

.arrow {
    margin-left: 8px;
    transition: transform 0.2s;
}

.cta-button:hover .arrow {
    transform: translateX(4px);
}

/* Alerts */
.alert-box,
.error-message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    font-size: 0.9rem;
}

.alert-box.error,
.error-message {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.success-message {
    background: #dcfce7;
    color: #166534;
    padding: 12px 16px;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    text-align: center;
    line-height: 1.5;
}

.alert-icon {
    font-weight: bold;
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.login-footer {
    text-align: center;
    border-top: 1px solid var(--border);
    padding-top: 1.5rem;
    margin-top: 2rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

.login-footer a {
    color: var(--primary);
    font-weight: 600;
}

.secure-note {
    font-size: 0.8rem;
    margin-top: 10px;
    opacity: 0.8;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

/* Spinner */
.spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s ease-in-out infinite;
    margin-right: 8px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* =========================================
   4. APPLICATION PAGE HEADER
   ========================================= */
html {
    scroll-behavior: smooth;
}

.container {
    width: 80%;
    max-width: 1200px;
    margin: 20px auto;
    background: var(--white);
    padding: 20px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    border-radius: 12px;
    border: 1px solid var(--border);
}

.site-header {
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
}

.header-top-bar {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 8px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.top-bar-links {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-top-bar a,
.header-top-bar .search-icon,
.session-timer-display {
    color: #fff;
    text-decoration: none;
    font-size: 12px;
    transition: color 0.3s ease;
}

.session-timer-display span {
    font-weight: normal;
}

#sessionTimerDisplay {
    font-weight: bold;
    min-width: 40px;
    display: inline-block;
    font-family: monospace;
}

.header-top-bar a:hover {
    color: rgba(255, 255, 255, 0.7);
}

.header-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.header-main .logo img {
    max-height: 80px;
    width: auto;
}

.main-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 25px;
}

.main-nav a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 14px;
    transition: color 0.3s ease;
}

.main-nav a:hover {
    color: var(--primary);
}

.title-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    border-top: 1px solid var(--border);
    padding-top: 15px;
}

.title-logo {
    max-height: 50px;
    width: auto;
}

h1 {
    text-align: center;
    color: var(--primary);
    font-size: 24px;
    font-weight: 700;
    margin: 0;
}

/* =========================================
   5. TRACKER & PROGRESS
   ========================================= */
.tracker-container table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.tracker-container th,
.tracker-container td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.tracker-container th {
    background-color: var(--bg-light);
    font-weight: 600;
}

.action-required-box {
    background: #fef2f2;
    color: #dc2626;
    padding: 20px;
    margin: 20px 0;
    border-radius: 12px;
    font-weight: bold;
    font-size: 1.1em;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.08);
    border: 1px solid #fecaca;
    position: relative;
}

.action-required-box b {
    font-size: 1.13em;
    color: #dc2626;
    display: flex;
    align-items: center;
    gap: 7px;
    font-weight: 700;
}

.no-action-box {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 18px;
    margin-top: 20px;
}

.button1 {
    display: inline-block;
    padding: 10px 20px;
    margin: 10px;
    font-size: 14px;
    color: #fff;
    background: var(--primary);
    border: none;
    border-radius: 8px;
    text-decoration: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.button1:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.progress-container {
    background: var(--bg-light);
    border-radius: 16px;
    height: 18px;
    margin: 20px 0 10px 0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.07);
    overflow: hidden;
    position: relative;
}

.progress-bar {
    background: linear-gradient(90deg, #1abc9c 0%, var(--primary) 100%);
    height: 100%;
    border-radius: 16px 0 0 16px;
    transition: width 0.5s cubic-bezier(.77, 0, .18, 1);
    text-align: right;
    padding-right: 6px;
    color: #fff;
    font-weight: bold;
    font-size: 1em;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.stages {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 20px;
    font-size: 1em;
    color: var(--text-light);
    justify-content: space-between;
}

.stages span {
    flex: 1;
    text-align: center;
    position: relative;
}

.stage-label {
    padding: 2px 10px;
    border-radius: 6px;
    background: var(--bg-light);
    border: 1px solid var(--border);
    font-size: 0.95em;
    color: var(--primary);
}

.stage-label.active {
    background: #1abc9c;
    color: #fff;
    border: 1px solid #16a085;
    font-weight: bold;
}

/* =========================================
   6. APPLICATION DATA
   ========================================= */
.application-data {
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg-light);
}

.application-data h2 {
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
    padding-bottom: 10px;
    margin-bottom: 20px;
    font-size: 20px;
}

.application-data table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
}

.application-data th,
.application-data td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

.application-data th {
    font-weight: 600;
    color: var(--text-dark);
    width: 30%;
    background-color: var(--bg-light);
}

.application-data td {
    color: var(--text-light);
}

/* =========================================
   7. PRO IFRAME LOADER
   ========================================= */
.secure-frame-wrapper {
    position: relative;
    min-height: 600px;
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    margin: 25px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.iframe-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

.iframe-loading-overlay.fade-out {
    opacity: 0;
    visibility: hidden;
}

.pro-spinner {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: var(--primary);
    border-bottom-color: var(--primary);
    animation: spin-pro 1.5s linear infinite;
    position: relative;
    box-shadow: 0 0 20px rgba(0, 51, 102, 0.15);
}

.pro-spinner:before {
    content: "";
    position: absolute;
    top: 5px;
    left: 5px;
    right: 5px;
    bottom: 5px;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: var(--text-dark);
    animation: spin-pro 3s linear infinite reverse;
}

.pro-spinner:after {
    content: "";
    position: absolute;
    top: 15px;
    left: 15px;
    right: 15px;
    bottom: 15px;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: var(--primary);
    animation: spin-pro 1s linear infinite;
}

.loading-text {
    margin-top: 25px;
    font-size: 14px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-light);
    font-weight: 600;
    animation: pulse-text 2s infinite;
}

@keyframes spin-pro {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes pulse-text {
    0% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.6;
    }
}

#iframeContainer {
    width: 100%;
    text-align: center;
    margin-bottom: 30px;
    position: relative;
}

.iframe-wrapper {
    display: none;
}

.iframe-wrapper.active {
    display: block;
}

.iframe-wrapper iframe {
    display: none;
    border: none;
    width: 100%;
}

.loader {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 400px;
    font-size: 1.2em;
    font-weight: 600;
    color: var(--text-light);
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: 12px;
}

/* =========================================
   8. CONTENT SECTIONS & FLOWCHART
   ========================================= */
.content-section {
    padding-top: 20px;
    margin-top: 20px;
    border-top: 1px solid var(--border);
    text-align: left;
}

.content-section h2 {
    text-align: center;
    color: var(--primary);
    font-size: 22px;
    margin-bottom: 20px;
}

.content-section h3 {
    color: var(--text-dark);
    font-size: 18px;
    margin-top: 20px;
    margin-bottom: 10px;
}

.content-section p {
    line-height: 1.6;
    color: var(--text-dark);
    margin-bottom: 1em;
}

.content-section a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.content-section a:hover {
    text-decoration: underline;
}

.flow-diagram-container {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.flow-diagram {
    flex: 2;
    text-align: center;
}

.flow-info {
    flex: 1;
    background: var(--bg-light);
    padding: 15px;
    border-radius: 12px;
    border: 1px solid var(--border);
    font-size: 14px;
}

.flow-box {
    color: #fff;
    padding: 10px 15px;
    border-radius: 8px;
    border: 2px solid transparent;
    width: 280px;
    min-height: 40px;
    box-sizing: border-box;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease-in-out;
    font-weight: 500;
}

.flow-box.applicant {
    background: var(--primary);
}

.flow-box.department {
    background: var(--text-dark);
}

.flow-arrow {
    font-size: 24px;
    color: var(--text-light);
    margin: 5px 0;
}

.flow-decision {
    display: flex;
    justify-content: space-around;
    gap: 20px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 2px solid var(--border);
}

.flow-path {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.path-label {
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 14px;
}

.legend {
    margin-top: 30px;
    border-top: 1px solid var(--border);
    padding-top: 20px;
    text-align: center;
}

.legend h3 {
    text-align: center;
    margin-top: 0;
}

.legend-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 10px 10px 10px;
}

.legend-color {
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 10px;
    border: 1px solid var(--border);
    border-radius: 4px;
}

.legend-color.applicant {
    background: var(--primary);
}

.legend-color.department {
    background: var(--text-dark);
}

.current-step-desc {
    background: #fef9c3;
    border: 1px solid #fde68a;
    padding: 12px;
    margin-top: 15px;
    border-radius: 8px;
    color: #92400e;
}

.highlight-active-step {
    border: 2px solid var(--accent);
    box-shadow: 0 0 15px rgba(255, 191, 0, 0.7);
    transform: scale(1.05);
}

.flow-step-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.you-are-here-indicator {
    position: absolute;
    left: calc(100% + 15px);
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    color: #d98d00;
    font-weight: bold;
    white-space: nowrap;
    font-size: 14px;
    z-index: 10;
}

.you-are-here-indicator::before {
    content: '';
    display: block;
    width: 0;
    height: 0;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-right: 10px solid #d98d00;
    margin-right: 8px;
}

.links-table-container {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 14px;
    margin-top: 30px;
}

/* =========================================
   9. FOOTER
   ========================================= */
.site-footer-box {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    padding: 30px;
    margin-top: 40px;
    border-radius: 12px;
}

.footer-main {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.footer-column {
    flex: 1;
    min-width: 200px;
}

.footer-column h4 {
    font-size: 16px;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 10px;
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-column ul li {
    margin-bottom: 10px;
}

.footer-address-list li {
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    margin-bottom: 10px;
}

.footer-column a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer-column a:hover {
    color: #fff;
}

.newsletter-form {
    position: relative;
}

.newsletter-form p {
    margin-bottom: 15px;
    font-size: 14px;
    color: #fff;
}

.newsletter-form input {
    width: 100%;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-radius: 8px;
    margin-bottom: 10px;
    box-sizing: border-box;
}

.newsletter-form input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.newsletter-form button {
    width: 100%;
    padding: 10px;
    border: none;
    background: #fff;
    color: var(--primary);
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.newsletter-form button:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-1px);
}

#newsletterMessage {
    margin-top: 10px;
    padding: 8px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
}

.newsletter-message-success {
    background: #dcfce7;
    color: #166534;
}

.newsletter-message-error {
    background: #fee2e2;
    color: #991b1b;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.social-media a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    margin-right: 15px;
    font-size: 14px;
}

.social-media a:hover {
    color: #fff;
}

.copyright p {
    margin: 0;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    text-align: right;
}

/* =========================================
   10. LANDING PAGE (SPLIT LAYOUT)
   ========================================= */
.landing-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    text-align: center;
    padding: 20px;
    box-sizing: border-box;
}

.landing-box {
    background: var(--white);
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    max-width: 600px;
    border: 1px solid var(--border);
}

.landing-logo {
    max-height: 145px;
    margin-bottom: 20px;
    width: 190px;
    align-self: center;
}

.landing-box h1 {
    font-size: 28px;
    color: var(--primary);
    margin-bottom: 15px;
}

.landing-box p {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 25px;
}

.landing-box-split {
    background: var(--white);
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    max-width: 1100px;
    width: 90%;
    display: flex;
    gap: 40px;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border);
}

.landing-left,
.landing-right {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.landing-left {
    border-right: 1px solid var(--border);
    padding-right: 40px;
    text-align: left;
}

.landing-right {
    text-align: center;
}

.landing-left h2 {
    color: var(--primary);
    font-size: 22px;
    margin-top: 0;
}

.instructions-list {
    text-align: left;
    padding-left: 20px;
    margin-top: 20px;
    margin-bottom: 20px;
    color: var(--text-light);
}

.instructions-list li {
    margin-bottom: 15px;
    line-height: 1.6;
}

.track-form {
    margin-top: 25px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
}

.track-form .landing-button {
    width: 100%;
}

.help-text {
    margin: 25px 0 10px 0;
    font-size: 14px;
    color: var(--text-light);
}

.help-text a {
    color: var(--primary);
    font-weight: 600;
}

/* =========================================
   11. FEEDBACK POPUP
   ========================================= */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 3000;
    display: none;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
}

.popup-content {
    background: var(--white);
    padding: 30px;
    border-radius: 16px;
    width: 90%;
    max-width: 400px;
    position: relative;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border);
}

.popup-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 30px;
    color: var(--text-light);
    text-decoration: none;
    line-height: 1;
}

.popup-close:hover {
    color: var(--text-dark);
}

#feedbackForm h3 {
    margin-top: 0;
    color: var(--primary);
    text-align: center;
}

#feedbackForm p {
    margin: 10px 0 5px 0;
    font-size: 14px;
    color: var(--text-dark);
    text-align: center;
}

#feedbackForm textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px;
    font-family: inherit;
    margin-top: 10px;
    margin-bottom: 10px;
    transition: border-color 0.2s;
}

#feedbackForm textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.1);
}

#feedbackForm button {
    width: 100%;
    padding: 12px;
    border: none;
    background: var(--primary);
    color: #fff;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

#feedbackForm button:hover {
    background: var(--primary-dark);
}

.star-rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: center;
    margin-bottom: 10px;
}

.star-rating input {
    display: none;
}

.star-rating label {
    font-size: 32px;
    color: #cbd5e1;
    cursor: pointer;
    transition: color 0.2s;
}

.star-rating input:checked~label,
.star-rating label:hover,
.star-rating label:hover~label {
    color: var(--accent);
}

#feedbackMessage {
    margin-top: 15px;
    padding: 10px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
}

.feedback-message-success {
    color: #166534;
    background: #dcfce7;
}

.feedback-message-error {
    color: #991b1b;
    background: #fee2e2;
}

/* =========================================
   12. SCROLL ARROWS & SESSION OVERLAY
   ========================================= */
.scroll-arrow {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: none;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    font-size: 24px;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 51, 102, 0.3);
    transition: all 0.3s;
}

.scroll-arrow:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 51, 102, 0.4);
}

#scrollToProcedureArrow .tooltip-text {
    visibility: hidden;
    width: auto;
    white-space: nowrap;
    background: var(--text-dark);
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 8px 12px;
    position: absolute;
    z-index: 1;
    top: 50%;
    right: 115%;
    transform: translateY(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 12px;
}

#scrollToProcedureArrow:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

#session-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    display: none;
    justify-content: center;
    align-items: center;
}

.session-message-box {
    background: var(--white);
    padding: 40px;
    border-radius: 16px;
    text-align: center;
    max-width: 500px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.session-message-box h2 {
    color: var(--danger);
    margin-top: 0;
}

/* =========================================
   13. PAGE TRANSITIONS
   ========================================= */
body {
    opacity: 1;
    transition: opacity 0.4s ease-in-out;
}

body.fade-out {
    opacity: 0;
}

/* =========================================
   14. OTP INPUT BOXES
   ========================================= */
.otp-input-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 25px;
}

.otp-box {
    width: 48px;
    height: 54px;
    text-align: center;
    font-size: 20px;
    font-weight: bold;
    border: 2px solid var(--border);
    border-radius: 10px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    font-family: inherit;
}

.otp-box:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.15);
}

/* =========================================
   15. PORTAL NAVIGATION TABS
   ========================================= */
.portal-nav {
    display: flex;
    gap: 1px;
    margin-top: 25px;
    position: sticky;
    top: 0;
    background: var(--white);
    z-index: 51;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--border);
}

.portal-nav a {
    padding: 12px 25px;
    text-decoration: none;
    color: var(--text-dark);
    background: var(--bg-light);
    font-weight: 600;
    border: 1px solid var(--border);
    border-bottom: none;
    border-radius: 10px 10px 0 0;
    position: relative;
    bottom: -1px;
    transition: all 0.2s ease-in-out;
}

.portal-nav a:hover {
    background: #e2e8f0;
    color: var(--primary);
}

.portal-nav a.active {
    background: var(--white);
    color: var(--primary);
    border-bottom: 1px solid var(--white);
}

/* =========================================
   16. BETA RIBBON
   ========================================= */
.beta-ribbon {
    position: absolute;
    top: 25px;
    right: -50px;
    width: 200px;
    padding: 10px 0;
    background: var(--accent);
    color: var(--text-dark);
    text-align: center;
    font-weight: bold;
    font-size: 16px;
    transform: rotate(45deg);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 10;
    overflow: hidden;
}

.beta-ribbon span {
    display: block;
}

.beta-ribbon::after {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    animation: shine 3.5s infinite;
}

@keyframes shine {
    0% {
        left: -150%;
    }

    50% {
        left: 150%;
    }

    100% {
        left: 150%;
    }
}

/* =========================================
   17. HELP & FAQ
   ========================================= */
.help-container {
    padding: 20px 30px;
}

.help-container h2 {
    text-align: center;
    color: var(--primary);
    margin-top: 0;
    margin-bottom: 30px;
    font-size: 28px;
    border-bottom: 2px solid var(--border);
    padding-bottom: 15px;
}

.faq-item {
    margin-bottom: 25px;
}

.faq-item h4 {
    font-size: 18px;
    color: var(--text-dark);
    margin-top: 0;
    margin-bottom: 8px;
    font-weight: 600;
}

.faq-item p {
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-light);
    margin-top: 0;
}

.faq-item a {
    color: #d98d00;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.faq-item a:hover {
    color: var(--primary);
    text-decoration: underline;
}

.contact-form-container {
    max-width: 600px;
    margin: 30px auto;
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg-light);
}

.contact-form-container h3 {
    text-align: center;
    color: var(--primary);
    margin-top: 0;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    box-sizing: border-box;
    font-family: inherit;
}

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

.form-submit-btn {
    display: block;
    width: 100%;
    padding: 12px;
    border: none;
    background: var(--primary);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.form-submit-btn:hover {
    background: var(--primary-dark);
}

#contactFormMessage {
    margin-top: 15px;
    text-align: center;
    font-weight: bold;
}

.title-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-left: 15px;
}

.refresh-button {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--bg-light);
    color: var(--text-dark);
    text-decoration: none;
    font-size: 20px;
    font-weight: bold;
    transition: transform 0.3s ease, background 0.3s ease;
    border: 1px solid var(--border);
}

.refresh-button:hover {
    background: var(--border);
    transform: rotate(180deg);
}

/* =========================================
   18. MODALS
   ========================================= */
.modal {
    display: none;
    position: fixed;
    z-index: 999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    background: var(--white);
    margin: 5% auto;
    padding: 24px;
    border-radius: 16px;
    width: 80%;
    max-width: 900px;
    position: relative;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border);
}

.close {
    position: absolute;
    right: 12px;
    top: 5px;
    font-size: 36px;
    font-weight: bold;
    cursor: pointer;
    color: var(--primary);
}

/* =========================================
   19. TOAST NOTIFICATIONS
   ========================================= */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    background: var(--white);
    color: var(--text-dark);
    padding: 16px 20px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    max-width: 400px;
    transform: translateX(120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    border-left: 4px solid var(--primary);
    font-size: 0.95rem;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
}

.toast.success {
    border-left-color: var(--success);
}

.toast.error {
    border-left-color: var(--danger);
}

.toast.warning {
    border-left-color: var(--warning);
}

/* Help icon/tooltip */
.help-icon {
    display: inline-block;
    width: 18px;
    height: 18px;
    border-radius: 100px;
    background: var(--bg-light);
    color: var(--primary);
    text-align: center;
    font-size: 14px;
    font-weight: bold;
    line-height: 18px;
    margin-left: 4px;
    cursor: pointer;
    border: 1px solid var(--border);
    position: relative;
}

.help-tooltip {
    display: none;
    position: absolute;
    background: var(--white);
    color: var(--text-dark);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.95em;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 999;
    width: 250px;
    left: 50%;
    transform: translateX(-50%);
    top: 30px;
}

.help-icon:hover .help-tooltip,
.help-icon:focus .help-tooltip {
    display: block;
}

/* =========================================
   20. MOBILE NAVIGATION
   ========================================= */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--primary);
    padding: 10px;
    margin-left: auto;
}

.mobile-nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
}

.mobile-nav-content {
    position: fixed;
    top: 0;
    right: -320px;
    width: 300px;
    height: 100%;
    background: var(--white);
    z-index: 2001;
    transition: right 0.3s cubic-bezier(0.77, 0, 0.175, 1);
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.mobile-nav-content.active {
    right: 0;
}

.mobile-nav-header {
    padding: 20px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-nav-header h3 {
    margin: 0;
    color: #fff;
    font-size: 18px;
}

.mobile-nav-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 30px;
    cursor: pointer;
    line-height: 1;
}

.mobile-nav-links {
    list-style: none;
    padding: 0;
    margin: 0;
    overflow-y: auto;
}

.mobile-nav-links li {
    border-bottom: 1px solid var(--bg-light);
}

.mobile-nav-links a {
    display: block;
    padding: 15px 20px;
    text-decoration: none;
    color: var(--text-dark);
    font-size: 16px;
    font-weight: 500;
    transition: all 0.2s;
}

.mobile-nav-links a:hover {
    background: var(--bg-light);
    color: var(--primary);
    padding-left: 25px;
}

.mobile-nav-links .highlight-link {
    color: var(--danger);
    font-weight: bold;
    background: #fef2f2;
}

/* =========================================
   21. RESPONSIVE
   ========================================= */
@media (max-width: 900px) {
    .split-screen {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
        overflow-y: visible;
    }

    .left-panel {
        flex: 0 0 auto;
        padding: 3rem 1.5rem;
        text-align: center;
        min-height: auto;
        height: auto;
    }

    .hero-title {
        font-size: 2.25rem;
    }

    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .features-grid {
        display: none;
    }

    .brand-header {
        justify-content: center;
    }

    .right-panel {
        flex: 1;
        padding: 2rem 1.5rem;
        border-top-left-radius: 24px;
        border-top-right-radius: 24px;
        margin-top: -24px;
        z-index: 10;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
        height: auto;
        overflow: visible;
    }
}

@media (max-width: 992px) {

    .main-nav,
    .header-apply {
        display: none;
    }

    .header-main {
        justify-content: center;
    }

    .mobile-menu-btn {
        display: block;
    }

    .landing-box-split {
        flex-direction: column;
    }

    .landing-left {
        border-right: none;
        padding-right: 0;
        border-bottom: 1px solid var(--border);
        padding-bottom: 30px;
        margin-bottom: 30px;
    }

    .portal-nav {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        justify-content: flex-start;
        padding-left: 10px;
        padding-right: 10px;
        scrollbar-width: none;
    }

    .portal-nav::-webkit-scrollbar {
        display: none;
    }

    .portal-nav a {
        flex: 0 0 auto;
        margin-right: 5px;
        white-space: nowrap;
        border-radius: 8px 8px 0 0;
    }
}

@media (max-width: 768px) {
    .container {
        width: 95%;
        padding: 10px;
    }

    h1 {
        font-size: 20px;
    }

    .content-section h2 {
        font-size: 18px;
    }

    .header-top-bar {
        display: none;
    }

    .flow-diagram-container {
        flex-direction: column;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .copyright p {
        text-align: center;
    }

    .flow-box {
        width: 90%;
    }

    .flow-decision {
        flex-direction: column;
        align-items: center;
        border-top: none;
        gap: 0;
    }

    .flow-path {
        width: 100%;
    }

    .flow-path:not(:first-child) {
        margin-top: 20px;
        padding-top: 20px;
        border-top: 2px dashed var(--border);
    }

    .progress-container {
        height: 13px;
    }

    .stages {
        font-size: 0.87em;
        flex-wrap: wrap;
    }

    .action-required-box {
        font-size: 1em;
    }

    .you-are-here-indicator {
        font-size: 12px;
        margin-left: 10px;
    }

    .you-are-here-indicator::before {
        border-top-width: 8px;
        border-bottom-width: 8px;
        border-right-width: 8px;
    }
}