/* ============================================================
   Menajere — Design premium, mobile-first
   ============================================================ */

:root {
  /* Palette */
  --ink:          #0f172a;
  --ink-mid:      #334155;
  --ink-muted:    #64748b;
  --ink-faint:    #94a3b8;
  --bg:           #f1f5f9;
  --surface:      #ffffff;
  --border:       #e2e8f0;
  --border-light: #f1f5f9;

  /* Brand — indigo */
  --p:            #4f46e5;
  --p-dark:       #3730a3;
  --p-light:      #e0e7ff;
  --p-mid:        #818cf8;
  --nav-bg:       #1e1b4b;
  --nav-text:     #c7d2fe;
  --nav-active:   #4f46e5;

  /* Semantic */
  --amber:        #f59e0b;
  --amber-dark:   #b45309;
  --amber-bg:     #fffbeb;
  --amber-border: #fde68a;
  --red:          #ef4444;
  --red-dark:     #b91c1c;
  --red-bg:       #fef2f2;
  --red-border:   #fecaca;
  --green:        #10b981;
  --green-bg:     #d1fae5;
  --blue:         #0ea5e9;
  --blue-bg:      #e0f2fe;

  /* Radius */
  --r-sm:   8px;
  --r:      14px;
  --r-lg:   20px;
  --r-pill: 999px;

  /* Shadow */
  --sh-xs:  0 1px 2px rgba(15,23,42,.05);
  --sh:     0 4px 16px rgba(15,23,42,.08);
  --sh-lg:  0 12px 40px rgba(15,23,42,.12);
  --sh-xl:  0 24px 64px rgba(15,23,42,.16);

  /* Motion */
  --ease:   cubic-bezier(.4,0,.2,1);
  --ease-out: cubic-bezier(0,0,.2,1);

  /* Layout */
  --touch:        48px;
  --nav-top-h:    60px;
  --nav-bot-h:    66px;
  --safe-top:     env(safe-area-inset-top, 0px);
  --safe-bot:     env(safe-area-inset-bottom, 0px);
  --safe-l:       env(safe-area-inset-left, 0px);
  --safe-r:       env(safe-area-inset-right, 0px);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  height: 100%;
}
body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  min-height: 100%;
  padding-left: var(--safe-l);
  padding-right: var(--safe-r);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; }
a { color: var(--p); }
button { font-family: inherit; }

/* ============================================================
   TOP BAR
   ============================================================ */
.top-bar {
  position: sticky;
  top: 0;
  z-index: 200;
  height: var(--nav-top-h);
  background: var(--nav-bg);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem 0 1.25rem;
  padding-top: var(--safe-top);
  gap: 1rem;
  box-shadow: 0 2px 12px rgba(0,0,0,.2);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: #fff;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
  flex-shrink: 0;
}
.brand-icon {
  width: 34px;
  height: 34px;
  background: var(--p);
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

/* Desktop-only nav inside top bar */
.desk-nav {
  display: none;
  align-items: center;
  gap: 0.25rem;
  flex: 1;
  padding: 0 1rem;
}
.desk-nav a {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.75rem;
  border-radius: var(--r-sm);
  color: var(--nav-text);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background .15s var(--ease), color .15s var(--ease);
  white-space: nowrap;
}
.desk-nav a:hover { background: rgba(255,255,255,.1); color: #fff; }
.desk-nav a.active { background: var(--nav-active); color: #fff; }

.top-bar-right { display: flex; align-items: center; gap: 0.75rem; }

/* User avatar chip */
.user-chip {
  width: 36px;
  height: 36px;
  border-radius: var(--r-pill);
  background: linear-gradient(135deg, var(--p), var(--p-mid));
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  border: 2px solid rgba(255,255,255,.2);
}
.user-chip--lg { width: 44px; height: 44px; font-size: 1.1rem; }

/* Hamburger / drawer toggle */
.drawer-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: var(--touch);
  height: var(--touch);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  border-radius: var(--r-sm);
  color: #fff;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
}
.drawer-toggle:hover { background: rgba(255,255,255,.1); }
.drawer-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: transform .2s var(--ease), opacity .2s;
}
body.drawer-open .drawer-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.drawer-open .drawer-toggle span:nth-child(2) { opacity: 0; }
body.drawer-open .drawer-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   SIDE DRAWER
   ============================================================ */
.drawer-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  backdrop-filter: blur(2px);
  z-index: 300;
  opacity: 0; visibility: hidden;
  transition: opacity .25s var(--ease), visibility .25s;
}
body.drawer-open .drawer-overlay { opacity: 1; visibility: visible; }

.side-drawer {
  position: fixed;
  top: 0; right: 0;
  width: min(300px, 88vw);
  height: 100vh; height: 100dvh;
  background: var(--nav-bg);
  color: #fff;
  z-index: 301;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .28s var(--ease-out), box-shadow .28s;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
body.drawer-open .side-drawer {
  transform: translateX(0);
  box-shadow: -16px 0 48px rgba(0,0,0,.25);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(1.25rem + var(--safe-top)) 1.25rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.drawer-user { display: flex; align-items: center; gap: 0.75rem; }
.drawer-user strong { display: block; font-size: 1rem; font-weight: 600; }
.drawer-user small { color: var(--nav-text); font-size: 0.8rem; }
.drawer-close {
  width: var(--touch); height: var(--touch);
  background: rgba(255,255,255,.08);
  border: none; border-radius: var(--r-sm);
  color: #fff; font-size: 1.4rem; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  -webkit-tap-highlight-color: transparent;
}
.drawer-close:hover { background: rgba(255,255,255,.15); }

.drawer-nav {
  flex: 1;
  padding: 0.5rem 0;
}
.drawer-nav a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1.25rem;
  color: var(--nav-text);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  min-height: var(--touch);
  transition: background .15s, color .15s;
}
.drawer-nav a svg { width: 20px; height: 20px; flex-shrink: 0; }
.drawer-nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.drawer-nav a.active { background: var(--nav-active); color: #fff; }

.drawer-footer {
  padding: 1rem 1.25rem;
  padding-bottom: calc(1rem + var(--safe-bot));
  border-top: 1px solid rgba(255,255,255,.08);
}
.drawer-logout {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 0;
  color: #fca5a5;
  text-decoration: none;
  font-weight: 500;
  min-height: var(--touch);
}
.drawer-logout svg { width: 20px; height: 20px; }
.drawer-logout:hover { color: #fecaca; }

/* ============================================================
   BOTTOM TAB BAR  (mobile only)
   ============================================================ */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 200;
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: stretch;
  height: calc(var(--nav-bot-h) + var(--safe-bot));
  padding-bottom: var(--safe-bot);
  box-shadow: 0 -4px 20px rgba(0,0,0,.08);
}
.bn-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-decoration: none;
  color: var(--ink-faint);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem 0.2rem 0;
  -webkit-tap-highlight-color: transparent;
  transition: color .15s;
  position: relative;
}
.bn-tab svg { width: 24px; height: 24px; }
.bn-tab.active { color: var(--p); }
.bn-tab.active::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 32px; height: 3px;
  background: var(--p);
  border-radius: 0 0 3px 3px;
}
/* Accent button in center */
.bn-tab--cta {
  color: #fff !important;
}
.bn-tab--cta .bn-cta-wrap {
  width: 48px; height: 48px;
  background: linear-gradient(135deg, var(--p), #7c3aed);
  border-radius: var(--r-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(79,70,229,.4);
  margin-top: -14px;
  transition: transform .15s var(--ease), box-shadow .15s;
}
.bn-tab--cta:active .bn-cta-wrap { transform: scale(0.93); box-shadow: 0 2px 8px rgba(79,70,229,.3); }
.bn-tab--cta::before { display: none; }
.bn-tab--cta span { margin-top: 4px; color: var(--ink-faint); }

/* ============================================================
   CONTENT AREA
   ============================================================ */
body.with-nav .content {
  padding: 1.25rem 1rem 1.5rem;
  padding-bottom: calc(var(--nav-bot-h) + var(--safe-bot) + 1rem);
  max-width: 1100px;
  margin: 0 auto;
}
body:not(.with-nav) .content {
  min-height: 100vh; min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
.page-title {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin-bottom: 1.25rem;
}
.page-subtitle {
  font-size: 0.9rem;
  color: var(--ink-muted);
  margin-bottom: 1.25rem;
  margin-top: -0.75rem;
}
h2.section-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  margin: 1.5rem 0 0.75rem;
  display: flex; align-items: center; gap: 0.5rem;
}
h2.section-title:first-child { margin-top: 0; }

/* ============================================================
   MESSAGE / ALERT BANNERS
   ============================================================ */
.msg {
  padding: 0.9rem 1.1rem;
  border-radius: var(--r);
  margin-bottom: 1.25rem;
  font-weight: 500;
  font-size: 0.95rem;
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  animation: slide-in .25s var(--ease-out);
}
.msg--success { background: var(--green-bg); color: #065f46; }
.msg--error   { background: var(--red-bg); color: var(--red-dark); }
.msg--info    { background: var(--blue-bg); color: #0c4a6e; }

@keyframes slide-in {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   STAT CARDS (Dashboard)
   ============================================================ */
.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
@media (min-width: 560px) { .stat-grid { grid-template-columns: repeat(4, 1fr); } }

.stat-card {
  background: var(--surface);
  border-radius: var(--r);
  padding: 1.1rem 1rem;
  box-shadow: var(--sh);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  position: relative;
  overflow: hidden;
}
.stat-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
}
.stat-card--indigo::after { background: linear-gradient(90deg, var(--p), var(--p-mid)); }
.stat-card--amber::after  { background: linear-gradient(90deg, var(--amber), #fbbf24); }
.stat-card--green::after  { background: linear-gradient(90deg, var(--green), #34d399); }
.stat-card--blue::after   { background: linear-gradient(90deg, var(--blue), #38bdf8); }

.stat-icon {
  width: 36px; height: 36px;
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.stat-icon svg { width: 18px; height: 18px; }
.stat-icon--indigo { background: var(--p-light); color: var(--p); }
.stat-icon--amber  { background: var(--amber-bg); color: var(--amber-dark); }
.stat-icon--green  { background: var(--green-bg); color: #065f46; }
.stat-icon--blue   { background: var(--blue-bg);  color: #0c4a6e; }

.stat-num {
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
}
.stat-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Alert box */
.alert-box {
  background: var(--red-bg);
  border: 1px solid var(--red-border);
  border-radius: var(--r);
  padding: 1rem 1.1rem;
  margin-bottom: 1.5rem;
}
.alert-box h3 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--red-dark);
  margin-bottom: 0.5rem;
  display: flex; align-items: center; gap: 0.4rem;
}
.alert-box ul { padding-left: 1.25rem; margin: 0; }
.alert-box li { color: var(--red-dark); font-size: 0.9rem; padding: 0.15rem 0; }

/* ============================================================
   FORMS
   ============================================================ */
.card-form {
  background: var(--surface);
  border-radius: var(--r);
  padding: 1.25rem;
  box-shadow: var(--sh);
  margin-bottom: 1.5rem;
  max-width: 520px;
}
.card-form h2 { font-size: 1rem; font-weight: 700; margin-bottom: 1rem; }

.field {
  margin-bottom: 1rem;
}
.field label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink-mid);
  margin-bottom: 0.4rem;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  min-height: var(--touch);
  font-size: 1rem;
  font-family: inherit;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--ink);
  -webkit-appearance: none;
  appearance: none;
  transition: border-color .15s, box-shadow .15s;
}
.field textarea { min-height: 100px; resize: vertical; }
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2364748b' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--p);
  box-shadow: 0 0 0 3px var(--p-light);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.5rem;
  min-height: var(--touch);
  font-size: 0.95rem;
  font-family: inherit;
  font-weight: 600;
  border: none;
  border-radius: var(--r-sm);
  cursor: pointer;
  text-decoration: none;
  transition: background .15s, transform .1s, box-shadow .15s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.97); }
.btn--primary { background: var(--p); color: #fff; box-shadow: 0 2px 8px rgba(79,70,229,.3); }
.btn--primary:hover { background: var(--p-dark); }
.btn--ghost { background: var(--p-light); color: var(--p-dark); }
.btn--ghost:hover { background: #c7d2fe; }
.btn--danger { background: var(--red-bg); color: var(--red-dark); border: 1px solid var(--red-border); }
.btn--full { width: 100%; }
.btn--sm { padding: 0.5rem 1rem; min-height: 0; font-size: 0.85rem; }

/* Link-style button (for inline actions) */
.action-link {
  background: none;
  border: none;
  color: var(--p);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.4rem 0;
  text-decoration: none;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
}
.action-link:hover { text-decoration: underline; }
.action-link--red { color: var(--red); }

.form-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}

/* ============================================================
   TABLES  (responsive — card mode on mobile)
   ============================================================ */
.table-wrap {
  background: var(--surface);
  border-radius: var(--r);
  box-shadow: var(--sh);
  margin-bottom: 1.5rem;
  overflow: hidden;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
}
.data-table th {
  background: var(--bg);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-muted);
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.data-table td {
  padding: 0.85rem 1rem;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border-light);
  vertical-align: top;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr.inactive { opacity: 0.55; }
.data-table .td-actions { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; }
.data-table .inline { display: inline; margin: 0; }

@media (max-width: 640px) {
  .table-wrap { background: transparent; box-shadow: none; border-radius: 0; }
  .data-table { display: block; }
  .data-table thead { display: none; }
  .data-table tbody { display: flex; flex-direction: column; gap: 0.75rem; }
  .data-table tr {
    display: block;
    background: var(--surface);
    border-radius: var(--r);
    box-shadow: var(--sh);
    padding: 0.9rem 1rem;
    border: 1px solid var(--border);
  }
  .data-table tr.inactive { opacity: 0.6; }
  .data-table td {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.4rem 0;
    border: none;
    font-size: 0.9rem;
  }
  .data-table td::before {
    content: attr(data-label);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--ink-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    flex-shrink: 0;
    min-width: 80px;
  }
  .data-table .td-actions {
    flex-direction: row;
    gap: 1rem;
  }
}

/* ============================================================
   BADGES / BULINE
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.65rem;
  border-radius: var(--r-pill);
  font-size: 0.8rem;
  font-weight: 700;
}
.badge::before { content: '●'; font-size: 0.7em; }
.badge--galben { background: var(--amber-bg); color: var(--amber-dark); border: 1px solid var(--amber-border); }
.badge--galben::before { color: var(--amber); }
.badge--rosu { background: var(--red-bg); color: var(--red-dark); border: 1px solid var(--red-border); }
.badge--rosu::before { color: var(--red); }
.badge--green { background: var(--green-bg); color: #065f46; }
.badge--indigo { background: var(--p-light); color: var(--p-dark); }

/* ============================================================
   BULINA PICKER (Inspectie)
   ============================================================ */
.bulina-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.bulina-input { display: none; }
.bulina-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1.5rem 1rem;
  border-radius: var(--r);
  border: 2px solid var(--border);
  cursor: pointer;
  text-align: center;
  background: var(--surface);
  transition: border-color .15s, box-shadow .15s, transform .1s;
  -webkit-tap-highlight-color: transparent;
  min-height: 130px;
}
.bulina-card:hover { border-color: var(--ink-faint); box-shadow: var(--sh); }
.bulina-card:active { transform: scale(0.97); }
.bulina-icon {
  font-size: 2.5rem;
  line-height: 1;
}
.bulina-lbl { font-weight: 700; font-size: 1rem; }
.bulina-desc { font-size: 0.8rem; color: var(--ink-muted); }

/* Checked states */
#b_galben:checked ~ .bulina-card-galben,
.bulina-card-galben.selected {
  border-color: var(--amber);
  background: var(--amber-bg);
  box-shadow: 0 0 0 4px rgba(245,158,11,.15);
}
#b_galben:checked ~ .bulina-card-galben .bulina-lbl { color: var(--amber-dark); }

#b_rosu:checked ~ .bulina-card-rosu,
.bulina-card-rosu.selected {
  border-color: var(--red);
  background: var(--red-bg);
  box-shadow: 0 0 0 4px rgba(239,68,68,.15);
}
#b_rosu:checked ~ .bulina-card-rosu .bulina-lbl { color: var(--red-dark); }

/* ============================================================
   INSPECTIE STEP FORM
   ============================================================ */
.step-form {
  max-width: 480px;
}
.step-form .field select { font-size: 1rem; }
.step-form .submit-btn {
  margin-top: 0.5rem;
  width: 100%;
  font-size: 1.05rem;
  padding: 1rem;
  min-height: 54px;
}

/* ============================================================
   RAPOARTE – visual score bar
   ============================================================ */
.score-card {
  background: var(--surface);
  border-radius: var(--r);
  box-shadow: var(--sh);
  padding: 1rem 1.1rem;
  margin-bottom: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.score-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.score-name { font-weight: 700; font-size: 0.95rem; }
.score-total { font-size: 0.8rem; color: var(--ink-muted); }
.score-bar-wrap {
  height: 8px;
  background: var(--border);
  border-radius: var(--r-pill);
  overflow: hidden;
  display: flex;
}
.score-bar-g {
  height: 100%;
  background: var(--amber);
  border-radius: var(--r-pill) 0 0 var(--r-pill);
  transition: width .5s var(--ease-out);
}
.score-bar-r {
  height: 100%;
  background: var(--red);
}
.score-badges { display: flex; gap: 0.5rem; }
.score-link { font-size: 0.85rem; font-weight: 600; color: var(--p); text-decoration: none; }
.score-link:hover { text-decoration: underline; }

/* Summary boxes */
.sume-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}
.sume-box {
  flex: 1;
  min-width: 120px;
  padding: 1rem;
  border-radius: var(--r);
  text-align: center;
}
.sume-box--galben { background: var(--amber-bg); border: 1px solid var(--amber-border); }
.sume-box--rosu   { background: var(--red-bg); border: 1px solid var(--red-border); }
.sume-box--total  { background: var(--p-light); border: 1px solid #c7d2fe; }
.sume-box .sume-num { font-size: 2rem; font-weight: 800; line-height: 1; }
.sume-box--galben .sume-num { color: var(--amber-dark); }
.sume-box--rosu   .sume-num { color: var(--red-dark); }
.sume-box--total  .sume-num { color: var(--p-dark); }
.sume-box .sume-lbl { font-size: 0.78rem; font-weight: 600; color: var(--ink-muted); margin-top: 0.2rem; text-transform: uppercase; }

/* ============================================================
   FILTER CARD (Rapoarte)
   ============================================================ */
.filter-card {
  background: var(--surface);
  border-radius: var(--r);
  box-shadow: var(--sh);
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
}
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}
.filter-row .field {
  flex: 1 1 150px;
  margin-bottom: 0;
}
.filter-row .field label { font-size: 0.78rem; margin-bottom: 0.25rem; }
.filter-row .field select,
.filter-row .field input[type="date"] {
  min-height: 42px;
  padding: 0.55rem 2.5rem 0.55rem 0.85rem;
  font-size: 0.9rem;
  width: 100%;
}
.filter-row .field input[type="date"] { padding-right: 0.85rem; }
.filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-top: 0.25rem;
}
.custom-range {
  border-top: 1px dashed var(--border);
  padding-top: 0.6rem;
  margin-top: 0.1rem;
  animation: fade-in .2s ease;
}
@keyframes fade-in { from { opacity:0; transform:translateY(-4px); } to { opacity:1; transform:none; } }

/* Label perioadă activă */
.period-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--ink-muted);
  margin-bottom: 1.1rem;
}
.period-label svg { flex-shrink: 0; }
.period-label span:first-of-type { font-weight: 600; color: var(--ink); }
.period-dates { color: var(--ink-faint); font-size: 0.8rem; }

/* Legacy filter-bar fallback */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: flex-end;
  margin-bottom: 1.25rem;
  background: var(--surface);
  padding: 1rem;
  border-radius: var(--r);
  box-shadow: var(--sh-xs);
}
.filter-bar .field { margin-bottom: 0; }
.filter-bar .field label { font-size: 0.78rem; margin-bottom: 0.25rem; }
.filter-bar .field select { min-height: 40px; padding: 0.5rem 2.5rem 0.5rem 0.75rem; font-size: 0.9rem; }
.filter-bar .btn { align-self: flex-end; min-height: 40px; padding: 0.5rem 1rem; }

/* ============================================================
   HOTEL CARDS
   ============================================================ */
.hotel-card {
  background: var(--surface);
  border-radius: var(--r);
  box-shadow: var(--sh);
  padding: 1rem 1.1rem;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.hotel-card-icon {
  width: 40px; height: 40px;
  background: var(--p-light);
  color: var(--p);
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.hotel-card-icon svg { width: 20px; height: 20px; }
.hotel-card-body { flex: 1; min-width: 0; }
.hotel-card-name { font-weight: 700; font-size: 0.95rem; }
.hotel-card-addr { font-size: 0.8rem; color: var(--ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hotel-card-actions { display: flex; gap: 0.5rem; flex-shrink: 0; }

/* ============================================================
   LOGIN PAGE
   ============================================================ */
body:not(.with-nav) {
  background: linear-gradient(135deg, #1e1b4b 0%, #3730a3 50%, #4f46e5 100%);
}
.login-wrap {
  width: 100%;
  max-width: 400px;
}
.login-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
  color: #fff;
}
.login-logo-icon {
  width: 52px; height: 52px;
  background: rgba(255,255,255,.15);
  border-radius: var(--r);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.75rem;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.2);
}
.login-logo-text h1 {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.login-logo-text p { font-size: 0.85rem; opacity: 0.7; margin-top: 0.1rem; }
.login-card {
  background: #fff;
  border-radius: var(--r-lg);
  padding: 2rem 1.75rem;
  box-shadow: var(--sh-xl);
}
.login-card h2 { font-size: 1.25rem; font-weight: 700; margin-bottom: 1.5rem; text-align: center; color: var(--ink); }
.login-card .field input {
  background: var(--bg);
  border: 1.5px solid var(--border);
}
.login-card .field input:focus {
  background: #fff;
  border-color: var(--p);
  box-shadow: 0 0 0 3px var(--p-light);
}
.login-error {
  padding: 0.75rem;
  background: var(--red-bg);
  color: var(--red-dark);
  border-radius: var(--r-sm);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 1rem;
  text-align: center;
}
.login-hint {
  text-align: center;
  font-size: 0.82rem;
  color: var(--ink-muted);
  margin-top: 1rem;
}

/* ============================================================
   SETTINGS
   ============================================================ */
.settings-card {
  background: var(--surface);
  border-radius: var(--r);
  box-shadow: var(--sh);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  max-width: 520px;
}
.settings-card h2 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}
.settings-card p { font-size: 0.875rem; color: var(--ink-muted); margin-bottom: 1rem; }
.prag-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.prag-row input[type="number"] {
  width: 80px;
  padding: 0.75rem;
  min-height: var(--touch);
  text-align: center;
  font-size: 1.2rem;
  font-weight: 700;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
}
.prag-row input:focus { outline: none; border-color: var(--p); box-shadow: 0 0 0 3px var(--p-light); }

/* ============================================================
   DESKTOP  (≥ 900px)
   ============================================================ */
@media (min-width: 900px) {
  .bottom-nav { display: none; }
  .desk-nav { display: flex; }
  .drawer-toggle { display: none; }

  body.with-nav .content {
    padding: 2rem 2rem 2.5rem;
    padding-bottom: 2.5rem;
  }

  .stat-grid { grid-template-columns: repeat(4, 1fr); }
  .bulina-picker { max-width: 400px; }
  .step-form { max-width: 500px; }
  .filter-bar { flex-wrap: nowrap; }
}

/* ============================================================
   MISC
   ============================================================ */
.section-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.5rem 0;
}
.tag { display: inline-block; padding: 0.2rem 0.5rem; border-radius: var(--r-sm); font-size: 0.75rem; font-weight: 600; background: var(--bg); color: var(--ink-muted); }

/* Focus ring */
:focus-visible { outline: 2px solid var(--p); outline-offset: 2px; }

/* Inline forms (hoteluri) */
.inline-add-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1rem;
}
.inline-add-form input,
.inline-add-form select {
  flex: 1 1 140px;
  min-height: var(--touch);
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-family: inherit;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  -webkit-appearance: none;
  appearance: none;
  background: var(--surface);
}
.inline-add-form input:focus,
.inline-add-form select:focus { outline: none; border-color: var(--p); box-shadow: 0 0 0 3px var(--p-light); }
.inline-add-form .btn { flex: 1 1 100%; }
@media (min-width: 500px) { .inline-add-form .btn { flex: 0 0 auto; } }
