/* =========================================================
   SchoolTek SaaS – Modern 2026 Login Page Stylesheet
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --lp-font-sans: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --lp-bg: #f8fafc;
    --lp-surface: #ffffff;
    --lp-surface-hover: #f1f5f9;
    --lp-text-heading: #0f172a;
    --lp-text-body: #334155;
    --lp-text-muted: #64748b;
    --lp-text-subtle: #94a3b8;
    --lp-border: #e2e8f0;
    --lp-border-focus: var(--color-primary, #4f46e5);
    
    --lp-radius-sm: 8px;
    --lp-radius-md: 12px;
    --lp-radius-lg: 16px;
    --lp-radius-xl: 24px;
    --lp-radius-pill: 9999px;

    --lp-shadow-xs: 0 1px 2px 0 rgba(15, 23, 42, 0.04);
    --lp-shadow-sm: 0 2px 4px 0 rgba(15, 23, 42, 0.06), 0 1px 2px -1px rgba(15, 23, 42, 0.04);
    --lp-shadow-md: 0 8px 24px -4px rgba(15, 23, 42, 0.08), 0 4px 8px -2px rgba(15, 23, 42, 0.04);
    --lp-shadow-lg: 0 20px 32px -8px rgba(15, 23, 42, 0.12), 0 8px 16px -4px rgba(15, 23, 42, 0.06);

    --lp-transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100vh;
    max-height: 100vh;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

body.lp-body {
    font-family: var(--lp-font-sans);
    background-color: #0c172e;
    color: var(--lp-text-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    height: 100vh;
    max-height: 100vh;
    overflow: hidden;
    line-height: 1.5;
}

/* =========================================================
   MAIN WRAPPER (Split 50% / 50% Layout – No Scroll)
   ========================================================= */
.lp-container {
    display: flex;
    height: 100vh;
    max-height: 100vh;
    width: 100vw;
    background: #0c172e;
    position: relative;
    overflow: hidden;
}

/* ---------- RIGHT COLUMN (Login Form – 50%) ---------- */
.lp-form-column {
    flex: 1 1 50%;
    max-width: 50%;
    width: 50%;
    height: 100vh;
    max-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 2.25rem 3.5rem;
    background: #ffffff;
    border-radius: 0 !important;
    box-shadow: none !important;
    position: relative;
    z-index: 3;
    overflow-y: auto;
    scrollbar-width: none; /* Firefox */
}

.lp-form-column::-webkit-scrollbar {
    display: none; /* Chrome/Safari/Edge */
}

.lp-form-wrapper {
    width: 100%;
    max-width: 420px;
    margin: auto 0;
    padding: 0.5rem 0;
}

/* Brand Header */
.lp-brand-top {
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.lp-logo-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.lp-logo-link:hover {
    opacity: 0.9;
}

.lp-logo-img {
    height: 38px;
    max-width: 180px;
    width: auto;
    object-fit: contain;
}

.lp-badge-saas {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    font-size: 0.725rem;
    font-weight: 600;
    color: var(--color-primary, #4f46e5);
    background: var(--color-primary-lighter, #eef2ff);
    border: 1px solid var(--color-primary-border, #c7d2fe);
    border-radius: var(--lp-radius-pill);
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.lp-badge-saas-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--color-primary, #4f46e5);
}

/* Title & Subtitle */
.lp-heading-group {
    margin-bottom: 1.75rem;
}

.lp-heading {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--lp-text-heading);
    letter-spacing: -0.025em;
    line-height: 1.25;
    margin-bottom: 0.4rem;
}

.lp-subheading {
    font-size: 0.9rem;
    color: var(--lp-text-muted);
    line-height: 1.5;
}

/* Alerts */
.lp-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    padding: 0.875rem 1rem;
    border-radius: var(--lp-radius-md);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 1.25rem;
    line-height: 1.4;
    animation: lpFadeIn 0.3s ease;
}

.lp-alert-icon {
    flex-shrink: 0;
    margin-top: 1px;
}

.lp-alert-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.lp-alert-danger {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.lp-demo-alert {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
    font-size: 0.8125rem;
    border-radius: var(--lp-radius-md);
    padding: 0.625rem 0.875rem;
    margin-bottom: 1.25rem;
    text-align: center;
}

.lp-demo-alert a {
    color: var(--color-primary, #2563eb);
    font-weight: 600;
    text-decoration: underline;
}

/* =========================================================
   FORM CONTROLS & INPUTS
   ========================================================= */
.lp-form-group {
    margin-bottom: 1.25rem;
    position: relative;
}

.lp-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.45rem;
}

.lp-label {
    display: inline-block;
    font-size: 0.845rem;
    font-weight: 600;
    color: var(--lp-text-heading);
    margin-bottom: 0;
    user-select: none;
}

.lp-required {
    color: #e11d48;
    margin-left: 2px;
}

.lp-forgot-link {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-primary, #4f46e5);
    text-decoration: none;
    transition: var(--lp-transition);
}

.lp-forgot-link:hover {
    text-decoration: underline;
    opacity: 0.88;
}

.lp-whats-this {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.785rem;
    font-weight: 600;
    color: var(--color-primary, #4f46e5);
    cursor: pointer;
    text-decoration: none;
    transition: var(--lp-transition);
    user-select: none;
}

.lp-whats-this:hover {
    opacity: 0.85;
    text-decoration: underline;
}

.lp-whats-this svg {
    width: 14px;
    height: 14px;
    stroke-width: 2.2;
}

/* Input Wrapper & Icon Prefix */
.lp-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.lp-input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--lp-text-subtle);
    pointer-events: none;
    z-index: 2;
    transition: color 0.2s ease;
}

.lp-input-icon svg {
    width: 18px;
    height: 18px;
    stroke-width: 2;
}

/* Modern Input */
.lp-input {
    width: 100%;
    height: 50px;
    padding: 0 42px 0 42px;
    background-color: #ffffff;
    border: 1px solid var(--lp-border);
    border-radius: var(--lp-radius-md);
    font-family: var(--lp-font-sans);
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--lp-text-heading);
    box-shadow: var(--lp-shadow-xs);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    outline: none;
}

.lp-input::placeholder {
    color: var(--lp-text-subtle);
    font-weight: 400;
    opacity: 0.9;
}

.lp-input:hover {
    border-color: #cbd5e1;
}

.lp-input:focus {
    border-color: var(--color-primary, #4f46e5);
    background-color: #ffffff;
    box-shadow: 0 0 0 3.5px var(--color-primary-focus-ring, rgba(79, 70, 229, 0.15));
}

.lp-input-wrapper:focus-within .lp-input-icon {
    color: var(--color-primary, #4f46e5);
}

/* Password Toggle Button */
.lp-password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: var(--lp-radius-sm);
    color: var(--lp-text-subtle);
    cursor: pointer;
    z-index: 2;
    transition: var(--lp-transition);
}

.lp-password-toggle:hover {
    color: var(--lp-text-heading);
    background: #f1f5f9;
}

.lp-password-toggle:focus-visible {
    outline: 2px solid var(--color-primary, #4f46e5);
    outline-offset: 2px;
}

.lp-password-toggle svg {
    width: 18px;
    height: 18px;
    stroke-width: 2;
}

/* Validation Errors */
.lp-error-text,
label.error {
    display: block;
    font-size: 0.785rem;
    font-weight: 500;
    color: #e11d48;
    margin-top: 0.375rem;
    line-height: 1.3;
}

.has-danger .lp-input,
.lp-input.form-control-danger,
.lp-input.error {
    border-color: #f87171 !important;
    background-color: #fffafb !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12) !important;
}

.has-danger .lp-input-icon {
    color: #f87171 !important;
}

/* =========================================================
   PRIMARY BUTTON (Sign In)
   ========================================================= */
.lp-btn-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    height: 50px;
    margin-top: 1.5rem;
    padding: 0 1.5rem;
    background: var(--color-primary-gradient, var(--color-primary, #4f46e5));
    color: #ffffff;
    border: none;
    border-radius: var(--lp-radius-md);
    font-family: var(--lp-font-sans);
    font-size: 0.9375rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    cursor: pointer;
    box-shadow: var(--color-primary-shadow, 0 4px 14px rgba(79, 70, 229, 0.35));
    transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
    user-select: none;
    text-decoration: none;
}

.lp-btn-submit:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px color-mix(in srgb, var(--color-primary, #4f46e5) 45%, transparent);
    filter: brightness(1.04);
    color: #ffffff;
}

.lp-btn-submit:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 8px color-mix(in srgb, var(--color-primary, #4f46e5) 30%, transparent);
}

.lp-btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.lp-btn-submit svg {
    width: 18px;
    height: 18px;
    stroke-width: 2.2;
    transition: transform 0.2s ease;
}

.lp-btn-submit:hover:not(:disabled) svg {
    transform: translateX(3px);
}

/* =========================================================
   SIGNUP CALLOUT
   ========================================================= */
.lp-signup-callout {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.85rem;
    color: var(--lp-text-muted);
}

.lp-signup-accent {
    font-weight: 600;
    color: var(--color-primary, #4f46e5);
    text-decoration: none;
    margin-left: 0.25rem;
    transition: var(--lp-transition);
}

.lp-signup-accent:hover {
    text-decoration: underline;
    opacity: 0.85;
}

/* =========================================================
   DEMO ACCESS CHIPS
   ========================================================= */
.lp-demo-container {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--lp-border);
}

.lp-demo-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.875rem;
    font-size: 0.725rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--lp-text-subtle);
}

.lp-demo-category {
    font-size: 0.725rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--lp-text-muted);
    text-align: center;
    margin: 0.75rem 0 0.5rem;
}

.lp-demo-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.lp-demo-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.45rem 0.85rem;
    font-family: var(--lp-font-sans);
    font-size: 0.775rem;
    font-weight: 600;
    color: var(--lp-text-body);
    background: var(--lp-bg);
    border: 1px solid var(--lp-border);
    border-radius: var(--lp-radius-pill);
    cursor: pointer;
    transition: var(--lp-transition);
    white-space: nowrap;
}

.lp-demo-chip svg {
    width: 14px;
    height: 14px;
    stroke-width: 2;
    color: var(--lp-text-muted);
    transition: color 0.15s ease;
}

.lp-demo-chip:hover {
    background: #ffffff;
    border-color: var(--color-primary, #4f46e5);
    color: var(--color-primary, #4f46e5);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.lp-demo-chip:hover svg {
    color: var(--color-primary, #4f46e5);
}

.lp-demo-chip-primary {
    background: var(--color-primary-lighter, #eef2ff);
    border-color: var(--color-primary-border, #c7d2fe);
    color: var(--color-primary, #4f46e5);
}

.lp-demo-chip-primary svg {
    color: var(--color-primary, #4f46e5);
}

.lp-demo-chip-primary:hover {
    background: var(--color-primary-light, #e0e7ff);
    border-color: var(--color-primary, #4f46e5);
}

/* Footer / Trust Mark */
.lp-form-footer {
    width: 100%;
    max-width: 440px;
    padding-top: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.775rem;
    color: var(--lp-text-subtle);
}

.lp-form-footer svg {
    width: 13px;
    height: 13px;
    stroke-width: 2;
    color: #10b981;
}

/* =========================================================
   LEFT VISUAL COLUMN (Exactly 50% Width – Edge-to-Edge Cover Image & Content)
   ========================================================= */
.lp-visual-column {
    flex: 1 1 50%;
    max-width: 50%;
    width: 50%;
    height: 100vh;
    max-height: 100vh;
    position: relative;
    padding: 2.25rem 3rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Background image filling 100% width & height with object-fit: cover */
.lp-bg-cover-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center bottom;
    z-index: 1;
    pointer-events: none;
    border: none;
    margin: 0;
    padding: 0;
}

/* Subtle overlay to ensure foreground text is crisp & readable */
.lp-bg-overlay-mask {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(8, 17, 39, 0.65) 0%, rgba(8, 17, 39, 0.28) 45%, rgba(6, 12, 30, 0.02) 75%, transparent 100%);
    z-index: 2;
    pointer-events: none;
}

.lp-visual-inner {
    position: relative;
    z-index: 3;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    text-align: left;
    max-width: 480px;
}

/* Visual Top Brand Badge */
.lp-visual-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.25rem;
}

.lp-visual-logo-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.85rem;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--lp-radius-pill);
    color: #ffffff;
    font-size: 0.775rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.lp-visual-logo-badge svg {
    width: 14px;
    height: 14px;
    color: #818cf8;
}

/* Hero Typography */
.lp-hero-text {
    margin: 0.35rem 0;
}

.lp-hero-title {
    font-size: 2.35rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-bottom: 0.65rem;
}

.lp-hero-title-line {
    display: block;
    color: #ffffff;
}

.lp-highlight-amber {
    color: #f59e0b;
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.lp-hero-subtitle {
    font-size: 0.875rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.78);
    max-width: 420px;
    font-weight: 400;
}

/* Feature Stack (4 items) */
.lp-features-stack {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    width: 100%;
    max-width: 300px;
    margin: 0.35rem 0;
}

.lp-feature-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.45rem 0.85rem 0.45rem 0.65rem;
    background: rgba(12, 23, 46, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor: default;
}

.lp-feature-card:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.28);
    transform: translateX(3px);
}

.lp-feature-card-icon {
    width: 30px;
    height: 30px;
    min-width: 30px;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    flex-shrink: 0;
}

.lp-feature-card-icon svg {
    width: 15px;
    height: 15px;
    color: #ffffff;
}

.lp-feature-card-title {
    font-size: 0.825rem;
    font-weight: 600;
    color: #ffffff;
    flex-grow: 1;
    white-space: nowrap;
}

.lp-feature-card-arrow {
    width: 12px;
    height: 12px;
    color: rgba(255, 255, 255, 0.5);
    flex-shrink: 0;
    transition: transform 0.2s ease, color 0.2s ease;
}

.lp-feature-card:hover .lp-feature-card-arrow {
    color: #ffffff;
    transform: translateX(2px);
}

/* Quote Box */
.lp-quote-box {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    max-width: 420px;
    margin-top: 0.35rem;
}

.lp-quote-icon {
    color: #f59e0b;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 2px;
}

.lp-quote-icon svg {
    width: 18px;
    height: 18px;
    color: #f59e0b;
}

.lp-quote-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.lp-quote-text {
    font-size: 0.875rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.85);
    font-style: italic;
    margin: 0;
}

.lp-quote-author {
    font-size: 0.775rem;
    font-weight: 600;
    color: #f59e0b;
    display: block;
}

@keyframes lpFloat {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, 20px) scale(1.08); }
}

/* =========================================================
   RTL SUPPORT
   ========================================================= */
[dir="rtl"] .lp-input-icon {
    left: auto;
    right: 14px;
}

[dir="rtl"] .lp-password-toggle {
    right: auto;
    left: 12px;
}

[dir="rtl"] .lp-input {
    padding: 0 42px 0 42px;
    text-align: right;
}

[dir="rtl"] .lp-btn-submit svg {
    transform: rotate(180deg);
}

[dir="rtl"] .lp-btn-submit:hover:not(:disabled) svg {
    transform: rotate(180deg) translateX(3px);
}

/* =========================================================
   RESPONSIVE BREAKPOINTS
   ========================================================= */
@media (max-width: 1199.98px) {
    .lp-form-column {
        padding: 2rem;
    }
    .lp-visual-column {
        padding: 2.5rem;
    }
    .lp-visual-tagline {
        font-size: 1.5rem;
    }
    .lp-feature-pills {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 991.98px) {
    .lp-container {
        flex-direction: column;
    }

    .lp-form-column {
        flex: 1 1 100%;
        max-width: 100%;
        width: 100%;
        min-height: 100vh;
        padding: 2.5rem 1.5rem;
    }

    .lp-visual-column {
        display: none;
    }
}

@media (max-width: 480px) {
    .lp-form-column {
        padding: 1.75rem 1.25rem;
    }
    .lp-heading {
        font-size: 1.5rem;
    }
    .lp-brand-top {
        margin-bottom: 1.5rem;
    }
    .lp-input {
        height: 48px;
        font-size: 0.875rem;
    }
    .lp-btn-submit {
        height: 48px;
    }
}