/* ═══════════════════════════════════════════════════════════
   RESTAUNET — Auth Pages (Register / Create Restaurant)
   ═══════════════════════════════════════════════════════════ */

:root {
    --primary: #FF6B35;
    --primary-dark: #E85A22;
    --primary-light: #FF8C5A;
    --secondary: #1A1D2E;
    --accent: #FFB347;
    --blue: #3B82F6;
    --green: #10B981;
    --purple: #8B5CF6;

    --text-primary: #0F172A;
    --text-secondary: #475569;
    --text-muted: #94A3B8;
    --border: #E2E8F0;
    --border-focus: #FF6B35;
    --bg: #FFFFFF;
    --bg-soft: #F8FAFC;
    --bg-input: #FAFBFC;

    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.10);
    --shadow-orange: 0 8px 32px rgba(255,107,53,0.30);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --transition: 0.2s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body {
    font-family: var(--font);
    color: var(--text-primary);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
img { max-width: 100%; display: block; }

/* ═══════════════════════════════════════════════════════════
   LAYOUT
   ═══════════════════════════════════════════════════════════ */
.auth-layout {
    display: grid;
    grid-template-columns: 420px 1fr;
    min-height: 100vh;
}

/* ═══════════════════════════════════════════════════════════
   LEFT PANEL
   ═══════════════════════════════════════════════════════════ */
.auth-panel {
    background: linear-gradient(160deg, var(--secondary) 0%, #242741 60%, #1e2235 100%);
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    scrollbar-width: none;
}
.auth-panel::-webkit-scrollbar { display: none; }

.panel-inner {
    display: flex;
    flex-direction: column;
    padding: 40px 36px;
    min-height: 100%;
    gap: 0;
}

.panel-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 48px;
    flex-shrink: 0;
}
.panel-logo .logo-icon { width: 36px; height: 36px; flex-shrink: 0; }
.panel-logo .logo-icon svg { width: 100%; height: 100%; }
.panel-logo span {
    font-size: 1.2rem;
    font-weight: 800;
    color: white;
    letter-spacing: -0.5px;
}

/* Steps */
.panel-steps {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 40px;
}
.step-indicator {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 4px 0;
}
.step-indicator .step-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: rgba(255,255,255,0.4);
    flex-shrink: 0;
    transition: all var(--transition);
}
.step-indicator.active .step-dot {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 0 0 4px rgba(255,107,53,0.2);
}
.step-indicator.done .step-dot {
    background: var(--green);
    border-color: var(--green);
    color: white;
}
.step-info { padding-top: 4px; }
.step-title {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    color: rgba(255,255,255,0.9);
    transition: color var(--transition);
}
.step-indicator:not(.active):not(.done) .step-title { color: rgba(255,255,255,0.4); }
.step-sub {
    display: block;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.35);
    margin-top: 2px;
}
.step-indicator.active .step-sub { color: rgba(255,255,255,0.55); }
.step-indicator.done .step-sub { color: var(--green); }

.step-connector {
    width: 2px;
    height: 24px;
    background: rgba(255,255,255,0.1);
    margin-left: 15px;
    border-radius: 2px;
}
.step-connector.filled { background: var(--green); }

/* Panel welcome */
.panel-welcome {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: rgba(255,255,255,0.06);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255,255,255,0.08);
    margin-bottom: 24px;
}
.welcome-avatar {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: white;
}
.panel-welcome strong { display: block; font-size: 0.88rem; color: white; font-weight: 700; }
.panel-welcome p { font-size: 0.75rem; color: rgba(255,255,255,0.5); margin-top: 2px; }

/* Panel content wrapper */
.panel-content { flex: 1; }

/* Features */
.panel-features {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 8px;
}
.panel-feature {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.pf-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.06);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.panel-feature strong { display: block; font-size: 0.85rem; color: white; font-weight: 600; }
.panel-feature p { font-size: 0.75rem; color: rgba(255,255,255,0.45); margin-top: 2px; line-height: 1.5; }

/* Quote */
.panel-quote {
    margin-top: auto;
    padding-top: 32px;
    border-top: 1px solid rgba(255,255,255,0.08);
}
.panel-quote p {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.65);
    line-height: 1.65;
    font-style: italic;
    margin-bottom: 14px;
}
.quote-author { display: flex; align-items: center; gap: 10px; }
.quote-author img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255,255,255,0.15); }
.quote-author strong { display: block; font-size: 0.8rem; color: white; font-weight: 600; }
.quote-author span { font-size: 0.7rem; color: rgba(255,255,255,0.4); }

/* ═══════════════════════════════════════════════════════════
   RIGHT: FORM AREA
   ═══════════════════════════════════════════════════════════ */
.auth-main {
    background: var(--bg-soft);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 48px 24px;
    overflow-y: auto;
    min-height: 100vh;
}

.auth-form-wrap {
    width: 100%;
    max-width: 520px;
    background: white;
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
}
.auth-form-wrap--wide { max-width: 700px; }

/* Progress indicator (top of form) */
.auth-progress {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 28px;
    justify-content: center;
}
.progress-step {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    background: white;
    transition: all var(--transition);
    flex-shrink: 0;
}
.progress-step.done { background: var(--primary); border-color: var(--primary); color: white; }
.progress-step.completed { background: var(--green); border-color: var(--green); color: white; }
.progress-line {
    flex: 1;
    height: 2px;
    background: var(--border);
    max-width: 60px;
    transition: background var(--transition);
}
.progress-line.filled { background: var(--green); }

/* Auth Header */
.auth-header { margin-bottom: 32px; }
.auth-header h1 {
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    margin-bottom: 8px;
    line-height: 1.2;
}
.auth-header p { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.6; }

/* Messages */
.messages { margin-bottom: 20px; display: flex; flex-direction: column; gap: 8px; }
.message {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.5;
}
.message-success { background: #DCFCE7; color: #16A34A; border: 1px solid #BBF7D0; }
.message-error   { background: #FEE2E2; color: #DC2626; border: 1px solid #FECACA; }
.message-warning { background: #FEF3C7; color: #D97706; border: 1px solid #FDE68A; }
.message-info    { background: #EFF6FF; color: #2563EB; border: 1px solid #BFDBFE; }

/* ═══════════════════════════════════════════════════════════
   FORM STYLES
   ═══════════════════════════════════════════════════════════ */
.auth-form { display: flex; flex-direction: column; gap: 20px; }

.form-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-soft);
}
.form-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}
.form-section-header h2 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    flex: 1;
}
.section-icon {
    width: 30px;
    height: 30px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.section-icon.orange { background: #FFF0E8; color: var(--primary); }
.section-icon.blue   { background: #EFF6FF; color: var(--blue); }
.section-icon.green  { background: #ECFDF5; color: var(--green); }

.optional-tag {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--border);
    padding: 2px 8px;
    border-radius: var(--radius-full);
    margin-left: 4px;
}
.section-desc { font-size: 0.82rem; color: var(--text-secondary); margin-top: -8px; }

/* Collapsible */
.collapsible-toggle { cursor: pointer; user-select: none; }
.collapsible-toggle:hover h2 { color: var(--primary); }
.collapse-arrow { transition: transform var(--transition); color: var(--text-muted); margin-left: auto; }
.collapsible.open .collapse-arrow { transform: rotate(180deg); }
.collapsible-content {
    display: none;
    flex-direction: column;
    gap: 16px;
    padding-top: 4px;
}
.collapsible.open .collapsible-content { display: flex; }

.form-row { display: flex; gap: 16px; }
.form-row.two-col > .form-group { flex: 1; min-width: 0; }

.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label {
    font-size: 0.83rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 4px;
}
.required { color: var(--primary); font-size: 0.75rem; }
.optional { color: var(--text-muted); font-size: 0.75rem; font-weight: 400; }

/* Input */
.input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.input-icon {
    position: absolute;
    left: 14px;
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    pointer-events: none;
    flex-shrink: 0;
    transition: color var(--transition);
}
.textarea-icon { top: 14px; align-self: flex-start; }

.form-input {
    width: 100%;
    padding: 11px 14px 11px 42px;
    background: var(--bg-input);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 0.9rem;
    color: var(--text-primary);
    transition: all var(--transition);
    outline: none;
    appearance: none;
}
.form-input::placeholder { color: var(--text-muted); }
.form-input:focus {
    background: white;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255,107,53,0.12);
}
.form-input:focus + .input-icon,
.input-wrap:focus-within .input-icon { color: var(--primary); }
.form-input.input-error {
    border-color: #EF4444;
    background: #FFF8F8;
}
.form-input.input-error:focus { box-shadow: 0 0 0 3px rgba(239,68,68,0.12); border-color: #EF4444; }
.form-input.input-success { border-color: var(--green); }

.form-textarea {
    resize: vertical;
    min-height: 80px;
    padding-top: 12px;
    padding-bottom: 12px;
    line-height: 1.6;
    align-items: flex-start;
}
.textarea-wrap { align-items: flex-start; }

/* Toggle password button */
.toggle-password {
    position: absolute;
    right: 12px;
    color: var(--text-muted);
    padding: 4px;
    border-radius: 4px;
    transition: color var(--transition);
    line-height: 0;
}
.toggle-password:hover { color: var(--primary); }
.toggle-password .eye-icon { width: 16px; height: 16px; }

/* Field error */
.field-error {
    font-size: 0.78rem;
    color: #EF4444;
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
}
.field-error::before { content: '⚠'; font-size: 0.7rem; }

/* Password strength */
.password-strength {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: -8px;
}
.strength-bar {
    flex: 1;
    height: 4px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
}
.strength-fill {
    height: 100%;
    width: 0%;
    border-radius: 4px;
    transition: all 0.4s ease;
}
.strength-fill.weak   { width: 25%; background: #EF4444; }
.strength-fill.fair   { width: 50%; background: #F59E0B; }
.strength-fill.good   { width: 75%; background: #3B82F6; }
.strength-fill.strong { width: 100%; background: var(--green); }
.strength-label { font-size: 0.72rem; color: var(--text-muted); white-space: nowrap; font-weight: 500; }

/* Checkbox */
.form-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: -4px;
}
.form-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin-top: 2px;
    accent-color: var(--primary);
    cursor: pointer;
}
.form-check label {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.5;
    cursor: pointer;
}
.form-link { color: var(--primary); font-weight: 600; }
.form-link:hover { text-decoration: underline; }

/* Submit button */
.btn-submit {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    font-size: 1rem;
    font-weight: 700;
    border-radius: var(--radius-md);
    transition: all var(--transition);
    box-shadow: var(--shadow-orange);
    margin-top: 4px;
    position: relative;
    overflow: hidden;
}
.btn-submit::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--primary-dark), #c94d1c);
    opacity: 0;
    transition: opacity var(--transition);
}
.btn-submit:hover::before { opacity: 1; }
.btn-submit:hover { transform: translateY(-1px); box-shadow: 0 12px 40px rgba(255,107,53,0.40); }
.btn-submit:active { transform: translateY(0); }
.btn-submit:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }
.btn-text, .btn-loader {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Spinner */
@keyframes spin { to { transform: rotate(360deg); } }
.spin { animation: spin 0.8s linear infinite; }

/* Auth redirect */
.auth-redirect { text-align: center; font-size: 0.85rem; color: var(--text-secondary); margin-top: 4px; }

/* Form actions (restaurant form) */
.form-actions { display: flex; flex-direction: column; gap: 12px; margin-top: 4px; }

/* ── Login page: welcome back panel ── */
.panel-welcome-back {
    text-align: center;
    padding: 24px 0 28px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    margin-bottom: 28px;
}
.wb-icon { font-size: 2.5rem; margin-bottom: 12px; }
.panel-welcome-back h2 {
    font-size: 1.3rem;
    font-weight: 800;
    color: white;
    margin-bottom: 8px;
    letter-spacing: -0.3px;
}
.panel-welcome-back p { font-size: 0.85rem; color: rgba(255,255,255,0.5); line-height: 1.6; }

/* Stats preview */
.panel-stats-preview {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
}
.stat-preview-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: rgba(255,255,255,0.04);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255,255,255,0.06);
}
.sp-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}
.sp-value { display: block; font-size: 0.9rem; font-weight: 800; color: white; }
.sp-label { font-size: 0.72rem; color: rgba(255,255,255,0.4); }

/* Label row with inline link */
.label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.label-row label { margin: 0; }
.forgot-link {
    font-size: 0.78rem;
    color: var(--primary);
    font-weight: 600;
    transition: color var(--transition);
    white-space: nowrap;
}
.forgot-link:hover { color: var(--primary-dark); text-decoration: underline; }

/* Auth divider */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 4px 0;
    color: var(--text-muted);
    font-size: 0.8rem;
}
.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
    .auth-layout { grid-template-columns: 1fr; }
    .auth-panel {
        position: static;
        height: auto;
        min-height: unset;
    }
    .panel-inner { padding: 28px 24px; }
    .panel-steps { flex-direction: row; align-items: flex-start; gap: 0; flex-wrap: nowrap; overflow-x: auto; }
    .step-connector {
        width: 40px;
        height: 2px;
        margin-left: 0;
        margin-top: 15px;
        flex-shrink: 0;
    }
    .step-indicator { flex-direction: column; align-items: center; text-align: center; min-width: 80px; }
    .step-info { padding-top: 6px; }
    .panel-features { flex-direction: row; flex-wrap: wrap; }
    .panel-feature { flex: 1; min-width: 200px; }
    .panel-quote { display: none; }
    .panel-welcome { display: none; }
    .auth-main { min-height: unset; padding: 32px 16px; }
    .auth-form-wrap { padding: 28px 20px; }
    .auth-form-wrap--wide { max-width: 100%; }
}

@media (max-width: 600px) {
    .form-row.two-col { flex-direction: column; }
    .auth-form-wrap { border-radius: var(--radius-md); }
    .auth-header h1 { font-size: 1.4rem; }
    .panel-features { flex-direction: column; }
}
