/* Panoul de administrare Oravo */

.shell { display: flex; min-height: 100vh; }

/* ---------- sidebar ---------- */
.sidebar {
  width: 240px; flex-shrink: 0; position: sticky; top: 0; height: 100vh;
  background: #0E1526; color: #E7EAF2; display: flex; flex-direction: column;
  padding: var(--s6) var(--s4);
}
.sidebar .logo {
  font-family: var(--font-display); font-weight: 800; font-size: 22px; letter-spacing: -.03em;
  color: #fff; padding: 0 var(--s3) var(--s6); display: block; text-decoration: none;
}
.sidebar .logo em { font-style: normal; background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav a {
  display: flex; align-items: center; gap: var(--s3); padding: 10px var(--s3);
  border-radius: var(--r-sm); color: #A6AFC3; font-weight: 500; font-size: 14px;
  transition: background var(--t-fast), color var(--t-fast); text-decoration: none;
}
.nav a:hover { color: #fff; background: rgba(255, 255, 255, .06); text-decoration: none; }
.nav a.active { color: #fff; background: var(--brand-grad); box-shadow: 0 4px 14px rgba(79, 70, 229, .35); }
.nav a svg { width: 18px; height: 18px; flex-shrink: 0; }
.sidebar .user {
  border-top: 1px solid rgba(255, 255, 255, .09); padding-top: var(--s4); margin-top: var(--s4);
  font-size: 13px; color: #A6AFC3;
}
.sidebar .user b { color: #fff; display: block; font-weight: 600; }
.sidebar .user form { margin-top: var(--s2); }
.sidebar .user button {
  background: none; border: 1px solid rgba(255, 255, 255, .14); color: #A6AFC3;
  padding: 5px 12px; border-radius: var(--r-sm); font-size: 12px; cursor: pointer; transition: all var(--t-fast);
}
.sidebar .user button:hover { color: #fff; border-color: rgba(255, 255, 255, .4); }

/* ---------- conținut ---------- */
.content { flex: 1; padding: var(--s8) var(--s10); max-width: 1240px; min-width: 0; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); margin-bottom: var(--s6); flex-wrap: wrap; }
.page-head h1 { font-size: 26px; margin: 0; }
.page-head .sub { color: var(--muted); font-size: 14px; margin-top: 2px; }

/* ---------- componente ---------- */
.btn {
  display: inline-flex; align-items: center; gap: var(--s2); padding: 10px 18px;
  border-radius: 10px; border: none; font-weight: 600; font-size: 14px; cursor: pointer;
  transition: transform var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
  text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--brand-grad); color: #fff; box-shadow: 0 4px 14px rgba(79, 70, 229, .3); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(79, 70, 229, .38); }
.btn-ghost { background: var(--panel); color: var(--ink); border: 1px solid var(--hairline-2); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: var(--r-sm); }

.card {
  background: var(--panel); border: 1px solid var(--hairline); border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm); padding: var(--s6);
}
.card + .card { margin-top: var(--s5); }
.card h2 { font-size: 17px; margin-bottom: var(--s4); }
.card .hint { color: var(--muted); font-size: 13px; }

.grid { display: grid; gap: var(--s5); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

.stat { display: flex; flex-direction: column; gap: 2px; }
.stat .num { font-family: var(--font-display); font-size: 30px; font-weight: 700; letter-spacing: -.03em; }
.stat .lbl { color: var(--muted); font-size: 13px; font-weight: 500; }
.stat .num.accent { background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* formulare */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: var(--s4); }
.field label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field input, .field select, .field textarea {
  padding: 10px 12px; border: 1px solid var(--hairline-2); border-radius: 10px; font-size: 14px;
  font-family: inherit; background: #fff; color: var(--ink); transition: border var(--t-fast), box-shadow var(--t-fast);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft);
}
.field-row { display: flex; gap: var(--s4); }
.field-row .field { flex: 1; }
.check { display: flex; align-items: center; gap: var(--s2); font-size: 14px; margin-bottom: var(--s4); cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--brand); }

/* tabele */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  text-align: left; padding: 10px 12px; color: var(--muted); font-size: 12px;
  text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--hairline-2); font-weight: 600;
}
.table td { padding: 12px; border-bottom: 1px solid var(--hairline); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: rgba(79, 70, 229, .025); }

/* badge-uri */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge-ok { background: var(--success-soft); color: #067a57; }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-brand { background: var(--brand-soft); color: var(--brand); }
.badge-muted { background: rgba(11, 18, 32, .06); color: var(--muted); }

.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

/* segmented control */
.seg { display: inline-flex; background: rgba(11, 18, 32, .05); border-radius: 10px; padding: 3px; gap: 2px; }
.seg a, .seg button {
  padding: 7px 14px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--muted);
  border: none; background: none; cursor: pointer; transition: all var(--t-fast); text-decoration: none;
}
.seg a.on, .seg button.on { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }
.seg a:hover { text-decoration: none; color: var(--ink); }

/* modal */
.modal-back {
  position: fixed; inset: 0; background: rgba(11, 18, 32, .45); backdrop-filter: blur(3px);
  display: none; align-items: center; justify-content: center; z-index: 100; padding: var(--s4);
}
.modal-back.open { display: flex; animation: fadeIn .18s var(--ease); }
.modal {
  background: #fff; border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
  width: 100%; max-width: 480px; max-height: 92vh; overflow: auto; padding: var(--s6);
  animation: slideUp .22s var(--ease);
}
.modal h3 { font-size: 17px; margin-bottom: var(--s4); }
.modal .modal-actions { display: flex; justify-content: flex-end; gap: var(--s3); margin-top: var(--s5); }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(14px); } }

/* autocomplete clienți */
.suggest {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 20; background: #fff;
  border: 1px solid var(--hairline-2); border-radius: var(--r-md); box-shadow: var(--shadow-md);
  max-height: 220px; overflow: auto; margin-top: 4px;
}
.suggest button {
  display: flex; justify-content: space-between; align-items: center; gap: var(--s3); width: 100%;
  border: none; background: none; padding: 10px 12px; font: inherit; font-size: 14px; cursor: pointer; text-align: left;
}
.suggest button:hover { background: var(--brand-soft); }
.suggest small { color: var(--muted); }

/* bara de confirmare la drag & drop */
.confirm-bar {
  position: fixed; bottom: var(--s6); left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: var(--s4); z-index: 250;
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg); font-size: 14px; max-width: min(92vw, 640px);
  animation: slideUp .22s var(--ease);
}
.confirm-bar[hidden] { display: none; }

/* toast */
.toast {
  position: fixed; bottom: var(--s6); right: var(--s6); background: var(--ink); color: #fff;
  padding: 12px 18px; border-radius: var(--r-md); box-shadow: var(--shadow-lg); font-size: 14px;
  opacity: 0; transform: translateY(10px); transition: all var(--t-slow); z-index: 200; pointer-events: none;
}
.toast.show { opacity: 1; transform: none; }
.toast.err { background: var(--danger); }

/* ---------- calendar ---------- */
.cal-toolbar { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; }
.cal-wrap { overflow-x: auto; }
.cal {
  display: grid; grid-template-columns: 56px repeat(var(--cal-days, 7), minmax(120px, 1fr));
  border: 1px solid var(--hairline); border-radius: var(--r-lg); background: #fff; overflow: hidden;
  position: relative; min-width: 700px;
}
.cal .corner, .cal .dayhead {
  position: sticky; top: 0; background: #fff; z-index: 3; border-bottom: 1px solid var(--hairline-2);
  padding: var(--s3); text-align: center;
}
.cal .dayhead { font-weight: 600; font-size: 13px; }
.cal .dayhead small { display: block; color: var(--muted); font-weight: 500; }
.cal .dayhead.today { color: var(--brand); }
.cal .timecol { border-right: 1px solid var(--hairline); }
.cal .hourlabel {
  height: var(--cal-hour, 56px); font-size: 11px; color: var(--muted); text-align: right;
  padding-right: 8px; transform: translateY(-7px);
}
.cal .daycol { position: relative; border-right: 1px solid var(--hairline); }
.cal .daycol:last-child { border-right: none; }
.cal .hourline { height: var(--cal-hour, 56px); border-bottom: 1px solid var(--hairline); }
.cal .offhours { position: absolute; left: 0; right: 0; background: repeating-linear-gradient(-45deg, rgba(11,18,32,.025), rgba(11,18,32,.025) 4px, transparent 4px, transparent 9px); pointer-events: none; }
.cal .appt {
  position: absolute; left: 4px; right: 4px; border-radius: var(--r-sm); padding: 4px 8px;
  font-size: 12px; overflow: hidden; cursor: pointer; color: var(--ink);
  background: #fff; border: 1px solid var(--hairline-2); border-left: 3px solid var(--ac, var(--brand));
  box-shadow: var(--shadow-sm); transition: box-shadow var(--t-fast), transform var(--t-fast); z-index: 2;
}
.cal .appt:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); z-index: 4; }
.cal .appt b { display: block; font-size: 12px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.cal .appt span { color: var(--muted); font-size: 11px; }
.cal .blocked {
  position: absolute; left: 4px; right: 4px; border-radius: var(--r-sm); padding: 4px 8px; font-size: 11px;
  background: repeating-linear-gradient(-45deg, rgba(11,18,32,.06), rgba(11,18,32,.06) 5px, rgba(11,18,32,.1) 5px, rgba(11,18,32,.1) 10px);
  color: var(--ink-2); border: 1px dashed var(--hairline-2); z-index: 1;
}
.cal .nowline { position: absolute; left: 0; right: 0; height: 2px; background: var(--danger); z-index: 5; pointer-events: none; }
.cal .nowline::before { content: ''; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); }

/* liste de programări */
.appt-row { display: flex; align-items: center; gap: var(--s4); padding: var(--s3) 0; border-bottom: 1px solid var(--hairline); }
.appt-row:last-child { border-bottom: none; }
.appt-row .when { min-width: 76px; text-align: center; }
.appt-row .when b { display: block; font-family: var(--font-display); font-size: 16px; }
.appt-row .when small { color: var(--muted); }
.appt-row .who { flex: 1; min-width: 0; }
.appt-row .who b { display: block; }
.appt-row .who small { color: var(--muted); }

/* clienți: două panouri */
.clients-layout { display: grid; grid-template-columns: 1fr 380px; gap: var(--s5); align-items: start; }
@media (max-width: 1000px) { .clients-layout { grid-template-columns: 1fr; } }

/* widget: două panouri */
.widget-layout { display: grid; grid-template-columns: minmax(340px, 440px) 1fr; gap: var(--s5); align-items: start; }
@media (max-width: 1000px) { .widget-layout { grid-template-columns: 1fr; } }
.widget-preview-frame {
  border: 1px solid var(--hairline-2); border-radius: var(--r-lg); width: 100%; height: 640px;
  background: #fff; box-shadow: var(--shadow-md);
}
.code-snip {
  background: #0E1526; color: #A8F0CE; font-family: ui-monospace, 'Cascadia Code', Consolas, monospace;
  font-size: 12.5px; padding: var(--s4); border-radius: var(--r-md); overflow-x: auto; user-select: all;
}

/* program săptămânal */
.sched-day { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) 0; border-bottom: 1px solid var(--hairline); flex-wrap: wrap; }
.sched-day:last-child { border-bottom: none; }
.sched-day .dname { width: 84px; font-weight: 600; font-size: 14px; }
.sched-day .ivals { display: flex; align-items: center; gap: 6px; flex: 1; flex-wrap: wrap; transition: opacity var(--t-fast); }
.sched-day .ivals select {
  padding: 7px 8px; border: 1px solid var(--hairline-2); border-radius: 8px; font-size: 13.5px;
  font-family: inherit; background: #fff; color: var(--ink);
}
.sched-day .ivals .pz { color: var(--muted); font-size: 12.5px; margin-left: var(--s2); }
.cp-day { display: flex; }

/* onboarding checklist */
.onb { display: flex; flex-direction: column; gap: var(--s3); }
.onb a { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s4); border: 1px solid var(--hairline); border-radius: var(--r-md); color: var(--ink); font-weight: 500; transition: all var(--t-fast); }
.onb a:hover { border-color: var(--brand); text-decoration: none; box-shadow: var(--shadow-sm); }
.onb .done { text-decoration: line-through; color: var(--muted); }
.onb .tick { width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: rgba(11,18,32,.06); font-size: 12px; flex-shrink: 0; }
.onb .done .tick { background: var(--success-soft); color: #067a57; }

/* pagini auth */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: var(--s6); background:
  radial-gradient(1200px 500px at 70% -10%, rgba(124, 58, 237, .1), transparent 60%),
  radial-gradient(900px 400px at 10% 110%, rgba(79, 70, 229, .1), transparent 60%), var(--bg); }
.auth-card { width: 100%; max-width: 420px; background: #fff; border: 1px solid var(--hairline); border-radius: var(--r-xl); box-shadow: var(--shadow-lg); padding: var(--s8); }
.auth-card .logo { font-family: var(--font-display); font-weight: 800; font-size: 26px; letter-spacing: -.03em; text-align: center; display: block; margin-bottom: var(--s6); color: var(--ink); text-decoration: none; }
.auth-card .logo em { font-style: normal; background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.btn-google {
  display: flex; align-items: center; justify-content: center; gap: var(--s3); width: 100%;
  padding: 11px; border: 1px solid var(--hairline-2); border-radius: 10px; background: #fff;
  font-weight: 600; font-size: 14px; cursor: pointer; color: var(--ink); transition: all var(--t-fast); text-decoration: none;
}
.btn-google:hover { border-color: var(--ink); text-decoration: none; }
.auth-sep { display: flex; align-items: center; gap: var(--s3); color: var(--muted); font-size: 12px; margin: var(--s5) 0; }
.auth-sep::before, .auth-sep::after { content: ''; flex: 1; height: 1px; background: var(--hairline-2); }
.form-error { background: var(--danger-soft); color: var(--danger); padding: 10px 14px; border-radius: var(--r-sm); font-size: 13px; margin-bottom: var(--s4); }
.btn-block { width: 100%; justify-content: center; }

@media (max-width: 860px) {
  .shell { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; flex-direction: row; align-items: center; overflow-x: auto; padding: var(--s3) var(--s4); gap: var(--s4); }
  .sidebar .logo { padding: 0; font-size: 18px; }
  .nav { flex-direction: row; }
  .nav a { padding: 8px 10px; white-space: nowrap; }
  .sidebar .user { border: none; margin: 0; padding: 0; }
  .sidebar .user b, .sidebar .user span { display: none; }
  .content { padding: var(--s5); }
}
