/* ============================================================
   TEAONCALL.CSS - Master Stylesheet
   ============================================================ */

:root {
    --ink: #2A1B12;
    --ink-soft: #5A4638;
    --kaapi: #5C3620;
    --kaapi-deep: #3D2313;
    --turmeric: #D6952B;
    --turmeric-deep: #B77A1B;
    --clay: #B54A2C;
    --clay-soft: #F3DCCF;
    --cardamom: #3F6B4A;
    --cardamom-soft: #DCEADD;
    --cream: #FBF3E4;
    --cream-deep: #F3E6D2;
    --card: #FFFFFF;
    --line: #E9DCC7;
    --font-display: 'Fraunces', serif;
    --font-body: 'Manrope', sans-serif;
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 999px;
    --shadow-sm: 0 1px 2px rgba(42,27,18,0.06);
    --shadow-md: 0 6px 20px rgba(42,27,18,0.10);
    --shadow-lg: 0 16px 40px rgba(42,27,18,0.16);
    --transition: 0.25s cubic-bezier(.4,0,.2,1);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
    font-family: var(--font-body);
    background: var(--cream);
    color: var(--ink);
    overflow-x: hidden;
    padding-bottom: 84px;
    line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--turmeric-deep); outline-offset: 2px; }

/* Auth Pages */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.auth-container {
    background: var(--card);
    padding: 32px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    width: 100%;
    max-width: 420px;
}

.auth-header {
    margin-bottom: 24px;
    text-align: center;
}

.auth-header h1 {
    font-family: var(--font-display);
    font-size: 28px;
    color: var(--kaapi-deep);
}

.auth-header p {
    font-size: 13px;
    color: var(--ink-soft);
    margin-top: 4px;
}

.back-link {
    display: inline-block;
    margin-bottom: 16px;
    font-size: 13px;
    color: var(--kaapi-deep);
    font-weight: 600;
}

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

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--ink-soft);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.form-group input {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--line);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: var(--font-body);
    background: var(--cream);
    transition: var(--transition);
}

.form-group input:focus {
    outline: none;
    border-color: var(--kaapi-deep);
    background: var(--card);
}

.btn-submit {
    width: 100%;
    padding: 13px;
    background: var(--turmeric);
    color: var(--kaapi-deep);
    border: none;
    border-radius: var(--radius-full);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.btn-submit:hover { background: var(--turmeric-deep); }

.alert {
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 13px;
    font-weight: 600;
}

.alert-error { background: #FEE2E2; color: #991B1B; }
.alert-success { background: #DCEADD; color: #166534; }

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

.auth-footer a { color: var(--kaapi-deep); font-weight: 700; }

/* Dashboard */
.dashboard {
    max-width: 900px;
    margin: 0 auto;
    padding: 24px 18px;
}

.dashboard-header {
    margin-bottom: 24px;
}

.dashboard-header h1 {
    font-family: var(--font-display);
    font-size: 28px;
    color: var(--kaapi-deep);
}

.dashboard-header p { color: var(--ink-soft); font-size: 13px; }

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.dash-card {
    background: var(--card);
    border-radius: var(--radius-md);
    padding: 20px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
}

.dash-card.full-width { grid-column: 1 / -1; }

.dash-card h2 {
    font-family: var(--font-display);
    font-size: 18px;
    margin-bottom: 12px;
    color: var(--kaapi-deep);
}

.profile-info .info-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--line);
    font-size: 13px;
}

.info-row .label { color: var(--ink-soft); font-weight: 600; }

.btn-outline {
    display: inline-block;
    margin-top: 12px;
    padding: 8px 16px;
    border: 1.5px solid var(--kaapi-deep);
    border-radius: var(--radius-full);
    color: var(--kaapi-deep);
    font-weight: 700;
    font-size: 12px;
}

.btn-primary {
    display: inline-block;
    margin-top: 12px;
    padding: 10px 20px;
    background: var(--turmeric);
    color: var(--kaapi-deep);
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 13px;
}

.btn-ghost {
    display: inline-block;
    padding: 10px 20px;
    border: 1.5px solid var(--kaapi-deep);
    border-radius: var(--radius-full);
    color: var(--kaapi-deep);
    font-weight: 700;
    font-size: 13px;
}

.empty-state {
    color: var(--ink-soft);
    font-size: 13px;
    margin: 8px 0;
}

.sub-item {
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.sub-info strong { display: block; font-size: 14px; }
.sub-info span { display: block; font-size: 11px; color: var(--ink-soft); }

.orders-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.orders-table th {
    text-align: left;
    padding: 8px 12px;
    background: var(--cream-deep);
    font-weight: 700;
    color: var(--kaapi-deep);
}

.orders-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
}

.status-badge {
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.status-pending { background: #FEF3C7; color: #92400E; }
.status-delivered { background: #DCEADD; color: #166534; }
.status-cancelled { background: #FEE2E2; color: #991B1B; }

.dashboard-actions { margin-top: 24px; text-align: center; }

/* Toast */
.toast {
    position: fixed;
    top: 68px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: var(--kaapi-deep);
    color: var(--cream);
    padding: 9px 18px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
    box-shadow: var(--shadow-lg);
    z-index: 300;
    opacity: 0;
    transition: all 0.3s;
    pointer-events: none;
}

.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Install Banner */
.install-banner {
    position: fixed;
    bottom: 70px;
    left: 0;
    right: 0;
    background: var(--card);
    padding: 16px;
    box-shadow: var(--shadow-lg);
    z-index: 250;
    display: flex;
    justify-content: center;
}

.install-content {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 500px;
    font-size: 13px;
}

.install-content button {
    padding: 6px 14px;
    border-radius: var(--radius-full);
    border: none;
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
    background: var(--kaapi-deep);
    color: var(--cream);
}

@media (max-width: 640px) {
    .dashboard-grid { grid-template-columns: 1fr; }
    .dash-card.full-width { grid-column: auto; }
}
