/* AVA — Asistent Virtual de Afaceri · demo premium UI */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --accent: #6c5ce7; --accent-soft: #eeeaff;
  --bg: #f4f6fb; --card: #ffffff; --line: #e7e9f2;
  --text: #23263b; --muted: #7a7f9a;
  --ok: #16a34a; --warn: #d97706; --bad: #dc2626;
  --sidebar: #1b1e2f;
}
html { font-size: 15px; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  background: var(--bg); color: var(--text); min-height: 100vh;
}

/* ---------- Layout ---------- */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 230px; background: var(--sidebar); color: #cfd2e4; flex-shrink: 0;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.content { flex: 1; padding: 28px 34px; max-width: 1160px; }

/* ---------- Sidebar ---------- */
.logo { display: flex; gap: 12px; align-items: center; padding: 22px 20px; }
.logo-badge {
  width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
  background: linear-gradient(135deg, #6c5ce7, #a55eea);
  color: #fff; font-weight: 800; font-size: 22px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(108, 92, 231, .4);
}
.logo-badge.big { width: 64px; height: 64px; font-size: 34px; margin: 0 auto 10px; }
.logo-name { color: #fff; font-weight: 800; font-size: 20px; letter-spacing: .5px; }
.logo-sub { font-size: 11px; color: #8f93b8; margin-top: 1px; }
.sidebar nav { display: flex; flex-direction: column; padding: 8px 12px; gap: 2px; flex: 1; }
.sidebar nav a {
  color: #cfd2e4; text-decoration: none; padding: 11px 14px; border-radius: 10px;
  font-weight: 600; font-size: 14.5px; transition: .15s;
}
.sidebar nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidebar nav a.active { background: var(--accent); color: #fff; box-shadow: 0 4px 12px rgba(108,92,231,.35); }
.pill-new { display: none; }
.sidebar-footer { padding: 14px 16px; border-top: 1px solid rgba(255,255,255,.08); }
.user-chip { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; background: #343756;
  color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px;
}
.user-name { color: #fff; font-size: 13.5px; font-weight: 700; }
.user-mail { font-size: 11px; color: #8f93b8; }
.logout { color: #8f93b8; font-size: 12.5px; text-decoration: none; }
.logout:hover { color: #fff; }

/* ---------- Page head ---------- */
.page-head { margin-bottom: 22px; }
.page-head h1 { font-size: 26px; font-weight: 800; letter-spacing: -.3px; }
.page-head .sub { color: var(--muted); margin-top: 5px; font-size: 14.5px; }
.page-head.center { text-align: center; }

/* ---------- Cards ---------- */
.card {
  background: var(--card); border-radius: 16px; padding: 22px;
  box-shadow: 0 1px 3px rgba(30,35,80,.07), 0 8px 24px rgba(30,35,80,.05);
  margin-bottom: 20px; border: 1px solid var(--line);
}
.card h2 { font-size: 16.5px; font-weight: 800; margin-bottom: 14px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid2 .card { margin-bottom: 20px; }
@media (max-width: 1000px) { .grid2 { grid-template-columns: 1fr; } .layout { flex-direction: column; } .sidebar { width: 100%; height: auto; position: static; } }

/* ---------- Hero briefing ---------- */
.hero { display: flex; gap: 18px; align-items: center; background: linear-gradient(120deg, #fff, #f6f3ff);
  border-left: 4px solid var(--accent); }
.hero-ava { font-size: 44px; }
.hero-title { font-weight: 800; font-size: 16px; margin-bottom: 4px; color: var(--accent); }
.hero p { font-size: 14.5px; line-height: 1.55; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
@media (max-width: 800px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat { padding: 18px; text-align: center; }
.stat-n { font-size: 30px; font-weight: 800; color: var(--accent); }
.stat-l { color: var(--muted); font-size: 13px; margin-top: 3px; }

/* ---------- Lists ---------- */
.list { width: 100%; border-collapse: collapse; }
.list td { padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.list tr:last-child td { border-bottom: none; }
.list tr.late { background: #fff7f2; }
.list tr.unread { background: #f3f0ff; }
.list .right { text-align: right; }
.nowrap { white-space: nowrap; }
.item-title { font-weight: 700; font-size: 14.5px; }
.item-sub { color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.ava-note {
  margin-top: 7px; font-size: 12.8px; color: #4c4680; background: var(--accent-soft);
  padding: 7px 10px; border-radius: 8px; display: inline-block;
}
.empty { color: var(--muted); padding: 8px 0; }

/* ---------- Badges ---------- */
.badge {
  display: inline-block; padding: 3px 9px; border-radius: 20px; font-size: 11.5px;
  font-weight: 700; margin-left: 4px; white-space: nowrap;
}
.badge.ava { background: var(--accent-soft); color: var(--accent); }
.badge.new { background: #ffe9e3; color: #c0392b; }
.badge.done { background: #e8f7ee; color: var(--ok); }
.badge.prio.ridicata { background: #fde8e8; color: var(--bad); }
.badge.prio.medie { background: #fff3e0; color: var(--warn); }
.badge.prio.jos { background: #eef0f5; color: var(--muted); }
.badge.st.draft { background: #eef0f5; color: var(--muted); }
.badge.st.trimisa { background: #e3f0fd; color: #1d6fd1; }
.badge.st.platita { background: #e8f7ee; color: var(--ok); }
.badge.st.intarziata { background: #fde8e8; color: var(--bad); }
.badge.cat.comanda { background: #e3f0fd; color: #1d6fd1; }
.badge.cat.factura { background: #fdeee7; color: #b3541e; }
.badge.cat.followup { background: #f3f0ff; color: var(--accent); }
.badge.cat.spam { background: #eef0f5; color: var(--muted); }
.badge.cat.info { background: #e8f7ee; color: var(--ok); }
.cat-col { width: 110px; }

/* ---------- Buttons ---------- */
.btn {
  border: 1px solid var(--line); background: #fff; color: var(--text);
  padding: 9px 16px; border-radius: 10px; font-weight: 700; font-size: 13.5px;
  cursor: pointer; text-decoration: none; display: inline-block; transition: .15s;
}
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff;
  box-shadow: 0 4px 12px rgba(108,92,231,.3); }
.btn.primary:hover { filter: brightness(1.07); color: #fff; }
.btn.ok { border-color: #b7e4c7; color: var(--ok); }
.btn.small { padding: 6px 12px; font-size: 12.5px; }
.btn.tiny { padding: 4px 9px; font-size: 11.5px; margin-left: 4px; }
.btn.full { width: 100%; }
.toolbar { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; flex-wrap: wrap; }
.toolbar-note { color: var(--muted); font-size: 13px; }
.inline { display: inline-block; margin-left: 4px; }
.inline:first-of-type { margin-left: 0; }

/* ---------- Simulare email ---------- */
.sim-result { margin-top: 14px; border: 2px dashed var(--accent); border-radius: 12px; padding: 16px;
  background: #faf9ff; animation: pop .25s ease; }
.sim-result.hidden { display: none; }
.sim-header { font-weight: 800; color: var(--accent); margin-bottom: 8px; }
.sim-body { font-size: 14px; }
.sim-triage { margin-top: 8px; min-height: 22px; color: #4c4680; font-size: 13.5px; }
.sim-triage:not(:empty) { animation: fadeIn .4s ease; }
.sim-meta { margin-top: 8px; font-size: 12.5px; color: var(--muted); font-weight: 700; }
.sim-hint { margin-top: 10px; font-size: 12px; color: var(--muted); text-align: right; }
@keyframes pop { from { transform: scale(.97); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Feed ---------- */
.feed { display: flex; flex-direction: column; gap: 13px; }
.feed-item { display: flex; gap: 12px; align-items: flex-start; }
.feed-icon { width: 34px; height: 34px; background: var(--accent-soft); border-radius: 10px;
  display: flex; align-items: center; justify-content: center; font-size: 17px; flex-shrink: 0; }
.feed-item > div:last-child { font-size: 13.8px; line-height: 1.5; }
.feed-time { color: var(--muted); font-size: 11.5px; margin-top: 2px; }

/* ---------- Chat ---------- */
.chat-card { display: flex; flex-direction: column; height: calc(100vh - 210px); min-height: 420px; }
.chat-feed { flex: 1; overflow-y: auto; padding: 6px 2px; display: flex; flex-direction: column; gap: 12px; }
.msg { display: flex; }
.msg.user { justify-content: flex-end; }
.msg .bubble {
  max-width: 72%; padding: 11px 15px; border-radius: 16px; font-size: 14.2px; line-height: 1.5;
  white-space: pre-wrap;
}
.msg.ava .bubble { background: var(--accent-soft); color: #3d3a6e; border-bottom-left-radius: 4px; }
.msg.user .bubble { background: var(--accent); color: #fff; border-bottom-right-radius: 4px; }
.msg.typing .bubble { color: #9a95c7; }
.chat-bar { display: flex; gap: 10px; margin-top: 14px; }
.chat-bar input {
  flex: 1; border: 1.5px solid var(--line); border-radius: 12px; padding: 11px 15px;
  font-size: 14px; outline: none; background: #fafbff;
}
.chat-bar input:focus { border-color: var(--accent); }
.chat-suggest { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line); background: #fff; border-radius: 20px; padding: 6px 13px;
  font-size: 12.5px; cursor: pointer; font-weight: 600; color: var(--muted); transition: .15s;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Login ---------- */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(1000px 600px at 70% -10%, #8e7ff0 0%, var(--sidebar) 55%); }
.auth-card {
  background: #fff; border-radius: 22px; padding: 38px 42px; width: 380px;
  box-shadow: 0 24px 70px rgba(10,10,40,.45); text-align: center;
}
.auth-card h1 { font-size: 30px; font-weight: 800; margin: 8px 0 4px; color: var(--text); }
.auth-card .tagline { color: var(--muted); font-size: 14px; margin-bottom: 24px; line-height: 1.5; }
.auth-card form { display: flex; flex-direction: column; text-align: left; }
.auth-card label { font-size: 12.5px; font-weight: 700; margin: 10px 0 5px; color: var(--text); }
.auth-card input {
  border: 1.5px solid var(--line); border-radius: 11px; padding: 12px 14px; font-size: 14px; outline: none;
}
.auth-card input:focus { border-color: var(--accent); }
.auth-card .btn { margin-top: 20px; }
.auth-card .hint { margin-top: 16px; font-size: 12px; color: var(--muted); }

/* ---------- Facturi / formulare ---------- */
.form-row { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; margin-bottom: 6px; }
.form-field label { font-size: 12.5px; font-weight: 700; display: block; margin-bottom: 6px; }
.form-field select, .form-field input {
  width: 100%; border: 1.5px solid var(--line); border-radius: 11px; padding: 11px 13px;
  font-size: 14px; background: #fff; outline: none;
}
.form-field select:focus, .form-field input:focus { border-color: var(--accent); }
.form-field input:disabled { background: #f3f4fa; color: var(--muted); }
.items-table { width: 100%; border-collapse: collapse; margin: 12px 0 18px; }
.items-table th { text-align: left; font-size: 12px; color: var(--muted); padding: 8px 6px;
  border-bottom: 2px solid var(--line); text-transform: uppercase; letter-spacing: .4px; }
.items-table td { padding: 7px 6px; border-bottom: 1px solid var(--line); }
.items-table input { width: 100%; border: 1.5px solid var(--line); border-radius: 9px;
  padding: 9px 11px; font-size: 13.5px; outline: none; }
.items-table input:focus { border-color: var(--accent); }
.totals { margin-left: auto; width: 260px; font-size: 13.5px; display: flex; flex-direction: column; gap: 5px;
  padding: 12px 4px; }
.totals .grand { font-size: 16px; font-weight: 800; color: var(--accent); border-top: 2px solid var(--line);
  padding-top: 8px; }
.hint-inline { color: var(--muted); font-size: 12.5px; margin-left: 12px; }

/* ---------- Invoice detail ---------- */
.inv-actions { margin-bottom: 18px; display: flex; gap: 10px; flex-wrap: wrap; }
.inv-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; }
.inv-company { font-size: 15px; }
.inv-small { color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.inv-bignumber { font-size: 27px; font-weight: 800; color: var(--accent); }
.inv-meta { font-size: 13.5px; line-height: 1.9; padding: 14px 0; border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.items-table.inv .tot-row td { font-weight: 700; }
.items-table.inv .grand td { font-size: 15.5px; font-weight: 800; color: var(--accent); }
.inv-footer { margin-top: 14px; }

/* ---------- Prezentare ---------- */
.pitch-cols { display: grid; grid-template-columns: 1.15fr 1fr; gap: 34px; }
@media (max-width: 900px) { .pitch-cols { grid-template-columns: 1fr; } }
.pitch-list { list-style: none; display: flex; flex-direction: column; gap: 12px; font-size: 14.5px;
  line-height: 1.55; }
.roi-box { background: #faf9ff; border: 1.5px solid var(--accent-soft); border-radius: 14px; padding: 18px; }
.roi-line { font-weight: 800; color: var(--accent); margin-bottom: 10px; font-size: 15px; }
.roi-box label { font-size: 13.5px; display: block; margin-bottom: 14px; color: var(--text); }
.roi-box input[type=range] { width: 100%; accent-color: var(--accent); margin-top: 8px; }
.roi-result { font-size: 13.5px; line-height: 1.9; }
.roi-result .grand { color: var(--ok); font-size: 15.5px; font-weight: 800; }
.pricing { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 800px) { .pricing { grid-template-columns: 1fr; } }
.price-box { border: 1.5px solid var(--line); border-radius: 14px; padding: 22px; position: relative; text-align: center; }
.price-box.featured { border-color: var(--accent); box-shadow: 0 8px 26px rgba(108,92,231,.18); }
.price-tag { position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; padding: 3px 12px;
  border-radius: 20px; }
.price-name { font-weight: 800; font-size: 15px; color: var(--muted); }
.price-val { font-size: 30px; font-weight: 800; margin: 8px 0 14px; }
.price-val span { font-size: 13px; color: var(--muted); font-weight: 600; }
.price-box ul { list-style: none; font-size: 13px; color: var(--text); line-height: 2; }
.center { text-align: center; }

/* ---------- Flash ---------- */
.flash { padding: 12px 18px; border-radius: 12px; margin-bottom: 16px; font-weight: 600; font-size: 14px; }
.flash.ok { background: #e8f7ee; color: var(--ok); border: 1px solid #b7e4c7; }
.flash.err { background: #fde8e8; color: var(--bad); border: 1px solid #f5b5b1; }

/* ---------- Print ---------- */
@media print {
  .sidebar, .inv-actions, .page-head .sub, .toolbar { display: none !important; }
  .content { padding: 0; }
  .card { box-shadow: none; border: none; }
}
/* ---------- v2: icons, logo, lang switch, live dot ---------- */
svg.ic { display: inline-block; vertical-align: -3px; }
.sidebar nav a .ic { margin-right: 8px; vertical-align: -4px; }
h1 .ic { color: var(--accent); }
.card h2 .ic { margin-right: 6px; color: var(--accent); vertical-align: -3px; }
.btn .ic { vertical-align: -3px; }
.ava-note .ic { color: var(--accent); vertical-align: -2px; margin-right: 2px; }
.logout .ic { vertical-align: -2px; margin-right: 5px; }
.chip .ic { vertical-align: -2px; margin-right: 2px; }
.lang-switch { display: flex; gap: 6px; margin: 2px 20px 16px; }
.lang-btn { font-size: 11px; font-weight: 800; letter-spacing: .5px; padding: 4px 12px; border-radius: 20px; text-decoration: none; color: #8f93b8; border: 1px solid rgba(255,255,255,.14); transition: .15s; }
.lang-btn:hover { color: #fff; }
.lang-btn.on { background: var(--accent); color: #fff; border-color: var(--accent); box-shadow: 0 3px 10px rgba(108,92,231,.4); }
.auth-lang { display: flex; gap: 6px; justify-content: center; margin-bottom: 16px; }
.auth-lang .lang-btn { color: var(--muted); border-color: var(--line); background: #fff; }
.auth-lang .lang-btn:hover { color: var(--accent); }
.auth-lang .lang-btn.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.logo-big { display: flex; justify-content: center; margin-bottom: 8px; }
.dot-live { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; display: inline-block; margin: 0 4px 0 2px; vertical-align: 1px; animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(34,197,94,.55);} 70% { box-shadow: 0 0 0 7px rgba(34,197,94,0);} 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0);} }
.feed-icon .ic { width: 17px; height: 17px; color: var(--accent); }
.hero-ava .ic-logo { display: block; }
.page-head .ic { vertical-align: -4px; }
