/* ================================================================
   POPAS BISTRO — Admin
   Interfață curată, luminoasă, cu accentele de brand (jar/aur/brad).
   ================================================================ */
:root {
  --ink:    #1c1614;
  --muted:  #6b6058;
  --line:   #e7e0d4;
  --bg:     #f4f0e8;
  --panel:  #ffffff;
  --ember:  #c0341d;
  --gold:   #c98a1f;
  --pine:   #2f4a36;
  --ok-bg:  #e7f3ea; --ok-fg: #1f6b3a;
  --err-bg: #fdeae7; --err-fg: #a32414;
  --radius: 14px;
}
* { box-sizing: border-box; }
body {
  margin: 0; font-family: 'Nunito Sans', system-ui, sans-serif;
  background: var(--bg); color: var(--ink); line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: 'Fraunces', serif; }
a { color: var(--ember); }
code { background: rgba(0,0,0,.06); padding: .1em .4em; border-radius: 5px; font-size: .9em; }

/* ===== LOGIN ===== */
.login-page {
  min-height: 100vh; display: grid; place-items: center; padding: 1.5rem;
  background:
    radial-gradient(120% 70% at 50% -10%, rgba(201,138,31,.15), transparent 55%),
    linear-gradient(180deg, #20342a, #161210);
}
.login-card {
  width: min(400px, 100%); background: var(--panel); border-radius: 20px;
  padding: 2.4rem 2rem; box-shadow: 0 24px 60px rgba(0,0,0,.4); text-align: center;
}
.login-logo { height: 80px; margin: 0 auto 1rem; display: block; }
.login-card h1 { font-size: 1.5rem; margin: 0 0 .3rem; }
.login-sub { color: var(--muted); font-size: .9rem; margin: 0 0 1.4rem; }
.login-card label { text-align: left; }
.login-back { display: inline-block; margin-top: 1rem; color: var(--muted); text-decoration: none; font-size: .9rem; }
.login-back:hover { color: var(--ember); }

/* ===== LAYOUT ===== */
.admin { display: flex; min-height: 100vh; }
.sidebar {
  width: 230px; flex-shrink: 0; background: var(--ink); color: #f6efe2;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.sidebar-brand { padding: 1.4rem 1.2rem; border-bottom: 1px solid rgba(246,239,226,.1); display: block; }
.sidebar-brand img { height: 54px; width: auto; filter: drop-shadow(0 3px 6px rgba(0,0,0,.5)); }
.sidebar-nav { display: flex; flex-direction: column; padding: 1rem .7rem; gap: .2rem; flex: 1; }
.sidebar-nav a {
  display: flex; align-items: center; gap: .7rem; padding: .7rem .9rem; border-radius: 10px;
  color: rgba(246,239,226,.82); text-decoration: none; font-weight: 700; font-size: .95rem; transition: background .15s, color .15s;
}
.sidebar-nav a span { width: 1.3em; text-align: center; opacity: .9; }
.sidebar-nav a:hover { background: rgba(246,239,226,.08); color: #fff; }
.sidebar-nav a.active { background: var(--ember); color: #fff; }
.sidebar-foot { padding: 1rem 1.2rem; border-top: 1px solid rgba(246,239,226,.1); display: flex; align-items: center; justify-content: space-between; }
.sidebar-user { font-size: .85rem; color: rgba(246,239,226,.7); }
.sidebar-logout { color: #f2c66b; text-decoration: none; font-weight: 700; font-size: .9rem; }
.sidebar-toggle { display: none; position: fixed; top: .8rem; left: .8rem; z-index: 50; background: var(--ink); color: #fff; border: 0; width: 44px; height: 44px; border-radius: 10px; font-size: 1.3rem; cursor: pointer; }

.content { flex: 1; padding: 1.8rem clamp(1rem, 4vw, 2.6rem) 3rem; max-width: 1200px; width: 100%; margin: 0 auto; }
.content-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.4rem; flex-wrap: wrap; }
.content-head h1 { font-size: clamp(1.5rem, 4vw, 2.1rem); margin: 0; }
.btn-link { color: var(--muted); text-decoration: none; font-weight: 700; font-size: .9rem; }
.btn-link:hover { color: var(--ember); }
.page-lead { color: var(--muted); margin: -.4rem 0 1.4rem; max-width: 60ch; }

/* ===== ALERTE ===== */
.alert { padding: .8rem 1.1rem; border-radius: 10px; margin-bottom: 1rem; font-weight: 600; font-size: .95rem; }
.alert-ok  { background: var(--ok-bg);  color: var(--ok-fg); }
.alert-err { background: var(--err-bg); color: var(--err-fg); }

/* ===== STATS ===== */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1.6rem; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem 1.5rem; text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: .2rem; transition: transform .15s, box-shadow .15s; }
.stat:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(28,22,20,.1); }
.stat-num { font-family: 'Fraunces', serif; font-weight: 900; font-size: 2.4rem; color: var(--pine); line-height: 1; }
.stat-label { color: var(--muted); font-weight: 700; font-size: .9rem; }

/* ===== PANELS ===== */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; margin-bottom: 1.4rem; }
.panel h2 { font-size: 1.3rem; margin: 0 0 1rem; }
.cols { display: grid; grid-template-columns: minmax(320px, 420px) 1fr; gap: 1.4rem; align-items: start; }

/* ===== QUICK GRID ===== */
.quick-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .9rem; }
.quick { display: flex; flex-direction: column; gap: .25rem; padding: 1.1rem 1.2rem; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: inherit; transition: border-color .15s, background .15s; }
.quick:hover { border-color: var(--gold); background: #fffdf8; }
.quick strong { font-size: 1.02rem; }
.quick span { color: var(--muted); font-size: .88rem; }

/* ===== FORMS ===== */
label { display: block; font-weight: 700; font-size: .9rem; margin-bottom: .9rem; color: #3a322d; }
.hint { font-weight: 600; color: var(--muted); font-size: .82em; }
input[type=text], input[type=password], input[type=number], input[type=date], select, textarea {
  width: 100%; margin-top: .35rem; padding: .7rem .85rem; border: 1.5px solid var(--line);
  border-radius: 10px; font: inherit; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,138,31,.15); }
textarea { resize: vertical; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.checks { display: flex; gap: 1.4rem; flex-wrap: wrap; margin-bottom: 1rem; }
.check { display: flex; align-items: center; gap: .5rem; margin-bottom: 0; font-weight: 600; }
.check input { width: auto; margin: 0; }
.img-preview { max-width: 160px; border-radius: 10px; border: 1px solid var(--line); margin: -.3rem 0 1rem; }
.form-actions { display: flex; gap: .7rem; align-items: center; flex-wrap: wrap; }
.soft { border: 0; border-top: 1px dashed var(--line); margin: 1.4rem 0; }
details summary { cursor: pointer; font-weight: 700; color: var(--ember); margin-bottom: .8rem; }
.mini-form { display: flex; flex-wrap: wrap; gap: .6rem; }
.mini-form input { width: auto; flex: 1; min-width: 140px; margin-top: 0; }

.btn-primary { background: var(--ember); color: #fff; border: 0; padding: .75rem 1.5rem; border-radius: 999px; font-weight: 800; font-size: .95rem; cursor: pointer; transition: background .15s, transform .12s; }
.btn-primary:hover { background: var(--ember-deep, #9a2715); transform: translateY(-1px); }
.btn-secondary { background: #efe9dd; color: var(--ink); border: 0; padding: .75rem 1.3rem; border-radius: 999px; font-weight: 800; font-size: .95rem; cursor: pointer; text-decoration: none; }
.btn-secondary:hover { background: #e5ddcb; }

/* ===== LISTE PRODUSE ===== */
.list-cat { font-size: 1.05rem; color: var(--pine); margin: 1.3rem 0 .6rem; display: flex; align-items: center; gap: .5rem; }
.list-cat .count { background: rgba(47,74,54,.1); color: var(--pine); font-family: 'Nunito Sans'; font-size: .78rem; font-weight: 800; padding: .1rem .5rem; border-radius: 20px; }
.list-cat:first-of-type { margin-top: 0; }
.prod-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.prod-row { display: grid; grid-template-columns: 48px 1fr auto auto; gap: .9rem; align-items: center; padding: .6rem .7rem; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.prod-row.inactiv { opacity: .55; }
.prod-thumb { width: 48px; height: 48px; border-radius: 9px; overflow: hidden; background: #f1ece1; display: grid; place-items: center; color: var(--muted); }
.prod-thumb img { width: 100%; height: 100%; object-fit: cover; }
.prod-info { min-width: 0; }
.prod-info strong { display: block; font-size: .98rem; }
.prod-meta { display: block; color: var(--muted); font-size: .83rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prod-price { font-family: 'Fraunces', serif; font-weight: 900; color: var(--ember); white-space: nowrap; }
.prod-actions { display: flex; gap: .35rem; }
.ic-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line); background: #fff; cursor: pointer; text-decoration: none; color: var(--ink); font-size: 1rem; }
.ic-btn:hover { border-color: var(--gold); }
.ic-del:hover { border-color: var(--ember); color: var(--ember); }
.badge { display: inline-block; font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; background: rgba(201,138,31,.18); color: var(--gold); padding: .1rem .45rem; border-radius: 5px; vertical-align: middle; margin-left: .3rem; }
.badge-off { background: rgba(0,0,0,.08); color: var(--muted); }
.empty { color: var(--muted); font-style: italic; padding: .4rem 0; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .cols { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
  .quick-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .sidebar { position: fixed; left: 0; top: 0; transform: translateX(-100%); transition: transform .25s ease; z-index: 40; box-shadow: 4px 0 30px rgba(0,0,0,.3); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-toggle { display: block; }
  .content { padding-top: 4rem; }
}
