/* ================================
   VARIÁVEIS GERAIS DO TEMA
================================ */
:root {
    --primary: #ffb400;
    --primary-hover: #e0a000;
    --danger: #d9534f;
    --danger-hover: #c64541;
    --bg: #f4f5f7;
    --card-bg: #ffffff;
    --text: #1e293b;
    --muted: #677489;
    --radius: 12px;
    --shadow-soft: 0 2px 8px rgba(15, 23, 42, 0.06);
    --shadow-hover: 0 8px 22px rgba(15, 23, 42, 0.10);
}

/* ================================
   RESET / BASE
================================ */
* {
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background: var(--bg);
    color: var(--text);
    padding-bottom: 70px !important; /* espaço para o footer */
}

a {
    text-decoration:none;
    color:inherit;
}

/* ================================
   BOTÕES
================================ */
.btn {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:8px 14px;
    border-radius:10px;
    cursor:pointer;
    border:1px solid #cfd6e0;
    background:#fff;
    font-size:0.9rem;
    transition:0.15s;
}
.btn:hover {
    background:#f1f1f1;
}

.btn-primary {
    background:var(--primary);
    border-color:var(--primary);
    color:#000;
    font-weight:600;
}
.btn-primary:hover {
    background:var(--primary-hover);
}

.btn-danger {
    background:var(--danger);
    border-color:var(--danger);
    color:#fff;
}
.btn-danger:hover {
    background:var(--danger-hover);
}

/* ================================
   HEADER SUPERIOR (PAINEL)
================================ */
.topo {
    background:#fff;
    padding:16px 22px;
    border-bottom:1px solid #e5e7eb;
    display:flex;
    justify-content:space-between;
    align-items:center;
    flex-wrap:wrap;
    gap:10px;
}
.topo h1 {
    font-size:1.2rem;
}
.topo p {
    font-size:0.85rem;
    color:var(--muted);
}
.topo nav { display:flex; gap:10px; }

/* ================================
   CONTENT / CONTAINER
================================ */
.conteudo { padding:20px; }

/* ================================
   GRID DE PRODUTOS — CLIENTE
================================ */
.grid-produtos,
.prod-grid {
    display:grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important;
    gap:20px;
    padding:18px;
}

/* CARD PRODUTO */
.card-prod {
    background: var(--card-bg);
    padding: 12px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    min-height: 280px;
    display:flex;
    flex-direction:column;
    cursor:pointer;
    transition:0.12s ease;
}
.card-prod:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.card-prod img,
.prod-img-card {
    width:100%;
    height:150px;
    object-fit:cover;
    border-radius:12px;
    margin-bottom:12px;
}

.card-prod h3 {
    font-size:1rem;
    margin-bottom:2px;
}
.card-prod p {
    font-size:0.85rem;
    color:var(--muted);
    margin-bottom:4px;
}

/* ================================
   MINIATURAS — PAINEL LOJISTA
================================ */
.prod-img,
table img {
    width:64px !important;
    height:64px !important;
    object-fit:cover !important;
    border-radius:12px !important;
    margin:auto !important;
    display:block !important;
}

/* ================================
   MODAL PRODUTO
================================ */
.modal {
    position:fixed;
    left:0; top:0;
    width:100%; height:100%;
    background:rgba(0,0,0,0.55);
    display:none;
    justify-content:center;
    align-items:center;
    padding:14px;
    z-index:1000;
}
.modal[style*="display:flex"] { display:flex !important; }

.modal-box {
    background:#fff;
    width:100%;
    max-width:520px;
    border-radius:16px;
    padding:20px;
    box-shadow:var(--shadow-hover);
}
.modal-img {
    width:100%;
    height:260px;
    object-fit:cover;
    border-radius:12px;
    margin-bottom:10px;
}

/* ================================
   TABELAS
================================ */
table {
    width:100%;
    border-collapse:collapse;
    margin-top:10px;
    background:#fff;
    border-radius:12px;
    overflow:hidden;
    box-shadow:var(--shadow-soft);
}
table th, table td {
    padding:10px 8px;
    font-size:0.9rem;
}
table th { background:#f3f4f6; font-weight:600; }
table tr:nth-child(even) { background:#f9fafb; }

/* ================================
   HEADER CLIENTE LARANJA
================================ */
.header-rest {
    background:#ffb400;
    padding:16px;
    display:flex;
    align-items:center;
    gap:14px;
    box-shadow:0 4px 14px rgba(0,0,0,0.1);
}

.logo {
    width:72px;
    height:72px;
    object-fit:cover;
    border-radius:14px;
    background:#fff;
    padding:6px;
}

.status-open {
    background:rgba(0,128,0,0.20);
    color:#064e3b;
    padding:4px 10px;
    border-radius:8px;
    font-weight:700;
}
.status-closed {
    background:rgba(255,0,0,0.22);
    color:#7f1d1d;
    padding:4px 10px;
    border-radius:8px;
    font-weight:700;
}

/* ================================
   FOOTER FIXO — CLIENTE
================================ */
.footer-nav,
.footer-menu {
    position:fixed;
    bottom:0; left:0;
    width:100%;
    background:#ffb400;
    display:flex;
    justify-content:space-around;
    padding:10px 0;
    border-top:3px solid #e5a200;
    z-index:999;
}

.footer-nav a,
.footer-item {
    display:flex;
    flex-direction:column;
    align-items:center;
    font-weight:700;
    color:#222;
}

.footer-item span { margin-top:3px; font-size:.75rem; }

/* ================================
   HEADER LOJISTA
================================ */
.dash-header {
    background:#ffb400;
    padding:18px;
    display:flex;
    justify-content:space-between;
    align-items:center;
    box-shadow:0 4px 14px rgba(0,0,0,0.1);
}

.dash-left { display:flex; align-items:center; gap:12px; }

.dash-logo {
    width:58px;
    height:58px;
    border-radius:14px;
    background:#fff;
    object-fit:cover;
    padding:4px;
}

.dash-title { margin:0; font-size:1.4rem; font-weight:800; }
.dash-sub   { margin:0; font-size:.85rem; color:#444; }

.dash-nav { display:flex; gap:10px; }

/* ================================
   AJUSTES FINAIS
================================ */
.tab-btn.active {
    box-shadow:0 12px 30px rgba(2,6,23,0.08);
    border:2px solid var(--primary);
}
.input-erro {
    border: 2px solid #ff4d4d !important;
    background: #ffecec !important;
}

.msg-erro {
    color: #d8000c;
    font-size: .8rem;
    margin-top: -6px;
    margin-bottom: 8px;
}

/* ========== HEADER NOVO ========== */
.novo-header {
    background: #ffffff;
    padding: 14px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e9e9e9;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.header-logo {
    width: 54px;
    height: 54px;
    border-radius: 12px;
    object-fit: cover;
    background: #f3f3f3;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.header-texts .header-title {
    font-size: 1.45rem;
    margin: 0;
    font-weight: 800;
    color: #333;
}

.header-texts .header-sub {
    font-size: .85rem;
    margin: 0;
    color: #666;
}

/* MENU */
.header-menu {
    display: flex;
    align-items: center;
    gap: 10px;
}

.menu-btn {
    padding: 8px 16px;
    background: #f4f4f4;
    color: #333;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    border: 1px solid #dcdcdc;
    transition: 0.2s;
}

.menu-btn:hover {
    background: #e9e9e9;
}

.menu-btn.admin {
    background: #ff7a00;
    color: #fff;
    border-color: #ff7a00;
}

.menu-btn.admin:hover {
    background: #ff8c22;
}
