@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --scpc-gold: #b49b56;
    --scpc-navy: #024173;
    --scpc-navy-light: #1e293b;
}

body {
    max-width: 100%;
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
}

/* Mobile Header */
.scpc-mobile-header {
    display: none;
    background: var(--scpc-navy);
    padding: 12px 20px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.scpc-header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
}

.scpc-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.scpc-logo-circle {
    width: 40px;
    height: 40px;
    background: var(--scpc-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scpc-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.scpc-brand-name {
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.3;
}

.scpc-portal-title {
    color: var(--scpc-gold);
    font-size: 11px;
    font-weight: 600;
}

@media (max-width: 1200px) {
    .scpc-mobile-header {
        display: block;
    }
}

/* Main Container */
.login-container {
    max-width: 100%;
    display: flex;
    min-height: 100vh;
    align-items: stretch;
}

/* Left Side - Branding */
.branding-section {
    flex: 1;
    min-height: 100vh;
    background: var(--scpc-navy);
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    color: white;
}

.branding-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    animation: pulse 8s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.2); opacity: 0.8; }
}

.branding-content {
    position: relative;
    z-index: 2;
    max-width: 500px;
    text-align: center;
}

.logo-section {
    margin-bottom: 40px;
}

.logo-circle {
    width: 100px;
    height: 100px;
    background: var(--scpc-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 10px 30px rgba(180, 155, 86, 0.3);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.logo-circle svg {
    width: 40px;
    height: 40px;
    fill: var(--scpc-navy);
}

.logo-circle img {
    width: 100px;
    height: 50px;
    object-fit: contain;
}

.branding-content h1 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}

.branding-content .subtitle {
    font-size: 16px;
    color: var(--scpc-gold);
    font-weight: 600;
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.mission-statement {
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 40px;
    opacity: 0.9;
    font-style: italic;
}

.admin-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 40px;
}

.feature-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.feature-card:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
}

.feature-card svg {
    width: 32px;
    height: 32px;
    fill: var(--scpc-gold);
    margin-bottom: 10px;
}

.feature-card h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 5px;
}

.feature-card p {
    font-size: 12px;
    opacity: 0.8;
}

/* Right Side - Form */
.form-section {
    flex: 1;
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: white;
    min-height: 100vh;
}

.form-container {
    width: 100%;
    max-width: 600px;
}

.form-header {
    text-align: center;
    margin-bottom: 40px;
}

.form-header h2 {
    font-size: 32px;
    font-weight: 800;
    color: var(--scpc-navy);
    margin-bottom: 10px;
}

.form-header p {
    color: #666;
    font-size: 15px;
}

.email-display {
    font-size: 15px;
    font-weight: 600;
    color: var(--scpc-navy);
    margin: 10px 0;
}

/* Form Styles */
.login-form {
    margin-top: 30px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--scpc-navy);
    font-weight: 600;
    font-size: 14px;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    fill: var(--scpc-gold);
    pointer-events: none;
}

.form-control {
    width: 100%;
    padding: 14px 16px 14px 48px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
    background: #fafafa;
}

.form-control:focus {
    outline: none;
    border-color: var(--scpc-gold);
    background: white;
    box-shadow: 0 0 0 4px rgba(180, 155, 86, 0.1);
}

/* Form help row */
.form-help {
    margin-top: 8px;
    display: flex;
    justify-content: flex-end;
}

#togglePasswords {
    background: transparent;
    color: var(--scpc-navy);
    border: none;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 12px;
    padding: 8px 12px;
    cursor: pointer;
    transition: text-decoration 0.2s ease;
}

#togglePasswords:hover {
    text-decoration: underline;
    color: var(--scpc-gold);
    border: none;
    box-shadow: none;
    transform: translateY(-1px);
}

#togglePasswords:active {
    transform: translateY(0);
}

/* Password Toggle */
.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle svg {
    width: 20px;
    height: 20px;
    fill: rgba(180, 155, 86, 0.7);
    transition: fill 0.3s ease;
}

.password-toggle:hover svg {
    fill: var(--scpc-gold);
}

/* Button */
.btn-login {
    width: 100%;
    padding: 16px;
    background: var(--scpc-gold);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: capitalize;
    letter-spacing: 1px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.btn-login .spinner {
    width: 18px;
    height: 18px;
    border-radius: 999px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #ffffff;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.btn-login .btn-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-login.is-loading {
    cursor: wait;
}

.btn-login.is-loading .spinner {
    opacity: 1;
    animation: spinner-rotate 0.75s linear infinite;
}

.btn-login:hover {
    background: #a08a4a;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(180, 155, 86, 0.3);
}

.btn-login:active {
    transform: translateY(0);
}

.btn-login:disabled {
    opacity: 0.8;
    pointer-events: none;
}

@keyframes spinner-rotate {
    to {
        transform: rotate(360deg);
    }
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 30px 0;
    color: #999;
    font-size: 14px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e0e0e0;
}

.divider span {
    padding: 0 15px;
}

/* Support Link */
.support-link {
    text-align: center;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #e0e0e0;
}

.support-link p {
    color: #666;
    font-size: 14px;
}

.support-link a {
    color: var(--scpc-navy);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.support-link a:hover {
    color: var(--scpc-gold);
}

.login-hint {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f1f5f9;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 24px;
    color: #475569;
    font-size: 14px;
}

.login-hint svg {
    width: 20px;
    height: 20px;
    fill: var(--scpc-gold);
}

/* ============================================
   APPLICATION WINDOW MODAL
   ============================================ */
.application-window-modal-backdrop,
.application-window-modal {
    position: fixed;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease;
    z-index: 5000;
}

.application-window-modal-backdrop {
    background: rgba(15, 23, 42, 0.65);
}

.application-window-modal {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    pointer-events: none;
    z-index: 5001;
}

.application-window-modal.is-visible,
.application-window-modal-backdrop.is-visible {
    opacity: 1;
    visibility: visible;
}

.application-window-modal.is-visible {
    pointer-events: auto;
}

.application-window-modal__dialog {
    width: min(800px, 100%);
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 30px 60px rgba(35, 35, 36, 0.25);
    padding: 32px;
    font-family: 'Inter', sans-serif;
}

.application-window-modal__header {
    display: grid;
    gap: 18px;
    margin-bottom: 24px;
}

.application-window-modal__intro h2 {
    font-size: 26px;
    margin-bottom: 8px;
    color: var(--scpc-navy);
    text-align: center;
}

.application-window-modal__intro p {
    margin: 0;
    color: #4b5563;
    line-height: 1.5;
    text-align: center;
}

.application-window-modal__body {
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 20px;
    background: #f8fafc;
}

.application-window-modal__meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.application-window-modal__meta-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    padding: 16px;
}

.application-window-modal__meta-card span {
    font-size: 15px;
    text-transform: uppercase;
    text-align: center;
    letter-spacing: 0.05em;
    color: var(--scpc-navy);
    font-weight: 700;
    display: block;
    margin-bottom: 6px;
}

.application-window-modal__meta-card p {
    font-size: 14px;
    font-weight: 500;
    color: var(--scpc-gold);
    text-align: center;
}

.application-window-modal__actions {
    margin-top: 24px;
    display: flex;
    justify-content: flex-end;
}

.application-window-modal__btn {
    border: none;
    border-radius: 12px;
    padding: 14px 28px;
    background: linear-gradient(135deg, var(--scpc-gold) 0%, #c9b272 100%);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(180, 155, 86, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.application-window-modal__btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(180, 155, 86, 0.4);
}

.application-window-modal__btn:focus-visible {
    outline: 3px solid rgba(180, 155, 86, 0.4);
    outline-offset: 3px;
}

.application-window-modal__locked-note {
    font-size: 14px;
    color: #991b1b;
    background: rgba(220, 38, 38, 0.08);
    border: 1px solid rgba(220, 38, 38, 0.2);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    width: 100%;
}

.application-window-modal__login-link {
    color: #991b1b;
    background: transparent;
    font-weight: 700;
    text-decoration: underline;
    display: inline-block;
    padding: 6px 10px;
    border-radius: 8px;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 1200px) {
    .login-container {
        flex-direction: column;
        padding-top: 70px; /* Account for mobile header */
    }

    .branding-section {
        display: none;
    }

    .form-section {
        padding: 40px 30px;
    }
}

@media (max-width: 576px) {
    .form-section {
        padding: 30px 20px;
    }

    .form-header h2 {
        font-size: 26px;
    }
}

@media (max-width: 350px) {
    .application-window-modal__dialog {
        width: calc(100% - 20px);
        padding: 18px;
    }
    .application-window-modal__intro h2 {
        font-size: 20px;
    }
    .application-window-modal__intro p {
        font-size: 13px;
    }
    .application-window-modal__meta-card p {
        font-size: 13px;
    }
    .application-window-modal__btn { 
        padding: 12px 22px;
        font-size: 13px;
    }
}

/* Watermark */
.login-container:not(.support-page) .branding-section {
    position: relative;
}

.login-container:not(.support-page) .branding-section::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('../images/Logo.png');
    background-repeat: no-repeat;
    background-position: center 35%;
    background-size: 100%;
    opacity: .05;
    pointer-events: none;
}
