/* ============================================
   VAINA RICA — Panel Admin & Restaurantes
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&display=swap');

:root {
    --primary: #FF5200;
    --primary-dark: #D94200;
    --whatsapp: #25D366;
    --danger: #FF3B30;
    --success: #30D158;
    --warning: #FF9500;
    --bg: #F5F5F7;
    --surface: #FFFFFF;
    --border: #E5E5EA;
    --text: #1C1C1E;
    --text2: #6E6E73;
    --font: 'Nunito', sans-serif;
    --radius: 14px;
    --sidebar-w: 240px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font); background: var(--bg); color: var(--text); min-height: 100vh; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: var(--font); }
input, select, textarea { font-family: var(--font); }

/* ---------- Login Page ---------- */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    padding: 20px;
}
.login-card {
    background: white;
    border-radius: 24px;
    padding: 40px 32px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
.login-logo {
    text-align: center;
    margin-bottom: 28px;
}
.login-logo .emoji { font-size: 48px; margin-bottom: 8px; }
.login-logo h1 { font-size: 28px; font-weight: 900; color: var(--primary); }
.login-logo p { font-size: 13px; color: var(--text2); font-weight: 600; margin-top: 4px; }

/* ---------- Panel Layout ---------- */
.panel-layout { display: flex; min-height: 100vh; }

.sidebar {
    width: var(--sidebar-w);
    background: var(--text);
    color: white;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 50;
    transition: transform .3s;
}

.sidebar-logo {
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.sidebar-logo .emoji { font-size: 24px; }
.sidebar-logo h2 { font-size: 18px; font-weight: 900; color: white; }
.sidebar-logo small { font-size: 11px; color: rgba(255,255,255,0.5); font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }

.sidebar-nav { padding: 16px 0; flex: 1; }
.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    color: rgba(255,255,255,0.7);
    font-size: 14px;
    font-weight: 700;
    transition: all .2s;
}
.nav-link:hover { background: rgba(255,255,255,0.08); color: white; }
.nav-link.active { background: var(--primary); color: white; }
.nav-link .nav-icon { font-size: 18px; width: 22px; }

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}
.nav-logout { color: rgba(255,255,255,0.5); }
.nav-logout:hover { color: var(--danger) !important; background: rgba(255,59,48,0.1) !important; }

/* Panel content */
.panel-content {
    margin-left: var(--sidebar-w);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.panel-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 16px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.panel-title { font-size: 20px; font-weight: 900; }
.panel-subtitle { font-size: 13px; color: var(--text2); font-weight: 600; }

.panel-body { padding: 28px; }

/* ---------- Cards / Stats ---------- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}
.stat-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid var(--border);
}
.stat-icon {
    width: 52px; height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}
.stat-icon.orange { background: #FFF0E8; }
.stat-icon.green { background: #E8FFF1; }
.stat-icon.blue { background: #E8F0FF; }
.stat-icon.yellow { background: #FFFBE8; }
.stat-value { font-size: 28px; font-weight: 900; line-height: 1; }
.stat-label { font-size: 12px; color: var(--text2); font-weight: 700; margin-top: 4px; }

/* ---------- Table ---------- */
.table-card {
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid var(--border);
    margin-bottom: 24px;
}
.table-header {
    padding: 18px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.table-header h3 { font-size: 16px; font-weight: 900; }
table { width: 100%; border-collapse: collapse; }
th {
    background: var(--bg);
    padding: 12px 16px;
    text-align: left;
    font-size: 11px;
    font-weight: 800;
    color: var(--text2);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border-bottom: 1px solid var(--border);
}
td {
    padding: 14px 16px;
    font-size: 14px;
    font-weight: 600;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: #FAFAFA; }

/* ---------- Badges / Status ---------- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
}
.badge-green { background: #E8FFF1; color: #1A8A3C; }
.badge-yellow { background: #FFFBE8; color: #8A6A00; }
.badge-red { background: #FFF0EE; color: #C0392B; }
.badge-gray { background: #F0F0F0; color: #6E6E73; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 800;
    transition: all .2s;
    cursor: pointer;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-success { background: var(--success); color: white; }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #C0392B; }
.btn-ghost { background: var(--bg); color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--border); }
.btn-sm { padding: 6px 12px; font-size: 12px; }

/* ---------- Forms ---------- */
.form-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid var(--border);
    margin-bottom: 24px;
}
.form-card h3 { font-size: 16px; font-weight: 900; margin-bottom: 20px; }

.p-form-group { margin-bottom: 16px; }
.p-form-label {
    display: block;
    font-size: 12px;
    font-weight: 800;
    color: var(--text2);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 6px;
}
.p-form-input, .p-form-select, .p-form-textarea {
    width: 100%;
    padding: 11px 14px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    background: var(--surface);
    outline: none;
    transition: border-color .2s;
}
.p-form-input:focus, .p-form-select:focus, .p-form-textarea:focus { border-color: var(--primary); }
.p-form-textarea { resize: vertical; min-height: 90px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }

/* ---------- Upload preview ---------- */
.upload-area {
    border: 2px dashed var(--border);
    border-radius: 10px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: border-color .2s;
}
.upload-area:hover { border-color: var(--primary); }
.upload-area p { font-size: 13px; color: var(--text2); font-weight: 700; margin-top: 8px; }

/* ---------- Alert ---------- */
.alert {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 16px;
}
.alert-success { background: #E8FFF1; color: #1A8A3C; border: 1px solid #A8E6BB; }
.alert-error { background: #FFF0EE; color: #C0392B; border: 1px solid #FFBDB8; }
.alert-info { background: #E8F0FF; color: #1A3C8A; border: 1px solid #B8C8FF; }

/* ---------- Mobile sidebar toggle ---------- */
.sidebar-toggle {
    display: none;
    position: fixed;
    top: 16px; left: 16px;
    z-index: 60;
    background: var(--primary);
    color: white;
    width: 40px; height: 40px;
    border-radius: 10px;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .sidebar-toggle { display: flex; }
    .panel-content { margin-left: 0; }
    .panel-header { padding: 16px 16px 16px 64px; }
    .panel-body { padding: 16px; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    table { font-size: 13px; }
    th, td { padding: 10px 12px; }
}
