@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400&family=Jost:wght@300;400;500;600&display=swap');

:root {
  --gold: #c8a94e;
  --gold-deep: #a88a35;
  --gold-soft: #e6d7a8;
  --gold-wash: #f6f0de;
  --rose: #c9a39e;
  --rose-deep: #b0827c;
  --rose-soft: #efdfdc;
  --rose-wash: #faf2f0;
  --cream: #f7f3ee;
  --ink: #3d2f2d;
  --ink-2: #5d4a46;
  --muted: #94827c;
  --line: #e8ddd3;
  --white: #fff;
  --shadow-s: 0 2px 10px rgba(61, 47, 45, 0.06);
  --shadow-m: 0 10px 30px rgba(61, 47, 45, 0.09);
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Jost', 'Helvetica Neue', Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  font-weight: 300;
  color: var(--ink-2);
  background: var(--cream);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

.app { display: grid; grid-template-columns: 252px 1fr; min-height: 100vh; }

.sidebar {
  background: linear-gradient(180deg, #342826 0%, #2a201e 100%);
  color: #cbb9b1;
  padding: 26px 18px;
  display: flex;
  flex-direction: column;
  gap: 26px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.side-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 10px 18px;
  border-bottom: 1px solid rgba(203, 185, 177, 0.14);
}
.side-brand img { width: 46px; height: 46px; border-radius: 50%; background: #fff; padding: 3px; }
.side-brand .n { font-family: var(--font-serif); font-size: 1.28rem; color: #fff7f1; line-height: 1.1; }
.side-brand .t { font-size: 0.58rem; letter-spacing: 0.26em; text-transform: uppercase; color: var(--gold-soft); }

.side-label {
  font-size: 0.62rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #8a7168;
  padding: 0 12px;
  margin-bottom: 8px;
}
.side-nav { display: grid; gap: 3px; }
.side-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 13px;
  border-radius: 10px;
  font-size: 0.92rem;
  color: #c2ada4;
  transition: all 0.18s ease;
}
.side-nav a svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.5; opacity: 0.85; }
.side-nav a:hover { background: rgba(255, 255, 255, 0.05); color: #fff; }
.side-nav a.active {
  background: linear-gradient(100deg, rgba(200, 169, 78, 0.26), rgba(200, 169, 78, 0.08));
  color: var(--gold-soft);
  box-shadow: inset 2px 0 0 var(--gold);
}
.side-nav a .badge {
  margin-left: auto;
  background: var(--rose);
  color: #fff;
  font-size: 0.68rem;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 500;
}

.side-foot {
  margin-top: auto;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(200, 169, 78, 0.22);
  border-radius: 14px;
  padding: 16px;
}
.side-foot .h { font-family: var(--font-serif); color: var(--gold-soft); font-size: 1.08rem; margin-bottom: 6px; }
.side-foot p { font-size: 0.8rem; color: #a9928a; margin-bottom: 12px; }
.side-foot a {
  display: block;
  text-align: center;
  background: var(--gold);
  color: #2c221f;
  padding: 9px;
  border-radius: 8px;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 500;
}

.main { display: flex; flex-direction: column; min-width: 0; }

.topbar {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  padding: 16px 32px;
  display: flex;
  align-items: center;
  gap: 20px;
  position: sticky;
  top: 0;
  z-index: 20;
}
.search {
  flex: 1;
  max-width: 400px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 14px;
  color: var(--muted);
}
.search svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.search input { border: none; background: none; outline: none; font-family: inherit; width: 100%; font-size: 0.92rem; color: var(--ink); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  background: var(--white);
  position: relative;
}
.icon-btn svg { width: 17px; height: 17px; stroke: var(--ink-2); fill: none; stroke-width: 1.6; }
.icon-btn .dot {
  position: absolute;
  top: 8px;
  right: 9px;
  width: 7px;
  height: 7px;
  background: var(--rose);
  border-radius: 50%;
  border: 1.5px solid #fff;
}
.user { display: flex; align-items: center; gap: 11px; padding-left: 6px; }
.user img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.user .un { font-size: 0.92rem; color: var(--ink); font-weight: 500; line-height: 1.15; }
.user .ur { font-size: 0.72rem; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; }

.content { padding: 30px 32px 44px; }

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
  flex-wrap: wrap;
}
.page-head h1 { font-family: var(--font-serif); font-size: 2.15rem; color: var(--ink); font-weight: 500; line-height: 1.1; }
.page-head .sub { color: var(--muted); font-size: 0.95rem; margin-top: 5px; }
.head-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 10px;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
}
.btn svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.btn-gold { background: var(--gold); color: #fff; box-shadow: 0 8px 20px rgba(168, 138, 53, 0.28); }
.btn-ghost { background: var(--white); border: 1px solid var(--line); color: var(--ink-2); }
.btn-rose { background: var(--rose); color: #fff; }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 26px; }
.kpi {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px 22px;
  position: relative;
  overflow: hidden;
}
.kpi::after {
  content: '';
  position: absolute;
  right: -22px;
  top: -22px;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--gold-wash);
  opacity: 0.7;
}
.kpi .lbl { font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
.kpi .val { font-family: var(--font-serif); font-size: 2.15rem; color: var(--ink); line-height: 1.15; margin: 6px 0 4px; }
.kpi .delta { font-size: 0.82rem; display: inline-flex; align-items: center; gap: 5px; }
.kpi .delta.up { color: #5c8a5e; }
.kpi .delta.down { color: var(--rose-deep); }
.kpi .ic {
  position: absolute;
  right: 18px;
  top: 18px;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--gold-wash);
  display: grid;
  place-items: center;
  z-index: 1;
}
.kpi .ic svg { width: 18px; height: 18px; stroke: var(--gold-deep); fill: none; stroke-width: 1.6; }

.grid-main { display: grid; grid-template-columns: 1.55fr 1fr; gap: 18px; align-items: start; }

.panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}
.panel-head {
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.panel-head h2 { font-family: var(--font-serif); font-size: 1.38rem; color: var(--ink); font-weight: 500; }
.panel-head .tools { display: flex; gap: 8px; align-items: center; }
.pill {
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-2);
  background: var(--white);
}
.pill.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.panel-body { padding: 20px 22px; }

.week {
  display: grid;
  grid-template-columns: 58px repeat(5, 1fr);
  gap: 8px;
}
.week .h {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
  padding-bottom: 8px;
}
.week .h strong { display: block; font-family: var(--font-serif); font-size: 1.32rem; color: var(--ink); font-weight: 500; letter-spacing: 0; text-transform: none; margin-top: 2px; }
.week .h.today strong {
  background: var(--gold);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin: 2px auto 0;
}
.week .t { font-size: 0.72rem; color: var(--muted); text-align: right; padding-right: 8px; padding-top: 6px; }
.week .slot {
  background: var(--cream);
  border-radius: 8px;
  min-height: 46px;
  padding: 6px 8px;
}
.appt {
  border-radius: 8px;
  padding: 7px 9px;
  font-size: 0.72rem;
  line-height: 1.35;
  border-left: 3px solid;
}
.appt .n { font-weight: 500; color: var(--ink); font-size: 0.78rem; }
.appt .s { color: var(--muted); font-size: 0.68rem; }
.appt.gold { background: var(--gold-wash); border-color: var(--gold); }
.appt.rose { background: var(--rose-wash); border-color: var(--rose); }
.appt.green { background: #eaf2ea; border-color: #7aa37c; }
.appt.blue { background: #e8eef5; border-color: #7b95b5; }
.appt.empty { background: transparent; border: 1px dashed var(--line); color: var(--muted); display: grid; place-items: center; border-left: 1px dashed var(--line); font-size: 0.68rem; }

.list { display: grid; gap: 10px; }
.list-item {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
}
.list-item .time {
  font-family: var(--font-serif);
  font-size: 1.12rem;
  color: var(--gold-deep);
  min-width: 52px;
  font-weight: 500;
}
.list-item .info { flex: 1; min-width: 0; }
.list-item .info .n { font-size: 0.94rem; color: var(--ink); font-weight: 500; }
.list-item .info .s { font-size: 0.78rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tag {
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
  white-space: nowrap;
}
.tag.ok { background: #e7f1e7; color: #4c7a4e; }
.tag.wait { background: var(--gold-wash); color: var(--gold-deep); }
.tag.new { background: var(--rose-wash); color: var(--rose-deep); }
.tag.cancel { background: #f3e6e4; color: #a06762; }

.chart {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  height: 168px;
  padding-top: 10px;
}
.chart .bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; }
.chart .bar .fill {
  width: 100%;
  border-radius: 7px 7px 3px 3px;
  background: linear-gradient(180deg, var(--gold) 0%, var(--gold-soft) 100%);
}
.chart .bar.alt .fill { background: linear-gradient(180deg, var(--rose) 0%, var(--rose-soft) 100%); }
.chart .bar .d { font-size: 0.7rem; color: var(--muted); letter-spacing: 0.1em; text-transform: uppercase; }

.mini-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mini {
  background: var(--cream);
  border-radius: 12px;
  padding: 15px 16px;
  border: 1px solid var(--line);
}
.mini .l { font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.mini .v { font-family: var(--font-serif); font-size: 1.62rem; color: var(--ink); line-height: 1.2; margin-top: 3px; }

.progress { height: 7px; background: var(--cream); border-radius: 999px; overflow: hidden; margin-top: 10px; }
.progress i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--gold), var(--rose)); }

.alert {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  padding: 13px 15px;
  border-radius: 12px;
  font-size: 0.86rem;
  margin-bottom: 10px;
}
.alert .ic {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 0.82rem;
}
.alert.warn { background: var(--gold-wash); color: var(--ink-2); }
.alert.warn .ic { background: var(--gold); color: #fff; }
.alert.info { background: var(--rose-wash); color: var(--ink-2); }
.alert.info .ic { background: var(--rose); color: #fff; }

@media (max-width: 1180px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .grid-main { grid-template-columns: 1fr; }
  .app { grid-template-columns: 78px 1fr; }
  .side-brand .txt, .side-label, .side-nav a span, .side-foot { display: none; }
  .side-nav a { justify-content: center; }
}
