:root {
  --ink: #173f3a;
  --ink-dark: #102f2c;
  --mint: #dcece8;
  --sand: #f5f2eb;
  --paper: #fffefa;
  --line: #dcded8;
  --text: #1e2c2a;
  --muted: #72807d;
  --coral: #d86f56;
  --shadow: 0 18px 50px rgba(22, 55, 50, .09);
}

* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--text); background: var(--sand); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.eyebrow { margin: 0 0 10px; font-size: 11px; font-weight: 800; letter-spacing: .18em; color: #b8d4ce; }
.eyebrow.dark { color: #76918c; }
.muted { color: var(--muted); line-height: 1.55; }
.brand-mark { display: grid; width: 52px; height: 52px; place-items: center; border: 1px solid rgba(255,255,255,.5); border-radius: 50%; color: white; font-family: Georgia, serif; font-size: 28px; font-style: italic; }
.brand-mark.small { width: 39px; height: 39px; font-size: 21px; }

.auth-shell { display: grid; min-height: 100vh; grid-template-columns: minmax(360px, 1fr) minmax(440px, 1.2fr); }
.brand-panel { padding: clamp(48px, 8vw, 110px); color: white; background: var(--ink); display: flex; flex-direction: column; justify-content: center; position: relative; overflow: hidden; }
.brand-panel::after { content: ""; position: absolute; width: 500px; height: 500px; border: 1px solid rgba(255,255,255,.08); border-radius: 50%; right: -300px; bottom: -180px; box-shadow: 0 0 0 90px rgba(255,255,255,.025), 0 0 0 180px rgba(255,255,255,.018); }
.brand-panel .brand-mark { margin-bottom: 70px; }
.brand-panel h1 { max-width: 580px; margin: 0; font-family: Georgia, serif; font-weight: 400; font-size: clamp(42px, 5vw, 72px); line-height: 1.05; }
.brand-copy { max-width: 500px; color: #c4d6d2; font-size: 17px; line-height: 1.7; margin: 28px 0 55px; }
.feature-row { display: flex; gap: 18px; align-items: center; border-top: 1px solid rgba(255,255,255,.15); padding: 15px 0; max-width: 440px; }
.feature-row span { color: #8eb0a8; font-size: 11px; letter-spacing: .12em; }
.feature-row p { margin: 0; }
.auth-panel { display: grid; place-items: center; padding: 40px; background: #fbfaf6; }
.auth-card { width: min(440px, 100%); }
.auth-card h2 { margin: 0; font-family: Georgia, serif; font-size: 44px; font-weight: 400; }
.mobile-brand { display: none; }
.stack { display: grid; gap: 20px; margin-top: 35px; }
label { display: grid; gap: 8px; font-size: 13px; font-weight: 700; color: #3c4b48; }
input, select, textarea { width: 100%; border: 1px solid var(--line); border-radius: 3px; background: white; padding: 13px 14px; outline: none; color: var(--text); transition: border .2s, box-shadow .2s; }
input:focus, select:focus, textarea:focus { border-color: #6d9d93; box-shadow: 0 0 0 3px rgba(109,157,147,.12); }
.btn { border: 0; padding: 13px 19px; border-radius: 3px; font-weight: 750; }
.btn.primary { background: var(--ink); color: white; }
.btn.primary:hover { background: var(--ink-dark); }
.btn.secondary { background: #eef0ec; color: var(--text); }
.btn.light { background: white; color: var(--ink); }
.btn.full { width: 100%; margin-top: 6px; }
.link-button { border: 0; background: transparent; color: var(--ink); font-weight: 800; padding: 0; }
.switch-copy { text-align: center; color: var(--muted); margin-top: 26px; font-size: 14px; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 245px 1fr; }
.sidebar { position: sticky; top: 0; height: 100vh; background: var(--ink); color: white; padding: 30px 20px 22px; display: flex; flex-direction: column; z-index: 10; }
.logo-row { display: flex; gap: 12px; align-items: center; padding: 0 8px 35px; }
.logo-row div:last-child { display: grid; gap: 3px; }
.logo-row span { color: #9ab7b1; font-size: 11px; }
.sidebar nav { display: grid; gap: 6px; }
.nav-item { border: 0; color: #bcd0cc; background: transparent; padding: 13px 14px; display: flex; gap: 13px; align-items: center; text-align: left; border-radius: 3px; font-weight: 650; }
.nav-item:hover, .nav-item.active { color: white; background: rgba(255,255,255,.1); }
.nav-item span { width: 18px; font-size: 18px; }
.sidebar-foot { margin-top: auto; border-top: 1px solid rgba(255,255,255,.12); padding-top: 20px; }
.user-chip { display: flex; gap: 11px; align-items: center; padding: 7px 8px 18px; min-width: 0; }
.user-chip > div:last-child { display: grid; min-width: 0; }
.user-chip span { color: #9ab7b1; font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.avatar { flex: 0 0 auto; display: grid; width: 35px; height: 35px; place-items: center; background: var(--mint); color: var(--ink); border-radius: 50%; font-weight: 900; }
.main-area { min-width: 0; }
.topbar { height: 100px; padding: 0 clamp(24px, 4vw, 60px); display: flex; align-items: center; border-bottom: 1px solid var(--line); background: var(--paper); }
.topbar h2 { margin: 0; font-family: Georgia, serif; font-size: 28px; font-weight: 400; }
.topbar .btn { margin-left: auto; }
.menu-button { display: none; margin-right: 15px; }
.page { padding: 35px clamp(24px, 4vw, 60px) 60px; }
.welcome-block { background: var(--ink); color: white; padding: 38px 42px; display: flex; justify-content: space-between; align-items: end; margin-bottom: 22px; position: relative; overflow: hidden; }
.welcome-block::after { content: ""; width: 240px; height: 240px; position: absolute; right: 12%; top: -140px; border: 1px solid rgba(255,255,255,.1); border-radius: 50%; box-shadow: 0 0 0 45px rgba(255,255,255,.025); }
.welcome-block h1 { margin: 0 0 7px; font-family: Georgia, serif; font-size: 39px; font-weight: 400; }
.welcome-block p:last-child { margin: 0; color: #bad0cb; }
.welcome-block .btn { z-index: 1; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 22px; }
.stat-card { background: var(--paper); border: 1px solid var(--line); padding: 21px; min-height: 143px; display: grid; align-content: space-between; }
.stat-card span { font-size: 10px; letter-spacing: .12em; color: var(--muted); font-weight: 850; }
.stat-card strong { font-family: Georgia, serif; font-size: 40px; font-weight: 400; color: var(--ink); }
.stat-card small { color: var(--muted); }
.stat-card.accent { background: var(--mint); border-color: transparent; }
.content-grid { display: grid; grid-template-columns: 1.7fr 1fr; gap: 22px; }
.panel { background: var(--paper); border: 1px solid var(--line); box-shadow: var(--shadow); }
.panel-head { padding: 23px 25px 18px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #e8e8e3; }
.panel-head h3 { font-family: Georgia, serif; margin: 0; font-size: 24px; font-weight: 400; }
.appointment-item { padding: 18px 25px; display: grid; grid-template-columns: 66px 1fr auto; gap: 18px; align-items: center; border-bottom: 1px solid #ecece7; }
.appointment-item:last-child { border-bottom: 0; }
.date-box { text-align: center; border-right: 1px solid var(--line); padding-right: 16px; }
.date-box strong { display: block; font-family: Georgia, serif; font-size: 27px; color: var(--ink); }
.date-box span { font-size: 10px; font-weight: 850; color: var(--muted); }
.appointment-info strong { display: block; margin-bottom: 5px; }
.appointment-info span { font-size: 12px; color: var(--muted); }
.badge { display: inline-block; padding: 5px 8px; background: #e9eeeb; color: #51625e; border-radius: 20px; font-size: 10px; font-weight: 850; }
.badge.confirmată { background: #dceee7; color: #276052; }
.badge.anulată { background: #f4dfda; color: #8e4435; }
.badge.finalizată { background: #e3e5ee; color: #4f577a; }
.service-card { padding: 34px 25px; display: grid; gap: 13px; }
.service-card strong { font-family: Georgia, serif; color: var(--ink); font-size: 24px; font-weight: 400; line-height: 1.25; }
.service-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.service-icon { display: grid; width: 45px; height: 45px; place-items: center; border-radius: 50%; background: var(--mint); color: var(--ink); font-family: Georgia, serif; font-size: 23px; font-style: italic; }
.spec-row { padding: 13px 0; }
.spec-label { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 8px; }
.bar { height: 5px; background: #ecece7; }
.bar i { display: block; height: 100%; background: var(--ink); }
.empty { padding: 38px 25px; color: var(--muted); text-align: center; }
.toolbar { display: flex; gap: 12px; margin-bottom: 18px; }
.toolbar input, .toolbar select { background: var(--paper); min-width: 190px; }
.search-wrap { min-width: 280px; }
.grow { flex: 1; }
.table-panel { box-shadow: none; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; color: var(--muted); font-size: 10px; letter-spacing: .1em; padding: 14px 25px; background: #f7f6f1; }
td { padding: 17px 25px; border-top: 1px solid #ecece7; font-size: 13px; }
td strong { display: block; }
td small { color: var(--muted); }
.actions { display: flex; justify-content: flex-end; gap: 7px; }
.action-btn { border: 1px solid var(--line); background: white; color: var(--ink); padding: 7px 9px; border-radius: 3px; font-size: 12px; }
.action-btn.danger { color: #9a4938; }
.count-pill { color: var(--muted); background: #f0f1ed; padding: 6px 10px; border-radius: 30px; font-size: 11px; }

dialog { border: 0; padding: 0; width: min(620px, calc(100% - 30px)); box-shadow: 0 24px 80px rgba(15,40,36,.3); }
dialog::backdrop { background: rgba(10,35,31,.62); }
.modal-card { background: var(--paper); }
.modal-head { display: flex; align-items: start; justify-content: space-between; padding: 27px 30px; border-bottom: 1px solid var(--line); }
.modal-head h2 { font-family: Georgia, serif; font-size: 30px; font-weight: 400; margin: 0; }
.icon-button { border: 0; background: transparent; color: var(--ink); font-size: 26px; line-height: 1; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; padding: 27px 30px; }
.span-2 { grid-column: span 2; }
.optional { color: var(--muted); font-weight: 400; }
.modal-actions { padding: 20px 30px; display: flex; justify-content: flex-end; gap: 10px; background: #f4f3ee; }
.toast { position: fixed; z-index: 100; right: 25px; top: 25px; background: var(--ink-dark); color: white; padding: 14px 18px; border-radius: 3px; box-shadow: var(--shadow); transform: translateY(-90px); opacity: 0; transition: .25s; }
.toast.show { transform: translateY(0); opacity: 1; }
.toast.error { background: #943f31; }

@media (max-width: 1000px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .content-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .auth-shell { grid-template-columns: 1fr; }
  .brand-panel { display: none; }
  .auth-panel { padding: 28px; }
  .mobile-brand { display: flex; align-items: center; gap: 12px; color: var(--ink); margin-bottom: 70px; }
  .mobile-brand .brand-mark { color: var(--ink); border-color: var(--ink); }
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: -260px; transition: left .25s; width: 245px; }
  .sidebar.open { left: 0; box-shadow: 20px 0 60px rgba(0,0,0,.2); }
  .menu-button { display: block; }
  .topbar { height: 88px; padding: 0 18px; }
  .topbar .btn { font-size: 0; width: 40px; height: 40px; padding: 0; }
  .topbar .btn::after { content: "+"; font-size: 23px; }
  .page { padding: 22px 16px 45px; }
  .welcome-block { padding: 28px 25px; }
  .welcome-block .btn { display: none; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-card { min-height: 125px; padding: 16px; }
  .toolbar { flex-wrap: wrap; }
  .toolbar > * { flex: 1 1 100%; min-width: 0; }
  th, td { padding-left: 15px; padding-right: 15px; white-space: nowrap; }
  .form-grid { grid-template-columns: 1fr; padding: 22px; }
  .span-2 { grid-column: auto; }
  .modal-head, .modal-actions { padding-left: 22px; padding-right: 22px; }
}
