/* =============================================================================
   PIZZA SAAS — Stylesheet
   Clean modern design, no external dependencies.
   ============================================================================= */

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

:root {
    --bg: #f7f7f5;
    --surface: #ffffff;
    --surface-2: #fafaf8;
    --border: #e5e5e0;
    --text: #1a1a18;
    --text-muted: #6b6b66;
    --text-soft: #9a9a94;
    --primary: #e53935;
    --primary-dark: #b71c1c;
    --primary-light: #fce8e8;
    --green: #2e7d32;
    --green-light: #e8f5e9;
    --amber: #f57c00;
    --amber-light: #fff3e0;
    --gray-pill: #eeeeec;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.03);
    --radius: 10px;
    --radius-sm: 6px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* =============================================================================
   AUTH PAGES (login)
   ============================================================================= */

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: linear-gradient(135deg, #f7f7f5 0%, #fce8e8 100%);
}

.auth-card {
    background: var(--surface);
    padding: 40px;
    border-radius: 16px;
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 420px;
}

.auth-brand {
    text-align: center;
    margin-bottom: 32px;
}

.auth-icon {
    font-size: 48px;
    margin-bottom: 8px;
}

.auth-brand h1 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 4px;
}

.auth-subtitle {
    color: var(--text-muted);
    font-size: 14px;
}

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

/* =============================================================================
   FORMS
   ============================================================================= */

.field {
    margin-bottom: 16px;
}

.field label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--text);
}

.field input {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-family: inherit;
    background: var(--surface);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.field input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

/* =============================================================================
   BUTTONS
   ============================================================================= */

.btn {
    display: inline-block;
    padding: 11px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    text-decoration: none;
    transition: background 0.15s, transform 0.05s;
}

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

.btn-primary {
    background: var(--primary);
    color: white;
}

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

.btn-block {
    width: 100%;
    padding: 13px 20px;
    margin-top: 8px;
}

.btn-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
}

.btn-link:hover {
    color: var(--primary);
}

/* =============================================================================
   ALERTS
   ============================================================================= */

.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    margin-bottom: 20px;
}

.alert-error {
    background: var(--primary-light);
    color: var(--primary-dark);
    border-left: 3px solid var(--primary);
}

/* =============================================================================
   APP LAYOUT (dashboard)
   ============================================================================= */

.topbar {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    height: 60px;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand {
    font-weight: 600;
    font-size: 17px;
}

.badge {
    background: var(--primary-light);
    color: var(--primary-dark);
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-name {
    font-size: 14px;
    color: var(--text-muted);
}

.sidebar {
    position: fixed;
    top: 60px;
    left: 0;
    bottom: 0;
    width: 220px;
    background: var(--surface);
    border-right: 1px solid var(--border);
    padding: 16px 0;
    overflow-y: auto;
}

.nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 20px;
    color: var(--text);
    text-decoration: none;
    font-size: 14.5px;
    border-left: 3px solid transparent;
    transition: background 0.1s;
}

.nav-link:hover:not(.disabled) {
    background: var(--surface-2);
}

.nav-link.active {
    border-left-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary-dark);
    font-weight: 500;
}

.nav-link.disabled {
    color: var(--text-soft);
    cursor: not-allowed;
}

.soon {
    background: var(--gray-pill);
    color: var(--text-muted);
    font-size: 10px;
    padding: 2px 7px;
    border-radius: 8px;
    font-weight: 500;
    text-transform: uppercase;
}

.content {
    margin-left: 220px;
    margin-top: 60px;
    padding: 32px;
    max-width: 1200px;
}

.welcome {
    margin-bottom: 32px;
}

.welcome h1 {
    font-size: 26px;
    font-weight: 600;
    margin-bottom: 4px;
}

.muted {
    color: var(--text-muted);
    font-size: 14px;
}

/* =============================================================================
   STATS GRID
   ============================================================================= */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
}

.stat-card-highlight {
    background: linear-gradient(135deg, #e53935 0%, #c62828 100%);
    color: white;
    border-color: transparent;
}

.stat-card-highlight .stat-label,
.stat-card-highlight .stat-sub {
    color: rgba(255, 255, 255, 0.8);
}

.stat-label {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    font-weight: 500;
}

.stat-value {
    font-size: 32px;
    font-weight: 600;
    line-height: 1.1;
    margin-bottom: 4px;
}

.stat-sub {
    font-size: 13px;
    color: var(--text-soft);
}

/* =============================================================================
   PANELS / TABLES
   ============================================================================= */

.panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
}

.panel-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 16px;
}

.panel h2 {
    font-size: 17px;
    font-weight: 600;
}

.empty {
    color: var(--text-soft);
    text-align: center;
    padding: 32px;
    font-size: 14px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.data-table th {
    text-align: left;
    padding: 10px 12px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    font-weight: 500;
}

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

.data-table tr:last-child td { border-bottom: none; }

.pill {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.pill-green { background: var(--green-light); color: var(--green); }
.pill-gray  { background: var(--gray-pill); color: var(--text-muted); }
.pill-amber { background: var(--amber-light); color: var(--amber); }

.info-panel {
    background: linear-gradient(135deg, #fff9e6 0%, #fff3d4 100%);
    border-color: #f0e0a0;
}

.info-panel ul {
    margin-top: 12px;
    padding-left: 24px;
}

.info-panel li {
    margin-bottom: 6px;
    color: var(--text-muted);
}

/* =============================================================================
   MOBILE
   ============================================================================= */

@media (max-width: 768px) {
    .sidebar {
        display: none;
    }
    .content {
        margin-left: 0;
        padding: 20px;
    }
    .topbar { padding: 12px 16px; }
    .user-name { display: none; }
    .stat-value { font-size: 26px; }
}
