@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: #0d1117;
    overflow-x: hidden;
}

.sidebar {
    position: fixed;
    right: 0;
    top: 0;
    width: 65%;
    height: 100vh;
    z-index: 1;
    background-image: url("../../images/backgrounds/ogimage.0fbdf78d3f79.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.login-visual-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(90deg, rgba(3, 7, 18, 0.88) 0%, rgba(3, 7, 18, 0.68) 28%, rgba(3, 7, 18, 0.26) 56%, rgba(3, 7, 18, 0.08) 100%),
        linear-gradient(180deg, rgba(13, 17, 23, 0.12) 0%, rgba(13, 17, 23, 0.36) 100%);
    pointer-events: none;
}

.login-background-copy {
    position: absolute;
    top: 62%;
    left: clamp(2rem, 4.8vw, 4.75rem);
    z-index: 2;
    width: min(470px, 43%);
    min-height: 5.25rem;
    transform: translateY(-50%);
    font-family: 'Garet', sans-serif;
    pointer-events: none;
}

.login-background-copy span {
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    color: #ffffff;
    font-family: 'Garet', sans-serif;
    font-size: clamp(1.5rem, 2.25vw, 2.5rem);
    font-weight: 600;
    line-height: 1.16;
    letter-spacing: 0;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.82), 0 8px 28px rgba(0, 0, 0, 0.58);
    opacity: 0;
    transform: translateY(12px);
    animation: loginCopyCycle 12s ease-in-out infinite;
}

.login-background-copy span:nth-child(2) {
    animation-delay: 4s;
}

.login-background-copy span:nth-child(3) {
    font-size: clamp(2.65rem, 4.6vw, 5.15rem);
    line-height: 1;
    animation-delay: 8s;
}

@keyframes loginCopyCycle {
    0%, 7% {
        opacity: 0;
        transform: translateY(12px);
    }

    12%, 29% {
        opacity: 1;
        transform: translateY(0);
    }

    34%, 100% {
        opacity: 0;
        transform: translateY(-12px);
    }
}

.content {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 10;
    width: 35%;
    height: 100vh;
    background: #0d1117;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    box-shadow: 15px 0 30px rgba(0, 0, 0, 0.5);
    border-radius: 0 1px 1px 0;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}


.header {
    margin-bottom: 1.5rem;
}

.spark-spark-accent {
    color: #60a5fa;
    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);
}

.login-accent-copy {
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    letter-spacing: -0.01em;
    white-space: nowrap;
    width: 100%;
    margin-bottom: 0.5rem;
    line-height: 1.1;
}

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

.description {
    color: #94a3b8;
    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: #64748b;
    font-size: 0.875rem;
    z-index: 1;
    pointer-events: none;
}

body .content .input-container input,
body .content .input-wrapper input:not([type="submit"]),
body .content .spark-input {
    width: 100% !important;
    height: 42px !important;
    padding: 0 0.875rem !important;
    border: 1px solid #334155 !important;
    border-radius: 3px !important;
    font-size: 0.9375rem !important;
    color: #e2e8f0 !important;
    background: #1e293b !important;
    background-color: #1e293b !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
    box-shadow: none !important;
    line-height: normal !important;
    caret-color: #60a5fa !important;
}

/* Force dark background even on browser autofill */
body .content input:-webkit-autofill,
body .content input:-webkit-autofill:hover,
body .content input:-webkit-autofill:focus,
body .content input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px #1e293b inset !important;
    -webkit-text-fill-color: #e2e8f0 !important;
    caret-color: #60a5fa !important;
    border-color: #334155 !important;
    transition: background-color 5000s ease-in-out 0s !important;
}

.input-container input:focus {
    outline: none !important;
    border-color: #60a5fa !important;
    box-shadow: 0 0 0 1px rgba(96, 165, 250, 0.25) !important;
}

.input-container input::placeholder {
    color: #4a5568;
}

.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: #64748b;
    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: #93c5fd;
}

.password-toggle-btn:focus {
    outline: none;
    color: #93c5fd;
}

.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: #64748b;
    text-align: center;
}

.terms-links {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.terms-separator {
    color: #a1a1aa;
}

.hosting-brand-lockup {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.125rem;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(35, 81, 139, 0.08), rgba(255, 255, 255, 0.95));
    border: 1px solid rgba(35, 81, 139, 0.12);
}

.hosting-brand-lockup__logo {
    width: 120px;
    height: 120px;
    object-fit: contain;
    flex-shrink: 0;
}

.hosting-brand-lockup__eyebrow {
    margin: 0 0 0.25rem;
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #6b7280;
}

.hosting-brand-lockup__name {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
    color: #111827;
}

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

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

.footer {
    text-align: center;
    padding: var(--spacing-4);
    font-size: 0.75rem;
    color: #475569;
    background-color: transparent;
    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: 10000;
    border: none;
}

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

.back-home-button {
    position: fixed;
    top: 1.5rem;
    left: 1.5rem;
    height: 38px;
    padding: 0 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    color: white;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    z-index: 10000;
    transition: all 0.3s ease;
}

.back-home-button:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    color: white;
}

.back-home-button i {
    font-size: 0.9rem;
}

/* 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.35rem;
    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.35rem;
    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 - Dark Mode */
.login-submit-btn {
    width: 100%;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-2);
    font-size: 0.8125rem;
    font-weight: var(--font-weight-semibold);
    color: #ffffff;
    background: #2563eb;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: var(--spacing-4);
    letter-spacing: 0.02em;
    box-shadow: none;
}

.login-submit-btn:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

.login-submit-btn:active {
    background: #1e40af;
    transform: translateY(0);
}

.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;
    background: #2563eb;
    color: #ffffff;
    border-radius: 2px;
}

#login-btn:hover {
    background: #1d4ed8;
}

#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 #334155;
    border-radius: 2px;
    cursor: pointer;
    accent-color: #3b82f6;
}

.checkbox-spark:checked {
    background: #3b82f6;
    border-color: #3b82f6;
}

.checkbox-spark:focus {
    border-color: #60a5fa;
    outline: none;
}

/* Login Options Row */
.login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    width: 100%;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.remember-me label {
    font-size: 0.8125rem;
    color: #94a3b8;
    cursor: pointer;
    margin: 0;
}

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

.forgot-password-link:hover {
    color: #93c5fd;
}

/* Login Error Box - SPARK Design */
.login-error-box {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-left: 3px solid #ef4444;
    border-radius: 2px;
    font-size: 0.875rem;
    color: #fca5a5;
}

.login-error-box i {
    color: #d13438;
    font-size: 0.875rem;
    margin-top: 2px;
    flex-shrink: 0;
}

.login-error-title {
    display: block;
    font-weight: 600;
}

.login-error-detail {
    display: block;
    margin-top: 2px;
    font-size: 0.78rem;
    opacity: 0.85;
}

.login-error-box--success {
    background: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.25);
    border-left-color: #10b981;
    color: #86efac;
}

.login-error-box--success i {
    color: #10b981;
}

.login-error-box--warning {
    background: rgba(245, 158, 11, 0.08);
    border-color: rgba(245, 158, 11, 0.25);
    border-left-color: #f59e0b;
    color: #fcd34d;
}

.login-error-box--warning i {
    color: #f59e0b;
}

.login-error-box--info {
    background: rgba(96, 165, 250, 0.08);
    border-color: rgba(96, 165, 250, 0.25);
    border-left-color: #60a5fa;
    color: #bfdbfe;
}

.login-error-box--info i {
    color: #60a5fa;
}

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

/* ========================================
   FORM CONTAINER WIDTH & ALIGNMENT
   ======================================== */
.login-form-container {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
}

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

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

    .login-background-copy {
        left: 1.5rem;
        top: 63%;
        width: calc(100% - 3rem);
        min-height: 4.25rem;
    }

    .login-background-copy span {
        font-size: clamp(1.2rem, 6vw, 2rem);
        line-height: 1.16;
    }

    .login-background-copy span:nth-child(3) {
        font-size: clamp(2.4rem, 12vw, 3.8rem);
    }

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

    /* 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;
    }

    .login-accent-copy {
        font-size: 1.45rem !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;
    }

    .back-home-button {
        top: 1rem !important;
        left: 1rem !important;
        height: 32px !important;
        padding: 0 0.75rem !important;
        font-size: 0.75rem !important;
        border-radius: 16px !important;
        background: rgba(0, 0, 0, 0.3) !important;
    }

    .back-home-button span {
        display: none;
    }

    .back-home-button i {
        font-size: 1rem !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);
    }

    .terms-links {
        gap: 0.35rem 0.5rem;
    }

    .hosting-brand-lockup {
        align-items: flex-start;
        padding: 0.875rem 1rem;
    }

    .hosting-brand-lockup__logo {
        width: 92px;
        height: 92px;
    }

}

@media (prefers-reduced-motion: reduce) {
    .login-background-copy span {
        animation: none;
    }

    .login-background-copy span:first-child {
        opacity: 1;
        transform: none;
    }
}

.hidden {
    display: none !important;
}

.w-full {
    width: 100%;
}

.h-full {
    height: 100%;
}

/* ========================================
   MODERN LOGIN SLIDE-LEFT TRANSITION
   ======================================== */
.login-slide-overlay {
    position: fixed;
    top: 0;
    right: -100vw;
    width: 100vw;
    height: 100vh;
    background: #05070d;
    z-index: 999999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.65s cubic-bezier(0.85, 0, 0.15, 1);
    box-shadow: -20px 0 50px rgba(0, 0, 0, 0.8);
}

.login-slide-overlay.login-slide-active {
    transform: translate3d(-100vw, 0, 0);
}

.login-slide-logo {
    width: clamp(220px, 25vw, 320px);
    height: auto;
    opacity: 0;
    transform: scale(0.95) translate3d(40px, 0, 0);
    transition: opacity 0.45s ease 0.15s, transform 0.45s cubic-bezier(0.85, 0, 0.15, 1) 0.15s;
}

.login-slide-overlay.login-slide-active .login-slide-logo {
    opacity: 1;
    transform: scale(1) translate3d(0, 0, 0);
}
