/* === ROOT VARIABLES === */
:root {
    --bg: #f8fafc;
    --card-bg: #ffffff;
    --primary: #1b71ff;
    --text: #1f2933;
    --muted: #5f6672;
    --border: #e1e5ec;
    --shadow: 0 22px 60px rgba(17, 24, 39, 0.12);
    --radius: 18px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Manrope", "Segoe UI", sans-serif;
    color: var(--text);
    background:
        linear-gradient(120deg, #f7f9fc 0%, #f1f4f9 45%, #f8fafc 100%),
        repeating-linear-gradient(120deg, rgba(210,216,226,0.22) 0 32px, transparent 32px 64px),
        repeating-linear-gradient(60deg, rgba(210,216,226,0.18) 0 36px, transparent 36px 72px);
    background-size: 100% 100%, 320px 320px, 320px 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 18px 32px;
}

/* === LAYOUT CONTAINERS === */
.auth-shell {
    width: 100%;
    max-width: 1160px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}

.auth-card {
    width: 100%;
    max-width: 1100px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 26px 60px rgba(17,24,39,0.12);
    border: 1px solid #edf1f6;
    overflow: hidden;
    min-height: 580px;
    align-items: stretch;
    padding: 0;
}

.default-view {
    display: contents; /* allow inner sections to form the two columns */
}

.auth-card.provider-mode {
    grid-template-columns: 1fr 1fr;
    max-width: 1100px;
    padding: 0;
    align-items: stretch;
}
.auth-card.provider-mode .default-view { display: none; }
.auth-card.provider-mode .provider-view { display: grid; }

.signin-pane {
    padding: 50px 54px 48px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 520px;
    width: 100%;
}

.top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.zoho-logo { height: 44px; width: auto; }

.smart-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-radius: 999px;
    background: linear-gradient(135deg, #0f3bff, #1b71ff);
    color: #fff;
    border: none;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 12px 26px rgba(27, 113, 255, 0.3);
}
.smart-btn i { font-size: 16px; }

h1 {
    margin: 8px 0 6px;
    font-size: 34px;
    letter-spacing: -0.2px;
}

.subtitle { margin: 0 0 16px; color: #616975; }

.signin-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.signin-form input {
    height: 52px;
    border-radius: 6px;
    border: 1px solid #e1e4eb;
    padding: 0 14px;
    background: #f8f9fb;
    font-size: 16px;
    font-family: inherit;
    color: #7a828e;
}
.signin-form input::placeholder { color: #9aa1ad; }

.signin-form input:focus {
    outline: none;
    border-color: #cbd5e4;
    box-shadow: 0 0 0 3px rgba(27, 113, 255, 0.16);
}
.signin-form .input-error {
    border-color: #e45b65;
    background: #fff6f6;
    color: #b4232e;
}
.signin-form .input-error:focus {
    border-color: #d2404e;
    box-shadow: 0 0 0 3px rgba(226, 90, 103, 0.18);
}
.error-inline {
    color: #b4232e;
    font-size: 14px;
    margin-top: 6px;
    margin-bottom: 4px;
}
.error-inline a { color: #b4232e; font-weight: 700; }

.error-box {
    border: 1px solid #f3b8be;
    background: #fff5f5;
    color: #b4232e;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 14px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* === FORM COMPONENTS === */
.primary-btn {
    height: 50px;
    border: none;
    border-radius: 6px;
    background: #0b7fff;
    color: #fff;
    font-weight: 800;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 14px 24px rgba(11, 127, 255, 0.32);
}

.social-signin { margin-top: 6px; }
.social-signin p { margin: 0 0 10px; color: #1f2933; font-weight: 600; }
.social-signin { position: relative; }

.social-icons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.icon-btn {
    width: 44px;
    height: 44px;
    border: 1px solid #d6dae4;
    border-radius: 6px;
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 100ms ease, box-shadow 120ms ease;
}
.icon-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 16px rgba(17,24,39,0.12); }

.icon-btn i { font-size: 20px; }
.icon-btn img { width: 20px; height: 20px; display: block; }
.icon-btn.apple { color: #fff; background: #000; border-color: #000; }
.icon-btn.google { background: #fff; }
.icon-btn.yahoo { background: #5f01d1; color: #fff; border-color: #5f01d1; }
.icon-btn.facebook { background: #1977f2; color: #fff; border-color: #1977f2; }
.icon-btn.linkedin { background: #0a66c2; color: #fff; border-color: #0a66c2; }
.icon-btn.x { background: #111; color: #fff; border-color: #111; }
.icon-btn.microsoft { background: #f8f9fb; }
.icon-btn.more { background: #f3f4f6; color: #4b5563; font-size: 18px; }

.provider-view {
    display: none;
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
    column-gap: 28px;
    grid-column: 1 / -1;
}
.providers-only {
    margin: 0;
    padding: 52px 54px 52px;
    max-width: 520px;
    width: 100%;
    place-self: center;
}
.provider-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 14px;
    margin-top: 10px;
    width: 430px;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
}
.back-default {
    margin-top: 12px;
    border: none;
    background: transparent;
    color: #1c4fd9;
    font-weight: 700;
    cursor: pointer;
}

.more-panel {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 14px;
    margin-top: 6px;
}

.provider {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 48px;
    width: 100%;
    border-radius: 10px;
    border: 1px solid #d8dde7;
    background: #fff;
    font-weight: 700;
    padding: 0 16px;
    cursor: pointer;
    justify-content: center;
    transition: transform 120ms ease, box-shadow 120ms ease;
    font-size: 15px;
}
.provider i, .provider img { font-size: 18px; height: 20px; width: 20px; }
.apple-svg { width: 20px; height: 20px; fill: currentColor; display: block; }
.provider img { display: block; }
.provider:hover { transform: translateY(-1px); box-shadow: 0 10px 18px rgba(17,24,39,0.12); }

.provider.apple { background: #000; color: #fff; border-color: #000; }
.provider.google { background: #f7f7f7; }
.provider.yahoo { background: #5f01d1; color: #fff; border-color: #5f01d1; }
.provider.facebook { background: #1977f2; color: #fff; border-color: #1977f2; }
.provider.linkedin { background: #0a66c2; color: #fff; border-color: #0a66c2; }
.provider.x { background: #0f1419; color: #fff; border-color: #0f1419; }
.provider.microsoft { background: #fff; }
.provider.slack { background: #461a52; color: #fff; border-color: #461a52; }
.provider.arattai { background: #f5c400; color: #0f172a; border-color: #e1b400; }
.provider.github { background: #24292e; color: #fff; border-color: #24292e; }

.zoho-wide {
    margin-top: 18px;
    width: 100%;
    height: 50px;
    border-radius: 24px;
    border: 1px solid #d9dfe8;
    background: #f8fafc;
    font-weight: 800;
    cursor: pointer;
    color: #0f1f39;
}


.signup-hint {
    margin-top: auto;
    color: #404654;
    font-size: 15px;
}
.signup-hint a { color: #1c4fd9; font-weight: 700; text-decoration: none; }

.promo-pane {
    background: #fdfefe;
    padding: 58px 60px 46px;
    display: grid;
    grid-template-rows: auto auto auto 1fr auto;
    text-align: center;
    align-items: start;
    justify-items: center;
    align-content: center;
    border-left: 1px solid #eef1f5;
    height: 100%;
}
.promo-provider {
    padding: 60px 64px 56px;
    align-content: start;
    justify-items: center;
    max-width: 460px;
    width: 100%;
}

.promo-illustration {
    max-width: 340px;
    width: 100%;
    height: auto;
    margin: 0 auto 18px;
    object-fit: contain;
    display: block;
}
.banner1_img {
    width: 100%;
    max-width: 360px;
    height: 260px;
    margin: 0 auto 18px;
}
.banner-rotator {
    position: relative;
    overflow: hidden;
}
.banner-slide {
    position: absolute;
    inset: 0;
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
    opacity: 0;
    animation: bannerSwap 10s infinite;
}
.banner-slide.slide-1 {
    background-image: url("images/passwordless_signin.svg");
    animation-delay: 0s;
}
.banner-slide.slide-2 {
    background-image: url("images/passwordless_signin_alt.svg");
    animation-delay: 5s;
}

@keyframes bannerSwap {
    0% { opacity: 0; }
    10% { opacity: 1; }
    40% { opacity: 1; }
    50% { opacity: 0; }
    100% { opacity: 0; }
}

.promo-pane h3 { margin: 6px 0 10px; font-size: 20px; }
.promo-pane p { margin: 0 0 18px; color: var(--muted); line-height: 1.55; }

.secondary-btn {
    justify-self: center;
    padding: 10px 22px;
    border-radius: 999px;
    border: 1px solid #b4d2ff;
    background: #e5f1ff;
    color: #1a57c5;
    font-weight: 700;
    cursor: pointer;
}

.toast {
    position: fixed;
    bottom: 22px;
    left: 50%;
    transform: translateX(-50%);
    background: #111827;
    color: #f9fafb;
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 14px;
    box-shadow: 0 18px 40px rgba(0,0,0,0.18);
    opacity: 0;
    pointer-events: none;
    transition: opacity 150ms ease, transform 150ms ease;
    z-index: 9999;
}
.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(-6px);
}

.dot-indicator {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #cbd5e1;
    display: inline-block;
    text-decoration: none;
}

.dot.active { width: 18px; border-radius: 999px; background: #1b71ff; }

.page-footer {
    font-size: 13px;
    color: #6c7280;
    margin-top: 6px;
}

/* OTP page */
.otp-banner {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: #0c8a3e;
    color: #fff;
    padding: 12px 16px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 18px 38px rgba(12,138,62,0.25);
    z-index: 50;
    font-weight: 600;
}
.otp-banner i { font-size: 15px; }

.otp-input-row {
    position: relative;
    display: flex;
    align-items: center;
}
.otp-input-row input {
    width: 100%;
    letter-spacing: 2px;
    text-transform: uppercase;
}
.resend {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 13px;
    color: #1b71ff;
    text-decoration: none;
    font-weight: 700;
}
.resend.disabled {
    color: #9ca3af;
    pointer-events: none;
    cursor: default;
}

.email-chip {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #dfe4ec;
    border-radius: 8px;
    background: #f7f9fc;
    font-weight: 700;
    color: #111827;
}
.email-chip a {
    color: #1b71ff;
    font-weight: 700;
    text-decoration: none;
    font-size: 14px;
}

.verify-btn {
    margin-top: 6px;
}

.otp-social {
    margin-top: 18px;
}

.inline-note {
    margin-top: 16px;
    padding: 12px 14px;
    border: 1px solid #d8e3f3;
    border-radius: 10px;
    background: #f6f9fe;
    color: #1f2937;
    display: flex;
    gap: 10px;
    align-items: center;
    font-size: 14px;
}
.inline-note i { color: #0b7fff; }
.inline-note-link {
    color: #1b71ff;
    text-decoration: none;
    font-weight: 700;
}

.status {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    font-weight: 600;
}
.status.success { background: #e8f9ef; color: #0f7b3b; border: 1px solid #b6e4c5; }
.status.error { background: #fff3f3; color: #b91c1c; border: 1px solid #f5c2c7; }

/* inline provider list hidden by default */
.providers-inline { display: none; margin-top: 10px; }
.providers-inline.active { display: block; }

@media (max-width: 1024px) {
    body { padding: 28px 12px 22px; }
    .auth-card { grid-template-columns: 1fr; }
    .promo-pane { display: none; }
    .signin-pane { padding: 42px 26px; }
}

@media (max-width: 600px) {
    .top-row { flex-direction: column; align-items: flex-start; gap: 10px; }
    .smart-btn { width: 100%; justify-content: center; }
}
