/* ============================================================
   ORVO Authenticator — Mobile-First Stylesheet
   Theme: Dark, Outfit font, Teal accent (#188796)
   ============================================================ */

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

/* --- Accent & Selection --- */
:root { accent-color: #188796; }
::selection { background: #188796; color: #fff; }
::-moz-selection { background: #188796; color: #fff; }
select option:checked { background: #188796; color: #fff; }

html {
    background: #000000;
    touch-action: pan-x pan-y;
}

body {
    font-family: 'Outfit', system-ui, -apple-system, sans-serif;
    background: #000000;
    color: #FFFFFF;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    opacity: 0;
    animation: pageIn 0.15s ease-out forwards;
    overflow-x: hidden;
}

a { color: #188796; text-decoration: none; }
a:hover { color: #73D1DE; }

/* --- Layout --- */
.auth-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 20px;
    max-width: 420px;
    margin: 0 auto;
    width: 100%;
}

/* --- Logo --- */
.auth-logo {
    text-align: center;
    margin: 0 0 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.auth-logo-img {
    height: 28px;
    filter: brightness(0) invert(1);
}

.auth-logo small {
    font-size: 13px;
    color: #888888;
    letter-spacing: 0.05em;
    font-weight: 400;
}

/* --- Card --- */
.card {
    background: #171717;
    border: 1px solid #333333;
    border-radius: 16px;
    padding: 32px 28px;
    width: 100%;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

.card-title {
    font-size: 20px;
    font-weight: 600;
    color: #FFFFFF;
    margin-bottom: 8px;
    text-align: center;
}

.card-subtitle {
    font-size: 14px;
    color: #888888;
    text-align: center;
    margin-bottom: 28px;
    line-height: 1.5;
}

/* --- Code Display --- */
.code-header {
    text-align: center;
    margin-bottom: 32px;
}

.code-manager {
    font-size: 18px;
    font-weight: 600;
    color: #FFFFFF;
    margin-bottom: 4px;
}

.code-company {
    font-size: 14px;
    color: #188796;
}

.code-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin-bottom: 24px;
}

.code-digits {
    display: flex;
    gap: 8px;
}

.code-digits span {
    width: 46px;
    height: 58px;
    background: #222222;
    border: 1px solid #444444;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    color: #FFFFFF;
    font-variant-numeric: tabular-nums;
    transition: color 0.3s, transform 0.2s;
}

.code-digits.changing span {
    animation: digitPop 0.3s ease-out;
}

.code-countdown {
    position: relative;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
}

.countdown-ring {
    width: 48px;
    height: 48px;
    transform: rotate(-90deg);
}

.countdown-bg {
    fill: none;
    stroke: #333333;
    stroke-width: 3;
}

.countdown-fg {
    fill: none;
    stroke: #188796;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 113.1;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1s linear, stroke 0.3s;
}

.countdown-fg.warning {
    stroke: #E8C846;
}

.countdown-fg.critical {
    stroke: #B52B2B;
}

.countdown-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    color: #AAAAAA;
    font-variant-numeric: tabular-nums;
}

.code-hint {
    font-size: 13px;
    color: #666666;
    text-align: center;
}

/* --- Forms --- */
.field {
    margin-bottom: 20px;
}

.field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #AAAAAA;
    margin-bottom: 6px;
}

.field input {
    width: 100%;
    background: #222222;
    color: #FFFFFF;
    border: 1px solid #444444;
    border-radius: 8px;
    padding: 14px 16px;
    font-size: 16px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.15s;
}

.field input:focus {
    border-color: #188796;
}

.field input::placeholder {
    color: #666666;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    background: #171717;
    color: #FFFFFF;
    border: 1px solid #444444;
    border-radius: 10px;
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, transform 0.1s;
}

.btn:hover {
    background: #2a2a2a;
    border-color: #666666;
}

.btn:active {
    transform: scale(0.98);
}

.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

.btn-primary {
    background: #188796;
    border-color: #188796;
}

.btn-primary:hover {
    background: #1a9dae;
    border-color: #1a9dae;
}

.btn-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 24px;
}

/* --- Error --- */
.error-card {
    text-align: center;
}

.error-icon {
    width: 64px;
    height: 64px;
    background: rgba(181, 43, 43, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 32px;
}

/* --- Loading --- */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
    color: #555555;
    font-size: 14px;
}

/* --- Footer --- */
.auth-footer {
    text-align: center;
    padding: 16px;
    font-size: 12px;
    color: #555555;
}

/* --- Animations --- */
@keyframes pageIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes digitPop {
    0%   { transform: scale(0.85); opacity: 0.5; }
    50%  { transform: scale(1.05); }
    100% { transform: scale(1); opacity: 1; }
}

/* --- Responsive --- */
/* --- Loading Dots Spinner --- */
.orvo-dots { display:inline-flex; align-items:center; gap:var(--dot-gap,5px); }
.orvo-dots .dot { width:var(--dot-size,7px); height:var(--dot-size,7px); border-radius:50%; background:currentColor; animation:orvoBounce 1s ease-in-out infinite; }
.orvo-dots .dot:nth-child(2) { animation-delay:0.15s; }
.orvo-dots .dot:nth-child(3) { animation-delay:0.3s; }
@keyframes orvoBounce { 0%,60%,100%{transform:translateY(0);opacity:0.3;} 30%{transform:translateY(calc(var(--dot-size,7px)*-1.5));opacity:1;} }
.orvo-dots--xs{--dot-size:3px;--dot-gap:3px;} .orvo-dots--sm{--dot-size:5px;--dot-gap:4px;} .orvo-dots--md{--dot-size:7px;--dot-gap:5px;}

@media (min-width: 600px) {
    .auth-container {
        padding: 40px 24px;
    }
    .card {
        padding: 40px 36px;
    }
}

/* Store buttons — iOS live (Apple black pill), Android pending. */
.auth-store-btn {
    display: flex !important;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    text-decoration: none;
    font-weight: 600;
    border-radius: 10px;
}
a.auth-store-btn.btn-accent {
    background: #000000 !important;
    border: 1px solid #333333 !important;
    color: #FFFFFF !important;
    letter-spacing: 0.01em;
}
a.auth-store-btn.btn-accent:hover {
    background: #1a1a1a !important;
    border-color: #555555 !important;
    color: #FFFFFF !important;
}
.auth-store-btn--soon {
    opacity: 0.5;
    cursor: not-allowed;
    flex-direction: column;
    gap: 2px;
    min-height: 58px;
}
.auth-store-btn--soon .auth-store-btn-soon {
    font-size: 11px;
    font-weight: 500;
    color: #9aa3a5;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
