@font-face { font-family: 'Inter'; font-weight: 100 900; font-display: swap; src: url(/vendor/brand/inter-latin.woff2) format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-weight: 300 700; font-display: swap; src: url(/vendor/brand/space-grotesk-latin.woff2) format('woff2'); }

:root {
  --background: #0E1115; --card: #15181E; --secondary: #1C2030; --muted: #202535; --border: #242B3D; --table-head: #1E2229;
  --foreground: #F2F2F2; --text-secondary: #97A0B2; --muted-foreground: #838DA0;
  --primary: #F97316; --primary-hover: #FB8435; --destructive: #F03838; --warning: #FBBF24;
  --gradient-card: linear-gradient(145deg, hsl(220 18% 12%), hsl(220 18% 8%));
  --font-display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, sans-serif;
  --radius: 12px; --radius-sm: 8px;
  --grid-hour: #3A4359; --grid-quarter: rgb(36 43 61 / 0.6);
  --scrollbar-size: 10px; --scrollbar-track: transparent; --scrollbar-thumb: #3A4359; --scrollbar-thumb-hover: #F97316;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--background); color: var(--foreground); font: 15px/1.5 var(--font-body); -webkit-font-smoothing: antialiased; }

/* Barele de scroll din brand kit (skills/design-brand-kit/colors_and_type.css): tokenii sunt inline, deci si blocul. */
html, * { scrollbar-width: thin; scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track); }
*:not(html):hover { scrollbar-color: var(--scrollbar-thumb-hover) var(--scrollbar-track); }
@supports not (scrollbar-color: auto) {
  ::-webkit-scrollbar { width: var(--scrollbar-size); height: var(--scrollbar-size); }
  ::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: var(--scrollbar-track); }
  ::-webkit-scrollbar-thumb { background-color: var(--scrollbar-thumb); border-radius: 9999px; border: 2px solid transparent; background-clip: padding-box; }
  ::-webkit-scrollbar-thumb:hover { background-color: var(--scrollbar-thumb-hover); }
}
h1, h2, h3 { font-family: var(--font-display); margin: 0; letter-spacing: -0.02em; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.15rem; }
a { color: var(--primary); }

.nav { display: flex; align-items: center; gap: 16px; padding: 12px 24px; border-bottom: 1px solid var(--border); background: var(--card); position: sticky; top: 0; z-index: 5; }
.nav a { color: var(--text-secondary); text-decoration: none; font-weight: 500; padding: 4px 0; }
.nav a:hover, .nav a.active { color: var(--foreground); }
.nav a.active { box-shadow: inset 0 -2px 0 var(--primary); }
.brand { font-family: var(--font-display); font-weight: 700; margin-right: 8px; }
.brand b { color: var(--primary); font-weight: 700; }
.nav-user { margin-left: auto; display: flex; align-items: center; gap: 12px; white-space: nowrap; }
.main { padding: 24px; max-width: 1280px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }

.spacer { flex: 1; }
.muted { color: var(--muted-foreground); }
.error { color: var(--destructive); margin: 0; }
.error:empty, .warnings:empty { display: none; }
.notice { color: var(--primary); margin: 0; }
.card { background: var(--gradient-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.row.end { justify-content: flex-end; align-items: center; }
/* Randul e aliniat jos; bifa are inaltimea unui camp, deci centrul ei cade pe centrul campului. */
.row > label.chk { height: 36px; }
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.toolbar select, .toolbar input { border-radius: 999px; padding: 0 14px; }

label { display: flex; flex-direction: column; gap: 4px; font-size: 0.85rem; color: var(--text-secondary); }
label.chk { flex-direction: row; align-items: center; gap: 8px; color: var(--foreground); font-size: 0.9rem; }
.label { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 4px; }
input, select { background: var(--secondary); color: var(--foreground); border: 1px solid var(--border); border-radius: var(--radius-sm); height: 36px; padding: 0 10px; font: inherit; }
input[type="checkbox"] { height: auto; padding: 0; accent-color: var(--primary); }
/* Mostra de culoare a echipei: fara padding, altfel se vede doar o liniuta gri (V15). */
input[type="color"] { width: 36px; padding: 0; cursor: pointer; }
input[type="color"]::-webkit-color-swatch-wrapper { padding: 3px; }
input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 4px; }
input:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.btn { border: 1px solid transparent; border-radius: 999px; height: 36px; padding: 0 16px; font: 600 0.9rem var(--font-body); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.btn.primary { background: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-hover); }
.btn.ghost { background: transparent; color: var(--foreground); border-color: var(--border); }
.btn.ghost:hover { border-color: var(--primary); }
.btn.danger { background: transparent; color: var(--destructive); border-color: var(--destructive); }
/* "Sigur?": in spate, o umplere care se goleste de la dreapta spre stanga cat dureaza confirmarea.
   Ramane si la "animatii reduse": e un cronometru lent si liniar, care spune cat timp mai e, nu decor. */
.btn.confirm { position: relative; overflow: hidden; }
.btn.confirm > span { position: relative; z-index: 1; }
.btn.confirm.armed::before { content: ''; position: absolute; inset: 0; background: rgb(240 56 56 / 0.28); transform-origin: left; animation: confirm-drain 5s linear forwards; } /* 5s = CONFIRM_MS din admin.js */
@keyframes confirm-drain { from { transform: scaleX(1); } to { transform: scaleX(0); } }
.chip { background: var(--secondary); color: var(--foreground); border: 1px solid var(--border); border-radius: 999px; padding: 4px 12px; cursor: pointer; font: 500 0.85rem var(--font-body); }
.chip:hover { border-color: var(--primary); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }

.center { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.auth { width: min(380px, 100%); display: flex; flex-direction: column; gap: 12px; }
.toast { position: fixed; bottom: 24px; right: 24px; background: var(--card); border: 1px solid var(--primary); padding: 12px 16px; border-radius: var(--radius-sm); max-width: 420px; z-index: 50; }
.toast-error { border-color: var(--destructive); }
.list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.list li { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { background: var(--table-head); text-align: left; font-weight: 600; font-size: 0.85rem; }
th, td { padding: 8px; border-bottom: 1px solid var(--border); vertical-align: middle; }
/* th are 8 px; campul are 1 px bordura + 7 px padding, deci textul lui cade sub antet. */
td:has(> select), td:has(> input:not([type="checkbox"]):not([type="color"])) { padding-left: 0; }
td > select, td > input:not([type="checkbox"]):not([type="color"]) { padding-left: 7px; }
tr.inactive td { color: var(--muted-foreground); }

.week { overflow-x: auto; }
.week-grid { display: grid; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--card); }
.day-head { height: 36px; display: flex; align-items: center; justify-content: center; font: 600 0.85rem var(--font-display); border-bottom: 1px solid var(--border); text-transform: capitalize; white-space: nowrap; padding: 0 6px; }
.day { border-left: 1px solid var(--border); min-width: 0; }
.day.today .day-head { color: var(--primary); }
/* Linii intre ore (10:00-18:00), mai evidente, si linii discrete din 15 in 15 minute. Sus e bordura
   capului de zi, jos bordura grilei, deci prima si ultima linie lipsesc intentionat (V1). */
.day-body {
  --h: var(--hour-h, 60px);
  position: relative; cursor: copy;
  background:
    repeating-linear-gradient(to bottom, transparent 0 calc(var(--h) - 1px), var(--grid-hour) calc(var(--h) - 1px) var(--h)) no-repeat 0 0 / 100% calc(100% - var(--h)),
    repeating-linear-gradient(to bottom, transparent 0 calc(var(--h) / 4 - 1px), var(--grid-quarter) calc(var(--h) / 4 - 1px) calc(var(--h) / 4)) no-repeat 0 0 / 100% calc(100% - 1px);
}
.hour { height: var(--hour-h, 60px); font-size: 0.75rem; line-height: 1; color: var(--muted-foreground); text-align: right; padding-right: 6px; }
.hour span { display: inline-block; line-height: 1; }
/* Eticheta centrata pe linia ei; 08:00 ramane lipita sub capul zilelor (V3). */
.hour:not(:first-child) span { transform: translateY(-50%); }
.hour.hour-end { height: 0; }
.hour.hour-end span { transform: translateY(-100%); }
.selection { position: absolute; left: 2px; right: 2px; z-index: 2; pointer-events: none; background: rgb(249 115 22 / 0.16); border: 1px solid var(--primary); border-radius: 6px; padding: 2px 6px; font: 600 0.78rem/1.3 var(--font-display); color: var(--foreground); overflow: hidden; }
.event { position: absolute; display: flex; flex-direction: column; text-align: left; overflow: hidden; padding: 2px 6px; background: var(--secondary); color: var(--foreground); border: 1px solid var(--border); border-radius: 6px; cursor: pointer; font: 0.78rem/1.3 var(--font-body); }
/* Bordura are culoarea echipei (inline), deci hover-ul e un contur separat. */
.event:hover { box-shadow: 0 0 0 1px var(--primary); }
.event.compact { flex-direction: row; align-items: center; gap: 6px; white-space: nowrap; }
.event.compact .event-room { display: none; }
.event.redacted { background: repeating-linear-gradient(135deg, var(--secondary) 0 6px, var(--muted) 6px 12px); color: var(--text-secondary); }
.event-time { font-family: var(--font-display); font-weight: 600; }
/* Culoarea echipei e un punct, nu o bordura stanga. */
.event-time .dot { display: inline-block; margin-right: 5px; vertical-align: 1px; }
.with-dot { display: flex; align-items: center; gap: 10px; }
.event-room { color: var(--text-secondary); }
.event-tip { position: fixed; z-index: 40; pointer-events: none; max-width: 320px; padding: 10px 12px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: 0 8px 24px rgb(0 0 0 / 0.45); font: 0.8rem/1.45 var(--font-body); display: flex; flex-direction: column; gap: 4px; }
.event-tip-title { font: 600 0.9rem/1.3 var(--font-display); margin-bottom: 2px; overflow-wrap: anywhere; }
.event-tip-row { display: grid; grid-template-columns: 82px 1fr; gap: 8px; }
.event-tip-label { color: var(--text-secondary); }
.event-tip-name { white-space: nowrap; } /* un nume nu se rupe pe doua randuri */

.modal { background: var(--card); color: var(--foreground); border: 1px solid var(--border); border-radius: var(--radius); width: min(640px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 20px; }
.modal::backdrop { background: rgb(0 0 0 / 0.6); }
.picker { display: flex; flex-direction: column; gap: 8px; max-height: 240px; overflow: auto; padding: 8px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.picker-group { display: flex; gap: 8px; align-items: flex-start; }
.picker-group .chip { min-width: 128px; display: inline-flex; align-items: center; gap: 8px; }
.dot { width: 8px; height: 8px; border-radius: 999px; flex: none; }
.picker-items { display: flex; flex-wrap: wrap; gap: 4px 12px; padding-top: 4px; }
.warnings { display: flex; flex-direction: column; gap: 4px; }
.warn { margin: 0; color: var(--warning); font-size: 0.85rem; }
.warn.strong { color: var(--destructive); font-weight: 600; }

.steps { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 16px; }
.step { display: flex; gap: 14px; align-items: flex-start; }
.step p { margin: 0; }
.step-n { flex: none; width: 28px; height: 28px; border-radius: 999px; background: var(--primary); color: #fff; display: grid; place-items: center; font: 700 0.9rem var(--font-display); }
.address { background: var(--secondary); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 12px; font-family: var(--font-mono, ui-monospace, monospace); }

@media (max-width: 800px) {
  .nav { flex-wrap: wrap; padding: 12px 16px; gap: 12px; }
  .main { padding: 16px; }
  .week-grid { display: flex !important; flex-direction: column; }
  .hours-col { display: none; }
  .day { border-left: 0; border-top: 1px solid var(--border); }
  .day-body { height: auto !important; background-image: none; display: flex; flex-direction: column; gap: 4px; padding: 6px; min-height: 36px; }
  .day-body:empty::after { content: 'Nimic programat.'; color: var(--muted-foreground); font-size: 0.85rem; }
  .event { position: static; width: auto !important; height: auto !important; }
}
