/* ============================================================
   Hezotech CRM — assets/css/app.css
   Tema vizuala: negru / portocaliu, mobile-first, romana
   ============================================================ */

/* --- Variabile globale --- */
:root {
  --bg:           #f5f5f7;
  --card:         #ffffff;
  --text:         #111111;
  --text2:        #3a3a3a;
  --text3:        #888888;
  --border:       rgba(0,0,0,0.08);
  --border2:      rgba(0,0,0,0.06);

  --orange:       #F5A623;
  --orange-dark:  #c47a00;
  --orange-soft:  #fff3e0;
  --orange-glow:  rgba(245,166,35,0.15);

  --blue:         #0071e3;
  --blue-soft:    #e8f1ff;
  --green:        #28a745;
  --green-soft:   #e8f9ed;
  --red:          #dc3545;
  --red-soft:     #fff0ef;

  --header-bg:    #131417;
  --header-text:  #ffffff;

  --sidebar-bg:   #111111;
  --sidebar-w:    240px;

  --radius:       10px;
  --radius-lg:    14px;
  --radius-xl:    20px;
  --shadow:       0 1px 4px rgba(0,0,0,0.08), 0 0 0 0.5px rgba(0,0,0,0.04);
  --shadow-lg:    0 8px 30px rgba(0,0,0,0.12);

  --font-main:    'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Rajdhani', 'Inter', sans-serif;
}

/* --- Reset minimal --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

html { font-size: 16px; }

body {
  font-family: var(--font-main);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
}

a { color: var(--orange); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

/* ============================================================
   LOGIN
   ============================================================ */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: #111111;
}

.login-card {
  background: #ffffff;
  border-radius: var(--radius-xl);
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 360px;
  box-shadow: var(--shadow-lg);
  border-top: 4px solid var(--orange);
}

.login-logo {
  text-align: center;
  margin-bottom: 2rem;
}

.login-logo img {
  width: 90px;
  height: 90px;
  border-radius: 16px;
  margin: 0 auto;
  object-fit: contain;
}

.login-logo-text {
  margin-top: 10px;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text3);
}

.login-form label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 5px;
}

.login-form input[type="password"] {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg);
  border: 1px solid #e0e0e0;
  border-radius: var(--radius);
  font-size: 16px;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.login-form input[type="password"]:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px var(--orange-glow);
}

.btn-login {
  display: block;
  width: 100%;
  padding: 15px;
  background: var(--orange);
  border: none;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 700;
  color: #000000;
  cursor: pointer;
  margin-top: 14px;
  letter-spacing: 0.5px;
  transition: opacity 0.15s, transform 0.1s;
}

.btn-login:active {
  opacity: 0.9;
  transform: scale(0.99);
}

.login-error {
  color: var(--red);
  font-size: 13px;
  text-align: center;
  margin-top: 10px;
  min-height: 20px;
}

/* ============================================================
   LAYOUT PRINCIPAL (post-login)
   ============================================================ */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* --- Header mobil --- */
.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--header-bg);
  border-bottom: 3px solid var(--orange);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.header-logo img {
  height: 32px;
  width: auto;
}

.header-logo-fallback {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--orange);
  letter-spacing: 1px;
}

.btn-logout {
  background: transparent;
  border: 1px solid rgba(245,166,35,0.4);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 500;
  color: var(--orange);
  cursor: pointer;
  letter-spacing: 0.3px;
  transition: background 0.15s;
}

.btn-logout:hover { background: rgba(245,166,35,0.12); }

/* --- Continut principal --- */
.app-main {
  flex: 1;
  margin-top: 60px;
  margin-bottom: 70px; /* spatiu pentru nav-bar jos pe mobil */
  padding: 20px;
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

/* --- Nav bar jos (mobil) --- */
.app-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--header-bg);
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: stretch;
  height: 64px;
  padding: 0;
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: rgba(255,255,255,0.45);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.3px;
  cursor: pointer;
  text-decoration: none;
  padding: 8px 4px;
  transition: color 0.15s;
  border: none;
  background: transparent;
  -webkit-tap-highlight-color: transparent;
}

.nav-item svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-item.active {
  color: var(--orange);
}

.nav-item:hover { color: rgba(255,255,255,0.75); }
.nav-item.active:hover { color: var(--orange); }

/* ============================================================
   CARD GENERIC
   ============================================================ */
.card {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.card + .card { margin-top: 12px; }

/* ============================================================
   DASHBOARD — Ziua mea
   ============================================================ */
.dashboard-greeting {
  margin-bottom: 20px;
}

.dashboard-greeting h1 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text);
}

.dashboard-greeting p {
  font-size: 13px;
  color: var(--text3);
  margin-top: 3px;
}

/* Metrici rapide */
.metrics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}

.metric-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 14px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.metric-label {
  font-size: 10px;
  color: var(--text3);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.metric-value {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -1px;
  line-height: 1.1;
  margin-top: 4px;
  color: var(--text);
}

.metric-value.orange { color: var(--orange); }
.metric-value.blue   { color: var(--blue); }
.metric-value.green  { color: var(--green); }
.metric-value.red    { color: var(--red); }

.metric-sub {
  font-size: 11px;
  color: var(--text3);
  margin-top: 2px;
}

/* Sectiune placeholder */
.section-placeholder {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 2rem 1rem;
  text-align: center;
  border: 1px dashed var(--border);
  margin-bottom: 16px;
}

.section-placeholder .ph-icon {
  font-size: 32px;
  margin-bottom: 8px;
  opacity: 0.4;
}

.section-placeholder h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text2);
  margin-bottom: 4px;
}

.section-placeholder p {
  font-size: 13px;
  color: var(--text3);
}

/* Section header */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ============================================================
   BUTOANE
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: opacity 0.15s, transform 0.1s;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--orange);
  color: #000000;
}

.btn-primary:hover { opacity: 0.9; }

.btn-secondary {
  background: var(--bg);
  color: var(--text2);
  border: 1px solid var(--border);
}

.btn-secondary:hover { background: #ebebed; }

.btn-sm {
  padding: 7px 13px;
  font-size: 12px;
  border-radius: 20px;
}

/* Buton add rotund */
.btn-add {
  background: var(--orange);
  border: none;
  border-radius: 20px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 700;
  color: #000000;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  letter-spacing: 0.3px;
}

/* ============================================================
   TOAST NOTIFICARE
   ============================================================ */
.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #111;
  color: #fff;
  padding: 11px 20px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  transition: all 0.3s;
  z-index: 999;
  white-space: nowrap;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ============================================================
   UTILITARE
   ============================================================ */
.text-orange { color: var(--orange); }
.text-muted  { color: var(--text3); }
.text-center { text-align: center; }

.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-5 { margin-top: 20px; }

.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text3);
  font-size: 15px;
}

/* ============================================================
   TOP NAV — Clienți, Contacte, Proiecte + Setări + Ieșire
   ============================================================ */
.app-topnav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  margin-left: 12px;
}

.topnav-item {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.topnav-item svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.topnav-item:hover {
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.9);
  text-decoration: none;
}

.topnav-item.active {
  background: rgba(245,166,35,0.15);
  color: var(--orange);
}

.app-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  flex-shrink: 0;
}

.btn-header-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.btn-header-icon svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn-header-icon:hover {
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.9);
  text-decoration: none;
}

.btn-header-icon.active {
  background: rgba(245,166,35,0.15);
  border-color: rgba(245,166,35,0.4);
  color: var(--orange);
}

/* Buton notificări + badge — V0.7.3 */
.btn-notif {
  position: relative;
  cursor: pointer;
}

.notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  padding: 0 3px;
  background: var(--orange);
  color: #111;
  font-size: 10px;
  font-weight: 700;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  pointer-events: none;
}

/* Mărire padding-top pe mobil pt topnav (header = 60px) */
/* app-main deja are margin-top:60px — neschimbat */

/* ============================================================
   CÂMPURI DATE / TIME — click pe tot câmpul
   ============================================================ */
/* dt-wrap: câmp text + spațiu clickabil + buton iconiță */
.dt-wrap {
  position: relative;
  display: flex;
  align-items: stretch;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
}
.dt-wrap:focus-within {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px var(--orange-glow);
}
.dt-wrap .form-input.dt-text {
  flex: 0 0 auto;
  width: auto;
  border: none;
  background: transparent;
  box-shadow: none;
  cursor: text;
  border-radius: var(--radius) 0 0 var(--radius);
  padding-right: 6px;
}
.dt-wrap .form-input.dt-text:focus { box-shadow: none; border-color: transparent; }
.dt-wrap .form-input.dt-text[data-type="date"]     { min-width: 108px; }
.dt-wrap .form-input.dt-text[data-type="time"]     { min-width: 62px; }
.dt-wrap .form-input.dt-text[data-type="datetime"] { min-width: 162px; }
.dt-wrap .dt-spacer {
  flex: 1;
  min-width: 0;
}
/* Native complet ascuns — Flatpickr gestionează picker-ul */
.dt-wrap .dt-native {
  display: none;
}
.dt-wrap .dt-btn {
  flex-shrink: 0;
  width: 38px;
  background: transparent;
  border: none;
  border-left: 1px solid var(--border);
  border-radius: 0;
  cursor: pointer;
  color: var(--text3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s;
}
.dt-wrap .dt-btn:hover,
.dt-wrap:hover .dt-btn { color: var(--orange); }

/* ============================================================
   DASHBOARD — "vezi toate" consistent
   ============================================================ */
.see-all-link {
  font-size: 12px;
  font-weight: 600;
  color: var(--orange);
  text-decoration: none;
  letter-spacing: 0.2px;
}

.see-all-link:hover { text-decoration: underline; }

/* ============================================================
   RESPONSIVE — ecrane mari (tablet/desktop)
   ============================================================ */

/* Tablet: 768px+ */
@media (min-width: 768px) {
  .app-main {
    padding: 28px 32px;
    max-width: 1020px;
  }
  .metrics-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Desktop: 1100px+ */
@media (min-width: 1100px) {
  .app-main {
    padding: 32px 40px;
    max-width: 1220px;
    margin-bottom: 40px;
  }
}

/* Wide desktop: 1440px+ */
@media (min-width: 1440px) {
  .app-main {
    max-width: 1320px;
  }
}

/* ============================================================
   FLATPICKR — theme Hezotech CRM (portocaliu / negru)
   ============================================================ */
.flatpickr-calendar {
  font-family: var(--font-main);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}
.flatpickr-day.selected,
.flatpickr-day.selected:hover,
.flatpickr-day.startRange,
.flatpickr-day.endRange {
  background: var(--orange);
  border-color: var(--orange);
  color: #000;
}
.flatpickr-day:hover {
  background: var(--orange-soft);
}
.flatpickr-day.today {
  border-color: var(--orange);
}
.flatpickr-day.today:hover {
  background: var(--orange-soft);
  color: var(--text);
}
.flatpickr-months .flatpickr-prev-month:hover svg,
.flatpickr-months .flatpickr-next-month:hover svg {
  fill: var(--orange);
}
.flatpickr-current-month .numInputWrapper span.arrowUp:after {
  border-bottom-color: var(--orange);
}
.flatpickr-current-month .numInputWrapper span.arrowDown:after {
  border-top-color: var(--orange);
}
.flatpickr-time input:hover,
.flatpickr-time input:focus,
.flatpickr-time .numInputWrapper:hover {
  background: var(--orange-soft);
}


/* ── Reminder Banner V0.7.3 ────────────────────────────────── */
#reminder-banner-container {
  position: fixed;
  top: 60px;
  left: 0; right: 0;
  z-index: 900;
  display: flex;
  flex-direction: column;
  pointer-events: none;
}
.reminder-banner {
  background: #1c1c1e;
  border-left: 4px solid var(--orange);
  border-bottom: 1px solid rgba(245,166,35,0.15);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: all;
  animation: rbIn 0.25s ease;
}
@keyframes rbIn { from { transform:translateY(-100%); opacity:0; } to { transform:translateY(0); opacity:1; } }
.reminder-banner.rb-pulsing { animation: rbPulse 1s ease 3; }
@keyframes rbPulse { 0%,100%{background:#1c1c1e} 50%{background:#2d1f00} }
.rb-icon { font-size:18px; flex-shrink:0; }
.rb-body { flex:1; min-width:0; }
.rb-title { font-weight:600; color:#fff; font-size:14px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.rb-sub   { font-size:12px; color:rgba(255,255,255,0.5); margin-top:1px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.rb-actions { display:flex; align-items:center; gap:6px; flex-shrink:0; }
.rb-snooze-wrap { position:relative; }
.rb-snooze-menu {
  position:absolute; top:calc(100% + 4px); right:0;
  background:#2c2c2e; border:1px solid rgba(255,255,255,0.1);
  border-radius:10px; padding:4px; min-width:130px; z-index:10;
  box-shadow:0 4px 20px rgba(0,0,0,0.4);
}
.rb-snooze-menu button {
  display:block; width:100%; padding:8px 12px; text-align:left;
  background:none; border:none; color:rgba(255,255,255,0.85);
  font-size:13px; cursor:pointer; border-radius:7px; font-family:inherit;
}
.rb-snooze-menu button:hover { background:rgba(255,255,255,0.08); }
.rb-btn {
  padding:5px 11px; border-radius:20px; border:none;
  font-size:12px; font-weight:600; cursor:pointer;
  white-space:nowrap; font-family:inherit; line-height:1.4;
}
.rb-snooze { background:rgba(255,255,255,0.1); color:rgba(255,255,255,0.85); }
.rb-snooze:hover { background:rgba(255,255,255,0.18); }
.rb-see    { background:rgba(255,255,255,0.1); color:rgba(255,255,255,0.85); text-decoration:none; }
.rb-see:hover    { background:rgba(255,255,255,0.18); }
.rb-ok { background:var(--orange); color:#111; }
.rb-ok:hover { background:var(--orange-dark); color:#fff; }
.rb-ent  { font-size:12px; color:rgba(255,255,255,0.7); margin-top:1px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.rb-desc { font-size:11px; color:rgba(255,255,255,0.5); margin-top:1px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-style:italic; }
/* Setări notificări */
.notif-pref-card {
  background:var(--card); border:1px solid var(--border);
  border-radius:var(--radius); padding:14px 16px; margin-bottom:10px;
  box-shadow: var(--shadow);
}
.notif-pref-card.disabled { opacity:0.5; pointer-events:none; }
.notif-pref-header { display:flex; align-items:center; gap:10px; margin-bottom:6px; }
.notif-pref-title { font-weight:600; font-size:14px; flex:1; }
.notif-pref-desc { font-size:12px; color:var(--text3); line-height:1.5; margin-bottom:8px; }

/* ============================================================
   V0.7.5 — ANAF API + Google Maps
   ============================================================ */

/* ── Buton ANAF lângă câmpul CUI ── */
.anaf-cui-wrap {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.anaf-cui-wrap .form-input {
  flex: 1;
  min-width: 0;
}
.btn-anaf {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 14px;
  background: var(--orange);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
  transition: opacity 0.15s;
  flex-shrink: 0;
}
.btn-anaf:hover  { opacity: 0.88; }
.btn-anaf:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Status ANAF (succes / eroare) ── */
.anaf-status {
  font-size: 12px;
  margin-top: 6px;
  min-height: 16px;
}
.anaf-status-success { color: var(--green); }
.anaf-status-error   { color: var(--red); }

/* ── Badge-uri ANAF (stare fiscală, TVA) ── */
.anaf-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  letter-spacing: 0.3px;
}
.anaf-badge-activ  { background: var(--green-soft); color: #1a7a35; }
.anaf-badge-inactiv{ background: #fff3e0; color: #c47a00; }
.anaf-badge-radiat { background: var(--red-soft);   color: var(--red); }
.anaf-badge-tva    { background: var(--blue-soft);  color: var(--blue); }
.anaf-badge-notva  { background: var(--bg);         color: var(--text3); border: 1px solid var(--border); }

/* ── Secțiune actualizare ANAF în client-view ── */
.anaf-update-section {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.btn-anaf-update {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  color: var(--text2);
  transition: background 0.15s;
}
.btn-anaf-update:hover    { background: var(--orange-soft); border-color: var(--orange); color: var(--orange-dark); }
.btn-anaf-update:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Panel diff ANAF ── */
.anaf-diff-panel {
  margin-top: 12px;
  background: var(--card);
  border: 1px solid var(--orange);
  border-radius: var(--radius);
  padding: 14px;
}
.anaf-diff-title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 10px;
}
.anaf-diff-rows { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.anaf-diff-row  {
  display: grid;
  grid-template-columns: 100px 1fr 16px 1fr;
  gap: 6px;
  align-items: start;
  font-size: 12px;
}
.anaf-diff-key   { color: var(--text3); font-weight: 500; }
.anaf-diff-old   { color: var(--red); text-decoration: line-through; word-break: break-word; }
.anaf-diff-arrow { color: var(--text3); text-align: center; }
.anaf-diff-new   { color: var(--green); font-weight: 500; word-break: break-word; }
.anaf-diff-actions { display: flex; gap: 8px; justify-content: flex-end; }

/* ── Mini-hartă Google Maps în client-view ── */
.maps-embed-wrap {
  margin-top: 20px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}
.maps-embed {
  width: 100%;
  height: 220px;
  border: none;
  display: block;
}
.maps-directions-btn {
  display: block;
  text-align: center;
  padding: 10px;
  background: var(--bg);
  font-size: 13px;
  font-weight: 500;
  color: var(--blue);
  text-decoration: none;
  border-top: 1px solid var(--border);
}
.maps-directions-btn:hover { background: var(--blue-soft); text-decoration: none; }

/* ── Căutare firme (firm-search.php) ── */
.firm-search-form  { margin-bottom: 20px; }
.firm-search-bar   { display: flex; gap: 10px; margin-bottom: 8px; }
.firm-search-input { flex: 1; }
.firm-search-hint  { font-size: 12px; color: var(--text3); line-height: 1.6; }
.firm-search-section-title {
  font-size: 13px; font-weight: 600; color: var(--text3);
  margin: 16px 0 8px; text-transform: uppercase; letter-spacing: 0.5px;
}

/* ── Card rezultat ANAF ── */
.firm-search-result {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-top: 16px;
}
.fsr-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--border);
}
.fsr-avatar {
  width: 44px; height: 44px;
  background: var(--orange); color: #fff;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700;
  flex-shrink: 0;
  font-family: var(--font-display);
}
.fsr-title-block { flex: 1; min-width: 0; }
.fsr-name  { font-size: 16px; font-weight: 700; line-height: 1.3; }
.fsr-sub   { font-size: 12px; color: var(--text3); margin-top: 2px; }
.fsr-badges { display: flex; flex-wrap: wrap; gap: 4px; align-items: flex-start; }
.fsr-rows  { padding: 0 16px; }
.fsr-footer {
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.fsr-source { font-size: 11px; color: var(--text3); margin-left: auto; }
.fsr-duplicate-warning { width: 100%; }
.fsr-similar-list { margin: 6px 0 0 0; padding-left: 18px; }
.fsr-similar-list li { margin-bottom: 4px; font-size: 13px; }
.fsr-sub-cui { font-size: 11px; color: var(--text3); margin-left: 4px; }

@media (max-width: 500px) {
  .anaf-diff-row { grid-template-columns: 80px 1fr; }
  .anaf-diff-arrow, .anaf-diff-new { display: none; }
  .anaf-diff-row::after {
    content: attr(data-new);
    color: var(--green);
    font-size: 12px;
    grid-column: 2;
  }
}

/* ============================================================
   V0.7.6 — Redesign Dashboard + Navigare
   ============================================================ */

/* ── Logo text HEZO/TECH ── */
.hdr-logo-link {
  display: flex;
  align-items: baseline;
  text-decoration: none;
  gap: 0;
  flex-shrink: 0;
}
.logo-hezo {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: #F5A623;
  letter-spacing: 1px;
  line-height: 1;
}
.logo-tech {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 1px;
  line-height: 1;
}

/* ── Desktop topnav visible; mobile hidden ── */
@media (max-width: 767px) {
  .app-topnav { display: none !important; }
  .hdr-desktop-only { display: none !important; }
}

/* ── Bottom nav hidden on desktop ── */
@media (min-width: 768px) {
  .app-nav { display: none !important; }
  .app-main { margin-bottom: 40px !important; }
}

/* ── Settings dropdown ── */
.hdr-settings-wrap {
  position: relative;
}
.settings-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  min-width: 190px;
  z-index: 1200;
  overflow: hidden;
  display: none;
  animation: sdFadeIn 0.15s ease;
}
@keyframes sdFadeIn {
  from { opacity:0; transform:translateY(-6px); }
  to   { opacity:1; transform:translateY(0); }
}
.settings-dropdown.open { display: block; }
.sd-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  font-size: 14px;
  color: var(--text2);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.12s;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  font-family: inherit;
}
.sd-item:hover { background: var(--bg); text-decoration: none; }
.sd-sep { height: 1px; background: var(--border); margin: 2px 0; }
.sd-item.danger { color: #A32D2D; font-weight: 500; }
.sd-item svg {
  width: 15px; height: 15px;
  stroke: currentColor; fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  flex-shrink: 0;
}

/* ── Bottom-sheet Mai multe ── */
.more-sheet-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 500;
}
.more-sheet-backdrop.open { display: block; }
.more-sheet {
  position: fixed;
  bottom: 0;
  left: 0; right: 0;
  background: var(--card);
  border-radius: 16px 16px 0 0;
  border-top: 1px solid var(--border);
  z-index: 501;
  padding: 14px 0 4px;
  padding-bottom: 72px; /* spațiu pentru bottom nav */
  transform: translateY(100%);
  transition: transform 0.25s ease;
}
.more-sheet.open { transform: translateY(0); }
.more-sheet-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 0 20px 10px;
}
.more-sheet-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  border-bottom: 0.5px solid var(--border);
  transition: background 0.1s;
}
.more-sheet-item:last-child { border-bottom: none; }
.more-sheet-item:hover { background: var(--bg); text-decoration: none; }
.more-sheet-item svg {
  width: 20px; height: 20px;
  stroke: var(--orange); fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  flex-shrink: 0;
}

/* ── Dashboard stat tiles ── */
.dash-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
@media (max-width: 360px) {
  .dash-stats { grid-template-columns: repeat(2, 1fr); }
}
.dash-stat-tile {
  background: var(--card);
  border: 0.5px solid #ECECEF;
  border-radius: 12px;
  padding: 11px 8px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.dash-stat-tile:active { transform: scale(0.96); }
.dash-stat-tile:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.dash-stat-num {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  line-height: 1.2;
  color: #1A1D23;
}
.dash-stat-num.orange { color: #F5A623; }
.dash-stat-num.red    { color: #A32D2D; }
.dash-stat-lbl {
  font-size: 11px;
  color: #8A8F98;
  margin-top: 2px;
  line-height: 1.2;
}

/* ── Dashboard compact action buttons ── */
.dash-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}
.dash-action-btn {
  background: var(--card);
  border: 0.5px solid #ECECEF;
  border-radius: 12px;
  padding: 14px 8px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.15s, transform 0.1s;
  -webkit-tap-highlight-color: transparent;
}
.dash-action-btn:hover { border-color: rgba(245,166,35,0.5); text-decoration: none; }
.dash-action-btn:active { transform: scale(0.97); }
.dash-action-btn svg {
  width: 21px; height: 21px;
  stroke: #F5A623; fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.dash-action-btn span {
  font-size: 11px;
  font-weight: 600;
  color: #1A1D23;
}

/* ── Task card V2 cu accent bar copil ── */
.task-card-v2 {
  position: relative;
  display: flex;
  align-items: stretch;
  background: var(--card);
  border: 0.5px solid #ECECEF;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow 0.15s;
  margin-bottom: 8px;
  -webkit-tap-highlight-color: transparent;
}
.task-card-v2:hover { box-shadow: 0 2px 10px rgba(0,0,0,0.08); }
.task-accent {
  width: 4px;
  flex-shrink: 0;
}
.accent-urgenta { background: #A32D2D; }
.accent-alta    { background: #F5A623; }
.accent-normala { background: #0C447C; }
.accent-scazuta { background: #8A8F98; }
.task-card-body {
  flex: 1;
  padding: 11px 36px 11px 12px;
  min-width: 0;
}
.task-card-title {
  font-size: 14px;
  font-weight: 500;
  color: #1A1D23;
  margin-bottom: 3px;
  line-height: 1.35;
}
.task-card-meta {
  font-size: 11px;
  color: #8A8F98;
  margin-bottom: 7px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.task-card-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.pill-v2 {
  font-size: 11px;
  font-weight: 500;
  padding: 2px 9px;
  border-radius: 10px;
  line-height: 1.6;
}
.pill-urgenta { background: #FDECEA; color: #A32D2D; }
.pill-alta    { background: #FBEFD7; color: #854F0B; }
.pill-normala { background: #E6F1FB; color: #0C447C; }
.pill-scazuta { background: #F4F5F7; color: #8A8F98; }
.pill-azi     { font-size:11px; color:#854F0B; font-weight:500; }
.pill-intarz  { font-size:11px; color:#A32D2D; font-weight:500; }
.task-check-v2 {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--card);
  border: 1.5px solid #ECECEF;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #8A8F98;
  transition: all 0.15s;
  flex-shrink: 0;
}
.task-check-v2:hover { background: var(--green-soft); border-color: var(--green); color: var(--green); }

/* ============================================================
   V0.8.0 — AI Intake: bara AI + bottom sheet
   ============================================================ */

/* Bara principală de intake */
.ai-intake-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #F5A623;
  border-radius: 14px;
  padding: 14px 16px;
  margin: 0 0 14px 0;
  cursor: pointer;
  user-select: none;
  transition: opacity .15s, transform .1s;
  box-shadow: 0 2px 8px rgba(245,166,35,.25);
}
.ai-intake-bar:active { opacity: .85; transform: scale(.985); }
.ai-bar-icon-left  { width: 22px; height: 22px; color: #7B4F00; flex-shrink: 0; }
.ai-bar-icon-right { width: 22px; height: 22px; color: #7B4F00; flex-shrink: 0; margin-left: auto; }
.ai-bar-text { flex: 1; }
.ai-bar-title { display: block; font-weight: 700; font-size: 15px; color: #3E2700; letter-spacing: .01em; }
.ai-bar-sub   { display: block; font-size: 12px; color: #7B4F00; margin-top: 1px; }

/* Overlay */
.ai-bs-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 500;
  opacity: 0; pointer-events: none;
  transition: opacity .28s;
}
.ai-bs-overlay.open { opacity: 1; pointer-events: auto; }

/* Bottom sheet */
.ai-bs-sheet {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--card);
  border-radius: 20px 20px 0 0;
  z-index: 501;
  transform: translateY(110%);
  transition: transform .3s cubic-bezier(.32,1.1,.56,1);
  padding-bottom: env(safe-area-inset-bottom, 0);
  max-height: 85vh;
  overflow-y: auto;
}
.ai-bs-sheet.open { transform: translateY(0); }

.ai-bs-handle {
  width: 40px; height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 10px auto 0;
}
.ai-bs-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px 0;
}
.ai-bs-title {
  font-size: 16px; font-weight: 700; color: var(--text1); flex: 1;
}
.ai-bs-close {
  background: none; border: none; font-size: 18px;
  color: var(--text3); cursor: pointer; padding: 4px 8px;
}
.ai-bs-body { padding: 12px 16px 20px; }

.ai-bs-textarea {
  width: 100%; box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--bg); color: var(--text1);
  font-size: 14px; font-family: inherit;
  resize: none; min-height: 80px;
  margin-bottom: 12px;
}
.ai-bs-textarea:focus { outline: none; border-color: #F5A623; }

.ai-bs-actions {
  display: flex; gap: 8px; align-items: center; justify-content: space-between;
}
.ai-bs-right-group {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
}
.ai-bs-photo-btn {
  display: flex; align-items: center; gap: 6px;
  background: var(--bg); color: var(--text2);
  border: 1px solid var(--border); border-radius: 8px;
  padding: 8px 14px; font-size: 13px; cursor: pointer; font-family: inherit;
}
.ai-bs-photo-btn:hover { border-color: var(--orange); color: var(--orange); }

.ai-bs-ws-toggle {
  display: flex; align-items: center; gap: 7px;
  font-size: 12px; color: var(--text3); cursor: pointer;
  user-select: none; transition: color .15s;
}
.ai-bs-ws-box {
  width: 16px; height: 16px; border: 1.5px solid var(--border);
  border-radius: 4px; background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: background .15s, border-color .15s;
}

.ai-bs-send-btn {
  display: flex; align-items: center; gap: 6px;
  background: #F5A623; color: #3E2700;
  border: none; border-radius: 8px;
  padding: 8px 18px; font-size: 14px; font-weight: 600; cursor: pointer; font-family: inherit;
}
.ai-bs-send-btn:disabled { opacity: .6; cursor: not-allowed; }

@keyframes spin { to { transform: rotate(360deg); } }
