/**
 * Wopro Auth - Design System 2026
 * Professional, modern, responsive
 */

/* ========== CSS RESET & VARIABLES ========== */
:root {
    /* Colors */
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: rgba(37, 99, 235, 0.08);
    --primary-border: rgba(37, 99, 235, 0.25);

    --bg: #f8fafc;
    --bg-card: #ffffff;
    --bg-section: #ffffff;
    --bg-input: #ffffff;
    --bg-hover: #f1f5f9;

    --text: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --text-inverse: #ffffff;

    --border: #e2e8f0;
    --border-focus: rgba(37, 99, 235, 0.5);

    --success: #10b981;
    --success-bg: rgba(16, 185, 129, 0.08);
    --success-border: rgba(16, 185, 129, 0.25);

    --error: #ef4444;
    --error-bg: rgba(239, 68, 68, 0.08);
    --error-border: rgba(239, 68, 68, 0.25);

    --warning: #f59e0b;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
    --shadow-card: 0 25px 50px -12px rgba(0, 0, 0, 0.1);

    /* Radii */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 200ms ease;
    --transition-slow: 300ms ease;

    /* Font */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Light mode only - dark mode removed */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

/* ========== LAYOUT ========== */
.auth-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.auth-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 8px 12px 12px;
}

@media (min-width: 769px) {
    .auth-main {
        flex-direction: row;
        align-items: center;
        justify-content: center;
        padding: 20px 16px 100px;
    }
}

.auth-container {
    width: 100%;
    max-width: 480px;
}

.auth-container.wide {
    max-width: 640px;
}

.auth-container.extra-wide {
    max-width: 800px;
}

/* ========== CARD ========== */
.auth-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card);
    padding: 32px;
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), #8b5cf6);
}

@media (max-width: 480px) {
    .auth-card {
        padding: 24px 20px;
        border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    }
    .auth-card::before {
        border-radius: 0;
    }
}

/* ========== BRAND / HEADER ========== */
.auth-brand {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 8px;
}

.auth-logo {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 24px;
    flex-shrink: 0;
    box-shadow: var(--shadow-md);
}
.auth-logo.nafakturu { background: linear-gradient(135deg, #8b5cf6, #c084fc); }
.auth-logo.wopro { background: linear-gradient(135deg, #2563eb, #7c3aed); }

.auth-brand-text h1 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 2px;
}

.auth-brand-text .subtitle {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.auth-description {
    margin: 16px 0 24px;
    padding: 16px;
    background: var(--primary-light);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--primary);
}

.auth-description p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.auth-description strong {
    color: var(--text);
}

/* ========== FORMS ========== */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-label.required::after {
    content: ' *';
    color: var(--error);
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    font-family: inherit;
    color: var(--text);
    background: var(--bg-input);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-input:hover {
    border-color: #cbd5e1;
}

.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-light);
}

.form-input:disabled {
    background: var(--bg-hover);
    color: var(--text-muted);
    cursor: not-allowed;
}

.form-input.error {
    border-color: var(--error);
}

.form-input.error:focus {
    box-shadow: 0 0 0 4px var(--error-bg);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 480px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.form-hint {
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-muted);
}

/* ========== BUTTONS ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #4f46e5);
    color: white;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--bg-section);
    color: var(--text);
    border: 2px solid var(--border);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--bg-hover);
    border-color: #cbd5e1;
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    padding: 10px 16px;
}

.btn-ghost:hover:not(:disabled) {
    background: var(--bg-hover);
    color: var(--text);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.btn-block {
    width: 100%;
}

.btn-lg {
    padding: 16px 28px;
    font-size: 16px;
}

/* Loading spinner in button */
.btn .spinner {
    width: 18px;
    height: 18px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========== ALERTS ========== */
.alert {
    padding: 14px 16px;
    border-radius: var(--radius-md);
    font-size: 14px;
    display: none;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
    animation: alertIn 0.3s ease;
}

.alert.show {
    display: flex;
}

.alert-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

.alert-error {
    background: var(--error-bg);
    border: 1px solid var(--error-border);
    color: #991b1b;
}

.alert-success {
    background: var(--success-bg);
    border: 1px solid var(--success-border);
    color: #065f46;
}

@keyframes alertIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== SERVICES BAR (Bottom on desktop, below card on mobile) ========== */
.services-bar {
    padding: 16px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--border);
    z-index: 100;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
}

/* Mobile: hide services bar completely */
@media (max-width: 768px) {
    .services-bar {
        display: none !important;
    }

    .auth-page {
        min-height: auto;
    }

    .auth-container {
        width: 100%;
        padding: 0;
    }
}


.services-bar-inner {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Services bar title removed - no longer used */

/* ========== SERVICE CARDS ========== */
.service-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: var(--bg-section);
    border: 2px solid var(--border);
    border-radius: var(--radius-full);
    text-decoration: none;
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
    transition: all var(--transition-fast);
    cursor: pointer;
}

.service-chip:hover {
    border-color: var(--primary-border);
    background: var(--primary-light);
}

.service-chip.active {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary);
}

.service-chip-icon {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 11px;
    color: white;
}

/* Service colors */
.service-chip-icon.nafakturu { background: linear-gradient(135deg, #8b5cf6, #c084fc); }
.service-chip-icon.dopravce { background: linear-gradient(135deg, #f59e0b, #d97706); }
.service-chip-icon.wopro { background: linear-gradient(135deg, #2563eb, #7c3aed); }
.service-chip-icon.default { background: linear-gradient(135deg, #64748b, #475569); }

/* Service grid (for selection) */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 20px;
}

.service-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: var(--bg-section);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: var(--text);
    transition: all var(--transition-fast);
    cursor: pointer;
}

.service-card:hover {
    border-color: var(--primary-border);
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.service-card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 18px;
    color: white;
    flex-shrink: 0;
}

.service-card-icon.nafakturu { background: linear-gradient(135deg, #8b5cf6, #c084fc); }
.service-card-icon.dopravce { background: linear-gradient(135deg, #f59e0b, #d97706); }
.service-card-icon.wopro { background: linear-gradient(135deg, #2563eb, #7c3aed); }
.service-card-icon.default { background: linear-gradient(135deg, #64748b, #475569); }

.service-card-content {
    flex: 1;
    min-width: 0;
}

.service-card-name {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 2px;
}

.service-card-desc {
    font-size: 12px;
    color: var(--text-muted);
}

.service-card-arrow {
    color: var(--text-muted);
    transition: transform var(--transition-fast);
}

.service-card:hover .service-card-arrow {
    transform: translateX(4px);
    color: var(--primary);
}

/* ========== STEPS / PROGRESS ========== */
.steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 32px;
}

.step {
    display: flex;
    align-items: center;
    gap: 8px;
}

.step-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    transition: all var(--transition-base);
}

.step-dot.pending {
    background: var(--bg-hover);
    color: var(--text-muted);
    border: 2px solid var(--border);
}

.step-dot.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.step-dot.completed {
    background: var(--success);
    color: white;
}

.step-line {
    width: 40px;
    height: 3px;
    background: var(--border);
    border-radius: 2px;
    transition: background var(--transition-base);
}

.step-line.active {
    background: var(--primary);
}

.step-line.completed {
    background: var(--success);
}

.step-label {
    display: none;
}

@media (min-width: 640px) {
    .step-label {
        display: block;
        font-size: 12px;
        font-weight: 600;
        color: var(--text-muted);
    }

    .step.active .step-label {
        color: var(--primary);
    }

    .step.completed .step-label {
        color: var(--success);
    }
}

/* ========== CHECKBOX ========== */
.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: var(--bg-hover);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.checkbox-group:hover {
    background: #e2e8f0;
}

.checkbox-input {
    width: 22px;
    height: 22px;
    border: 2px solid var(--border);
    border-radius: 6px;
    appearance: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    flex-shrink: 0;
    margin-top: 2px;
    position: relative;
}

.checkbox-input:checked {
    background: var(--primary);
    border-color: var(--primary);
}

.checkbox-input:checked::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 12px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-label {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.checkbox-label a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.checkbox-label a:hover {
    text-decoration: underline;
}

/* ========== LINKS ========== */
.auth-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.auth-link {
    font-size: 14px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: color var(--transition-fast);
}

.auth-link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* ========== SECTION (in forms) ========== */
.form-section {
    background: var(--bg-section);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 16px;
}

.form-section-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-section-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ========== DIVIDER ========== */
.divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.divider span {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ========== LOADING STATES ========== */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    color: var(--text-muted);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 16px;
}

/* ========== ANIMATIONS ========== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.4s ease;
}

.animate-slide-up {
    animation: slideUp 0.5s ease;
}

.animate-slide-in {
    animation: slideIn 0.4s ease;
}

/* Step content transitions */
.step-content {
    animation: slideUp 0.4s ease;
}

/* ========== UTILITIES ========== */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-small { font-size: 13px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.hidden { display: none !important; }

/* ========== RESPONSIVE ========== */
@media (max-width: 640px) {
    .auth-main {
        padding: 8px 12px 12px;
    }

    .auth-card {
        padding: 20px 16px;
    }

    .auth-brand {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }

    .auth-logo {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }

    .auth-brand-text h1 {
        font-size: 20px;
    }

    .auth-description {
        margin: 12px 0 20px;
        padding: 12px;
    }

    .form-section {
        padding: 16px;
    }

    .form-group {
        margin-bottom: 16px;
    }

    .form-input {
        padding: 12px 14px;
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .btn {
        padding: 12px 20px;
    }

    .btn-lg {
        padding: 14px 24px;
    }

    .steps {
        gap: 4px;
        margin-bottom: 24px;
    }

    .step-line {
        width: 20px;
    }

    .step-dot {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
}

/* ========== LOGIN PAGE SPECIFIC ========== */
/* Login page: center on desktop, top on mobile */
.login-page .auth-main {
    justify-content: center;
    align-items: center;
}

@media (max-width: 768px) {
    .login-page .auth-main {
        justify-content: flex-start;
        align-items: center;
    }
}

/* ========== CHOOSE PAGE SPECIFIC ========== */
.org-list { display: flex; flex-direction: column; gap: 12px; margin-top: 20px; }
.org-card {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 16px 20px; background: var(--bg-section); border: 2px solid var(--border);
    border-radius: var(--radius-lg); transition: all var(--transition-fast); cursor: pointer;
}
.org-card:hover { border-color: var(--primary-border); background: var(--primary-light); transform: translateX(4px); }
.org-info { flex: 1; min-width: 0; }
.org-name { font-weight: 700; font-size: 15px; margin-bottom: 2px; }
.org-meta { font-size: 13px; color: var(--text-muted); }
.org-badge { font-size: 11px; padding: 4px 8px; background: var(--success-bg); color: var(--success); border-radius: var(--radius-sm); font-weight: 600; margin-left: 8px; }
.org-action { color: var(--text-muted); transition: all var(--transition-fast); }
.org-card:hover .org-action { color: var(--primary); transform: translateX(4px); }
.search-box { position: relative; margin-bottom: 16px; }
.search-box input { padding-left: 44px; }
.search-icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--text-muted); }
.choose-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.choose-header .auth-brand { margin-bottom: 0; }
.header-actions { display: flex; gap: 10px; align-items: stretch; }
.header-actions .btn { font-size: 13px; padding: 10px 16px; }
.empty-state { text-align: center; padding: 40px 20px; color: var(--text-muted); }
.empty-state svg { width: 48px; height: 48px; margin-bottom: 16px; opacity: 0.5; }

/* Service switcher */
.service-switcher { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border); }
.service-toggle-btn {
    display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
    padding: 12px 16px; background: var(--bg-section); border: 2px solid var(--border);
    border-radius: var(--radius-md); cursor: pointer; font-size: 14px; font-weight: 600;
    color: var(--text-secondary); transition: all var(--transition-fast);
}
.service-toggle-btn:hover { border-color: var(--primary-border); background: var(--primary-light); color: var(--primary); }
.service-toggle-btn.active { border-color: var(--primary); background: var(--primary-light); color: var(--primary); }
.service-toggle-btn svg { transition: transform var(--transition-fast); }
.service-toggle-btn.active svg { transform: rotate(180deg); }
.services-dropdown {
    display: none; flex-direction: column; gap: 8px; margin-top: 12px;
    padding: 12px; background: var(--bg-hover); border-radius: var(--radius-md);
    animation: slideUp 0.2s ease;
}
.services-dropdown.show { display: flex; }
.service-link {
    display: flex; align-items: center; gap: 10px; padding: 12px 14px;
    background: var(--bg-card); border: 2px solid var(--border); border-radius: var(--radius-md);
    text-decoration: none; color: var(--text); font-size: 14px; font-weight: 600;
    transition: all var(--transition-fast);
}
.service-link:hover { border-color: var(--primary-border); background: var(--primary-light); }
.service-link.active { border-color: var(--primary); background: var(--primary-light); color: var(--primary); pointer-events: none; }

/* Choose page mobile */
@media (max-width: 768px) {
    .choose-header { flex-direction: column !important; align-items: center !important; justify-content: center !important; text-align: center; gap: 16px; }
    .choose-header .auth-brand { flex-direction: column !important; text-align: center !important; align-items: center !important; justify-content: center !important; width: 100%; }
    .choose-header .auth-logo { margin: 0 auto !important; }
    .choose-header .auth-brand-text { text-align: center !important; width: 100%; }
    .choose-header .auth-brand-text h1 { text-align: center !important; width: 100%; }
    .choose-header .auth-brand-text .subtitle { text-align: center !important; width: 100%; }
    .header-actions { flex-direction: column; width: 100%; gap: 8px; }
    .header-actions .btn { width: 100%; justify-content: center; height: 44px; }
    .user-email { text-align: center; width: 100%; }
    .org-action { display: none; }
}

/* ========== REGISTER PAGE SPECIFIC ========== */
.password-wrapper { position: relative; }
.password-toggle {
    position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
    background: none; border: none; padding: 4px; cursor: pointer;
    color: var(--text-muted); transition: color var(--transition-fast);
}
.password-toggle:hover { color: var(--text); }
.password-wrapper input { padding-right: 44px; }

.validation-badges {
    display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px;
    font-size: 12px;
}
.validation-badge {
    display: flex; align-items: center; gap: 4px;
    padding: 4px 10px; border-radius: var(--radius-sm);
    background: var(--error-bg); color: var(--error);
    transition: all var(--transition-fast);
    font-weight: 500;
}
.validation-badge.valid {
    background: var(--success-bg); color: var(--success);
}
.validation-badge svg { width: 12px; height: 12px; }

.input-group {
    display: flex; gap: 8px;
}
.input-group .form-input { flex: 1; }
.input-group .form-input.prefix-select {
    width: 120px; flex: none;
}

.collapsible-section {
    overflow: hidden;
    transition: all 0.3s ease;
}
.collapsible-section.collapsed {
    max-height: 0;
    opacity: 0;
    margin: 0;
    padding: 0;
}

.step-clickable {
    cursor: pointer;
    transition: transform var(--transition-fast);
}
.step-clickable:hover { transform: scale(1.05); }
.step-clickable.disabled { cursor: not-allowed; opacity: 0.5; }

.alert-info {
    background: var(--primary-light);
    color: var(--primary);
    border: 1px solid var(--primary-border);
    display: flex;
    align-items: center;
    gap: 10px;
}

.ares-confirm-box {
    background: linear-gradient(135deg, var(--primary-light), rgba(99, 102, 241, 0.08));
    border: 2px solid var(--primary-border);
    border-radius: var(--radius-lg);
    padding: 16px;
    margin-bottom: 16px;
}
.ares-confirm-content {
    display: flex;
    gap: 14px;
    margin-bottom: 14px;
}
.ares-confirm-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    background: var(--primary);
    color: white;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}
.ares-confirm-text {
    flex: 1;
}
.ares-confirm-question {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}
.ares-confirm-address {
    font-size: 13px;
    color: var(--text-muted);
}
.ares-confirm-actions {
    display: flex;
    gap: 10px;
}
.ares-confirm-actions .btn {
    flex: 1;
}
.btn-sm {
    padding: 8px 14px;
    font-size: 13px;
}
.ares-loading {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: var(--bg-section);
    border-radius: var(--radius-md);
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 16px;
}
.ares-loading .spinner {
    width: 18px;
    height: 18px;
}

.country-field {
    max-width: 200px;
}

@media (max-width: 768px) {
    .country-field {
        max-width: none;
        width: 100%;
    }
}

/* ========== SETTINGS PAGE SPECIFIC ========== */
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 24px; }
@media (max-width: 768px) { .settings-grid { grid-template-columns: 1fr; } }
.settings-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.user-info { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--bg-hover); border-radius: var(--radius-md); font-size: 13px; }
.user-avatar { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), #8b5cf6); color: white; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; }
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    background: var(--bg-section);
    color: var(--text);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    transition: all 0.15s;
}
.back-link:hover {
    background: var(--bg-hover);
    border-color: #cbd5e1;
}
.settings-actions { display: flex; flex-direction: column; gap: 12px; margin-top: 24px; }
@media (min-width: 480px) { .settings-actions { flex-direction: row; justify-content: flex-end; } }
.settings-actions .btn { width: 100%; }
@media (min-width: 480px) { .settings-actions .btn { width: auto; } }

.phone-group { display: flex; gap: 8px; }
.phone-group .phone-prefix { width: 110px; flex-shrink: 0; }
.phone-group .phone-number { flex: 1; }

#successBox, #errorBox { margin-top: 16px; margin-bottom: 0; }
#successBox.show, #errorBox.show { margin-bottom: 8px; }

/* Settings page mobile: center everything */
@media (max-width: 768px) {
    .settings-header { flex-direction: column; align-items: center; text-align: center; }
    .settings-page .auth-brand { flex-direction: column; text-align: center; }
    .user-info { width: 100%; justify-content: center; }
    .back-link { justify-content: center; width: 100%; }
    .settings-page .form-section { width: 100%; }
    .settings-actions { align-items: center; }
    .settings-actions .btn { width: 100%; }
}

/* ========== FORGOT PAGE SPECIFIC ========== */
.dev-link-box {
    margin-top: 20px;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary-light), rgba(99, 102, 241, 0.1));
    border: 2px solid var(--primary-border);
    border-radius: var(--radius-lg);
}
.dev-link-box-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 12px;
}
.dev-link-box-title svg {
    width: 16px;
    height: 16px;
}
.dev-link-btn {
    display: block;
    width: 100%;
    padding: 12px 16px;
    background: var(--primary);
    color: white;
    text-align: center;
    text-decoration: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 14px;
    transition: all var(--transition-fast);
}
.dev-link-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}
.dev-link-url {
    margin-top: 10px;
    padding: 10px 12px;
    background: var(--bg-section);
    border-radius: var(--radius-sm);
    font-size: 11px;
    color: var(--text-muted);
    word-break: break-all;
    font-family: monospace;
}

/* ========== RESET PAGE SPECIFIC ========== */
.password-requirements {
    display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px;
    font-size: 12px;
}
.password-req {
    display: flex; align-items: center; gap: 4px;
    padding: 4px 8px; border-radius: var(--radius-sm);
    background: var(--error-bg); color: var(--error);
    transition: all var(--transition-fast);
}
.password-req.valid {
    background: var(--success-bg); color: var(--success);
}
.password-req svg { width: 12px; height: 12px; }
