@font-face {
    font-family: 'Garet';
    src: url("../../fonts/Garet-Book.6aea6bc41f90.ttf") format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-primary);
}

body {
    display: flex;
    min-height: 100vh;
    background-color: #ffffff;
    overflow-x: hidden;
}

.sidebar {
    position: fixed;
    right: 0;
    top: 0;
    width: 65%;
    height: 100vh;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    transition: width 0.5s ease;
    z-index: 1;
}

.content {
    position: fixed;
    left: 0;
    top: 0;
    width: 35%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem;
    background-color: #ffffff;
    z-index: 2;
    transition: transform 0.5s ease;
    overflow-y: auto;
}

.header {
    margin-bottom: 1.5rem;
}

.spark-spark-accent {
    color: #23518b;
    font-weight: var(--font-weight-semibold);
    margin-bottom: 12px;
    font-size: 3rem;
    text-align: left;
    line-height: 1;
    letter-spacing: 0.05em;
    font-family: var(--font-primary);
}

h1 {
    font-size: 1.25rem;
    font-weight: var(--font-weight-semibold);
    color: #323130;
    margin-bottom: 0.375rem;
}

.description {
    color: #605e5c;
    font-size: 0.875rem;
    line-height: 1.5;
}

.input-container {
    margin-bottom: var(--spacing-4);
}

/* Icon-leading input fields */
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper .input-icon {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: #605e5c;
    font-size: 0.875rem;
    z-index: 1;
    pointer-events: none;
}

.input-container input {
    width: 100% !important;
    height: 42px !important;
    padding: 0 0.875rem !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 4px !important;
    font-size: 0.9375rem !important;
    color: #323130 !important;
    background: #ffffff !important;
    transition: border-color 0.15s ease !important;
    box-shadow: none !important;
    line-height: normal !important;
}

.input-container input:focus {
    outline: none !important;
    border-color: #23518b !important;
    box-shadow: none !important;
}

.input-container input::placeholder {
    color: #8a8886;
}

.input-container .input-wrapper input {
    padding-left: 2.5rem !important;
    padding-right: 2.75rem !important;
}

/* Password Input Container with Toggle Button */
.password-input-container {
    position: relative;
}

.password-input-container input {
    padding-right: 3rem !important;
}

.password-toggle-btn {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #605e5c;
    cursor: pointer;
    padding: 0.375rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s ease;
    font-size: 0.875rem;
}

.password-toggle-btn:hover {
    color: #23518b;
}

.password-toggle-btn:focus {
    outline: none;
    color: #23518b;
}

.btn {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e4e4e7;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    transition: background-color 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-2);
}

.terms {
    margin-top: 1.5rem;
    margin-bottom: 2rem;
    font-size: 0.75rem;
    color: #71717a;
    text-align: center;
}

.terms a {
    color: #000000;
    text-decoration: none;
}

.terms a:hover {
    text-decoration: underline;
}

.footer {
    text-align: center;
    padding: var(--spacing-4);
    font-size: 0.75rem;
    color: #71717a;
    background-color: rgba(255, 255, 255, 0.5);
    margin-top: var(--spacing-4);
}

.alert {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: var(--spacing-4);
    border-radius: 0.5rem;
    text-align: center;
}

.alert-danger {
    background-color: #ffebee;
    color: #d32f2f;
    border: 1px solid #d32f2f;
}

/* Info Button */
.info-button {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 100;
    border: none;
}

.info-button:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Modal Styles - SPARK Design */
.app-info-modal .modal-content {
    border-radius: 2px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.app-info-modal .modal-header {
    background: #1e3c72;
    color: white;
    border: none;
    border-bottom: 1px solid #e0e0e0;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.app-info-modal .modal-header-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.app-info-modal .modal-icon {
    font-size: 1.25rem;
    color: white;
}

.app-info-modal .modal-title {
    font-size: 0.875rem;
    font-weight: var(--font-weight-semibold);
    letter-spacing: 0.05em;
    margin: 0;
    text-transform: uppercase;
}

.app-info-modal .btn-close {
    filter: brightness(0) invert(1);
    opacity: 0.8;
}

.app-info-modal .btn-close:hover {
    opacity: 1;
}

.app-info-modal .modal-body {
    padding: 0;
    background: #fafafa;
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    background: #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
}

.info-section {
    background: white;
    padding: var(--spacing-6);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.info-icon-wrapper {
    width: 40px;
    height: 40px;
    background: #f0f4f8;
    border: 1px solid #1e3c72;
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
}

.info-icon-wrapper i {
    font-size: 1.25rem;
    color: #1e3c72;
}

.info-title {
    font-size: 0.75rem;
    font-weight: var(--font-weight-semibold);
    color: #323130;
    margin: 0 0 0.5rem 0;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.info-text {
    font-size: 0.8125rem;
    color: #605e5c;
    line-height: 1.5;
    margin: 0;
}

/* Info Footer */
.info-footer {
    background: white;
    padding: 1rem 1.5rem;
}

.info-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.8125rem;
    color: #605e5c;
    font-weight: var(--font-weight-medium);
}

.stat-item i {
    color: #1e3c72;
    font-size: 1rem;
}

.stat-divider {
    width: 1px;
    height: 20px;
    background: #e0e0e0;
}

/* Mobile Responsive */
@media (max-width: 767px) {
    .info-grid {
        grid-template-columns: 1fr;
    }

    .info-section {
        padding: var(--spacing-4);
    }

    .info-stats {
        flex-direction: column;
        gap: 0.75rem;
    }

    .stat-divider {
        display: none;
    }
}

/* Login Button - SPARK Design System */
.login-submit-btn {
    width: 100%;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-2);
    font-size: 0.9375rem;
    font-weight: var(--font-weight-medium);
    color: #ffffff;
    background: #23518b;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s ease;
    margin-bottom: var(--spacing-4);
}

.login-submit-btn:hover {
    background: #1a3d68;
}

.login-submit-btn .btn-text {
    display: flex;
    align-items: center;
    gap: var(--spacing-2);
}

.login-submit-btn .btn-loader {
    display: none;
    align-items: center;
    gap: var(--spacing-2);
}

.login-submit-btn.btn-connecting .btn-text {
    display: none;
}

.login-submit-btn.btn-connecting .btn-loader {
    display: flex;
}

/* Legacy support for #login-btn */
#login-btn {
    min-height: 36px;
    position: relative;
    border: none;
    cursor: pointer;
}

#login-btn.btn-connecting {
    opacity: 0.9;
}

#login-btn .btn-text {
    display: flex;
    align-items: center;
    gap: var(--spacing-2);
}

#login-btn.btn-connecting .btn-text {
    display: none;
}

#login-btn .btn-loader {
    display: none;
}

#login-btn.btn-connecting .btn-loader {
    display: flex;
}

/* Custom Checkbox - SPARK Design */
.checkbox-spark {
    width: 16px;
    height: 16px;
    border: 1px solid #e0e0e0;
    border-radius: 2px;
    cursor: pointer;
    accent-color: #23518b;
}

.checkbox-spark:checked {
    background: #23518b;
    border-color: #23518b;
}

.checkbox-spark:focus {
    border-color: #23518b;
    outline: none;
}

/* Forgot Password Link - SPARK Design */
.forgot-password-link {
    font-size: 0.8125rem;
    font-weight: var(--font-weight-medium);
    color: #23518b;
    text-decoration: none;
    transition: color 0.15s ease;
}

.forgot-password-link:hover {
    color: #1a3d68;
}

/* Login Error Box - SPARK Design */
.login-error-box {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-left: 3px solid #d13438;
    border-radius: 2px;
    font-size: 0.875rem;
    color: #323130;
}

.login-error-box i {
    color: #d13438;
    font-size: 0.875rem;
}

.error-message-container {
    margin-bottom: var(--spacing-4);
    width: 100%;
}

/* ========================================
   VIDEO TOGGLE FEATURE (Desktop Only)
   ======================================== */

.video-toggle-btn,
.mini-login-bar {
    display: none;
}

@media screen and (min-width: 768px) {

    /* Toggle Button - at the right edge of content panel */
    .video-toggle-btn {
        position: fixed;
        left: calc(35% - 22px);
        top: 50%;
        transform: translateY(-50%);
        width: 44px;
        height: 44px;
        background: #1e3c72;
        color: white;
        border: none;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1rem;
        cursor: pointer;
        z-index: 200;
        transition: left 0.5s ease, background 0.2s ease;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    }

    .video-toggle-btn:hover {
        background: #2a5298;
    }

    .video-toggle-btn i {
        transition: transform 0.3s ease;
    }

    /* Mini Login Bar - just a colored bar, no button inside */
    .mini-login-bar {
        position: fixed;
        left: 0;
        top: 0;
        width: 70px;
        height: 100vh;
        background: linear-gradient(180deg, #1e3c72 0%, #2a5298 100%);
        display: block;
        z-index: 150;
        transform: translateX(-100%);
        transition: transform 0.5s ease;
        box-shadow: 2px 0 15px rgba(0, 0, 0, 0.3);
    }

    .mini-login-bar.active {
        transform: translateX(0);
    }

    /* ========================================
       COLLAPSED STATE - Video Fullscreen
       ======================================== */
    body.video-fullscreen .content {
        transform: translateX(-100%);
    }

    body.video-fullscreen .sidebar {
        width: 100%;
    }

    body.video-fullscreen .video-toggle-btn {
        left: 80px;
    }

    body.video-fullscreen .video-toggle-btn i {
        transform: rotate(180deg);
    }
}

/* ========================================
   MOBILE LAYOUT
   ======================================== */
@media screen and (max-width: 767px) {
    body {
        flex-direction: column;
    }

    .sidebar {
        position: relative;
        width: 100%;
        height: 35vh;
        order: 1;
        overflow: hidden;
    }

    .content {
        position: relative;
        width: 100%;
        height: auto;
        min-height: 65vh;
        order: 2;
        padding: var(--spacing-6);
        padding-bottom: 3rem;
        background: #ffffff;
        border-radius: 24px 24px 0 0;
        margin-top: -24px;
        z-index: 10;
        box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.1);
    }

    /* Prevents iOS zoom and improves hit area */
    .input-container input {
        font-size: 16px !important;
        height: 48px;
    }

    .spark-spark-accent {
        font-size: 1.7rem !important;
        margin-bottom: 0.5rem;
    }

    .gradient-title {
        font-size: 1.4rem !important;
        padding: 0 1rem;
        margin-bottom: 0.5rem;
        line-height: 1.25;
    }

    .mode-toggle-btn {
        right: 1rem !important;
        bottom: 1rem !important;
        padding: 0.5rem 0.8rem !important;
        font-size: 0.7rem !important;
        z-index: 1000 !important;
        display: flex !important;
        background: rgba(0, 0, 0, 0.5) !important;
        border: 1px solid rgba(255, 255, 255, 0.3) !important;
    }

    .info-button {
        top: 1rem !important;
        right: 1rem !important;
        width: 32px !important;
        height: 32px !important;
        font-size: 1.1rem !important;
        background: rgba(0, 0, 0, 0.3) !important;
        color: white !important;
    }

    /* Hide video controls that don't apply to mobile */
    .video-toggle-btn,
    .mini-login-bar {
        display: none !important;
    }

    .footer {
        font-size: 0.65rem;
        padding: 0.75rem 0.5rem;
        margin-top: 1.5rem;
    }

    .terms {
        font-size: 0.7rem;
        margin-top: var(--spacing-4);
    }
}

/* ========================================
   GRADIENT MODE STYLES
   ======================================== */

.mode-toggle-btn {
    position: fixed;
    right: 2rem;
    bottom: 2rem;
    padding: var(--spacing-3) var(--spacing-6);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    color: white;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    z-index: 100;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.875rem;
    font-weight: var(--font-weight-medium);
    letter-spacing: 0.02em;
}

.mode-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.mode-toggle-btn i {
    font-size: 1rem;
    color: #00f2fe;
}

.gradient-overlay-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 80%;
    z-index: 10;
    pointer-events: none;
}

.gradient-title {
    font-family: 'Garet', sans-serif;
    font-size: 3.5rem;
    font-weight: 800;
    color: white;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    letter-spacing: -0.02em;
    animation: fadeInUp 1s ease-out;
    transition: opacity 0.3s ease;
}

.gradient-accent {
    font-family: 'Garet', sans-serif;
    font-size: 0.75rem;
    font-weight: var(--font-weight-bold);
    text-transform: uppercase;
    letter-spacing: 0.4em;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 2rem;
    animation: fadeInUp 1s ease-out 0.2s both;
}

.gradient-accent span {
    color: #00f2fe;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hidden {
    display: none !important;
}

/* Visibility management based on body class */
body.spark-mode-active #video-container {
    display: none !important;
}

body.spark-mode-active #spark-container {
    display: block !important;
}

body:not(.spark-mode-active) #spark-container {
    display: none !important;
}

body:not(.spark-mode-active) #video-container {
    display: block !important;
}

.w-full {
    width: 100%;
}

.h-full {
    height: 100%;
}
