/* ============================================================
   DAMIFY — Design System v2
   Inspirat din: Linear, Vercel, Raycast
   Palette: Deep space dark + Amber gold + Indigo accent
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Culori de baza */
  --bg:           #07080d;
  --bg-2:         #0c0e15;
  --surface:      #0f1118;
  --surface-2:    #151820;
  --surface-3:    #1c2030;
  --border:       rgba(255,255,255,.07);
  --border-hover: rgba(255,255,255,.14);

  /* Accent principal — amber */
  --amber:        #f0b429;
  --amber-dim:    rgba(240,180,41,.15);
  --amber-glow:   rgba(240,180,41,.25);

  /* Accent secundar — indigo */
  --indigo:       #6366f1;
  --indigo-dim:   rgba(99,102,241,.15);
  --indigo-glow:  rgba(99,102,241,.2);

  /* Status */
  --green:        #22c55e;
  --green-dim:    rgba(34,197,94,.12);
  --red:          #ef4444;
  --red-dim:      rgba(239,68,68,.12);
  --orange:       #f97316;
  --orange-dim:   rgba(249,115,22,.12);

  /* Text */
  --text:         #f0f2f8;
  --text-2:       #a0a8c0;
  --text-3:       #505870;

  /* Misc */
  --radius:       10px;
  --radius-lg:    16px;
  --radius-xl:    20px;
  --font:         'Inter', system-ui, sans-serif;
  --transition:   .18s cubic-bezier(.4,0,.2,1);
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  /* Subtle noise texture */
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
}

a { color: var(--amber); text-decoration: none; transition: color var(--transition); }
a:hover { color: #ffd166; text-decoration: none; }

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-3); }

/* ============================================================
   LAYOUT PRINCIPAL
   ============================================================ */
.layout {
  min-height: 100vh;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
  background: linear-gradient(180deg, var(--surface) 0%, #0d0f17 100%);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 220px;
  z-index: 50;
  overflow-y: auto;
  box-shadow: 4px 0 24px rgba(0,0,0,.25);
}

.sidebar-logo {
  padding: 1.25rem 1rem .875rem;
  display: flex;
  align-items: center;
  gap: .625rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: .375rem;
}

.sidebar-logo-mark {
  width: 28px;
  height: 28px;
  background: var(--amber);
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .875rem;
  font-weight: 800;
  color: #000;
  flex-shrink: 0;
  box-shadow: 0 0 20px rgba(240,180,41,.4);
}

.sidebar-logo-text {
  font-size: .9375rem;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--text);
}

.sidebar-logo-text span { color: var(--amber); }

.sidebar-logo-img {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 0 10px rgba(240,180,41,.35));
}

.sidebar-section-label {
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-3);
  padding: 1rem 1rem .3rem;
}

.sidebar-nav {
  list-style: none;
  padding: 0 .625rem;
}

.sidebar-nav li + li { margin-top: 1px; }

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: .625rem;
  padding: .4375rem .75rem;
  border-radius: 8px;
  color: var(--text-2);
  font-size: .8125rem;
  font-weight: 500;
  transition: all var(--transition);
  position: relative;
  letter-spacing: -.01em;
}

.sidebar-nav a:hover {
  background: var(--surface-2);
  color: var(--text);
  text-decoration: none;
}

.sidebar-nav a.active {
  background: linear-gradient(135deg, rgba(240,180,41,.16) 0%, rgba(240,180,41,.05) 100%);
  color: var(--amber);
  font-weight: 600;
  border: 1px solid rgba(240,180,41,.18);
  box-shadow: 0 2px 12px rgba(240,180,41,.06);
}

.sidebar-nav a.active::before {
  content: '';
  position: absolute;
  left: -1px;
  top: 50%;
  transform: translateY(-50%);
  width: 2.5px;
  height: 55%;
  background: var(--amber);
  border-radius: 0 2px 2px 0;
  box-shadow: 2px 0 10px rgba(240,180,41,.5);
}

.nav-icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  opacity: .6;
  transition: opacity var(--transition);
}

.sidebar-nav a.active .nav-icon,
.sidebar-nav a:hover .nav-icon { opacity: 1; }

.sidebar-footer {
  margin-top: auto;
  padding: .75rem .625rem;
  border-top: 1px solid var(--border);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .5rem .625rem;
  border-radius: 8px;
  transition: background var(--transition);
}

.sidebar-user:hover { background: var(--surface-2); }

.sidebar-avatar {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--amber) 0%, #d97706 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .7rem;
  font-weight: 800;
  color: #000;
  flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(240,180,41,.3);
}

.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-name {
  font-size: .75rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-user-role {
  font-size: .65rem;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.main-content {
  margin-left: 220px;
  min-height: 100vh;
  background: var(--bg);
  width: calc(100% - 220px);
}

.content-inner {
  padding: 2rem 2rem 3rem;
  max-width: 1200px;
  width: 100%;
}

/* ============================================================
   TOPBAR (breadcrumb + actions)
   ============================================================ */
.topbar {
  height: 52px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  background: rgba(7,8,13,.85);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  position: sticky;
  top: 0;
  z-index: 40;
  box-shadow: 0 1px 0 var(--border);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: .375rem;
  font-size: .8rem;
  color: var(--text-3);
}

.breadcrumb-sep { opacity: .4; }
.breadcrumb-current { color: var(--text-2); font-weight: 500; }

.topbar-actions { display: flex; align-items: center; gap: .5rem; }

/* Logo topbar — ascuns pe desktop, centrat pe mobil */
.topbar-logo {
  display: none;
  align-items: center;
  gap: .375rem;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
}

/* ============================================================
   PAGE HEADER
   ============================================================ */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.75rem;
  padding-top: .25rem;
}

.page-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -.03em;
  color: var(--text);
  line-height: 1.2;
}

.page-subtitle {
  font-size: .8125rem;
  color: var(--text-3);
  margin-top: .375rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}

/* ============================================================
   KPI CARDS
   ============================================================ */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .875rem;
  margin-bottom: 1.25rem;
}

.kpi-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.375rem 1.375rem 1.25rem;
  position: relative;
  overflow: hidden;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}

/* Linie de highlight la top */
.kpi-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  opacity: .6;
}

.kpi-amber::before  { background: linear-gradient(90deg, transparent, var(--amber), transparent); }
.kpi-green::before  { background: linear-gradient(90deg, transparent, var(--green), transparent); }
.kpi-indigo::before { background: linear-gradient(90deg, transparent, var(--indigo), transparent); }
.kpi-blue::before   { background: linear-gradient(90deg, transparent, var(--indigo), transparent); }
.kpi-red::before    { background: linear-gradient(90deg, transparent, var(--red), transparent); }

.kpi-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(0,0,0,.22);
}

.kpi-amber:hover  { box-shadow: 0 8px 32px rgba(240,180,41,.08); }
.kpi-green:hover  { box-shadow: 0 8px 32px rgba(34,197,94,.08); }
.kpi-indigo:hover { box-shadow: 0 8px 32px rgba(99,102,241,.08); }
.kpi-blue:hover   { box-shadow: 0 8px 32px rgba(99,102,241,.08); }
.kpi-red:hover    { box-shadow: 0 8px 32px rgba(239,68,68,.08); }

/* Corner glow — mai vizibil */
.kpi-card.kpi-amber .kpi-glow  { background: radial-gradient(ellipse at 90% 0%, rgba(240,180,41,.18) 0%, transparent 65%); }
.kpi-card.kpi-green .kpi-glow  { background: radial-gradient(ellipse at 90% 0%, rgba(34,197,94,.14) 0%, transparent 65%); }
.kpi-card.kpi-indigo .kpi-glow { background: radial-gradient(ellipse at 90% 0%, rgba(99,102,241,.16) 0%, transparent 65%); }
.kpi-card.kpi-blue .kpi-glow   { background: radial-gradient(ellipse at 90% 0%, rgba(99,102,241,.16) 0%, transparent 65%); }
.kpi-card.kpi-red .kpi-glow    { background: radial-gradient(ellipse at 90% 0%, rgba(239,68,68,.14) 0%, transparent 65%); }

.kpi-glow {
  position: absolute;
  top: 0; right: 0;
  width: 140px; height: 110px;
  pointer-events: none;
}

.kpi-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  font-size: .875rem;
  font-weight: 700;
}

.kpi-amber .kpi-icon  { background: rgba(240,180,41,.15); color: var(--amber);  border: 1px solid rgba(240,180,41,.2); }
.kpi-green .kpi-icon  { background: rgba(34,197,94,.12);  color: var(--green);  border: 1px solid rgba(34,197,94,.2); }
.kpi-indigo .kpi-icon { background: rgba(99,102,241,.12); color: var(--indigo); border: 1px solid rgba(99,102,241,.2); }
.kpi-blue .kpi-icon   { background: rgba(99,102,241,.12); color: var(--indigo); border: 1px solid rgba(99,102,241,.2); }
.kpi-red .kpi-icon    { background: rgba(239,68,68,.12);  color: var(--red);    border: 1px solid rgba(239,68,68,.2); }

.kpi-label {
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: .5rem;
}

.kpi-value {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -.05em;
  color: var(--text);
  line-height: 1;
}

.kpi-amber .kpi-value { color: var(--amber); text-shadow: 0 0 40px rgba(240,180,41,.3); }

.kpi-footer {
  display: flex;
  align-items: center;
  gap: .375rem;
  margin-top: .625rem;
}

.kpi-sub {
  font-size: .75rem;
  color: var(--text-3);
}

.kpi-trend {
  font-size: .7rem;
  font-weight: 700;
  padding: .1rem .4rem;
  border-radius: 4px;
  letter-spacing: .02em;
}

.kpi-trend.up   { color: var(--green);  background: rgba(34,197,94,.12); }
.kpi-trend.down { color: var(--red);    background: rgba(239,68,68,.12); }

/* Progress bar */
.progress-track {
  height: 3px;
  background: rgba(255,255,255,.05);
  border-radius: 2px;
  margin-top: .875rem;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--amber), #ffd166);
  box-shadow: 0 0 10px rgba(240,180,41,.4);
  transition: width .8s cubic-bezier(.4,0,.2,1);
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 4px 24px rgba(0,0,0,.18);
}

.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.1), transparent);
  pointer-events: none;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.125rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.card-title {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-3);
  display: flex;
  align-items: center;
  gap: .5rem;
}

.card-body { padding: 1.5rem; }

/* ============================================================
   AI FOCUS CARD
   ============================================================ */
.ai-card {
  background: var(--surface);
  border: 1px solid rgba(240,180,41,.2);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 1.5rem;
  position: relative;
}

.ai-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at top left, rgba(240,180,41,.05) 0%, transparent 60%);
  pointer-events: none;
}

.ai-card-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(240,180,41,.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ai-badge {
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  background: var(--amber-dim);
  color: var(--amber);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .25rem .75rem;
  border-radius: 999px;
  border: 1px solid rgba(240,180,41,.2);
}

.ai-pulse {
  width: 6px;
  height: 6px;
  background: var(--amber);
  border-radius: 50%;
  box-shadow: 0 0 0 0 var(--amber-glow);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(240,180,41,.4); }
  70%  { box-shadow: 0 0 0 6px rgba(240,180,41,0); }
  100% { box-shadow: 0 0 0 0 rgba(240,180,41,0); }
}

.ai-card-body { padding: 1.25rem 1.5rem; }

.ai-focus-text {
  font-size: .9375rem;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 1.25rem;
}

.ai-priorities {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.ai-priorities li {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  font-size: .875rem;
  color: var(--text-2);
  padding: .5rem .75rem;
  background: var(--surface-2);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.ai-priority-num {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  background: var(--amber-dim);
  color: var(--amber);
  font-size: .65rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.ai-warning {
  margin-top: 1rem;
  padding: .75rem 1rem;
  background: var(--red-dim);
  border: 1px solid rgba(239,68,68,.2);
  border-radius: var(--radius);
  font-size: .875rem;
  color: var(--red);
  display: flex;
  align-items: center;
  gap: .5rem;
}

.ai-motivation {
  margin-top: 1rem;
  font-size: .8125rem;
  color: var(--text-3);
  font-style: italic;
  border-left: 2px solid var(--amber-dim);
  padding-left: .75rem;
}

/* ============================================================
   TABELE
   ============================================================ */
.table-wrap { overflow-x: auto; }

table { width: 100%; border-collapse: collapse; }

thead tr {
  background: linear-gradient(180deg, var(--surface-2) 0%, rgba(21,24,32,.6) 100%);
}

th {
  padding: .75rem 1.25rem;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-3);
  text-align: left;
  white-space: nowrap;
}

td {
  padding: .875rem 1.25rem;
  font-size: .875rem;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

tr:last-child td { border-bottom: none; }

tbody tr {
  transition: background var(--transition);
}

tbody tr:hover td { background: var(--surface-2); }

/* ============================================================
   BADGES
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: .2rem .6rem;
  border-radius: 6px;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .04em;
}

.badge::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
}

.badge-green  { background: var(--green-dim);  color: var(--green);  border: 1px solid rgba(34,197,94,.2); }
.badge-green::before  { background: var(--green); }
.badge-red    { background: var(--red-dim);    color: var(--red);    border: 1px solid rgba(239,68,68,.2); }
.badge-red::before    { background: var(--red); }
.badge-amber  { background: var(--amber-dim);  color: var(--amber);  border: 1px solid rgba(240,180,41,.2); }
.badge-amber::before  { background: var(--amber); }
.badge-indigo { background: var(--indigo-dim); color: var(--indigo); border: 1px solid rgba(99,102,241,.2); }
.badge-indigo::before { background: var(--indigo); }
.badge-dim    { background: rgba(255,255,255,.05); color: var(--text-3); border: 1px solid var(--border); }
.badge-dim::before    { background: var(--text-3); }

/* ============================================================
   BUTOANE
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .375rem;
  padding: .5rem 1rem;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition);
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
}

.btn:hover { text-decoration: none; }
.btn:active { transform: scale(.97); }

.btn-primary {
  background: linear-gradient(135deg, var(--amber) 0%, #d97706 100%);
  color: #000;
  border-color: var(--amber);
  box-shadow: 0 2px 16px rgba(240,180,41,.3), inset 0 1px 0 rgba(255,255,255,.2);
  position: relative;
  overflow: hidden;
}
.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,.12) 0%, transparent 50%);
  pointer-events: none;
}
.btn-primary:hover {
  background: linear-gradient(135deg, #ffc848 0%, #f0a020 100%);
  color: #000;
  box-shadow: 0 4px 24px rgba(240,180,41,.45);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover {
  background: var(--surface-3);
  border-color: var(--border-hover);
  color: var(--text);
}

.btn-ghost {
  background: transparent;
  color: var(--text-2);
  border-color: var(--border);
}
.btn-ghost:hover {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--border-hover);
}

.btn-danger {
  background: var(--red-dim);
  color: var(--red);
  border-color: rgba(239,68,68,.2);
}
.btn-danger:hover {
  background: var(--red);
  color: #fff;
}

.btn-sm { padding: .3rem .7rem; font-size: .8rem; }
.btn-full { width: 100%; }

/* ============================================================
   FORMS
   ============================================================ */
.form-group { margin-bottom: 1.125rem; }

label {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: .375rem;
  letter-spacing: .01em;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
select,
textarea {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font);
  font-size: .9rem;
  padding: .625rem .875rem;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  -webkit-appearance: none;
}

input:focus, select:focus, textarea:focus {
  border-color: rgba(240,180,41,.5);
  box-shadow: 0 0 0 3px rgba(240,180,41,.07), 0 1px 0 rgba(240,180,41,.1);
}

input::placeholder, textarea::placeholder { color: var(--text-3); }

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23505870' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .875rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

input[type="file"] {
  cursor: pointer;
  color: var(--text-2);
  font-size: .875rem;
}
input[type="file"]::-webkit-file-upload-button {
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-2);
  cursor: pointer;
  font-family: var(--font);
  font-size: .75rem;
  font-weight: 600;
  margin-right: .75rem;
  padding: .3rem .7rem;
  transition: background var(--transition), color var(--transition);
}
input[type="file"]::-webkit-file-upload-button:hover {
  background: var(--surface-2);
  color: var(--text);
}

.form-error { font-size: .8rem; color: var(--red); margin-top: .3rem; }
.form-hint  { font-size: .8rem; color: var(--text-3); margin-top: .3rem; }

/* ============================================================
   AUTH PAGES
   ============================================================ */
.auth-layout {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
}

/* Orb decorativ in background */
.auth-layout::before {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(240,180,41,.06) 0%, transparent 70%);
  top: -200px; right: -200px;
  pointer-events: none;
}

.auth-layout::after {
  content: '';
  position: absolute;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99,102,241,.06) 0%, transparent 70%);
  bottom: -100px; left: -100px;
  pointer-events: none;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  position: relative;
  z-index: 1;
  box-shadow: 0 24px 64px rgba(0,0,0,.4);
}

.auth-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.12), transparent);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: .625rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.auth-logo-mark {
  width: 36px; height: 36px;
  background: var(--amber);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  color: #000;
  box-shadow: 0 0 20px var(--amber-glow);
}

.auth-logo-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.02em;
}

.auth-heading { font-size: 1.25rem; font-weight: 700; letter-spacing: -.03em; margin-bottom: .25rem; }
.auth-subheading { font-size: .875rem; color: var(--text-2); margin-bottom: 1.75rem; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin: 1.25rem 0;
  color: var(--text-3);
  font-size: .75rem;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ============================================================
   ONBOARDING — ob-* design system
   ============================================================ */

.ob-layout {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background: #07080d;
  position: relative;
  overflow: hidden;
}

/* Orb decorativ */
.ob-layout::before {
  content: '';
  position: absolute;
  width: 560px; height: 560px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(240,180,41,.07) 0%, transparent 60%);
  top: -180px; right: -180px;
  pointer-events: none;
  z-index: 0;
}

/* ── Card ─────────────────────────────────────────────────── */
.ob-card {
  width: 100%;
  max-width: 560px;
  background: #111318;
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 22px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(255,255,255,.04),
    0 4px 16px rgba(0,0,0,.4),
    0 16px 48px rgba(0,0,0,.5),
    0 48px 96px rgba(0,0,0,.35);
  position: relative;
  z-index: 1;
}

.ob-card-accent {
  height: 3px;
  background: linear-gradient(90deg,
    transparent 0%,
    #f0b429 25%,
    #fbbf24 50%,
    #f0b429 75%,
    transparent 100%
  );
}

.ob-card-inner {
  padding: 2rem 2.25rem 2.5rem;
}

/* ── Header ─────────────────────────────────────────────────  */
.ob-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.75rem;
}

.ob-logo {
  display: flex;
  align-items: center;
  gap: .5rem;
  text-decoration: none;
}

.ob-logo-mark {
  width: 32px;
  height: 32px;
  background: #f0b429;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: .9rem;
  color: #000;
  box-shadow: 0 0 16px rgba(240,180,41,.4);
  flex-shrink: 0;
}

.ob-logo-text {
  font-size: 1.05rem;
  font-weight: 800;
  color: #f0f2f8;
  letter-spacing: -.02em;
}

/* ── Progress bar ─────────────────────────────────────────── */
.ob-progress-wrap {
  height: 4px;
  background: rgba(255,255,255,.06);
  border-radius: 4px;
  margin-bottom: .55rem;
  overflow: hidden;
}

.ob-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #f0b429, #fbbf24);
  border-radius: 4px;
  transition: width .4s ease;
}

.ob-progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.75rem;
}

.ob-progress-label {
  font-size: .68rem;
  font-weight: 800;
  color: rgba(240,180,41,.9);
  text-transform: uppercase;
  letter-spacing: .09em;
}

.ob-progress-count {
  font-size: .68rem;
  color: rgba(255,255,255,.3);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* ── Step icon ────────────────────────────────────────────── */
.ob-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(240,180,41,.1);
  border: 1px solid rgba(240,180,41,.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.1rem;
}

/* ── Typography ────────────────────────────────────────────── */
.ob-title {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -.035em;
  color: #f0f2f8;
  margin: 0 0 .4rem;
  line-height: 1.2;
}

.ob-sub {
  font-size: .875rem;
  color: rgba(255,255,255,.45);
  margin: 0 0 1.75rem;
  line-height: 1.6;
}

/* ── Fields ─────────────────────────────────────────────────  */
.ob-field { margin-bottom: 1.1rem; }
.ob-field:last-child { margin-bottom: 0; }

.ob-field-row {
  display: flex;
  gap: .75rem;
  margin-bottom: 1.1rem;
}
.ob-field-row:last-child { margin-bottom: 0; }
.ob-field-row > .ob-field { margin-bottom: 0; }

.ob-row-fields > .ob-field:last-child,
.ob-row-fields > .ob-field-row:last-child { margin-bottom: 0; }

.ob-label {
  display: block;
  font-size: .76rem;
  font-weight: 700;
  color: rgba(255,255,255,.55);
  margin-bottom: .4rem;
  letter-spacing: .01em;
}

.ob-required { color: #ef4444; margin-left: .15rem; }

.ob-hint {
  font-size: .73rem;
  color: rgba(255,255,255,.3);
  margin-top: .375rem;
  line-height: 1.5;
}

.ob-error {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .75rem;
  color: #fca5a5;
  margin-top: .4rem;
  padding: .4rem .7rem;
  background: rgba(239,68,68,.08);
  border: 1px solid rgba(239,68,68,.18);
  border-radius: 7px;
  line-height: 1.4;
}
.ob-error svg { flex-shrink: 0; }

/* ── Currency selector ─────────────────────────────────────── */
.ob-currency-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .625rem;
  margin-top: .4rem;
}

.ob-currency-opt { display: block; cursor: pointer; }
.ob-currency-radio { display: none; }

.ob-currency-btn {
  border: 1.5px solid rgba(255,255,255,.1);
  border-radius: 10px;
  padding: .75rem .5rem;
  text-align: center;
  background: rgba(255,255,255,.03);
  transition: border-color .2s, background .2s, box-shadow .2s;
  cursor: pointer;
  user-select: none;
}
.ob-currency-btn:hover {
  border-color: rgba(240,180,41,.4);
  background: rgba(240,180,41,.04);
}
.ob-currency-sym {
  display: block;
  font-size: 1.15rem;
  font-weight: 800;
  color: #f0f2f8;
  line-height: 1;
}
.ob-currency-code {
  display: block;
  font-size: .68rem;
  color: rgba(255,255,255,.35);
  margin-top: .25rem;
  font-weight: 600;
}
.ob-currency-radio:checked + .ob-currency-btn {
  border-color: #f0b429;
  background: rgba(240,180,41,.1);
  box-shadow: 0 0 0 3px rgba(240,180,41,.12);
}
.ob-currency-radio:checked + .ob-currency-btn .ob-currency-sym,
.ob-currency-radio:checked + .ob-currency-btn .ob-currency-code {
  color: #f0b429;
}

/* ── Rows box ──────────────────────────────────────────────── */
.ob-rows-box {
  background: rgba(255,255,255,.02);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 14px;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

/* ── Client / Invoice rows ──────────────────────────────────── */
.ob-client-row,
.ob-invoice-row {
  background: rgba(255,255,255,.025);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  margin-bottom: .625rem;
  transition: border-color .2s, background .2s;
}
.ob-client-row:last-of-type,
.ob-invoice-row:last-of-type { margin-bottom: 0; }
.ob-client-row:focus-within,
.ob-invoice-row:focus-within {
  border-color: rgba(240,180,41,.3);
  background: rgba(240,180,41,.02);
}

.ob-row-tag {
  font-size: .65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: rgba(240,180,41,.75);
  margin-bottom: .75rem;
}
.ob-row-fields { flex: 1; min-width: 0; }

/* ── Info box ─────────────────────────────────────────────── */
.ob-info-box {
  display: flex;
  align-items: flex-start;
  gap: .625rem;
  background: rgba(99,102,241,.07);
  border: 1px solid rgba(99,102,241,.18);
  border-radius: 10px;
  padding: .875rem 1rem;
  font-size: .82rem;
  color: rgba(255,255,255,.6);
  line-height: 1.5;
  margin-bottom: 1.25rem;
}
.ob-info-box a { color: #818cf8; }

/* ── Step 4 summary ─────────────────────────────────────────  */
.ob-summary {
  background: rgba(255,255,255,.025);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 12px;
  padding: 1.1rem 1.25rem;
  margin: 1.5rem 0;
}
.ob-summary-title {
  font-size: .64rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: #f0b429;
  margin-bottom: .875rem;
}
.ob-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .83rem;
  padding: .4rem 0;
  border-bottom: 1px solid rgba(255,255,255,.04);
}
.ob-summary-row:last-child { border-bottom: none; padding-bottom: 0; }
.ob-summary-row span:first-child { color: rgba(255,255,255,.4); }

/* ── Actions ─────────────────────────────────────────────── */
.ob-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.75rem;
  gap: .75rem;
}
.ob-actions-end {
  display: flex;
  justify-content: flex-end;
  margin-top: 1.75rem;
}

/* ── Skip ─────────────────────────────────────────────────── */
.ob-skip {
  text-align: center;
  margin-top: 1.1rem;
  font-size: .78rem;
  color: rgba(255,255,255,.3);
}
.ob-skip a {
  color: rgba(255,255,255,.4);
  text-underline-offset: 2px;
  transition: color .15s;
}
.ob-skip a:hover { color: #f0b429; }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 580px) {
  /* Layout: padding mic dar card rămâne card */
  .ob-layout {
    padding: 1.25rem .875rem;
    align-items: flex-start;
  }

  /* Card: păstrăm border-radius și bordere — rămâne incaseteat */
  .ob-card {
    border-radius: 16px;
    max-width: 100%;
  }

  .ob-card-inner { padding: 1.5rem 1.25rem 2rem; }

  .ob-title { font-size: 1.2rem; }
  .ob-sub { font-size: .82rem; margin-bottom: 1.35rem; }
  .ob-icon { width: 44px; height: 44px; font-size: 1.2rem; border-radius: 11px; }

  /* Field rows → stivă verticală */
  .ob-field-row { flex-direction: column; gap: 0; }
  .ob-field-row > .ob-field { margin-bottom: .875rem; }
  .ob-field-row > .ob-field:last-child { margin-bottom: 0; }

  /* Inputuri 16px → fără zoom iOS */
  .ob-card input,
  .ob-card select,
  .ob-card textarea { font-size: 16px !important; }

  /* Butoane full-width, Continuă primul */
  .ob-actions { flex-direction: column-reverse; gap: .5rem; }
  .ob-actions .btn,
  .ob-actions-end .btn { width: 100%; justify-content: center; }

  .ob-progress-meta { margin-bottom: 1.35rem; }
}


/* ============================================================
   ONBOARDING LEGACY (păstrat pentru compatibilitate)
   ============================================================ */
.onboarding-layout {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

.onboarding-layout::before {
  content: '';
  position: absolute;
  width: 800px; height: 800px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(240,180,41,.04) 0%, transparent 70%);
  top: -300px; right: -300px;
  pointer-events: none;
}

.onboarding-card {
  width: 100%;
  max-width: 580px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  box-shadow: 0 24px 64px rgba(0,0,0,.4);
  position: relative;
  z-index: 1;
}

.onboarding-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.1), transparent);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.step-indicator {
  display: flex;
  align-items: center;
  gap: .375rem;
  margin-bottom: 2rem;
}

.step-dot {
  height: 3px;
  border-radius: 2px;
  background: var(--surface-3);
  flex: 1;
  transition: all .4s;
}
.step-dot.active { background: var(--amber); box-shadow: 0 0 8px var(--amber-glow); }
.step-dot.done   { background: var(--green); }

.step-label {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: .5rem;
}

.onboarding-title {
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -.03em;
  margin-bottom: .375rem;
}

.onboarding-subtitle {
  font-size: .875rem;
  color: var(--text-2);
  margin-bottom: 2rem;
}

.formset-row {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: .75rem;
  display: grid;
  gap: .75rem;
}
.formset-row-3 { grid-template-columns: 1.5fr 1.5fr 1fr; }
.formset-row-2 { grid-template-columns: 1fr 1fr; }
.formset-row-invoice { grid-template-columns: 1.5fr 1fr 1fr 1fr; gap:.75rem; }

/* Progress dots onboarding */
.onboarding-steps {
  display: flex;
  gap: .5rem;
  margin-bottom: 1.75rem;
}
.onboarding-step-dot {
  height: 4px;
  flex: 1;
  border-radius: 2px;
  background: var(--surface-3, rgba(255,255,255,.08));
  transition: all .35s;
}
.onboarding-step-dot.active { background: var(--amber, #f0b429); box-shadow: 0 0 8px rgba(240,180,41,.4); }
.onboarding-step-dot.done   { background: var(--green, #22c55e); }

/* ============================================================
   TASK ITEMS
   ============================================================ */
.task-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .75rem 1.25rem;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

.task-item:last-child { border-bottom: none; }
.task-item:hover { background: var(--surface-2); }

.task-check-btn {
  width: 18px; height: 18px;
  border-radius: 5px;
  border: 1.5px solid var(--border-hover);
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition);
  color: transparent;
  font-size: .65rem;
}

.task-check-btn:hover { border-color: var(--amber); background: var(--amber-dim); color: var(--amber); }
.task-check-btn.done  { background: var(--amber); border-color: var(--amber); color: #000; }

.task-title {
  flex: 1;
  font-size: .875rem;
  color: var(--text);
}
.task-title.done {
  text-decoration: line-through;
  color: var(--text-3);
}

.task-meta { display: flex; align-items: center; gap: .5rem; }

.priority-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.priority-1 { background: var(--text-3); }
.priority-2 { background: var(--orange); }
.priority-3 { background: var(--red); box-shadow: 0 0 6px rgba(239,68,68,.5); }

/* ============================================================
   FILTER BAR
   ============================================================ */
.filter-bar {
  display: flex;
  gap: .375rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.filter-chip {
  padding: .3rem .75rem;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 500;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition);
}

.filter-chip:hover { border-color: var(--border-hover); color: var(--text); text-decoration: none; }
.filter-chip.active { background: var(--amber-dim); border-color: rgba(240,180,41,.3); color: var(--amber); }

/* ============================================================
   CHART
   ============================================================ */
.chart-wrap {
  position: relative;
  height: 200px;
  padding: 0 1.5rem 1.25rem;
}

/* ============================================================
   PRICING
   ============================================================ */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  max-width: 860px;
  margin: 0 auto;
}

.pricing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2rem;
  position: relative;
  transition: border-color var(--transition), transform var(--transition);
}

.pricing-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.pricing-card.featured {
  border-color: rgba(240,180,41,.3);
  background: linear-gradient(180deg, rgba(240,180,41,.04) 0%, var(--surface) 100%);
  box-shadow: 0 0 40px rgba(240,180,41,.08);
}

.pricing-badge {
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--amber);
  color: #000;
  font-size: .65rem;
  font-weight: 800;
  padding: .2rem .875rem;
  border-radius: 999px;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.pricing-plan-name {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: .75rem;
}

.pricing-price {
  font-size: 2.75rem;
  font-weight: 800;
  letter-spacing: -.05em;
  color: var(--text);
  line-height: 1;
  margin-bottom: .25rem;
}

.pricing-price sup {
  font-size: 1.25rem;
  font-weight: 700;
  vertical-align: top;
  margin-top: .4rem;
  display: inline-block;
  color: var(--text-2);
}

.pricing-period {
  font-size: .875rem;
  color: var(--text-3);
  margin-bottom: 1.75rem;
}

.pricing-features {
  list-style: none;
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  gap: .625rem;
}

.pricing-features li {
  font-size: .875rem;
  color: var(--text-2);
  display: flex;
  align-items: center;
  gap: .625rem;
}

.pricing-features li::before {
  content: '';
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--green-dim);
  border: 1.5px solid rgba(34,197,94,.3);
  flex-shrink: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='6' fill='none'%3E%3Cpath d='M1 3l2 2 4-4' stroke='%2322c55e' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}

/* ============================================================
   MESSAGES
   ============================================================ */
.messages-wrap {
  position: fixed;
  top: 1.25rem;
  right: 1.5rem;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  pointer-events: none;
}

.toast {
  padding: .75rem 1.125rem;
  border-radius: var(--radius);
  font-size: .875rem;
  font-weight: 500;
  border: 1px solid;
  background: var(--surface-2);
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 24px rgba(0,0,0,.3);
  pointer-events: all;
  animation: toast-in .25s cubic-bezier(.34,1.56,.64,1);
  max-width: 340px;
  display: flex;
  align-items: center;
  gap: .625rem;
}

@keyframes toast-in {
  from { transform: translateX(16px) scale(.96); opacity: 0; }
  to   { transform: translateX(0) scale(1); opacity: 1; }
}

.toast.success { border-color: rgba(34,197,94,.25); }
.toast.success::before { content: '✓'; width:18px; height:18px; border-radius:50%; background:var(--green-dim); color:var(--green); display:flex; align-items:center; justify-content:center; font-size:.7rem; font-weight:800; flex-shrink:0; }
.toast.error   { border-color: rgba(239,68,68,.25); }
.toast.error::before   { content: '✕'; width:18px; height:18px; border-radius:50%; background:var(--red-dim); color:var(--red); display:flex; align-items:center; justify-content:center; font-size:.7rem; font-weight:800; flex-shrink:0; }
.toast.info    { border-color: rgba(99,102,241,.25); }
.toast.info::before    { content: 'i'; width:18px; height:18px; border-radius:50%; background:var(--indigo-dim); color:var(--indigo); display:flex; align-items:center; justify-content:center; font-size:.7rem; font-weight:800; flex-shrink:0; }
.toast.warning { border-color: rgba(249,115,22,.25); }
.toast.warning::before { content: '!'; width:18px; height:18px; border-radius:50%; background:var(--orange-dim); color:var(--orange); display:flex; align-items:center; justify-content:center; font-size:.7rem; font-weight:800; flex-shrink:0; }

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3.5rem 2rem;
  color: var(--text-3);
  text-align: center;
}

.empty-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--surface-2) 0%, var(--surface-3) 100%);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  color: var(--text-3);
  box-shadow: 0 4px 16px rgba(0,0,0,.15);
}

.empty-title { font-size: .9rem; font-weight: 600; color: var(--text-2); margin-bottom: .375rem; }
.empty-text  { font-size: .8125rem; margin-bottom: 1.25rem; }

/* ============================================================
   HAMBURGER BUTTON (vizibil doar pe mobil)
   ============================================================ */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4.5px;
  width: 36px;
  height: 36px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  padding: 0 8px;
  flex-shrink: 0;
  transition: border-color var(--transition), background var(--transition);
}
.hamburger:hover { border-color: var(--border-hover); background: var(--surface-2); }
.hamburger span {
  display: block;
  height: 1.5px;
  background: var(--text-2);
  border-radius: 2px;
  transition: all .25s cubic-bezier(.4,0,.2,1);
  transform-origin: center;
}
.hamburger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Overlay fundal cand sidebar e deschis pe mobil */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(2px);
  z-index: 45;
  opacity: 0;
  transition: opacity .25s;
  pointer-events: none;
}
.sidebar-overlay.visible {
  opacity: 1;
  pointer-events: all;
}

/* ============================================================
   PREMIUM MICRO-INTERACTIONS
   ============================================================ */

/* Shimmer subtil pe AI card */
@keyframes shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}

.ai-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(240,180,41,.5) 40%,
    rgba(240,180,41,.8) 50%,
    rgba(240,180,41,.5) 60%,
    transparent 100%
  );
  background-size: 400px 1px;
  animation: shimmer 4s linear infinite;
  pointer-events: none;
}

/* Link din tabel — hover arrow */
.table-link {
  color: var(--text);
  font-weight: 500;
  transition: color var(--transition);
}
.table-link:hover {
  color: var(--amber);
  text-decoration: none;
}

/* Badge cu glow subtil pe hover */
.badge-green:hover  { box-shadow: 0 0 12px rgba(34,197,94,.2); }
.badge-amber:hover  { box-shadow: 0 0 12px rgba(240,180,41,.2); }
.badge-red:hover    { box-shadow: 0 0 12px rgba(239,68,68,.2); }
.badge-indigo:hover { box-shadow: 0 0 12px rgba(99,102,241,.2); }

/* Sidebar scrollbar invisible */
.sidebar::-webkit-scrollbar { width: 0; }

/* Main content — gradient fade jos */
.main-content::after {
  content: '';
  display: block;
  position: fixed;
  bottom: 0;
  left: 220px;
  right: 0;
  height: 60px;
  background: linear-gradient(0deg, var(--bg) 0%, transparent 100%);
  pointer-events: none;
  z-index: 10;
}

@media (max-width: 768px) {
  .main-content::after { left: 0; }
}

/* ============================================================
   SIDEBAR NAV BADGES
   ============================================================ */
.nav-badge {
  margin-left: auto;
  min-width: 18px;
  height: 18px;
  border-radius: 6px;
  font-size: .65rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 .35rem;
  letter-spacing: 0;
}
.nav-badge-red {
  background: rgba(239,68,68,.18);
  color: var(--red);
  border: 1px solid rgba(239,68,68,.25);
  animation: badge-pulse 2.5s ease infinite;
}
.nav-badge-dim {
  background: rgba(255,255,255,.06);
  color: var(--text-3);
  border: 1px solid var(--border);
}
@keyframes badge-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,.3); }
  50%       { box-shadow: 0 0 0 4px rgba(239,68,68,0); }
}

/* ============================================================
   ALERT BARS (dashboard)
   ============================================================ */
.alert-bar {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .7rem 1.125rem;
  border-radius: var(--radius);
  font-size: .8375rem;
  margin-bottom: .75rem;
  border: 1px solid;
}
.alert-bar strong { font-weight: 700; }
.alert-bar-link {
  margin-left: auto;
  font-size: .8rem;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}
.alert-bar-red {
  background: rgba(239,68,68,.07);
  border-color: rgba(239,68,68,.2);
  color: #f87171;
}
.alert-bar-red .alert-bar-link { color: var(--red); }
.alert-bar-amber {
  background: rgba(240,180,41,.07);
  border-color: rgba(240,180,41,.2);
  color: var(--amber);
}
.alert-bar-amber .alert-bar-link { color: var(--amber); }
.alert-bar-green {
  background: rgba(34,197,94,.07);
  border-color: rgba(34,197,94,.2);
  color: #4ade80;
}
.alert-bar-green .alert-bar-link { color: var(--green); }

/* ============================================================
   TOP CLIENTS LEADERBOARD
   ============================================================ */
.top-client-row {
  display: flex;
  align-items: center;
  gap: .875rem;
  padding: .6rem 1.25rem;
  transition: background var(--transition);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
}
.top-client-row:last-child { border-bottom: none; }
.top-client-row:hover { background: var(--surface-2); text-decoration: none; }

.top-client-rank {
  width: 20px;
  text-align: center;
  font-size: .72rem;
  font-weight: 800;
  color: var(--text-3);
  flex-shrink: 0;
}
.top-client-row:nth-child(1) .top-client-rank { color: var(--amber); }
.top-client-row:nth-child(2) .top-client-rank { color: var(--text-2); }
.top-client-row:nth-child(3) .top-client-rank { color: #cd7c2e; }

.top-client-info { flex: 1; min-width: 0; }
.top-client-name {
  font-size: .8375rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.top-client-rev {
  font-size: .72rem;
  color: var(--text-3);
  margin-top: 1px;
  font-variant-numeric: tabular-nums;
}

.top-client-bar-wrap {
  width: 60px;
  height: 4px;
  background: rgba(255,255,255,.05);
  border-radius: 2px;
  overflow: hidden;
  flex-shrink: 0;
}
.top-client-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--amber), #ffd166);
  border-radius: 2px;
  width: 0;
  transition: width .8s cubic-bezier(.4,0,.2,1);
}

/* ============================================================
   MOBILE FAB
   ============================================================ */
.fab {
  display: none;
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--amber) 0%, #d97706 100%);
  color: #000;
  border: none;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 24px rgba(240,180,41,.45), 0 2px 8px rgba(0,0,0,.3);
  z-index: 100;
  transition: transform .2s, box-shadow .2s;
}
.fab:hover { transform: scale(1.07); box-shadow: 0 8px 32px rgba(240,180,41,.55); }
.fab:active { transform: scale(.95); }

@media (max-width: 768px) {
  .fab { display: flex; }
}

/* ============================================================
   TABLE HOVER-REVEAL ACTIONS
   ============================================================ */
.actions-cell { white-space: nowrap; }
.actions-cell .btn {
  opacity: 0;
  transform: translateX(4px);
  transition: opacity .15s, transform .15s;
}
tr:hover .actions-cell .btn {
  opacity: 1;
  transform: translateX(0);
}

/* ============================================================
   COUNTUP — număr animat
   ============================================================ */
.kpi-value[data-countup] { transition: none; }

/* ============================================================
   PAGE PROGRESS BAR
   ============================================================ */
#page-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, var(--amber), #ffd166, var(--amber));
  background-size: 200% 100%;
  box-shadow: 0 0 10px rgba(240,180,41,.7);
  z-index: 99999;
  pointer-events: none;
  opacity: 0;
  animation: progress-shimmer 1.5s linear infinite;
}
@keyframes progress-shimmer {
  0%   { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

/* ============================================================
   PAGE ENTER TRANSITION
   ============================================================ */
@keyframes page-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.page-enter { animation: page-in .22s cubic-bezier(.4,0,.2,1) both; }

/* ============================================================
   TASK CHECK POP
   ============================================================ */
@keyframes task-pop {
  0%   { transform: scale(1); }
  45%  { transform: scale(1.4); }
  72%  { transform: scale(.88); }
  100% { transform: scale(1); }
}
.task-check-btn.pop { animation: task-pop .38s cubic-bezier(.34,1.56,.64,1); }

/* ============================================================
   COMMAND PALETTE
   ============================================================ */
#cmd-palette {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
}
#cmd-palette.open { display: block; }

#cmd-bd {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: fade-in .15s ease both;
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

#cmd-modal {
  position: fixed;
  top: 18vh;
  left: 50%;
  transform: translateX(-50%);
  width: 560px;
  max-width: calc(100vw - 2rem);
  background: var(--surface);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 14px;
  box-shadow: 0 32px 80px rgba(0,0,0,.7), 0 0 0 1px rgba(255,255,255,.04);
  overflow: hidden;
  animation: cmd-in .2s cubic-bezier(.34,1.3,.64,1) both;
}
@keyframes cmd-in {
  from { transform: translateX(-50%) translateY(-10px) scale(.96); opacity: 0; }
  to   { transform: translateX(-50%) translateY(0) scale(1);       opacity: 1; }
}

/* Top shimmer line on palette */
#cmd-modal::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(240,180,41,.5), transparent);
  pointer-events: none;
}

#cmd-search-row {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .9rem 1.125rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-3);
}

#cmd-inp {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: .9625rem;
  font-family: var(--font);
  outline: none;
  padding: 0;
  box-shadow: none;
}
#cmd-inp::placeholder { color: var(--text-3); }
#cmd-inp:focus { border: none; box-shadow: none; }

#cmd-esc-key {
  font-size: .67rem;
  padding: .15rem .45rem;
  border-radius: 4px;
  border: 1px solid var(--border);
  color: var(--text-3);
  letter-spacing: .02em;
  flex-shrink: 0;
}

#cmd-list {
  max-height: 300px;
  overflow-y: auto;
  padding: .375rem;
}
#cmd-list::-webkit-scrollbar { width: 0; }

.cmd-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .6rem .875rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background .08s;
}
.cmd-item.sel { background: linear-gradient(135deg, rgba(240,180,41,.13) 0%, rgba(240,180,41,.04) 100%); }
.cmd-item:not(.sel):hover { background: var(--surface-2); }

.cmd-ico {
  width: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-3);
  flex-shrink: 0;
}
.cmd-item.sel .cmd-ico { color: var(--amber); }

.cmd-lbl {
  flex: 1;
  font-size: .9rem;
  font-weight: 500;
  color: var(--text);
}
.cmd-item.sel .cmd-lbl { color: var(--amber); }

.cmd-hint {
  font-size: .67rem;
  padding: .12rem .42rem;
  border-radius: 4px;
  border: 1px solid var(--border);
  color: var(--text-3);
  font-family: monospace;
  letter-spacing: .03em;
}

#cmd-foot {
  display: flex;
  gap: 1.125rem;
  padding: .55rem 1.125rem;
  border-top: 1px solid var(--border);
  font-size: .68rem;
  color: var(--text-3);
}

/* ============================================================
   CMD TRIGGER BUTTON (topbar)
   ============================================================ */
#cmd-trigger {
  display: flex;
  align-items: center;
  gap: .375rem;
  padding: .3rem .65rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--text-3);
  font-size: .72rem;
  font-family: var(--font);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
#cmd-trigger:hover {
  border-color: var(--border-hover);
  color: var(--text-2);
  background: var(--surface-3);
}

/* Hide on mobile — logo takes center space */
@media (max-width: 768px) {
  #cmd-trigger span { display: none; }
  #cmd-trigger { padding: .3rem .5rem; }
}

/* ============================================================
   SHORTCUTS PANEL
   ============================================================ */
#sc-panel {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.25rem 1.125rem;
  z-index: 9998;
  min-width: 210px;
  box-shadow: 0 12px 40px rgba(0,0,0,.45);
  animation: toast-in .22s cubic-bezier(.34,1.56,.64,1) both;
}
.sc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: .75rem;
}
#sc-close {
  cursor: pointer;
  font-size: .75rem;
  transition: color var(--transition);
}
#sc-close:hover { color: var(--red); }

.sc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .35rem;
  font-size: .8rem;
}
.sc-keys { display: flex; gap: .25rem; }
.sc-row span { color: var(--text-3); font-size: .78rem; }

kbd {
  font-size: .65rem;
  padding: .15rem .42rem;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,.1);
  background: var(--surface-3);
  color: var(--text-2);
  font-family: var(--font);
  font-weight: 600;
}

/* ============================================================
   RESPONSIVE — TABLET
   ============================================================ */
@media (max-width: 1024px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .kpi-grid-3 { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid { grid-template-columns: 1fr; max-width: 420px; }
}

/* ============================================================
   RESPONSIVE — MOBIL
   ============================================================ */
@media (max-width: 768px) {

  /* Sidebar devine drawer lateral */
  .sidebar {
    position: fixed;
    left: 0; top: 0;
    width: 260px;
    height: 100vh;
    z-index: 50;
    transform: translateX(-100%);
    transition: transform .28s cubic-bezier(.4,0,.2,1);
    box-shadow: none;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 8px 0 40px rgba(0,0,0,.5);
  }

  /* Main content — full width */
  .main-content { margin-left: 0; width: 100%; }

  /* Topbar mobil */
  .topbar { padding: 0 1rem; position: relative; }
  .hamburger { display: flex; }

  /* Logo centrat in topbar pe mobil */
  .topbar-logo { display: flex; }

  /* Breadcrumb ascuns pe mobil */
  .breadcrumb { display: none; }

  /* Ascunde search button pe mobil — ramane doar bell */
  #searchTrigger { display: none !important; }

  /* Logout link — touch target mai mare pe mobil */
  .sidebar-logout-mobile {
    display: flex !important;
    align-items: center;
    gap: .5rem;
    width: 100%;
    padding: .6rem .75rem;
    margin-top: .25rem;
    border-radius: 8px;
    color: var(--text-3);
    text-decoration: none;
    font-size: .8rem;
    border: 1px solid var(--border);
    background: transparent;
    cursor: pointer;
    transition: color .15s, background .15s, border-color .15s;
  }
  .sidebar-logout-mobile:hover,
  .sidebar-logout-mobile:active {
    color: var(--red);
    background: rgba(239,68,68,.08);
    border-color: rgba(239,68,68,.3);
  }

  /* Content padding */
  .content-inner { padding: 1rem 1rem 4rem; }

  /* Page header stacked */
  .page-header {
    flex-direction: column;
    gap: .875rem;
    margin-bottom: 1.25rem;
  }
  .page-header > div:last-child { align-self: flex-start; }
  .page-title { font-size: 1.125rem; }

  /* KPI grid — 2 coloane pe mobil */
  .kpi-grid {
    grid-template-columns: 1fr 1fr;
    gap: .625rem;
  }
  .kpi-card { padding: 1rem 1rem .875rem; }
  .kpi-value { font-size: 1.5rem; }
  .kpi-glow { width: 100px; height: 80px; }

  /* Chart mai mic */
  .chart-wrap { height: 160px; }

  /* Grid chart + tasks → coloana unica */
  div[style*="grid-template-columns:3fr 2fr"],
  div[style*="grid-template-columns:2fr 1fr"] {
    display: flex !important;
    flex-direction: column !important;
  }

  /* Hover-reveal pe mobil — always visible */
  .actions-cell .btn { opacity: 1; transform: none; }

  /* Tabele scroll orizontal */
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table { min-width: 520px; }
  th, td { padding: .625rem .875rem; font-size: .8rem; }

  /* Forms full width */
  .formset-row-3 { grid-template-columns: 1fr; }
  .formset-row-2 { grid-template-columns: 1fr; }
  div[style*="max-width:520px"],
  div[style*="max-width:480px"] { max-width: 100% !important; }

  /* Filter chips scroll orizontal */
  .filter-bar { flex-wrap: nowrap; overflow-x: auto; padding-bottom: .25rem; }
  .filter-bar::-webkit-scrollbar { display: none; }
  .filter-chip { white-space: nowrap; flex-shrink: 0; }

  /* AI card body padding */
  .ai-card-body { padding: 1rem 1.125rem; }

  /* Tasks quick-add stacked */
  form[hx-target="#task-list"] > div.form-group { display: none; }
  form[hx-target="#task-list"] { flex-wrap: wrap; }

  /* Pricing grid */
  .pricing-grid { grid-template-columns: 1fr; max-width: 100%; }

  /* Auth card */
  .auth-card { padding: 1.75rem 1.25rem; }
  .onboarding-card { padding: 1.5rem 1rem; max-width: 100%; }

  /* Onboarding layout — fără overflow, scroll normal */
  .onboarding-layout { align-items: flex-start; padding: 1.25rem 1rem; }

  /* Onboarding title mai mic pe telefon */
  .onboarding-title { font-size: 1.15rem; }
  .onboarding-subtitle { font-size: .82rem; margin-bottom: 1.25rem; }

  /* Formset rows — stivă verticală pe mobil */
  .formset-row,
  .formset-row-3,
  .formset-row-2,
  .formset-row-invoice {
    grid-template-columns: 1fr !important;
    padding: .75rem;
  }

  /* Previne zoom iOS pe inputuri din onboarding */
  .onboarding-card input,
  .onboarding-card select,
  .onboarding-card textarea {
    font-size: 16px !important;
  }

  /* Butoane full-width pe mobil */
  .onboarding-card .btn { width: 100%; justify-content: center; }
  .onboarding-card form > div[style*="justify-content:space-between"],
  .onboarding-card form > div[style*="justify-content: space-between"] {
    flex-direction: column-reverse;
    gap: .625rem;
  }

  /* Sidebar nav link — touch target mai mare */
  .sidebar-nav a { padding: .625rem .75rem; }
}

/* ============================================================
   AI SUGGEST BANNER
   ============================================================ */
.ai-suggest-banner {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  background: linear-gradient(135deg, rgba(99,102,241,.14) 0%, rgba(240,180,41,.08) 100%);
  border: 1px solid rgba(99,102,241,.3);
  border-radius: var(--radius);
  padding: .55rem .75rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
  font-size: .72rem;
  color: var(--text-2);
  z-index: 50;
  animation: fadeSlideDown .15s ease;
  backdrop-filter: blur(8px);
}
@keyframes fadeSlideDown {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.ai-suggest-tag {
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--indigo);
  background: var(--indigo-dim);
  border: 1px solid rgba(99,102,241,.25);
  border-radius: 4px;
  padding: .15rem .4rem;
  white-space: nowrap;
}
.ai-meta { color: var(--text); font-size: .72rem; }
.ai-meta strong { color: var(--amber); }
.ai-reason {
  flex: 1 1 100%;
  font-size: .67rem;
  color: var(--text-3);
  font-style: italic;
  margin-top: .1rem;
}
.ai-accept, .ai-ignore {
  border: none;
  border-radius: 5px;
  padding: .25rem .65rem;
  font-size: .7rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity var(--transition);
  white-space: nowrap;
}
.ai-accept { background: var(--indigo); color: #fff; }
.ai-accept:hover { opacity: .85; }
.ai-ignore { background: var(--surface-3); color: var(--text-3); }
.ai-ignore:hover { color: var(--text); }

/* ============================================================
   CLIENT INSIGHT BOX
   ============================================================ */
.client-insight {
  border: 1px solid rgba(99,102,241,.2);
  background: linear-gradient(135deg, rgba(99,102,241,.07) 0%, rgba(240,180,41,.04) 100%);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  position: relative;
  overflow: hidden;
}
.client-insight::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(99,102,241,.05) 50%, transparent 100%);
  animation: shimmer 2.4s infinite;
}
.client-insight-header {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: .6rem;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--indigo);
}
.client-insight-body {
  font-size: .82rem;
  color: var(--text-2);
  line-height: 1.6;
}
.client-insight-body strong { color: var(--text); }
.client-insight-loading {
  color: var(--text-3);
  font-size: .78rem;
  font-style: italic;
}

/* ============================================================
   RESPONSIVE — EXTRA SMALL
   ============================================================ */
@media (max-width: 420px) {
  .kpi-grid { grid-template-columns: 1fr 1fr; gap: .5rem; }
  .kpi-card { padding: .875rem .875rem .75rem; }
  .kpi-value { font-size: 1.25rem; }
  .kpi-label { font-size: .6rem; }
  .content-inner { padding: .875rem .875rem 4rem; }
  .topbar { padding: 0 .875rem; }
}

/* ============================================================
   SKELETON LOADERS
   ============================================================ */
@keyframes skeleton-shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
.skeleton {
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2, #151820) 50%, var(--surface) 75%);
  background-size: 800px 100%;
  animation: skeleton-shimmer 1.4s infinite;
  border-radius: 6px;
}
.skeleton-text  { height: 14px; margin-bottom: 8px; }
.skeleton-title { height: 20px; margin-bottom: 12px; width: 60%; }
.skeleton-block { height: 80px; margin-bottom: 12px; }

/* ============================================================
   TOOLTIPS
   ============================================================ */
[data-tip] { position: relative; }
[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: .7rem;
  white-space: nowrap;
  padding: 4px 8px;
  border-radius: 6px;
  pointer-events: none;
  opacity: 0;
  transition: opacity .15s;
  z-index: 100;
}
[data-tip]:hover::after { opacity: 1; }

/* ============================================================
   AI LOADING STATE
   ============================================================ */
.ai-loading-pulse {
  display: flex;
  align-items: center;
  gap: .4rem;
  color: var(--text-3);
  font-size: .82rem;
  padding: 1.5rem 0;
  justify-content: center;
}
.ai-loading-pulse::before {
  content: '';
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--amber);
  animation: pulse-dot 1s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: .3; transform: scale(.8); }
  50%       { opacity: 1;  transform: scale(1.2); }
}
