@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/all.min.css');

/* ============================================================
   ZUZU MARKET - Core Stylesheet
   ============================================================ */

:root {
    --primary: #DC1C23;
    --primary-rgb: 220, 28, 35;
    --primary-dark: #AB191E;
    --primary-light: #FCE9EA;
    --primary-soft: rgba(220, 28, 35, 0.12);
    --secondary: #AB191E;
    --accent: #C91B21;
    --soft-accent: #D87073;
    --success: #2f8f68;
    --danger: #d16067;
    --warning: #d8a03b;
    --text-primary: #19231f;
    --text-secondary: #6f7d76;
    --text-muted: #97a39d;
    --border: rgba(25, 35, 31, 0.08);
    --bg: #eef1ef;
    --bg-strong: #e6ebe8;
    --white: #FEFEFE;
    --sidebar-w: 228px;
    --sidebar-width: 228px;
    --radius-sm: 12px;
    --radius: 16px;
    --radius-lg: 22px;
    --shadow-xs: 0 6px 16px rgba(28, 39, 34, 0.05);
    --shadow: 0 12px 30px rgba(28, 39, 34, 0.08);
    --shadow-md: 0 18px 42px rgba(28, 39, 34, 0.12);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Segoe UI', sans-serif;
    font-size: 14px;
    color: var(--text-primary);
    background: linear-gradient(180deg, #f2f4f3 0%, #ecefee 100%);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
}

img {
    max-width: 100%;
}

.fa-solid,
.fa-regular,
.fa-brands {
    line-height: 1;
}

.empty-icon i,
.sidebar-toggle i,
.filter-tab i,
.section-tab i,
.btn-text i,
.upload-status i,
.kpi-icon i,
.confirm-icon i,
.payment-icon i,
.upload-icon i,
.cat-nav-link i,
.footer-socials a i,
.aa-icon i,
.store-icon i,
.review-store-name i,
.nav-icon i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1em;
}

button,
input,
select,
textarea {
    font: inherit;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 10px 18px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-decoration: none;
    white-space: nowrap;
    transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

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

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 10px 24px rgba(var(--primary-rgb), 0.2);
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-outline {
    background: rgba(255, 255, 255, 0.92);
    color: var(--text-primary);
    border: 1px solid rgba(25, 35, 31, 0.1);
    box-shadow: var(--shadow-xs);
}

.btn-outline:hover {
    background: #fff;
    border-color: rgba(var(--primary-rgb), 0.18);
    color: var(--primary);
}

.btn-danger {
    background: var(--danger);
    color: #fff;
    box-shadow: 0 10px 24px rgba(209, 96, 103, 0.2);
}

.btn-full {
    width: 100%;
}

.btn-google {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(25, 35, 31, 0.08);
    color: var(--text-primary);
    box-shadow: var(--shadow-xs);
}

.btn-google:hover {
    background: #fff;
}

.btn-sm {
    min-height: 36px;
    padding: 8px 14px;
    font-size: 12px;
}

.btn-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.form-group {
    margin-bottom: 22px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

label {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 7px;
}

.label-link {
    color: var(--primary);
    text-decoration: none;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
input[type="url"],
input[type="date"],
input[type="datetime-local"],
select,
textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid transparent;
    border-radius: 14px;
    /* 16px minimum prevents iOS Safari from auto-zooming the page on focus */
    font-size: 16px;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: inset 0 0 0 1px rgba(25, 35, 31, 0.08);
    outline: none;
    transition: box-shadow 0.16s ease, background 0.16s ease;
}

/* Restore compact 14px on screens wide enough that auto-zoom is never triggered */
@media (min-width: 768px) {
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="tel"],
    input[type="number"],
    input[type="url"],
    input[type="date"],
    input[type="datetime-local"],
    select,
    textarea {
        font-size: 14px;
    }
}

textarea {
    resize: vertical;
    min-height: 120px;
}

input:focus,
select:focus,
textarea:focus {
    background: #fff;
    box-shadow: inset 0 0 0 1px rgba(var(--primary-rgb), 0.32), 0 0 0 4px rgba(var(--primary-rgb), 0.1);
}

input[type="date"],
input[type="datetime-local"] {
    min-height: 46px;
    appearance: none;
    -webkit-appearance: none;
}

.input-icon-wrap {
    position: relative;
}

.input-icon-wrap input {
    padding-right: 40px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
}

.field-error {
    display: none;
    font-size: 12px;
    color: var(--danger);
    margin-top: 5px;
}

.field-status {
    display: block;
    font-size: 12px;
    margin-top: 5px;
}

.field-status-checking {
    color: var(--text-secondary);
}

.field-status-available {
    color: var(--success);
}

.field-status-unavailable {
    color: var(--danger);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    cursor: pointer;
    color: var(--text-secondary);
}

.checkbox-label input {
    width: auto;
}

.checkbox-label a {
    color: var(--primary);
}

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 28px;
}

.auth-container {
    width: 100%;
    max-width: 720px;
    padding: 28px;
}

.auth-card {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 24px;
    padding: 44px 46px;
    box-shadow: var(--shadow-md);
}

.auth-logo {
    text-align: center;
    margin-bottom: 22px;
}

.auth-title {
    font-size: 28px;
    line-height: 1.15;
    font-weight: 800;
    text-align: center;
    margin-bottom: 8px;
}

.auth-sub {
    font-size: 14px;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 28px;
}

.auth-link {
    text-align: center;
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 20px;
}

.auth-link a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    color: var(--text-muted);
    font-size: 12px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(25, 35, 31, 0.08);
}

.role-tabs {
    display: flex;
    background: var(--bg);
    border-radius: 16px;
    padding: 5px;
    margin-bottom: 28px;
    gap: 4px;
}

.role-tab {
    flex: 1;
    padding: 10px 8px;
    border: none;
    background: transparent;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    color: var(--text-secondary);
    transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.role-tab.active {
    background: #fff;
    color: var(--primary);
    box-shadow: var(--shadow-xs);
}

.alert {
    padding: 12px 14px;
    border-radius: 14px;
    font-size: 13px;
    margin-bottom: 16px;
}

.alert-error {
    background: rgba(209, 96, 103, 0.1);
    color: #9d454b;
}

.alert-success {
    background: rgba(47, 143, 104, 0.12);
    color: #24694c;
}

.alert-warning {
    background: rgba(216, 160, 59, 0.14);
    color: #8f6b20;
}

.hidden {
    display: none !important;
}

.text-success {
    color: var(--success);
}

.text-warning {
    color: var(--warning);
}

.text-danger {
    color: var(--danger);
}

.text-muted {
    color: var(--text-secondary);
}

.text-mono {
    font-family: 'Courier New', monospace;
}

@media (max-width: 640px) {
    .auth-container {
        max-width: 100%;
        padding: 10px;
    }

    .auth-card {
        padding: 28px 22px;
        border-radius: 20px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .role-tabs {
        flex-direction: column;
    }
}
