/*
  The sign-in and lock screens: a soft blurred backdrop with a rounded "device" split into a green panel (clock and
  greeting) and a near-black panel (the form or the PIN keypad). On phones the panels stack and fill the screen.
  Look approved from design-ideas/mockups/login.html and lock.html.
*/

body.auth { margin: 0; min-height: 100vh; background: #e8ece8; }

/* the out-of-focus backdrop; a real shop photo can replace the gradients later (set background-image on .auth-scene) */
.auth-scene {
    min-height: 100vh; display: grid; place-items: center; padding: 28px; position: relative; overflow: hidden;
    background:
        radial-gradient(ellipse 60% 55% at 18% 22%, #f6efe2 0%, transparent 60%),
        radial-gradient(ellipse 45% 50% at 82% 18%, #cfe3df 0%, transparent 62%),
        radial-gradient(ellipse 55% 45% at 70% 88%, #f1e6d6 0%, transparent 65%),
        radial-gradient(ellipse 40% 40% at 8% 90%, #b9d2c6 0%, transparent 60%),
        #e8ece8;
}
.auth-scene::before {
    content: ''; position: absolute; inset: 0; pointer-events: none; filter: blur(6px);
    background:
        radial-gradient(circle 120px at 30% 30%, rgba(255, 255, 255, .75), transparent 70%),
        radial-gradient(circle 160px at 78% 62%, rgba(255, 255, 255, .55), transparent 70%),
        radial-gradient(circle 90px at 55% 12%, rgba(255, 226, 170, .55), transparent 70%),
        radial-gradient(circle 110px at 12% 70%, rgba(120, 180, 150, .35), transparent 70%);
}

/* centred on wide screens; never taller than the window */
.auth-device {
    position: relative; z-index: 1; width: min(1100px, 100%, calc((100vh - 56px) * 1.6)); aspect-ratio: 16 / 10;
    border-radius: 34px; padding: 10px; background: #0b0f0d; box-shadow: 0 40px 90px rgba(10, 30, 22, .35), 0 0 0 2px #1b2420 inset;
}
.auth-screen { width: 100%; height: 100%; border-radius: 26px; overflow: hidden; display: grid; grid-template-columns: 1.08fr 1fr; background: var(--uc-ink); }

/* ---- green panel ---- */
.auth-green { position: relative; padding: 5% 6%; color: #fff; display: flex; flex-direction: column; background: radial-gradient(ellipse 90% 70% at 30% 10%, #3cc79b 0%, transparent 60%), linear-gradient(160deg, #2fb68b, #1d7f62 55%, #145a47); }
.auth-green::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 85% 90%, rgba(255, 255, 255, .12), transparent 40%); pointer-events: none; }
.auth-clock { text-align: center; margin-top: 2%; }
.auth-clock .time { font-size: clamp(46px, 7vw, 92px); font-weight: 600; letter-spacing: -.02em; line-height: 1; }
.auth-clock .date { font-size: clamp(13px, 1.5vw, 18px); font-weight: 300; opacity: .9; margin-top: 6px; }
.auth-hello { margin-top: auto; position: relative; z-index: 1; }
.auth-hello h2 { font-size: clamp(20px, 2.4vw, 30px); font-weight: 500; margin: 0 0 4px; color: #fff; }
.auth-hello p { margin: 0; font-weight: 300; opacity: .92; font-size: clamp(13px, 1.4vw, 17px); }
.auth-quote { margin-top: 5%; font-weight: 300; font-size: clamp(12px, 1.3vw, 16px); line-height: 1.35; opacity: .95; max-width: 30ch; position: relative; z-index: 1; }
.auth-quote b { display: block; font-weight: 500; margin-top: 6px; }

/* ---- dark panel ---- */
.auth-dark { background: var(--uc-ink); color: #fff; padding: 5% 7%; display: flex; flex-direction: column; justify-content: center; overflow: auto; }
.auth-dark h1 { font-weight: 500; font-size: clamp(22px, 2.6vw, 32px); line-height: 1.12; margin: 0 0 5%; color: #fff; }
.auth-dark .form-label { color: #cfd8d3; font-size: 13px; }
.auth-dark .form-control { background: var(--uc-ink-3); border: 1px solid var(--uc-ink-line); color: #fff; height: 50px; border-radius: 12px; }
.auth-dark .form-control::placeholder { color: #667570; }
.auth-dark .form-control:focus { background: var(--uc-ink-3); color: #fff; border-color: var(--uc-green-1); box-shadow: 0 0 0 3px rgba(47, 182, 139, .18); }
.auth-dark .form-control.is-invalid { border-color: #ff6b5e; }
.auth-dark .invalid-feedback, .auth-dark .text-danger { color: #ff8f84 !important; }
.auth-dark .form-text, .auth-dark .text-muted { color: #8c9a93 !important; }
.auth-dark a { color: #7ee0bf; }
.auth-dark a.auth-forgot { color: #ff6b5e; font-size: 13px; display: block; text-align: right; margin: -2% 0 4%; }
.auth-dark .btn-primary { height: 52px; border-radius: 12px; font-size: 16px; }
.auth-dark .alert { border-radius: 12px; font-size: 14px; }
.auth-dark .alert-success { background: rgba(47, 182, 139, .16); color: #aee9d3; }
.auth-dark .alert-danger { background: rgba(255, 107, 94, .16); color: #ffb3ac; }
.auth-dark .alert-warning { background: rgba(244, 183, 64, .16); color: #f6d58e; }

/* ---- lock screen: people, PIN dots and keypad ---- */
.auth-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; margin-bottom: 4%; max-height: 38vh; overflow: auto; padding: 2px; }
.auth-person { display: block; background: var(--uc-ink-3); border: 1px solid var(--uc-ink-line); border-radius: 14px; padding: 12px 6px; text-align: center; color: #fff !important; }
a.auth-person:hover { border-color: var(--uc-green-1); }
.auth-person.is-me { border-color: var(--uc-green-1); background: rgba(47, 182, 139, .12); }
.auth-person.is-off { opacity: .55; }
.auth-avatar { width: 42px; height: 42px; border-radius: 50%; margin: 0 auto 6px; display: grid; place-items: center; font-weight: 600; background: linear-gradient(150deg, #3dc9a0, #1d7f62); color: #fff; }
.auth-person b { display: block; font-weight: 500; font-size: 14px; line-height: 1.2; }
.auth-person small { display: block; color: #8c9a93; font-size: 11px; }
.auth-who { text-align: center; margin-bottom: 3%; }
.auth-who .auth-avatar { width: 56px; height: 56px; font-size: 20px; }
.auth-who .name { font-size: 20px; font-weight: 500; }
.auth-who .hint { color: #8c9a93; font-size: 13px; }

.auth-dots { display: flex; justify-content: center; gap: 16px; margin: 0 0 5%; }
.auth-dots span { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #4a5852; display: block; }
.auth-dots span.on { background: var(--uc-green-1); border-color: var(--uc-green-1); box-shadow: 0 0 14px rgba(47, 182, 139, .5); }
.auth-keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 330px; margin: 0 auto 4%; width: 100%; }
.auth-keys button { height: clamp(46px, 7.2vh, 62px); border-radius: 12px; background: var(--uc-ink-3); border: 1px solid var(--uc-ink-line); color: #fff; font-size: 22px; font-weight: 400; cursor: pointer; font-family: inherit; }
.auth-keys button:hover { background: #2a3530; }
.auth-keys button:active { background: var(--uc-green-2); }
.auth-keys .fn { font-size: 14px; color: #8c9a93; }
.auth-foot { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 2%; }
.auth-foot .btn, .auth-foot button { font-size: 14px; }
.auth-dark .btn-outline-light, .auth-dark .btn-outline-secondary { --bs-btn-color: #cfe9de; --bs-btn-border-color: #1d7f62; --bs-btn-bg: transparent; --bs-btn-hover-bg: rgba(47, 182, 139, .12); --bs-btn-hover-color: #fff; --bs-btn-hover-border-color: #2fb68b; --bs-btn-active-bg: rgba(47, 182, 139, .2); --bs-btn-active-color: #fff; }
.auth-dark .btn-link { color: #8c9a93; }
.auth-pw { margin-top: 3%; }

@media (max-width: 980px), (max-height: 560px) {
    .auth-scene { padding: 0; place-items: stretch; }
    .auth-device { aspect-ratio: auto; width: 100%; min-height: 100vh; border-radius: 0; padding: 0; box-shadow: none; }
    .auth-screen { border-radius: 0; grid-template-columns: 1fr; min-height: 100vh; }
    .auth-green { min-height: 34vh; }
    .auth-dark { padding: 8% 7%; }
}
