/* ════════════════════════════════════════════════════════════════════════════
   MIMBAR DIGITAL — Premium Auth Pages CSS
   Two-column layout: illustrated left panel + clean right form
   Poppins font · Apple/iOS aesthetic · fully responsive
   ════════════════════════════════════════════════════════════════════════════ */

/* ── Tokens (inherited from portal if loaded, else standalone) ────────── */
:root {
    --md-blue:        #0066FF;
    --md-blue-hover:  #0052CC;
    --md-green:       #30D158;
    --md-amber:       #FF9F0A;
    --md-red:         #FF453A;
    --md-bg:          #F5F5F7;
    --md-card:        #FFFFFF;
    --md-text:        #1D1D1F;
    --md-sub:         #424245;
    --md-muted:       #86868B;
    --md-light:       #C7C7CC;
    --md-border:      rgba(0,0,0,0.10);
    --md-border-2:    rgba(0,0,0,0.05);
    --md-font:        'Poppins', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    --ease-spring:    cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-out:       cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ── Reset ────────────────────────────────────────────────────────────── */
.mimbar-auth-html { box-sizing: border-box; height: 100%; }
*, *::before, *::after { box-sizing: inherit; }

.mimbar-auth-body {
    margin: 0; padding: 0;
    font-family: var(--md-font);
    background: var(--md-bg);
    color: var(--md-text);
    min-height: 100vh;
    height: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: -0.01em;
}

/* ════════════════════════════════════════════════════════════════════════════
   SHELL — two columns
   ════════════════════════════════════════════════════════════════════════════ */
.mimbar-auth-shell {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
}

@media (max-width: 900px) {
    .mimbar-auth-shell {
        grid-template-columns: 1fr;
    }
}

/* ════════════════════════════════════════════════════════════════════════════
   LEFT PANEL — decorative
   ════════════════════════════════════════════════════════════════════════════ */
.mimbar-auth-panel {
    background: linear-gradient(150deg,
        #0A0A0F 0%,
        #0D1B3E 40%,
        #0A1628 70%,
        #07111F 100%
    );
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: stretch;
}

@media (max-width: 900px) {
    .mimbar-auth-panel { display: none; }
}

.mimbar-auth-panel-inner {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 48px;
    width: 100%;
    position: relative;
    z-index: 2;
}

/* Floating orbs */
.mimbar-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    pointer-events: none;
    z-index: 0;
}
.mimbar-orb-1 {
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(0,102,255,0.30) 0%, transparent 70%);
    top: -100px; right: -80px;
    animation: mimbar-orb-float 8s ease-in-out infinite alternate;
}
.mimbar-orb-2 {
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(88,86,214,0.20) 0%, transparent 70%);
    bottom: 80px; left: -60px;
    animation: mimbar-orb-float 11s ease-in-out infinite alternate-reverse;
}
.mimbar-orb-3 {
    width: 200px; height: 200px;
    background: radial-gradient(circle, rgba(48,209,88,0.10) 0%, transparent 70%);
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    animation: mimbar-orb-float 6s ease-in-out infinite alternate;
}

@keyframes mimbar-orb-float {
    from { transform: translateY(0) scale(1); }
    to   { transform: translateY(-24px) scale(1.05); }
}
.mimbar-orb-3 { animation: mimbar-orb-pulse 7s ease-in-out infinite; }
@keyframes mimbar-orb-pulse {
    0%, 100% { transform: translate(-50%,-50%) scale(1); opacity: 0.6; }
    50%       { transform: translate(-50%,-50%) scale(1.3); opacity: 1; }
}

/* Brand */
.mimbar-panel-brand { position: relative; z-index: 1; }

.mimbar-panel-logo {
    width: 56px; height: 56px;
    margin-bottom: 20px;
    border-radius: 16px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    backdrop-filter: blur(12px);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 8px 32px rgba(0,0,0,0.30);
}
.mimbar-panel-logo svg { width: 36px; height: 36px; }

.mimbar-panel-name {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 8px;
    letter-spacing: -0.025em;
}

.mimbar-panel-tagline {
    font-size: 14px;
    color: rgba(255,255,255,0.55);
    margin: 0;
    line-height: 1.5;
    font-weight: 400;
    max-width: 280px;
}

/* Feature list */
.mimbar-panel-features {
    list-style: none;
    margin: 0;
    padding: 0;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.mimbar-panel-features li {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 14px;
    color: rgba(255,255,255,0.75);
    font-weight: 500;
    line-height: 1.4;
}

.mimbar-panel-feature-icon {
    width: 34px; height: 34px;
    border-radius: 10px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.10);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    color: rgba(255,255,255,0.70);
}
.mimbar-panel-feature-icon svg { width: 16px; height: 16px; }

/* Slider mockup */
.mimbar-panel-mockup {
    position: relative;
    z-index: 1;
}

.mimbar-mockup-screen {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 14px;
    padding: 16px;
    overflow: hidden;
    position: relative;
    backdrop-filter: blur(8px);
}

.mimbar-mockup-slide {
    border-radius: 10px;
    height: 120px;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: flex-end;
    padding: 14px;
    background:
        linear-gradient(to top, rgba(0,0,0,0.60) 0%, transparent 60%),
        linear-gradient(135deg, #1a3a6b 0%, #0d2040 100%);
}

.mimbar-mockup-slide::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 30% 30%, rgba(0,102,255,0.25), transparent 50%),
        radial-gradient(circle at 70% 70%, rgba(88,86,214,0.20), transparent 50%);
}

.mimbar-mockup-caption {
    display: flex; flex-direction: column; gap: 6px;
    position: relative; z-index: 1; width: 100%;
}

.mimbar-mockup-bar {
    height: 9px;
    border-radius: 999px;
    background: rgba(255,255,255,0.80);
}
.mimbar-mockup-bar-w70 { width: 70%; }
.mimbar-mockup-bar-w45 { width: 45%; background: rgba(255,255,255,0.45); height: 7px; }

.mimbar-mockup-dots {
    display: flex;
    gap: 5px;
    justify-content: center;
    margin-top: 12px;
}
.mimbar-mockup-dots span {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,0.25);
    transition: all 300ms;
}
.mimbar-mockup-dots span.active {
    width: 18px;
    border-radius: 999px;
    background: rgba(255,255,255,0.80);
}

/* Panel footer */
.mimbar-panel-footer {
    font-size: 12px;
    color: rgba(255,255,255,0.30);
    margin: 0;
    position: relative;
    z-index: 1;
}

/* ════════════════════════════════════════════════════════════════════════════
   RIGHT PANEL — form
   ════════════════════════════════════════════════════════════════════════════ */
.mimbar-auth-main {
    display: flex;
    flex-direction: column;
    background: var(--md-card);
    position: relative;
    overflow-y: auto;
}

@media (max-width: 900px) {
    .mimbar-auth-main {
        background: var(--md-bg);
    }
}

/* Mobile brand (hidden on desktop) */
.mimbar-auth-mobile-brand {
    display: none;
    align-items: center;
    gap: 10px;
    padding: 24px 32px;
    font-size: 16px;
    font-weight: 700;
    color: var(--md-text);
    letter-spacing: -0.02em;
    border-bottom: 1px solid var(--md-border-2);
    background: var(--md-card);
}
.mimbar-auth-logo-sm { width: 36px; height: 36px; }
.mimbar-auth-logo-sm svg { width: 100%; height: 100%; display: block; }

@media (max-width: 900px) {
    .mimbar-auth-mobile-brand { display: flex; }
}

/* Form wrapper */
.mimbar-auth-form-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 48px 56px;
    max-width: 480px;
    width: 100%;
    margin: 0 auto;
}

@media (max-width: 1100px) {
    .mimbar-auth-form-wrap { padding: 40px 40px; }
}

@media (max-width: 900px) {
    .mimbar-auth-form-wrap {
        padding: 32px 24px;
        max-width: 480px;
        margin: 0 auto;
        justify-content: flex-start;
    }
}

/* Step dots */
.mimbar-auth-steps {
    display: flex;
    gap: 6px;
    margin-bottom: 36px;
}
.mimbar-step {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--md-border);
    transition: all 300ms var(--ease-spring);
}
.mimbar-step.is-active {
    width: 24px;
    border-radius: 999px;
    background: var(--md-blue);
}

/* Heading */
.mimbar-auth-heading { margin-bottom: 32px; }
.mimbar-auth-heading h1 {
    font-size: 30px;
    font-weight: 700;
    color: var(--md-text);
    margin: 0 0 8px;
    letter-spacing: -0.035em;
    line-height: 1.15;
}
.mimbar-auth-heading p {
    font-size: 15px;
    color: var(--md-muted);
    margin: 0;
    font-weight: 400;
    line-height: 1.5;
}

/* Alerts */
.mimbar-auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 13.5px;
    font-weight: 500;
    line-height: 1.45;
    margin-bottom: 22px;
}
.mimbar-auth-alert--error {
    background: rgba(255,69,58,0.08);
    border: 1px solid rgba(255,69,58,0.16);
    color: #B22B20;
    animation: mimbar-shake 0.4s var(--ease-out) both;
}
.mimbar-auth-alert--success {
    background: rgba(48,209,88,0.08);
    border: 1px solid rgba(48,209,88,0.18);
    color: #1A7F37;
}
.mimbar-auth-alert-icon {
    width: 20px; height: 20px;
    flex-shrink: 0;
}
.mimbar-auth-alert-icon svg { width: 100%; height: 100%; }
.mimbar-auth-alert p { margin: 0; }

@keyframes mimbar-shake {
    0%, 100% { transform: translateX(0); }
    20%      { transform: translateX(-6px); }
    40%      { transform: translateX(5px); }
    60%      { transform: translateX(-4px); }
    80%      { transform: translateX(3px); }
}

/* ════════════════════════════════════════════════════════════════════════════
   FORM FIELDS
   ════════════════════════════════════════════════════════════════════════════ */
.mimbar-auth-form { margin: 0; }

.mimbar-field { margin-bottom: 20px; }

.mimbar-field-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--md-sub);
    margin-bottom: 8px;
    letter-spacing: 0.005em;
}
.mimbar-field-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.mimbar-field-link {
    font-size: 12.5px;
    font-weight: 500;
    color: var(--md-blue);
    text-decoration: none;
    transition: color 150ms;
}
.mimbar-field-link:hover { color: var(--md-blue-hover); text-decoration: underline; }

/* Input control */
.mimbar-field-control {
    position: relative;
    display: flex;
    align-items: center;
}

.mimbar-field-icon {
    position: absolute;
    left: 16px;
    color: var(--md-light);
    display: flex;
    align-items: center;
    pointer-events: none;
    flex-shrink: 0;
    transition: color 200ms;
}
.mimbar-field-icon svg { width: 16px; height: 16px; }

.mimbar-field-input {
    width: 100%;
    padding: 14px 48px 14px 46px;
    border: 1.5px solid var(--md-border);
    border-radius: 14px;
    font-family: var(--md-font);
    font-size: 15px;
    font-weight: 500;
    color: var(--md-text);
    background: #FAFAFA;
    outline: none;
    transition: all 200ms var(--ease-out);
    -webkit-appearance: none;
    letter-spacing: -0.005em;
    line-height: 1;
}

.mimbar-field-input::placeholder {
    color: var(--md-light);
    font-weight: 400;
}

.mimbar-field-input:hover {
    border-color: rgba(0,0,0,0.18);
    background: #fff;
}

.mimbar-field-input:focus {
    border-color: var(--md-blue);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(0,102,255,0.12);
}

/* When focused, make icon blue */
.mimbar-field-control:focus-within .mimbar-field-icon {
    color: var(--md-blue);
}

/* Eye toggle */
.mimbar-eye-btn {
    position: absolute;
    right: 14px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--md-muted);
    padding: 6px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px; height: 32px;
    transition: all 150ms;
}
.mimbar-eye-btn:hover {
    background: rgba(0,0,0,0.05);
    color: var(--md-text);
}
.mimbar-eye-btn svg { width: 18px; height: 18px; }

/* Inline remember row */
.mimbar-field-row-inline {
    margin-bottom: 24px;
}

.mimbar-toggle-label-inline {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--md-sub);
    user-select: none;
}

/* Password strength */
.mimbar-strength-wrap {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.mimbar-strength-track {
    flex: 1;
    height: 4px;
    background: var(--md-border);
    border-radius: 999px;
    overflow: hidden;
}
.mimbar-strength-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 400ms var(--ease-spring), background 300ms;
}
.mimbar-strength-label {
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
    min-width: 52px;
    text-align: right;
}

/* ════════════════════════════════════════════════════════════════════════════
   SUBMIT BUTTON
   ════════════════════════════════════════════════════════════════════════════ */
.mimbar-submit-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 24px;
    background: var(--md-blue);
    color: #fff;
    border: none;
    border-radius: 14px;
    font-family: var(--md-font);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    letter-spacing: -0.01em;
    transition: all 200ms var(--ease-out);
    box-shadow: 0 1px 2px rgba(0,0,0,0.08), 0 6px 20px rgba(0,102,255,0.22);
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.mimbar-submit-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.12) 0%, transparent 60%);
    pointer-events: none;
}

.mimbar-submit-btn:hover {
    background: var(--md-blue-hover);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.10), 0 10px 28px rgba(0,102,255,0.32);
}

.mimbar-submit-btn:active {
    transform: translateY(0);
    transition-duration: 80ms;
    box-shadow: 0 1px 2px rgba(0,0,0,0.08), 0 4px 12px rgba(0,102,255,0.20);
}

.mimbar-submit-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

.mimbar-submit-btn svg {
    width: 16px; height: 16px;
    flex-shrink: 0;
}

/* Loading spinner inside button */
.mimbar-submit-btn .mimbar-btn-spinner {
    display: inline-block;
    width: 16px; height: 16px;
    border: 2px solid rgba(255,255,255,0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: mimbar-spin 0.65s linear infinite;
}

/* Back link */
.mimbar-auth-back-row {
    text-align: center;
}
.mimbar-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--md-muted);
    text-decoration: none;
    transition: color 150ms;
}
.mimbar-back-link svg { width: 14px; height: 14px; }
.mimbar-back-link:hover { color: var(--md-text); }

/* Footer note */
.mimbar-auth-note {
    font-size: 11.5px;
    color: var(--md-light);
    text-align: center;
    margin: 28px 0 0;
    line-height: 1.6;
}

/* ════════════════════════════════════════════════════════════════════════════
   SUCCESS STATE
   ════════════════════════════════════════════════════════════════════════════ */
.mimbar-auth-success {
    text-align: center;
    padding: 8px 0 20px;
}

.mimbar-auth-success-graphic {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    animation: mimbar-pop-in 0.5s var(--ease-spring) both;
}
.mimbar-auth-success-graphic svg { width: 100%; height: 100%; }

@keyframes mimbar-pop-in {
    from { transform: scale(0.5); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}

.mimbar-auth-success h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--md-text);
    margin: 0 0 10px;
    letter-spacing: -0.025em;
}

.mimbar-auth-success p {
    font-size: 14.5px;
    color: var(--md-muted);
    margin: 0 0 24px;
    line-height: 1.55;
}

/* ════════════════════════════════════════════════════════════════════════════
   CHECKBOX (keep me signed in)
   ════════════════════════════════════════════════════════════════════════════ */
.mimbar-checkbox { display: none; }

.mimbar-checkbox-custom {
    width: 20px; height: 20px;
    border: 1.5px solid var(--md-border);
    border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    transition: all 220ms var(--ease-spring);
    background: #FAFAFA;
}
.mimbar-checkbox:checked + .mimbar-checkbox-custom {
    background: var(--md-blue);
    border-color: var(--md-blue);
    box-shadow: 0 0 0 3px rgba(0,102,255,0.15);
}
.mimbar-checkbox:checked + .mimbar-checkbox-custom::after {
    content: '';
    width: 10px; height: 6px;
    border-left: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(-45deg) translateY(-1px);
}

/* ════════════════════════════════════════════════════════════════════════════
   ANIMATIONS
   ════════════════════════════════════════════════════════════════════════════ */
.mimbar-auth-form-wrap {
    animation: mimbar-slide-in 0.5s var(--ease-spring) both;
}
@keyframes mimbar-slide-in {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

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

/* ════════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
    .mimbar-auth-form-wrap {
        padding: 24px 20px;
        justify-content: flex-start;
    }
    .mimbar-auth-heading h1 { font-size: 26px; }
    .mimbar-submit-btn { padding: 14px 20px; font-size: 14.5px; }
    .mimbar-field-input { font-size: 14px; padding: 13px 46px 13px 44px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
