:root{
  --wine-dark:#5a1420;
  --wine:#7a1f2b;
  --wine-light:#a8384a;
  --cream:#faf6f0;
  --cream2:#f2e9dd;
  --ink:#2b2320;
  --muted:#8a7d73;
  --gold:#c9a24b;
  --radius:16px;
  --shadow: 0 6px 20px rgba(90,20,32,0.12);
}

*{box-sizing:border-box;}
html,body{margin:0;padding:0;height:100%;}
body{
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  background: var(--cream);
  color: var(--ink);
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: contain;
}

.hidden{display:none !important;}

/* HEADER (topbar + filterbar) sticks together as one block, so we never have to
   guess the topbar's height for the filterbar's sticky offset — it just works
   at any width, including when the topbar wraps to two lines on narrow tablets. */
#stickyHeader{position:sticky; top:0; z-index:50;}

/* TOPBAR */
.topbar{
  display:flex; align-items:center; gap:16px;
  padding:12px 20px;
  background: linear-gradient(120deg, var(--wine-dark), var(--wine));
  color:#fff;
  flex-wrap:wrap;
}
.brand{display:flex; align-items:center; gap:12px; min-width:0;}
.brand-logo{height:56px; width:auto; flex-shrink:0; border-radius:8px; background:#fff; padding:4px 8px;}
.brand-mark{
  width:44px; height:44px; border-radius:50%;
  background:var(--gold); color:#3c2a10; font-weight:800;
  align-items:center; justify-content:center; font-size:14px;
  flex-shrink:0;
}
.brand-text span{font-size:13px; opacity:.9; white-space:nowrap;}
.sr-only{
  position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden;
  clip:rect(0,0,0,0); white-space:nowrap; border:0;
}
.search-wrap{flex:1 1 200px; min-width:160px;}
.search-wrap input{
  width:100%; padding:12px 16px; border-radius:24px; border:none;
  font-size:15px; background:rgba(255,255,255,0.92); color:var(--ink);
}
.topbar-actions{display:flex; gap:8px; flex-wrap:wrap;}
.pill-btn{
  border:1px solid rgba(255,255,255,0.5); background:rgba(255,255,255,0.08);
  color:#fff; padding:10px 16px; border-radius:24px; font-size:14px; cursor:pointer;
  min-height:40px; white-space:nowrap;
}
.pill-btn:active{background:rgba(255,255,255,0.25);}

/* VIEW SWITCH (Vinos / Comida) */
.view-switch{
  display:flex; gap:4px; background:rgba(0,0,0,0.18); border-radius:24px; padding:4px; flex-shrink:0;
}
.view-switch-btn{
  border:none; background:transparent; color:rgba(255,255,255,0.75); padding:9px 16px;
  border-radius:20px; font-size:14px; font-weight:600; cursor:pointer; white-space:nowrap;
  transition: background .15s ease, color .15s ease;
}
.view-switch-btn.active{background:var(--gold); color:#3c2a10;}

/* LANGUAGE SWITCH (ES / EN / IT) */
.lang-switch{
  display:flex; gap:2px; background:rgba(0,0,0,0.18); border-radius:20px; padding:3px; flex-shrink:0;
}
.lang-switch-btn{
  border:none; background:transparent; color:rgba(255,255,255,0.7); padding:7px 10px;
  border-radius:16px; font-size:12.5px; font-weight:700; cursor:pointer; letter-spacing:.3px;
  transition: background .15s ease, color .15s ease;
}
.lang-switch-btn.active{background:#fff; color:var(--wine-dark);}

/* HERO BANNER (imagen tipo carta impresa) */
.hero-banner{
  position:relative; width:100%; height:180px; overflow:hidden; background:var(--wine-dark);
}
.hero-banner-img{
  width:100%; height:100%; object-fit:cover; display:block; opacity:.88;
}
.hero-banner-caption{
  position:absolute; inset:0; display:flex; align-items:center; justify-content:center;
  background:linear-gradient(180deg, rgba(43,20,14,0.15), rgba(43,20,14,0.55));
  text-align:center; padding:12px;
}
.script-title{
  font-family:'Alex Brush', cursive; color:#fdf6ea; font-size:44px; line-height:1.1;
  text-shadow:0 2px 10px rgba(0,0,0,0.45); letter-spacing:.5px;
}

/* FOOD FILTER BAR (mismos estilos que .filterbar, ligeros ajustes) */
.food-filterbar{padding-bottom:14px;}
.food-search-wrap{flex-basis:100%; margin-top:8px;}
.food-search-wrap input{
  width:100%; padding:12px 16px; border-radius:24px; border:1px solid #d9c9b0;
  font-size:15px; background:#fff; color:var(--ink);
}

/* FOOD GRID + DISH CARDS (calcado de .wine-grid / .wine-card) */
.food-grid{
  padding:20px; display:grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap:18px;
}
.food-category-heading{
  grid-column:1 / -1; margin:8px 0 -4px; font-family:'Playfair Display', serif; font-weight:700;
  font-size:20px; color:var(--wine-dark); border-bottom:2px solid var(--gold); padding-bottom:6px;
}
.food-category-heading:first-child{margin-top:0;}
.dish-card{
  background:#fff; border-radius:var(--radius); box-shadow:var(--shadow);
  overflow:hidden; cursor:pointer; display:flex; flex-direction:column;
  transition: transform .12s ease; border:1px solid #f0e4d3;
}
.dish-card:active{transform:scale(.98);}
.dish-card-img{
  width:100%; aspect-ratio:3/4; background:var(--cream2) url('icons/dish-placeholder.svg') center/40% no-repeat;
  overflow:hidden; position:relative;
}
.dish-card-img img{width:100%; height:100%; object-fit:cover;}
.dish-card-badges{position:absolute; top:8px; left:8px; display:flex; flex-direction:column; gap:5px;}
.dish-card-body{padding:12px 14px 14px; display:flex; flex-direction:column; gap:4px; flex:1;}
.dish-card-name{font-size:15.5px; font-weight:700; margin:0; line-height:1.25; font-family:'Playfair Display', serif;}
.dish-card-desc{font-size:12.5px; color:var(--muted); line-height:1.4;}
.dish-card-price{margin-top:auto; padding-top:8px; font-weight:800; color:var(--wine-dark); font-size:16px;}
.dish-detail-img{
  width:180px; height:240px; border-radius:14px; background:var(--cream2) url('icons/dish-placeholder.svg') center/35% no-repeat;
  overflow:hidden; flex-shrink:0;
}
.dish-detail-img img{width:100%; height:100%; object-fit:cover;}
.dish-detail-img.zoomable{cursor:zoom-in;}

/* FILTER BAR */
.filterbar{
  background:var(--cream2);
  padding:12px 20px; border-bottom:1px solid #e6d9c6;
}
.filter-row{display:flex; gap:8px; flex-wrap:wrap; margin-bottom:8px;}
.filter-row:last-child{margin-bottom:0;}
.chip{
  padding:9px 16px; border-radius:20px; border:1.5px solid var(--wine);
  background:transparent; color:var(--wine); font-size:14px; cursor:pointer; font-weight:600;
}
.chip.active{background:var(--wine); color:#fff;}
.chip-nuevo{border-color:#2f7a4f; color:#2f7a4f;}
.chip-nuevo.active{background:#2f7a4f; color:#fff;}
.chip-promo{border-color:#b8862f; color:#b8862f;}
.chip-promo.active{background:#b8862f; color:#fff;}
.filter-row-secondary select{
  padding:10px 12px; border-radius:10px; border:1px solid #d9c9b0; background:#fff;
  font-size:14px; color:var(--ink);
}
.text-btn{
  background:none; border:none; color:var(--wine); font-size:14px; cursor:pointer;
  text-decoration:underline; font-weight:600;
}

/* WINE GRID */
.wine-grid{
  padding:20px; display:grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap:18px;
}
.wine-card{
  background:#fff; border-radius:var(--radius); box-shadow:var(--shadow);
  overflow:hidden; cursor:pointer; display:flex; flex-direction:column;
  transition: transform .12s ease;
  border:1px solid #f0e4d3;
}
.wine-card:active{transform:scale(.98);}
.wine-card-img{
  width:100%; aspect-ratio:3/4; background:#f5eee2 url('icons/bottle-placeholder.svg') center/50% no-repeat;
  display:flex; align-items:center; justify-content:center; overflow:hidden; position:relative;
}
.wine-card-img img{width:100%; height:100%; object-fit:contain;}
.wine-card-badges{position:absolute; top:8px; left:8px; display:flex; flex-direction:column; gap:5px; pointer-events:none;}
.badge-new{
  background:#2f7a4f; color:#fff; font-size:10.5px; font-weight:700; padding:4px 9px;
  border-radius:12px; letter-spacing:.3px; text-transform:uppercase; display:inline-block;
}
.badge-promo{
  background:#b8862f; color:#fff; font-size:10.5px; font-weight:700; padding:4px 9px;
  border-radius:12px; letter-spacing:.3px; display:inline-block;
}
.price-original{color:var(--muted); text-decoration:line-through; font-weight:500; font-size:0.85em;}
.price-final{color:#b8862f; font-weight:800;}
.wine-card-body{padding:12px 14px 14px; display:flex; flex-direction:column; gap:4px; flex:1;}
.wine-card-type{
  align-self:flex-start; font-size:11px; font-weight:700; letter-spacing:.4px;
  padding:3px 10px; border-radius:10px; color:#fff; text-transform:uppercase;
}
.type-Espumoso{background:#c9a24b;}
.type-Rosado{background:#d97a9a;}
.type-Blanco{background:#c7b56a;}
.type-Tinto{background:#7a1f2b;}
.wine-card-name{font-size:15.5px; font-weight:700; margin:4px 0 0; line-height:1.25; font-family:'Playfair Display', serif;}
.wine-card-meta{font-size:12.5px; color:var(--muted);}
.wine-card-price{margin-top:auto; padding-top:8px; font-weight:800; color:var(--wine-dark); font-size:16px;}
.wine-card-cta{
  margin-top:8px; width:100%; padding:9px; border-radius:10px; border:1.5px solid var(--wine);
  background:transparent; color:var(--wine); font-weight:700; font-size:13px; cursor:pointer;
  transition: background .12s ease, color .12s ease;
}
.wine-card:hover .wine-card-cta, .wine-card:active .wine-card-cta{background:var(--wine); color:#fff;}

.empty-state{text-align:center; color:var(--muted); padding:40px; font-size:16px;}

.price-disclaimer{
  text-align:center; font-size:11.5px; color:var(--muted); padding:14px 16px 22px; font-style:italic;
}
.price-disclaimer-inline{font-size:11px; color:var(--muted); font-style:italic; margin-top:2px;}

/* MODAL */
.modal{
  position:fixed; inset:0; background:rgba(30,15,10,0.55); z-index:100;
  display:flex; align-items:center; justify-content:center; padding:16px;
}
.modal-content{
  background:#fff; border-radius:20px; padding:24px; max-width:640px; width:100%;
  max-height:88vh; overflow-y:auto; position:relative; box-shadow:0 20px 60px rgba(0,0,0,0.3);
}
.modal-narrow{max-width:380px;}
.modal-close{
  position:absolute; top:14px; right:16px; font-size:26px; border:none; background:none;
  cursor:pointer; color:var(--muted); line-height:1;
}
.wine-modal-content{max-width:720px;}

.wine-detail{display:flex; flex-direction:column; gap:14px;}
.wine-detail-top{display:flex; gap:20px; flex-wrap:wrap;}
.wine-detail-img{
  width:180px; height:240px; border-radius:14px; background:#f5eee2 url('icons/bottle-placeholder.svg') center/45% no-repeat;
  overflow:hidden; flex-shrink:0;
}
.wine-detail-img img{width:100%; height:100%; object-fit:contain;}
.wine-detail-img.zoomable{cursor:zoom-in;}

/* LIGHTBOX */
.lightbox-modal{z-index:200; background:rgba(20,10,8,0.88);}
.lightbox-content{
  background:transparent; box-shadow:none; padding:0; max-width:min(90vw, 560px);
  max-height:90vh; display:flex; align-items:center; justify-content:center;
}
.lightbox-content img{max-width:100%; max-height:90vh; border-radius:14px; box-shadow:0 20px 60px rgba(0,0,0,0.5); object-fit:contain;}
.lightbox-close{color:#fff; top:-6px; right:-6px; background:rgba(0,0,0,0.4); border-radius:50%; width:34px; height:34px;}
.wine-detail-info h2{margin:0 0 6px; font-size:22px; font-family:'Playfair Display', serif;}
.wine-detail-info p{margin:2px 0; color:var(--muted); font-size:14px;}
.wine-detail-price{font-size:24px; font-weight:800; color:var(--wine-dark); margin-top:8px;}
.wine-detail-desc{font-size:14px; line-height:1.5; color:#4a3f38;}

.profile-box{
  background:#fff; border-radius:14px; padding:16px; border:1px solid #f0e4d3; box-shadow:var(--shadow);
}
.profile-box h3{margin:0 0 8px; color:var(--wine-dark); font-size:16px;}
.profile-notas{font-size:14px; line-height:1.5; color:#4a3f38; margin:0 0 6px;}
.profile-caption{font-size:11.5px; color:var(--muted); font-style:italic; margin:0 0 14px;}
.profile-meters{
  display:grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap:14px 18px;
  padding:14px; background:var(--cream); border-radius:12px; margin-bottom:14px;
}
.profile-grid{
  display:grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap:14px;
}
.profile-item{display:flex; flex-direction:column; gap:4px;}
.profile-label{font-size:11.5px; font-weight:700; color:var(--muted); text-transform:uppercase; letter-spacing:.3px;}
.profile-value{font-size:13.5px; font-weight:700; color:var(--ink);}
.body-meter{display:flex; gap:4px; margin:2px 0;}
.body-dot{width:13px; height:13px; border-radius:50%; background:#e6d9c6; display:inline-block;}
.body-dot.filled{background:var(--wine);}

.tasting-box{
  background:#fff; border-radius:14px; padding:16px; border:1px solid #f0e4d3; box-shadow:var(--shadow);
  margin-top:14px;
}
.tasting-box h3{margin:0 0 6px; color:var(--wine-dark); font-size:16px;}
.tasting-caption{font-size:11.5px; color:var(--muted); font-style:italic; margin:0 0 12px;}
.tasting-rows{display:flex; flex-direction:column; gap:10px;}
.tasting-row{
  display:grid; grid-template-columns:90px 1fr; gap:10px; align-items:start;
  padding:8px 10px; background:var(--cream); border-radius:10px;
}
.tasting-label{font-size:12.5px; font-weight:700; color:var(--wine-dark); white-space:nowrap;}
.tasting-text{font-size:13.5px; line-height:1.5; color:#4a3f38;}
.tasting-source{font-size:11px; color:var(--muted); font-style:italic; margin:10px 0 0; text-align:right;}

.pairing-box{
  background:var(--cream2); border-radius:14px; padding:16px; border:1px dashed var(--gold);
  margin-top:14px;
}
.pairing-box h3{margin:0 0 10px; color:var(--wine-dark); font-size:16px;}
.pairing-dish{
  display:flex; justify-content:space-between; gap:10px; padding:8px 0;
  border-bottom:1px solid #e6d9c6; font-size:14px;
}
.pairing-dish:last-child{border-bottom:none;}
.pairing-dish-name{font-weight:700;}
.pairing-dish-cat{font-size:11.5px; color:var(--muted);}
.pairing-empty{color:var(--muted); font-size:13.5px;}

/* PAIRING MODE (dish -> wine) */
#pairingDishSearch{
  width:100%; padding:12px 14px; border-radius:12px; border:1px solid #d9c9b0; margin:12px 0; font-size:15px;
}
.dish-pick-list{max-height:220px; overflow-y:auto; border:1px solid #eee; border-radius:10px;}
.dish-pick-item{padding:10px 14px; border-bottom:1px solid #f0f0f0; cursor:pointer; font-size:14px;}
.dish-pick-item:hover{background:#faf3ea;}
.dish-pick-item small{display:block; color:var(--muted);}

/* ADMIN */
.admin-panel{
  position:fixed; inset:0; background:var(--cream); z-index:90; overflow-y:auto; padding:20px;
}
.admin-header{display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:10px; margin-bottom:14px;}
.admin-header h2{margin:0; color:var(--wine-dark);}
.admin-tabs{display:flex; gap:8px; margin-bottom:16px; flex-wrap:wrap;}
.admin-tab{
  padding:10px 18px; border-radius:20px; border:1.5px solid var(--wine); background:#fff; color:var(--wine);
  cursor:pointer; font-weight:600; font-size:14px;
}
.admin-tab.active{background:var(--wine); color:#fff;}
.admin-table-wrap{overflow-x:auto; background:#fff; border-radius:12px; box-shadow:var(--shadow);}
.admin-table{width:100%; border-collapse:collapse; font-size:13.5px;}
.admin-table th, .admin-table td{padding:10px 12px; text-align:left; border-bottom:1px solid #f0e9dd;}
.admin-table img{width:40px; height:40px; object-fit:cover; border-radius:6px; background:#f5eee2;}
.admin-table button{background:none; border:none; color:var(--wine); cursor:pointer; font-size:13px; text-decoration:underline;}
.admin-table tr.row-oculto{opacity:.55;}
.status-pill{display:inline-block; padding:3px 10px; border-radius:12px; font-size:11.5px; font-weight:700; letter-spacing:.2px;}
.status-visible{background:#e4f3e9; color:#2f7a4f;}
.status-oculto{background:#f3e4e4; color:#a13a3a;}
.settings-block{background:#fff; padding:18px; border-radius:14px; margin-bottom:16px; box-shadow:var(--shadow); max-width:420px;}
.settings-block h3{margin-top:0;}
.settings-block input{width:100%; padding:10px; margin:8px 0; border-radius:8px; border:1px solid #d9c9b0;}
#dishBatchImgBlock, #invSummaryBlock, #poBlock{max-width:100%;}
.inv-filter-row{display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin:8px 0;}
.inv-filter-row input, .inv-filter-row select{width:auto; margin:0 !important; padding:8px 10px;}
.inv-filter-row .checkbox-label{margin:0;}
.invStockInput, .invMinInput, .invBulkQtyInput, .poQtyInput{width:70px; padding:6px 8px !important; margin:0 !important;}
#btnSaveAllInvStock{margin-top:12px;}
.po-provider-block{margin-top:14px;}
.po-provider-block h4{margin:0 0 6px; color:var(--wine-dark); display:flex; align-items:center; gap:10px;}
.recvQtyInput{width:70px; padding:6px 8px !important; margin:0 !important;}
.auto-import-banner{background:#f5eee2; border:1px solid #e8dcc8; border-radius:10px; padding:10px 14px; margin-bottom:12px; display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap;}
.auto-import-banner p{margin:0;}
.pending-order-block{padding:14px 0; border-bottom:1px solid #e8dcc8;}
.pending-order-block:last-child{border-bottom:none;}
.pending-order-block h3{margin:0 0 4px; color:var(--wine-dark); font-size:16px;}
.po-provider-received{opacity:0.7;}
.po-provider-received h4{margin:0;}
.batch-img-row{display:flex; align-items:center; gap:12px; padding:8px 0; border-bottom:1px solid #f0e9dd;}
.batch-img-row img{width:52px; height:52px; object-fit:cover; border-radius:8px; background:#f5eee2; flex-shrink:0;}
.batch-img-row .batch-img-filename{font-size:12px; color:#8a7a68; word-break:break-all; max-width:180px;}
.batch-img-row select{width:auto; min-width:220px; padding:8px 10px; border-radius:8px; border:1px solid #d9c9b0; font-size:13.5px;}
.batch-img-row .batch-img-score{font-size:11px; font-weight:700; padding:3px 8px; border-radius:10px; flex-shrink:0;}
.batch-img-score-good{background:#e4f3e9; color:#2f7a4f;}
.batch-img-score-unsure{background:#fff3e0; color:#a1752f;}
.batch-img-score-none{background:#f3e4e4; color:#a13a3a;}

/* FORMS */
form label{display:block; font-size:13.5px; font-weight:600; margin:12px 0 4px; color:#4a3f38;}
form input[type=text], form input[type=number], form input[type=password], form input[type=search], form select, form textarea{
  width:100%; padding:10px 12px; border-radius:10px; border:1px solid #d9c9b0; font-size:14.5px; font-family:inherit;
}
.form-fieldset{
  border:1px solid #e6d9c6; border-radius:12px; padding:6px 14px 14px; margin-top:16px; background:var(--cream2);
}
.form-fieldset legend{font-size:12.5px; font-weight:700; color:var(--wine-dark); padding:0 6px;}
.ai-fieldset{background:#eef4f0; border-color:#bfd9c8;}
.ai-fieldset textarea{background:#fff; font-size:12.5px; color:#4a3f38;}
.ai-ref-row{display:flex; align-items:center; gap:10px; margin-top:10px; flex-wrap:wrap;}
.checkbox-label{display:flex !important; align-items:center; gap:8px; font-weight:600;}
.checkbox-label input{width:auto !important;}
.form-grid-2{display:grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap:0 14px;}
.tag-checks{display:flex; flex-wrap:wrap; gap:8px; margin-top:6px;}
.tag-checks label{
  display:flex; align-items:center; gap:6px; font-weight:400; margin:0;
  background:var(--cream2); padding:6px 10px; border-radius:8px; font-size:12.5px;
}
.tag-checks input{width:auto;}
.dish-checks{
  max-height:220px; overflow-y:auto; background:#fff; border:1px solid #e6d9c6; border-radius:10px; padding:10px;
}
.dish-checks label{width:100%; background:none; padding:6px 4px; border-bottom:1px solid #f4ede0; border-radius:0;}
.dish-checks label:last-child{border-bottom:none;}
.bank-search-results{
  margin-top:8px; max-height:200px; overflow-y:auto; background:#fff; border:1px solid #bfd9c8; border-radius:10px;
}
.bank-search-result{
  display:flex; justify-content:space-between; align-items:center; gap:10px; width:100%;
  padding:8px 10px; border-bottom:1px solid #f4ede0; background:none; text-align:left; cursor:pointer; font-size:12.5px; color:#2b2320;
}
.bank-search-result:last-child{border-bottom:none;}
.bank-search-result:hover{background:#eef4f0;}
.bank-search-result .brs-tag{
  font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.2px; padding:2px 7px; border-radius:8px; flex-shrink:0;
}
.bank-search-result .brs-tag.oculto{background:#f0e4d3; color:#7a1f2b;}
.bank-search-result .brs-tag.visible{background:#dcefe1; color:#2f7a4f;}
.pairing-badge{
  display:inline-block; font-size:10px; font-weight:700; color:#fff; background:var(--gold);
  padding:2px 8px; border-radius:8px; vertical-align:middle; margin-left:4px; text-transform:uppercase; letter-spacing:.2px;
}
.image-upload-row{display:flex; gap:14px; align-items:center; flex-wrap:wrap;}
.img-preview{
  width:90px; height:90px; object-fit:cover; border-radius:10px; background:#f5eee2 url('icons/bottle-placeholder.svg') center/45% no-repeat;
}
.image-upload-actions{display:flex; flex-direction:column; gap:6px;}
.form-actions{display:flex; gap:10px; margin-top:18px;}

.primary-btn{
  background:var(--wine); color:#fff; border:none; padding:12px 20px; border-radius:10px;
  font-weight:700; font-size:14.5px; cursor:pointer;
}
.danger-btn{
  background:#fff; color:#b12b2b; border:1.5px solid #b12b2b; padding:12px 20px; border-radius:10px;
  font-weight:700; font-size:14.5px; cursor:pointer;
}
.secondary-btn{
  background:#fff; color:var(--wine); border:1.5px solid var(--wine); padding:12px 20px; border-radius:10px;
  font-weight:700; font-size:14.5px; cursor:pointer; margin-right:8px;
}
.inv-count-sheet-actions{margin-top:18px; padding-top:14px; border-top:1px solid #e8dcc8;}
.error-text{color:#b12b2b; font-size:13.5px;}
.muted{color:var(--muted);}
.muted.small{font-size:12px;}

.toast{
  position:fixed; bottom:24px; left:50%; transform:translateX(-50%);
  background:#2b2320; color:#fff; padding:12px 22px; border-radius:24px; font-size:14px; z-index:200;
  box-shadow:0 6px 20px rgba(0,0,0,0.3);
}

#adminEmailInput, #adminPasswordInput{
  width:100%; padding:12px 14px; margin:10px 0; border-radius:10px; border:1px solid #d9c9b0;
  font-size:15px; font-family:inherit; box-sizing:border-box;
}

/* ============ RESPONSIVE ============
   Pensado sobre todo para tablets Android de 9" (ambas orientaciones),
   pero funciona igual de bien en celulares y pantallas más grandes. */

/* Celulares / tablets muy angostas en portrait (~<480px) */
@media (max-width: 480px){
  .topbar{padding:10px 14px; gap:10px;}
  .brand-logo{height:44px;}
  .brand-mark{width:36px; height:36px; font-size:12px;}
  .brand-text span{font-size:10.5px;}
  .search-wrap{flex-basis:100%; order:3;}
  .filterbar{padding:10px 14px;}
  .wine-grid{grid-template-columns: repeat(auto-fill, minmax(148px,1fr)); gap:10px; padding:12px;}
  .wine-card-name{font-size:14px;}
  .modal-content{padding:16px; border-radius:14px;}
  .wine-detail-img{width:130px; height:173px;}
  .tasting-row{grid-template-columns:1fr; gap:2px;}
  .view-switch-btn{padding:8px 11px; font-size:12.5px;}
  .lang-switch-btn{padding:6px 8px; font-size:11px;}
  .hero-banner{height:110px;}
  .script-title{font-size:26px;}
  .food-grid{grid-template-columns: repeat(auto-fill, minmax(148px,1fr)); gap:10px; padding:12px;}
  .dish-card-name{font-size:14px;}
  .dish-detail-img{width:130px; height:173px;}
}

/* Tablets en portrait (~481-820px) — ej. tablet Android 9" vertical */
@media (min-width: 481px) and (max-width: 820px){
  .wine-grid{grid-template-columns: repeat(auto-fill, minmax(180px,1fr)); gap:14px;}
  .search-wrap{flex-basis:100%; order:3; margin-top:2px;}
  .modal-content{max-width:92vw;}
  .hero-banner{height:150px;}
  .script-title{font-size:34px;}
  .food-grid{grid-template-columns: repeat(auto-fill, minmax(180px,1fr)); gap:14px;}
}

/* Tablets en landscape (~821-1180px) — ej. tablet Android 9" horizontal, la
   orientación más común para dejarla apoyada en la mesa */
@media (min-width: 821px) and (max-width: 1180px){
  .wine-grid{grid-template-columns: repeat(auto-fill, minmax(200px,1fr));}
  .wine-modal-content{max-width:85vw;}
  .food-grid{grid-template-columns: repeat(auto-fill, minmax(200px,1fr));}
}

/* Pantallas bajas (tablet en landscape con poca altura visible) */
@media (max-height: 500px){
  .topbar{padding:8px 20px;}
  .brand-logo{height:40px;}
  .filterbar{padding:8px 20px;}
  .filter-row{margin-bottom:6px;}
  .modal-content{max-height:94vh; padding:16px;}
  .hero-banner{height:90px;}
  .script-title{font-size:24px;}
}

/* Pantallas grandes (desktop / monitor de recepción) */
@media (min-width: 1400px){
  .wine-grid{grid-template-columns: repeat(auto-fill, minmax(230px,1fr)); gap:22px; padding:26px;}
  .hero-banner{height:230px;}
  .script-title{font-size:52px;}
  .food-grid{grid-template-columns: repeat(auto-fill, minmax(230px,1fr)); gap:22px; padding:26px;}
}

/* Asegura buen tamaño de toque en pantallas táctiles */
@media (pointer: coarse){
  .chip, .text-btn, .admin-tab{min-height:40px; display:inline-flex; align-items:center;}
  .primary-btn, .danger-btn{min-height:44px;}
}

/* ---------------- CartaVino: pantallas de estado del tenant ---------------- */
.tenant-status-screen{
  min-height:100vh; display:flex; flex-direction:column; align-items:center; justify-content:center;
  text-align:center; padding:40px 20px; background:var(--wine-dark); color:#fdf6ea;
}
.tenant-status-screen h1{ font-size:22px; margin:0 0 10px; }
.tenant-status-screen p{ color:#e7d9d2; max-width:420px; }

/* Hero genérico (sin foto propia todavía): degradado con el color de marca. */
.hero-generic{
  background: linear-gradient(120deg, var(--wine-dark), var(--wine) 60%, var(--gold));
}

/* El logo del restaurante puede no llegar a tiempo del primer paint --
   se muestra oculto por defecto y JS decide logo vs. iniciales. */
.brand-mark{ display:none; }
.brand-mark.shown{ display:flex; }
