/* =========================================================
   Suite SaaS Alimentos y Bebidas — Estilos
   Paleta cálida y apetitosa: espresso + terracota + naranja
   + ámbar + verde fresco + berry/café. Para restaurante, bar,
   panadería, pastelería, cafetería y fast food.
   ========================================================= */
:root {
    /* Tonos cálidos espresso/terracota para sidebar, login y acentos.
       (Se conservan los nombres --violet-* para no romper referencias,
        pero ahora son tonos apetitosos de alimentos y bebidas.) */
    --violet-900: #2b1a11;   /* espresso oscuro (fondo sidebar) */
    --violet-800: #43291b;   /* espresso (top sidebar) */
    --violet-700: #c2410c;   /* terracota (botones) */
    --violet-600: #ea580c;   /* naranja marca (acentos) */
    --violet-500: #f59e0b;   /* ámbar (focus) */

    /* Paleta de alimentos y bebidas */
    --orange-600: #ea580c;
    --orange-500: #f97316;
    --orange-400: #fb923c;
    --amber-500: #f59e0b;
    --amber-400: #fbbf24;
    --pink-500: #e11d48;     /* fresa / pastelería */
    --green-600: #15803d;
    --green-500: #16a34a;    /* fresco / hierbas */
    --teal-500: #0d9488;
    --blue-500: #2563eb;
    --red-500: #e11d48;
    --coffee: #7c4a2d;       /* café / cafetería */

    --bg: #f7f3ec;           /* crema cálida */
    --card: #ffffff;
    --text: #2a1f18;
    --muted: #9b8b7d;
    --line: #efe5d8;
    --radius: 18px;
    --shadow: 0 12px 34px rgba(120, 72, 40, .10);
    --shadow-sm: 0 4px 14px rgba(120, 72, 40, .07);
    --sidebar-w: 252px;

    /* Tipografía: serif cálida para marca/títulos + sans para el resto */
    --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
    --font-body: 'Plus Jakarta Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: var(--font-body);
    background:
        radial-gradient(1000px 600px at 100% -5%, rgba(249,115,22,.08), transparent 55%),
        radial-gradient(900px 600px at -10% 110%, rgba(225,29,72,.06), transparent 55%),
        var(--bg);
    background-attachment: fixed;
    color: var(--text);
    font-size: 14px;
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }

/* ---------- Layout ---------- */
.app { display: flex; min-height: 100vh; }

/* ---------- Sidebar ---------- */
.sidebar {
    width: var(--sidebar-w);
    flex: 0 0 var(--sidebar-w);
    background: linear-gradient(185deg, var(--violet-800) 0%, var(--violet-900) 100%);
    color: #ecdccb;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 6px; }

.brand {
    display: flex; align-items: center; gap: 10px;
    padding: 20px 18px 14px;
    font-family: var(--font-display); font-weight: 700; font-size: 16.5px; color: #fff; letter-spacing: -.01em;
}
.brand .brand-logo {
    width: 34px; height: 34px; border-radius: 10px;
    background: linear-gradient(135deg, var(--orange-500), var(--pink-500));
    display: grid; place-items: center; font-size: 18px; flex: 0 0 34px;
}
.brand .brand-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.side-user {
    display: flex; flex-direction: column; align-items: center;
    padding: 8px 18px 18px; gap: 8px;
    border-bottom: 1px solid rgba(255,255,255,.08);
    margin-bottom: 8px;
}
.avatar {
    width: 64px; height: 64px; border-radius: 50%;
    background: linear-gradient(135deg, var(--orange-500), var(--amber-400));
    display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 22px;
    box-shadow: 0 6px 18px rgba(249,115,22,.4);
}
.avatar.sm { width: 34px; height: 34px; font-size: 13px; box-shadow: none; }
.side-user .role { font-size: 13px; font-weight: 600; color: #fff; }

.nav { padding: 4px 12px 24px; }
.nav-group-title {
    font-size: 10.5px; letter-spacing: .09em; text-transform: uppercase;
    color: #d8bfa8; font-weight: 700; padding: 16px 12px 6px;
}
.nav-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px; border-radius: 12px; margin: 2px 0;
    color: #ecdccb; font-weight: 500; font-size: 13.5px;
    transition: background .15s, color .15s, transform .12s;
}
.nav-item:hover { background: rgba(255,255,255,.09); color: #fff; transform: translateX(3px); }
.nav-item.active {
    background: linear-gradient(135deg, var(--orange-500), var(--orange-600));
    color: #fff; box-shadow: 0 8px 20px rgba(234,88,12,.35);
}
.nav-item .ico { width: 20px; height: 20px; flex: 0 0 20px; display: grid; place-items: center; }
.nav-item .ico svg { width: 18px; height: 18px; }

/* ---------- Main ---------- */
.main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.topbar {
    display: flex; align-items: center; gap: 18px;
    padding: 22px 30px 10px;
}
.topbar .greeting h1 { margin: 0; font-family: var(--font-display); font-size: 27px; font-weight: 700; letter-spacing: -.01em; }
.topbar .greeting .date { color: var(--muted); font-size: 13px; text-transform: capitalize; }
.topbar .spacer { flex: 1; }
.search {
    display: flex; align-items: center; gap: 8px;
    background: #fff; border: 1px solid var(--line); border-radius: 30px;
    padding: 9px 16px; width: 260px; color: var(--muted);
    box-shadow: var(--shadow-sm);
}
.search input { border: none; outline: none; font-size: 13px; width: 100%; background: transparent; color: var(--text); }
.user-chip {
    display: flex; align-items: center; gap: 10px;
    background: #fff; border: 1px solid var(--line); border-radius: 30px;
    padding: 6px 14px 6px 6px; box-shadow: var(--shadow-sm); font-weight: 600; font-size: 13px;
}
.content { padding: 12px 30px 40px; }

/* ---------- Cards ---------- */
.card {
    background: var(--card); border-radius: var(--radius);
    box-shadow: var(--shadow); border: 1px solid var(--line);
}
.card-pad { padding: 20px 22px; }

.grid { display: grid; gap: 18px; }
.stats-grid { grid-template-columns: repeat(4, 1fr); }
.cols-2 { grid-template-columns: 1.5fr 1fr; }

.stat {
    background: var(--card); border-radius: var(--radius); padding: 18px 20px;
    box-shadow: var(--shadow); border: 1px solid var(--line);
    display: flex; flex-direction: column; gap: 8px; position: relative;
    border-top: 3px solid var(--accent, var(--violet-600));
    transition: transform .15s, box-shadow .15s;
}
.stat:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(120, 72, 40, .16); }
.stat .stat-head { display: flex; align-items: center; justify-content: space-between; }
.stat .stat-ico {
    width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
    background: color-mix(in srgb, var(--accent, var(--violet-600)) 14%, #fff);
    color: var(--accent, var(--violet-600));
}
.stat .stat-ico svg { width: 22px; height: 22px; }
.stat .tag {
    font-size: 9.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
    color: var(--muted); background: #f7efe6; padding: 3px 8px; border-radius: 20px;
}
.stat .label { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.stat .value { font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.stat .sub { font-size: 12px; color: var(--muted); }

/* ---------- Section headers ---------- */
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.section-head h3 { margin: 0; font-family: var(--font-display); font-size: 17.5px; font-weight: 700; display: flex; align-items: center; gap: 8px; }

/* ---------- Goal bar ---------- */
.goal { display: flex; align-items: center; gap: 16px; }
.goal .goal-info { flex: 0 0 auto; }
.goal .goal-info .t { font-weight: 800; font-size: 15px; }
.goal .goal-info .s { color: var(--muted); font-size: 12.5px; }
.progress { flex: 1; height: 12px; background: #f4e7d9; border-radius: 20px; overflow: hidden; position: relative; }
.progress > span {
    display: block; height: 100%;
    background: linear-gradient(90deg, var(--orange-400), var(--orange-600));
    border-radius: 20px;
}
.progress .pct { position: absolute; left: 8px; top: -1px; font-size: 10px; font-weight: 800; color: #fff; }
.btn {
    display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
    padding: 10px 16px; border-radius: 12px; font-weight: 700; font-size: 13px; border: none;
}
.btn-violet { background: var(--violet-700); color: #fff; }
.btn-green { background: var(--green-500); color: #fff; }
.btn-pink { background: var(--pink-500); color: #fff; }
.btn-ghost { background: #f7efe6; color: var(--violet-700); }
.btn-orange { background: linear-gradient(135deg, var(--orange-500), var(--orange-600)); color: #fff; box-shadow: 0 8px 20px rgba(234,88,12,.28); }
.btn-amber { background: var(--amber-500); color: #fff; }
.btn-danger { background: #fff; color: var(--red-500); border: 1px solid #f3c7cf; }
.btn-danger:hover { background: var(--red-500); color: #fff; }
.btn.sm { padding: 8px 13px; font-size: 12px; border-radius: 10px; }

/* ---------- Encabezado de página / flash ---------- */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.page-sub { color: var(--muted); font-size: 13px; margin: 2px 0; }
.flash { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 12px; font-size: 13.5px; font-weight: 600; margin-bottom: 18px; }
.flash-ok { background: #e7f7ee; color: #15803d; border: 1px solid #bfe8cf; }
.flash-err { background: #fdecec; color: #b91c1c; border: 1px solid #f5c2c2; }

/* ---------- Empresas: listado ---------- */
.empresas-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.empresa-card { padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; transition: transform .15s, box-shadow .15s; }
.empresa-card:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(120,72,40,.15); }
.ec-top { display: flex; align-items: center; gap: 12px; }
.ec-logo { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 20px; flex: 0 0 48px; }
.ec-id { flex: 1; min-width: 0; }
.ec-name { font-weight: 800; font-size: 15.5px; }
.ec-legal { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ec-state { font-size: 10.5px; font-weight: 800; padding: 4px 10px; border-radius: 20px; text-transform: uppercase; letter-spacing: .04em; }
.ec-state.on { background: #e7f7ee; color: #15803d; }
.ec-state.off { background: #f1ece6; color: #9b8b7d; }
.ec-state.amber { background: #fef3e2; color: #b45309; }
.ec-state.danger { background: #fdecec; color: #b91c1c; }

/* ---------- Barra de filtros ---------- */
.filter-bar { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.fb-field { display: flex; flex-direction: column; gap: 5px; }
.fb-field.grow { flex: 1; min-width: 160px; }
.fb-field label { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.fb-field input, .fb-field select { padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 11px; font-size: 13.5px; outline: none; background: #fff; }
.fb-field input:focus, .fb-field select:focus { border-color: var(--violet-500); box-shadow: 0 0 0 3px rgba(234,88,12,.16); }
.fb-actions { display: flex; gap: 8px; align-items: flex-end; }

/* ---------- Filas de información ---------- */
.info-rows { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; }
.info-rows > div { font-size: 13.5px; font-weight: 700; }
.info-rows span { display: block; font-size: 10.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 2px; }
.data-table tfoot td { padding: 14px 18px; border-top: 2px solid var(--line); background: #fbf7f1; }
.ec-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ec-badge { font-size: 11.5px; font-weight: 700; padding: 5px 11px; border-radius: 20px; }
.ec-dim { font-size: 11.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 4px; }
.ec-rows { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; border-top: 1px solid var(--line); padding-top: 12px; }
.ec-rows > div { font-size: 12.5px; font-weight: 700; }
.ec-rows span { display: block; font-size: 10px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 2px; }
.ec-actions { display: flex; gap: 8px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 12px; }
.ec-actions form { margin: 0; }

/* ---------- Empresas: formulario ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 340px; gap: 18px; align-items: start; }
.form-section { margin: 0 0 14px; font-size: 15px; font-weight: 800; }
.ff-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ff-grid .span-2 { grid-column: 1 / -1; }
.ff-grid .field { margin: 0; }
.ff-grid select, .ff-grid input {
    width: 100%; padding: 11px 13px; border: 1.5px solid var(--line); border-radius: 11px;
    font-size: 14px; outline: none; background: #fff; transition: border .15s, box-shadow .15s;
}
.ff-grid select:focus, .ff-grid input:focus { border-color: var(--violet-500); box-shadow: 0 0 0 3px rgba(234,88,12,.16); }
.switch { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--text); cursor: pointer; padding-top: 6px; }
.switch input { width: 18px; height: 18px; accent-color: var(--orange-500); }

.modules-panel { position: sticky; top: 18px; max-height: calc(100vh - 40px); overflow-y: auto; }
.mod-group-title { font-size: 10.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin: 14px 0 6px; }
.mod-check { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 10px; font-size: 13.5px; font-weight: 600; cursor: pointer; transition: background .12s; }
.mod-check:hover { background: #f7efe6; }
.mod-check input { width: 17px; height: 17px; accent-color: var(--orange-500); }
.mod-check.is-core { opacity: .75; }
.mod-check.locked { opacity: .4; }
.mod-check.locked span { text-decoration: line-through; }
.mod-check .core-tag { margin-left: auto; font-size: 9.5px; font-style: normal; font-weight: 800; text-transform: uppercase; color: var(--orange-600); background: #fde7dc; padding: 2px 8px; border-radius: 20px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

/* ---------- Toolbar (búsqueda/filtros) ---------- */
.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.search.inline { width: 280px; box-shadow: none; }
.toolbar select { padding: 10px 13px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font-size: 13px; outline: none; }

/* ---------- Íconos de acción ---------- */
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--muted); cursor: pointer; transition: all .12s; }
.icon-btn:hover { color: var(--orange-600); border-color: var(--orange-400); }
.icon-btn.danger:hover { color: #fff; background: var(--red-500); border-color: var(--red-500); }
.row-actions { display: inline-flex; gap: 6px; justify-content: flex-end; }
.row-actions form { margin: 0; }

/* ---------- Tabla de datos ---------- */
.table-wrap { width: 100%; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.data-table th { text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 800; padding: 14px 18px; border-bottom: 1px solid var(--line); background: #fbf7f1; }
.data-table td { padding: 13px 18px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #fdfaf6; }
.data-table .right { text-align: right; }
.data-table .strong { font-weight: 800; }
.tbl-prod { display: flex; align-items: center; gap: 11px; }
.tbl-thumb { width: 38px; height: 38px; border-radius: 10px; background: #f7ecef; display: grid; place-items: center; color: #d9a9b6; flex: 0 0 38px; }
.tbl-name { font-weight: 700; }
.tbl-sku { font-size: 11.5px; color: var(--muted); }
.cli-avatar { width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg, var(--orange-500), var(--amber-400)); color: #fff; font-weight: 800; display: grid; place-items: center; flex: 0 0 38px; }
.role-badge { font-size: 11.5px; font-weight: 700; padding: 5px 11px; border-radius: 20px; }
.me-tag { font-size: 10px; font-weight: 800; text-transform: uppercase; background: #f7efe6; color: var(--coffee); padding: 2px 7px; border-radius: 20px; margin-left: 6px; }
.type-pill { font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 20px; background: #f7efe6; color: var(--coffee); }
.stock-low { color: #b45309; font-weight: 800; }
.stock-out { color: var(--red-500); font-weight: 800; }

/* ---------- Categorías ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.cat-card { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.cat-swatch { width: 14px; height: 44px; border-radius: 8px; flex: 0 0 14px; }
.cat-info { flex: 1; min-width: 0; }
.cat-name { font-weight: 800; font-size: 14.5px; }
.cat-count { font-size: 12px; color: var(--muted); }
.cat-actions { display: inline-flex; gap: 6px; }
.cat-actions form { margin: 0; }

/* ---------- Modal ---------- */
.modal-backdrop { display: none; position: fixed; inset: 0; background: rgba(30,15,8,.5); z-index: 60; align-items: center; justify-content: center; padding: 20px; }
.modal-backdrop.show { display: flex; }
.modal { background: #fff; border-radius: 18px; width: 100%; max-width: 440px; padding: 22px; box-shadow: 0 30px 70px rgba(0,0,0,.3); animation: pop .16s ease; }
@keyframes pop { from { transform: scale(.96); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.modal-head h3 { margin: 0; font-family: var(--font-display); font-size: 18.5px; font-weight: 700; }
.modal .field { margin-bottom: 14px; }
.modal .field label { display: block; font-size: 12.5px; font-weight: 700; margin-bottom: 6px; }
.modal .field input, .modal .field select { width: 100%; padding: 11px 13px; border: 1.5px solid var(--line); border-radius: 11px; font-size: 14px; outline: none; }
.modal .field input:focus, .modal .field select:focus { border-color: var(--violet-500); box-shadow: 0 0 0 3px rgba(234,88,12,.16); }

/* ---------- Movimientos de inventario ---------- */
.mov-item { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--line); }
.mov-item:last-child { border-bottom: none; }
.mov-ico { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; font-weight: 800; flex: 0 0 32px; }
.mov-entrada { background: #e7f7ee; color: #15803d; }
.mov-salida { background: #fdecec; color: var(--red-500); }
.mov-ajuste { background: #f7efe6; color: var(--coffee); }
.mov-info { flex: 1; min-width: 0; }
.mov-name { font-weight: 700; font-size: 13.5px; }
.mov-meta { font-size: 11.5px; color: var(--muted); }
.mov-right { text-align: right; }
.mov-after { font-weight: 800; }
.mov-date { font-size: 11px; color: var(--muted); }

/* ---------- Preview producto ---------- */
.mini-preview { text-align: center; }
.mp-thumb { width: 80px; height: 80px; border-radius: 16px; margin: 0 auto 10px; background: #f7ecef; display: grid; place-items: center; color: #d9a9b6; }

/* ---------- Punto de Venta (POS) ---------- */
.pos-layout { display: grid; grid-template-columns: 1fr 360px; gap: 18px; align-items: start; }
.pos-catalog { display: flex; flex-direction: column; gap: 14px; }
.pos-search { }
.pos-cats { display: flex; gap: 8px; flex-wrap: wrap; }
.cat-chip { padding: 8px 15px; border-radius: 20px; border: 1px solid var(--line); background: #fff; font-weight: 700; font-size: 13px; cursor: pointer; color: var(--muted); transition: all .12s; }
.cat-chip:hover { border-color: var(--chip, var(--orange-400)); color: var(--chip, var(--orange-600)); }
.cat-chip.active { background: linear-gradient(135deg, var(--orange-500), var(--orange-600)); color: #fff; border-color: transparent; }
.pos-products { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.prod-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 10px; cursor: pointer; text-align: center; transition: transform .12s, box-shadow .12s, border-color .12s; display: flex; flex-direction: column; gap: 6px; align-items: center; }
.prod-card:hover { transform: translateY(-3px); box-shadow: 0 12px 26px rgba(120,72,40,.14); border-color: var(--orange-400); }
.pc-thumb { width: 48px; height: 48px; border-radius: 12px; background: #f7efe6; display: grid; place-items: center; font-size: 24px; }
.pc-name { font-weight: 700; font-size: 12.5px; line-height: 1.2; }
.pc-price { font-weight: 800; font-size: 13px; color: var(--orange-600); }

.pos-cart { position: sticky; top: 18px; display: flex; flex-direction: column; padding: 16px; max-height: calc(100vh - 40px); }
.pos-cart-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.pos-cart-head h3 { margin: 0; font-size: 16px; font-weight: 800; }
.pos-type { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 10px; }
.type-btn { padding: 8px 4px; border-radius: 10px; border: 1px solid var(--line); background: #fff; font-weight: 700; font-size: 12px; cursor: pointer; color: var(--muted); }
.type-btn.active { background: var(--coffee); color: #fff; border-color: transparent; }
.pos-selects { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.pos-select { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 11px; font-size: 13px; background: #fff; outline: none; }
.pos-items { flex: 1; overflow-y: auto; min-height: 120px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 8px 0; margin-bottom: 10px; }
.pos-empty { text-align: center; color: var(--muted); font-size: 13px; padding: 30px 10px; }
.pos-item { display: grid; grid-template-columns: 1fr auto auto auto; align-items: center; gap: 8px; padding: 8px 2px; border-bottom: 1px dashed var(--line); }
.pos-item:last-child { border-bottom: none; }
.pi-name { font-weight: 700; font-size: 13px; }
.pi-price { font-size: 11px; color: var(--muted); }
.pi-qty { display: inline-flex; align-items: center; gap: 6px; }
.pi-qty button { width: 24px; height: 24px; border-radius: 7px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-weight: 800; color: var(--orange-600); }
.pi-qty span { min-width: 18px; text-align: center; font-weight: 700; font-size: 13px; }
.pi-total { font-weight: 800; font-size: 12.5px; min-width: 56px; text-align: right; }
.pi-del { border: none; background: transparent; color: var(--muted); cursor: pointer; font-size: 13px; }
.pi-del:hover { color: var(--red-500); }
.pos-totals { margin-bottom: 12px; }
.pt-row { display: flex; justify-content: space-between; font-size: 13px; padding: 3px 0; color: var(--muted); }
.pt-row.total { font-size: 20px; color: var(--text); font-weight: 800; border-top: 1px solid var(--line); padding-top: 10px; margin-top: 4px; }
.pos-actions { display: flex; gap: 8px; }

.pay-total { background: #f7efe6; border-radius: 12px; padding: 12px 14px; font-size: 14px; margin-bottom: 14px; }
.pay-total b, .pay-change b { font-size: 17px; }
.pay-change { background: #e7f7ee; color: #15803d; border-radius: 12px; padding: 12px 14px; font-size: 14px; margin-top: 6px; }

/* ---------- Cocina (KDS) ---------- */
.kds-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; align-items: start; }
.kds-card { background: #fff; border-radius: 16px; border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden; border-top: 5px solid var(--green-500); }
.kds-card.warn { border-top-color: var(--amber-500); }
.kds-card.late { border-top-color: var(--red-500); }
.kds-card.is-ready { opacity: .92; }
.kds-head { display: flex; align-items: flex-start; justify-content: space-between; padding: 14px 16px 10px; }
.kds-code { font-weight: 800; font-size: 16px; }
.kds-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.kds-time { font-weight: 800; font-size: 18px; color: var(--coffee); background: #f7efe6; padding: 3px 10px; border-radius: 10px; }
.kds-card.warn .kds-time { color: #b45309; background: #fef3e2; }
.kds-card.late .kds-time { color: #b91c1c; background: #fdecec; }
.kds-items { padding: 4px 12px 12px; display: flex; flex-direction: column; gap: 6px; }
.kds-item-form { margin: 0; }
.kds-item { width: 100%; display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: #fbf7f1; cursor: pointer; text-align: left; transition: all .12s; }
.kds-item:hover { border-color: var(--orange-400); }
.kds-item .ki-qty { font-weight: 800; color: var(--coffee); }
.kds-item .ki-name { flex: 1; font-weight: 600; font-size: 13.5px; }
.kds-item .ki-state { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; padding: 3px 8px; border-radius: 20px; }
.kds-item.pend { }
.kds-item.pend .ki-state { background: #f1ece6; color: #9b8b7d; }
.kds-item.prep { background: #fff7ec; border-color: #ffe6bf; }
.kds-item.prep .ki-state { background: #fde7c8; color: #b45309; }
.kds-item.ready { background: #e9f9f1; border-color: #cfeee0; }
.kds-item.ready .ki-name { text-decoration: line-through; color: #6b8f7c; }
.kds-item.ready .ki-state { background: #cdeede; color: #15803d; }
.kds-actions { display: flex; gap: 8px; padding: 0 12px 14px; }
.kds-actions form { margin: 0; }

/* ---------- Caja / Arqueo ---------- */
.caja-wrap { display: grid; place-items: center; padding: 30px 0; }
.caja-open { width: 100%; max-width: 420px; text-align: center; }
.caja-icon { width: 70px; height: 70px; border-radius: 20px; display: grid; place-items: center; margin: 0 auto; color: #fff; }
.caja-icon.closed { background: linear-gradient(135deg, var(--coffee), var(--orange-600)); }
.diff-box { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-radius: 12px; margin-top: 10px; font-weight: 700; background: #f7efe6; }
.diff-box b { font-size: 18px; }
.diff-box.ok { background: #e7f7ee; color: #15803d; }
.diff-box.over { background: #eef6ff; color: #1d4ed8; }
.diff-box.under { background: #fdecec; color: #b91c1c; }

/* ---------- Delivery (kanban) ---------- */
.deliv-board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; align-items: start; }
.deliv-col { background: #fbf7f1; border: 1px solid var(--line); border-radius: 16px; padding: 10px; }
.deliv-col-head { display: flex; align-items: center; justify-content: space-between; font-weight: 800; font-size: 13px; padding: 6px 8px 10px; color: var(--c); border-bottom: 2px solid var(--c); margin-bottom: 10px; }
.deliv-count { background: var(--c); color: #fff; border-radius: 20px; padding: 1px 9px; font-size: 12px; }
.deliv-cards { display: flex; flex-direction: column; gap: 10px; min-height: 40px; }
.deliv-empty { text-align: center; color: var(--muted); font-size: 12px; padding: 16px 0; }
.deliv-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; box-shadow: var(--shadow-sm); }
.dc-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.dc-code { font-weight: 800; font-size: 13px; }
.dc-total { font-weight: 800; color: var(--orange-600); font-size: 13px; }
.dc-addr { font-size: 12.5px; font-weight: 600; display: flex; align-items: center; gap: 5px; margin-bottom: 3px; }
.dc-meta { font-size: 11.5px; color: var(--muted); }
.dc-courier { font-size: 11.5px; color: var(--green-600); font-weight: 700; display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; }
.dc-actions { display: flex; gap: 6px; margin-top: 10px; align-items: center; }
.dc-actions form { margin: 0; }

/* Campos del formulario de delivery */
.deliv-fields { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.deliv-inline { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; font-weight: 700; }
.deliv-inline input { padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; font-size: 13px; text-align: right; }

/* ---------- Producción / Recetas ---------- */
.recipe-items { display: flex; flex-direction: column; gap: 4px; }
.recipe-ing { display: flex; justify-content: space-between; font-size: 13px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.recipe-ing:last-child { border-bottom: none; }
.ing-row { display: grid; grid-template-columns: 1fr 110px 40px; gap: 8px; margin-bottom: 8px; align-items: center; }
.ing-row select, .ing-row input { padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px; font-size: 13.5px; outline: none; background: #fff; width: 100%; }
.ing-row select:focus, .ing-row input:focus { border-color: var(--violet-500); }

/* ---------- Preview de logo (config negocio) ---------- */
.logo-preview { display: grid; place-items: center; margin-bottom: 14px; }
.logo-preview img { width: 96px; height: 96px; border-radius: 20px; object-fit: cover; border: 1px solid var(--line); }
.logo-fallback { width: 96px; height: 96px; border-radius: 20px; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 40px; }

/* ---------- Banner de rubro (dashboard empresa) ---------- */
.rubro-banner {
    display: flex; align-items: center; gap: 16px;
    background:
        linear-gradient(90deg, color-mix(in srgb, var(--rb) 12%, #fff), #fff 60%),
        var(--card);
    border: 1px solid var(--line);
    border-left: 5px solid var(--rb);
    border-radius: var(--radius);
    padding: 16px 20px;
    box-shadow: var(--shadow-sm);
}
.rb-emoji {
    width: 56px; height: 56px; border-radius: 16px; flex: 0 0 56px;
    display: grid; place-items: center; font-size: 30px;
    background: color-mix(in srgb, var(--rb) 16%, #fff);
    box-shadow: 0 6px 16px color-mix(in srgb, var(--rb) 30%, transparent);
}
.rb-text { flex: 1; min-width: 0; }
.rb-kicker { font-size: 10.5px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--rb); }
.rb-title { font-family: var(--font-display); font-size: 20px; font-weight: 700; letter-spacing: -.01em; margin: 1px 0 2px; }
.rb-sub { font-size: 12.5px; color: var(--muted); }
.rb-chip {
    font-size: 12px; font-weight: 800; padding: 7px 16px; border-radius: 30px;
    background: var(--rb); color: #fff; flex: 0 0 auto;
    box-shadow: 0 6px 16px color-mix(in srgb, var(--rb) 35%, transparent);
}
@media (max-width: 560px) {
    .rubro-banner { flex-wrap: wrap; }
    .rb-chip { order: -1; }
}

/* ---------- Intro superadmin (rubros) ---------- */
.intro-card { background: radial-gradient(120% 130% at 0% 0%, rgba(249,115,22,.07), transparent 55%), var(--card); }
.intro-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.rubros-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.rubro-chip { border: 1px solid var(--line); border-radius: 14px; padding: 14px; text-align: center; border-top: 3px solid var(--rc); background: #fff; transition: transform .12s, box-shadow .12s; }
.rubro-chip:hover { transform: translateY(-3px); box-shadow: 0 12px 26px rgba(120,72,40,.14); }
.rubro-emoji { font-size: 28px; }
.rubro-name { font-weight: 800; font-size: 14px; margin: 4px 0 2px; color: var(--rc); }
.rubro-desc { font-size: 11.5px; color: var(--muted); line-height: 1.3; }

/* ---------- Resumen de suscripción ---------- */
.sub-summary { margin-top: 14px; background: #f7efe6; border-radius: 12px; padding: 6px 14px; }
.ss-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; font-size: 14px; font-weight: 600; }
.ss-row b { font-size: 16px; }
.ss-row.big { border-top: 1px dashed #d9c9b3; }
.ss-row.big b { font-size: 18px; color: var(--orange-600); }

/* ---------- Planes ---------- */
.plans-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.plan-card { padding: 20px; border-top: 5px solid var(--pc); display: flex; flex-direction: column; gap: 12px; }
.plan-top { display: flex; align-items: flex-start; justify-content: space-between; }
.plan-name { font-weight: 800; font-size: 18px; margin-bottom: 6px; }
.plan-price { font-weight: 800; font-size: 22px; color: var(--pc); text-align: right; }
.plan-price small { font-size: 12px; color: var(--muted); font-weight: 600; }
.plan-meta { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 12px; }
.plan-meta span { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- Paginación ---------- */
.pager { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.pager-btn { min-width: 36px; height: 36px; padding: 0 10px; display: inline-grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); background: #fff; font-weight: 700; font-size: 13px; color: var(--text); }
.pager-btn:hover { border-color: var(--orange-400); color: var(--orange-600); }
.pager-btn.active { background: linear-gradient(135deg, var(--orange-500), var(--orange-600)); color: #fff; border-color: transparent; }
.pager-btn.disabled { opacity: .4; pointer-events: none; }
.pager-dots { padding: 0 4px; color: var(--muted); }

/* ---------- Grid de 4 gráficos (responsivo) ---------- */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}
.chart-card {
    padding: 18px 20px 20px;
    position: relative; overflow: hidden;
    background:
        radial-gradient(120% 100% at 100% 0%, rgba(249,115,22,.05), transparent 60%),
        var(--card);
}
.chart-card::before {
    content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px;
    background: linear-gradient(90deg, var(--orange-500), var(--amber-400));
    opacity: .9;
}
.chart-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.chart-title { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 14.5px; color: var(--text); }
.chart-title .ch-dot { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 10px; box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 0%, transparent); }
.chart-sub { font-size: 11px; font-weight: 700; color: var(--muted); background: #f7efe6; padding: 4px 10px; border-radius: 20px; text-transform: uppercase; letter-spacing: .04em; }

/* ---------- Chart container (evita estiramiento infinito) ---------- */
.chart-box { position: relative; height: 260px; width: 100%; }
.chart-box canvas { position: absolute; inset: 0; }

/* ---------- Donut ---------- */
.donut-wrap { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 0; }
.donut { position: relative; width: 180px; height: 180px; }
.donut canvas { width: 180px !important; height: 180px !important; }
.donut .center { position: absolute; inset: 0; display: grid; place-items: center; flex-direction: column; text-align: center; }
.donut .center .big { font-size: 30px; font-weight: 800; }
.donut .center .small { font-size: 11px; color: var(--muted); }

/* ---------- Tables/mesas ---------- */
.tabs { display: flex; gap: 8px; }
.tab { padding: 8px 18px; border-radius: 20px; font-weight: 700; font-size: 13px; cursor: pointer; border: 1px solid var(--line); color: var(--muted); background: #fff; }
.tab.active { background: linear-gradient(135deg, var(--orange-500), var(--orange-600)); color: #fff; border-color: transparent; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); }
.legend .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; }
.mesas-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 12px; margin-top: 14px; }
.mesa {
    border-radius: 14px; padding: 14px 8px; text-align: center; border: 1.5px solid transparent;
    display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.mesa .m-ico { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; }
.mesa .m-name { font-weight: 700; font-size: 13px; }
.mesa .m-amount { font-size: 11px; font-weight: 800; padding: 2px 10px; border-radius: 20px; }
.mesa.ocupada { background: #fdecef; border-color: #f9d3da; }
.mesa.ocupada .m-ico { background: #fbd5dc; color: var(--red-500); }
.mesa.ocupada .m-amount { background: var(--red-500); color: #fff; }
.mesa.disponible { background: #e9f9f1; border-color: #cfeee0; }
.mesa.disponible .m-ico { background: #cfeee0; color: var(--green-500); }
.mesa.disponible .m-amount { background: #d6f5e6; color: var(--green-500); }
.mesa.reservada { background: #fff5e6; border-color: #ffe6bf; }
.mesa.reservada .m-ico { background: #ffe6bf; color: var(--orange-600); }
.mesa.reservada .m-amount { background: var(--amber-400); color: #7a4a00; }

/* ---------- Herramientas de mesa (gestión) ---------- */
.mesa { position: relative; }
.mesa-tools { display: flex; align-items: center; gap: 4px; margin-top: 8px; width: 100%; justify-content: center; }
.mesa-tools form { margin: 0; }
.mini-sel { font-size: 11px; padding: 4px 6px; border-radius: 8px; border: 1px solid rgba(0,0,0,.12); background: rgba(255,255,255,.7); max-width: 92px; }
.icon-btn.xs { width: 26px; height: 26px; border-radius: 8px; }

/* ---------- Best sellers ---------- */
.rank-item { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--line); }
.rank-item:last-child { border-bottom: none; }
.rank-badge { width: 26px; height: 26px; border-radius: 8px; background: #f7efe6; color: var(--violet-700); font-weight: 800; font-size: 12px; display: grid; place-items: center; flex: 0 0 26px; }
.rank-thumb { width: 44px; height: 44px; border-radius: 10px; background: #f7ecef; display: grid; place-items: center; color: #d9a9b6; flex: 0 0 44px; }
.rank-info { flex: 1; }
.rank-info .n { font-weight: 700; font-size: 13.5px; }
.rank-info .u { font-size: 12px; color: var(--muted); }
.rank-trophy { color: var(--amber-400); }

/* ---------- Login ---------- */
.login-wrap {
    min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr;
    background: var(--bg);
}
.login-aside {
    background: linear-gradient(160deg, var(--violet-700) 0%, var(--violet-900) 100%);
    color: #fff; padding: 60px; display: flex; flex-direction: column; justify-content: center;
    position: relative; overflow: hidden;
}
.login-aside::after {
    content: ""; position: absolute; right: -80px; bottom: -80px; width: 320px; height: 320px;
    background: radial-gradient(circle, rgba(249,115,22,.5), transparent 70%); border-radius: 50%;
}
.login-aside .badge { font-size: 44px; margin-bottom: 20px; }
.login-aside h2 { font-family: var(--font-display); font-size: 37px; font-weight: 700; margin: 0 0 14px; line-height: 1.15; letter-spacing: -.01em; }
.login-aside p { color: #f0e2d4; font-size: 15px; max-width: 420px; }
.login-features { margin-top: 30px; display: flex; flex-direction: column; gap: 12px; }
.login-features .lf { display: flex; align-items: center; gap: 10px; font-size: 14px; color: #f0e7db9ff; }
.login-features .lf .chk { width: 22px; height: 22px; border-radius: 50%; background: rgba(255,255,255,.15); display: grid; place-items: center; color: var(--amber-400); }

.login-form-side { display: grid; place-items: center; padding: 40px; }
.login-card { width: 100%; max-width: 400px; }
.login-card .lc-logo {
    width: 60px; height: 60px; border-radius: 16px; margin: 0 auto 18px;
    background: linear-gradient(135deg, var(--orange-500), var(--pink-500));
    display: grid; place-items: center; font-size: 30px;
}
.login-card h1 { text-align: center; font-family: var(--font-display); font-size: 26px; font-weight: 700; margin: 0 0 4px; }
.login-card .subtitle { text-align: center; color: var(--muted); margin: 0 0 26px; font-size: 14px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12.5px; font-weight: 700; margin-bottom: 6px; color: #4a4d68; }
.field input[type=email], .field input[type=password], .field input[type=text] {
    width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px;
    font-size: 14px; outline: none; transition: border .15s, box-shadow .15s;
}
.field input:focus { border-color: var(--violet-500); box-shadow: 0 0 0 3px rgba(234,88,12,.16); }
.field.row { display: flex; align-items: center; justify-content: space-between; font-size: 13px; }
.field.row label { display: inline-flex; align-items: center; gap: 7px; margin: 0; font-weight: 500; color: var(--muted); }
.btn-login {
    width: 100%; padding: 13px; border: none; border-radius: 12px; cursor: pointer;
    background: linear-gradient(135deg, var(--orange-500), var(--orange-600));
    color: #fff; font-weight: 800; font-size: 15px; box-shadow: 0 10px 24px rgba(234,88,12,.35);
    transition: transform .1s;
}
.btn-login:hover { transform: translateY(-1px); }
.alert { background: #fdecec; color: #b91c1c; border: 1px solid #f5c2c2; padding: 10px 14px; border-radius: 10px; font-size: 13px; margin-bottom: 16px; }
.demo-box { margin-top: 22px; background: #f9f3ec; border: 1px dashed #e7d4c0; border-radius: 12px; padding: 14px; font-size: 12.5px; color: #7a5a44; }
.demo-box b { color: var(--violet-700); }

/* ---------- Placeholder module ---------- */
.placeholder-hero { display: grid; place-items: center; text-align: center; padding: 70px 20px; }
.placeholder-hero .ph-ico { width: 90px; height: 90px; border-radius: 24px; background: linear-gradient(135deg, var(--coffee), var(--orange-500)); display: grid; place-items: center; color: #fff; margin-bottom: 22px; }
.placeholder-hero .ph-ico svg { width: 46px; height: 46px; }
.placeholder-hero h2 { font-size: 26px; margin: 0 0 8px; font-weight: 800; }
.placeholder-hero p { color: var(--muted); max-width: 460px; }
.pill { display: inline-block; background: #f7efe6; color: var(--violet-700); padding: 5px 14px; border-radius: 20px; font-size: 12px; font-weight: 700; margin-top: 16px; }

/* ---------- Botón hamburguesa (solo móvil) ---------- */
.menu-toggle {
    display: none; border: 1px solid var(--line); background: #fff; border-radius: 12px;
    width: 42px; height: 42px; cursor: pointer; align-items: center; justify-content: center;
    color: var(--violet-700); box-shadow: var(--shadow-sm); flex: 0 0 42px;
}
.sidebar-overlay {
    display: none; position: fixed; inset: 0; background: rgba(30,15,8,.45); z-index: 40;
}
.sidebar-overlay.show { display: block; }

/* ---------- Impresión (reportes) ---------- */
@media print {
    .sidebar, .topbar, .no-print, .menu-toggle, .sidebar-overlay { display: none !important; }
    .main { display: block; }
    .content { padding: 0 !important; }
    body { background: #fff; }
    .card, .stat { box-shadow: none !important; border: 1px solid #e5ded3 !important; break-inside: avoid; }
    .charts-grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1280px) {
    .cols-2 { grid-template-columns: 1fr; }
}
@media (max-width: 1024px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .charts-grid { grid-template-columns: 1fr; }
    .login-wrap { grid-template-columns: 1fr; }
    .login-aside { display: none; }
    .form-grid { grid-template-columns: 1fr; }
    .modules-panel { position: static; max-height: none; }
    .pos-layout { grid-template-columns: 1fr; }
    .pos-cart { position: static; max-height: none; order: -1; }
    .deliv-board { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
    .deliv-board { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
    :root { --sidebar-w: 240px; }
    .sidebar { position: fixed; left: calc(-1 * var(--sidebar-w) - 10px); top: 0; z-index: 50; transition: left .22s ease; box-shadow: 0 0 40px rgba(0,0,0,.3); }
    .sidebar.open { left: 0; }
    .menu-toggle { display: inline-flex; }
    .topbar { padding: 16px 18px 8px; gap: 12px; }
    .topbar .greeting h1 { font-size: 20px; }
    .search { width: auto; flex: 1; max-width: 320px; }
}
@media (max-width: 560px) {
    .stats-grid { grid-template-columns: 1fr; }
    .content { padding: 10px 14px 32px; }
    .search { display: none; }
    .topbar .greeting h1 { font-size: 18px; }
    .goal { flex-direction: column; align-items: stretch; }
    .goal .progress { width: 100%; }
    .chart-box { height: 240px; }
    .tabs { flex-wrap: wrap; }
    .legend { flex-wrap: wrap; }
    .user-chip span { display: none; }
    .ff-grid { grid-template-columns: 1fr; }
    .empresas-grid { grid-template-columns: 1fr; }
}
