/* ============================================================
   Offlikart — Auth Pages Design System
   Covers: pages/login.php  &  pages/register.php
   Theme:  Inherits --primary, --accent, --card-bg, --border,
           --text, --text-light, --input-bg from style.css
   ============================================================ */

/* ── Page shell ─────────────────────────────────────────────── */
.ok-auth-page {
    min-height: calc(100vh - 64px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 16px 60px;
    background: var(--primary);          /* white (light) | #121212 (dark) */
}

/* ── Card ─────────────────────────────────────────────────────── */
.ok-auth-card {
    width: 100%;
    max-width: 460px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 36px 40px 40px;
    box-shadow: var(--shadow);
    animation: okAuthFadeUp 0.35s ease both;
}

@keyframes okAuthFadeUp {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0);    }
}

/* ── Brand row (logo + tabs) ─────────────────────────────────── */
.ok-auth-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
}

.ok-brand-link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    flex-shrink: 0;
}

.ok-brand-logo {
    height: 38px;
    width: 38px;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.ok-brand-text {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.2px;
}

/* Login / Register tabs */
.ok-auth-tabs {
    display: flex;
    gap: 4px;
    background: var(--secondary, var(--primary));
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 4px;
}

.ok-tab {
    padding: 6px 18px;
    font-size: 0.82rem;
    font-weight: 600;
    border-radius: 7px;
    text-decoration: none;
    color: var(--text-light);
    transition: all 0.2s ease;
    white-space: nowrap;
}

.ok-tab:hover {
    color: var(--text);
    background: var(--card-hover);
}

.ok-tab-active {
    background: var(--accent) !important;
    color: #fff !important;
}

/* ── Heading block ─────────────────────────────────────────────── */
.ok-auth-heading {
    text-align: center;
    margin-bottom: 28px;
}

.ok-auth-heading h1 {
    font-size: 1.65rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 6px;
    letter-spacing: -0.3px;
}

.ok-auth-heading p {
    font-size: 0.875rem;
    color: var(--text-light);
    line-height: 1.5;
}

/* ── Alert ─────────────────────────────────────────────────────── */
.ok-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 0.875rem;
    margin-bottom: 20px;
    line-height: 1.5;
}

.ok-alert-error   { background: rgba(239,68,68,.08);  color: var(--danger);  border: 1px solid rgba(239,68,68,.2);  }
.ok-alert-success { background: rgba(34,197,94,.08);  color: var(--success); border: 1px solid rgba(34,197,94,.2);  }

/* ── Form Fields ───────────────────────────────────────────────── */
.ok-field {
    margin-bottom: 18px;
}

.ok-field label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

.ok-field label svg,
.ok-field label i {
    color: var(--text-light);
    flex-shrink: 0;
}

/* Input wrapper (positions eye button) */
.ok-input-wrap {
    position: relative;
}

.ok-input {
    width: 100%;
    height: 48px;
    padding: 0 44px 0 14px;
    background: var(--input-bg);
    border: 1.5px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-size: 0.95rem;
    font-family: var(--font-primary);
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    -webkit-appearance: none;
}

/* No padding-right for non-password inputs */
.ok-field input[type="text"].ok-input,
.ok-field input[type="email"].ok-input {
    padding-right: 14px;
}

.ok-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(59,130,246,.12);
}

.ok-input::placeholder { color: var(--text-light); opacity: 1; }
.ok-input.ok-input-error { border-color: var(--danger) !important; }
.ok-input.ok-input-error:focus { box-shadow: 0 0 0 3px rgba(239,68,68,.12); }

/* Eye / show-password button */
.ok-eye-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    transition: color 0.2s;
    line-height: 1;
}

.ok-eye-btn:hover { color: var(--text); }

/* Inline field-level error */
.ok-field-error {
    font-size: 0.78rem;
    color: var(--danger);
    margin-top: 5px;
    display: none;
}

.ok-field-error.ok-error-visible { display: block; }

/* ── Row: remember + forgot ─────────────────────────────────────── */
.ok-form-row-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.ok-check-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-light);
    cursor: pointer;
    user-select: none;
}

.ok-check-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--accent);
    flex-shrink: 0;
    cursor: pointer;
}

.ok-link-muted {
    font-size: 0.85rem;
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.2s;
}

.ok-link-muted:hover { color: var(--accent); }

/* ── Primary CTA button ─────────────────────────────────────────── */
.ok-primary-btn {
    width: 100%;
    height: 48px;
    padding: 0 20px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: var(--font-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: opacity 0.2s, transform 0.15s;
    text-decoration: none;
    letter-spacing: 0.01em;
}

.ok-primary-btn:hover   { opacity: 0.88; transform: translateY(-1px); }
.ok-primary-btn:active  { transform: translateY(0); }
.ok-primary-btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

.ok-btn-text   { display: inline; }
.ok-btn-loader { display: none; align-items: center; gap: 6px; }

/* ── Divider ────────────────────────────────────────────────────── */
.ok-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 22px 0;
    color: var(--text-light);
    font-size: 0.82rem;
}

.ok-divider::before,
.ok-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* ── Google button ──────────────────────────────────────────────── */
.ok-google-btn,
.google-btn {
    width: 100%;
    height: 48px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: #ffffff;
    color: #374151;
    border: 1.5px solid #E5E7EB;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: var(--font-primary);
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
    user-select: none;
    letter-spacing: 0.01em;
}

.ok-google-btn:hover,
.google-btn:hover {
    background: #F9FAFB;
    border-color: #D1D5DB;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transform: translateY(-1px);
    color: #111827;
}

.ok-google-btn:active,
.google-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.ok-google-btn svg,
.google-btn svg,
.ok-google-btn img,
.google-btn img {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    display: block;
}

/* Dark mode override — keep Google button legible */
[data-theme="dark"] .ok-google-btn,
[data-theme="dark"] .google-btn {
    background: #1F2937;
    color: #F3F4F6;
    border-color: #374151;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

[data-theme="dark"] .ok-google-btn:hover,
[data-theme="dark"] .google-btn:hover {
    background: #374151;
    border-color: #4B5563;
    box-shadow: 0 4px 14px rgba(0,0,0,0.3);
    color: #FFFFFF;
}

/* Disabled state */
.ok-google-disabled,
.google-btn-disabled {
    cursor: not-allowed !important;
    opacity: 0.6 !important;
    pointer-events: none !important;
    transform: none !important;
    box-shadow: none !important;
}

/* ── Terms note ─────────────────────────────────────────────────── */
.ok-terms-note {
    font-size: 0.78rem;
    color: var(--text-light);
    text-align: center;
    margin-bottom: 16px;
    line-height: 1.5;
}

/* ── Footer link ────────────────────────────────────────────────── */
.ok-auth-footer-text {
    text-align: center;
    margin-top: 22px;
    font-size: 0.875rem;
    color: var(--text-light);
}

.ok-link {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.2s;
}

.ok-link:hover { opacity: 0.78; text-decoration: underline; }

/* ── Responsive ─────────────────────────────────────────────────── */

/* Tablet */
@media (max-width: 600px) {
    .ok-auth-card {
        padding: 28px 24px 32px;
        border-radius: 16px;
    }

    .ok-auth-heading h1 { font-size: 1.45rem; }
}

/* Mobile */
@media (max-width: 480px) {
    .ok-auth-page {
        padding: 20px 12px 40px;
        align-items: flex-start;
    }

    .ok-auth-card {
        padding: 24px 18px 28px;
        border-radius: 14px;
        max-width: 100%;
    }

    .ok-auth-brand { margin-bottom: 22px; }
    .ok-brand-logo { height: 30px; }

    .ok-tab { padding: 5px 13px; font-size: 0.78rem; }

    .ok-auth-heading { margin-bottom: 20px; }
    .ok-auth-heading h1 { font-size: 1.3rem; }
    .ok-auth-heading p  { font-size: 0.82rem; }

    .ok-input   { height: 46px; font-size: 0.9rem; }
    .ok-primary-btn  { height: 46px; font-size: 0.9rem; }
    .ok-google-btn   { height: 46px; font-size: 0.85rem; }

    .ok-form-row-between { flex-direction: column; align-items: flex-start; gap: 10px; }
}

/* Very small screens */
@media (max-width: 360px) {
    .ok-auth-card   { padding: 20px 14px 24px; }
    .ok-auth-brand  { flex-wrap: wrap; gap: 10px; }
    .ok-auth-tabs   { width: 100%; }
    .ok-tab         { flex: 1; text-align: center; padding: 5px 6px; }
}
