/* ============ Dashboard ============ */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}
.kpi {
  position: relative;
  overflow: hidden;
  padding: 16px 17px 15px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(26, 32, 41, 0.98), rgba(18, 22, 30, 0.98));
  box-shadow: var(--shadow);
}
.kpi::after {
  content: '';
  position: absolute; inset: 0 0 auto auto;
  width: 120px; height: 120px;
  background: radial-gradient(circle at 100% 0, rgba(245, 181, 68, 0.16), transparent 70%);
  pointer-events: none;
}
.kpi-label { font-size: 12px; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 7px; }
.kpi-label i { color: var(--gold); font-size: 12px; }
.kpi-value { font-size: 26px; font-weight: 800; margin-top: 8px; letter-spacing: -0.02em; line-height: 1.15; }
.kpi-value small { font-size: 13px; font-weight: 600; color: var(--muted); margin-left: 3px; }
.kpi-foot { margin-top: 8px; font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.delta { font-weight: 700; font-size: 11.5px; padding: 2px 7px; border-radius: 999px; }
.delta.up { color: var(--green); background: rgba(61, 220, 151, 0.12); }
.delta.down { color: var(--red); background: rgba(255, 107, 107, 0.12); }
.delta.flat { color: var(--muted); background: rgba(122, 131, 148, 0.14); }

.progress { height: 6px; border-radius: 999px; background: #202836; overflow: hidden; margin-top: 10px; }
.progress > span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #f5b544, #ffd479); }

.dash-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 16px; margin-bottom: 16px; }
.dash-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.chart-box { position: relative; height: 250px; padding: 6px 4px 0; }

.up-list { display: flex; flex-direction: column; }
.up-item {
  display: flex; gap: 12px; align-items: center;
  padding: 11px 4px;
  border-bottom: 1px solid var(--line-soft);
  cursor: pointer;
  border-radius: 10px;
}
.up-item:last-child { border-bottom: none; }
.up-item:hover { background: rgba(255, 255, 255, 0.025); }
.up-date {
  flex: 0 0 46px;
  text-align: center;
  padding: 5px 0;
  border-radius: 10px;
  background: #0e131a;
  border: 1px solid var(--line);
}
.up-date b { display: block; font-size: 16px; line-height: 1.1; }
.up-date span { font-size: 10px; color: var(--muted); text-transform: uppercase; }
.up-main { min-width: 0; flex: 1; }
.up-main strong { display: block; font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.up-main span { font-size: 12px; color: var(--muted); }

.bar-list { display: flex; flex-direction: column; gap: 13px; }
.bar-row .bar-top { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 5px; gap: 10px; }
.bar-row .bar-top strong { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-row .bar-top span { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.bar-track { height: 8px; background: #1c2330; border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; transition: width 0.5s ease; }

.status-chips { display: flex; flex-wrap: wrap; gap: 9px; }
.status-chip {
  flex: 1 1 100px;
  padding: 11px 13px;
  border-radius: 12px;
  background: #0f131a;
  border: 1px solid var(--line);
}
.status-chip b { display: block; font-size: 19px; font-weight: 800; }
.status-chip span { font-size: 11.5px; color: var(--muted); }

.hero-empty {
  border: 1px dashed #2b3444;
  border-radius: var(--radius);
  padding: 40px 24px;
  text-align: center;
  background: linear-gradient(180deg, rgba(245, 181, 68, 0.05), transparent);
}
.hero-empty .big { font-size: 34px; color: var(--gold); margin-bottom: 12px; }
.hero-empty h2 { font-size: 20px; margin-bottom: 7px; }
.hero-empty p { color: var(--muted); font-size: 14px; max-width: 460px; margin: 0 auto 18px; }
.hero-empty .actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ============ Toolbar & filters ============ */
.toolbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 14px;
}
.toolbar .grow { flex: 1; min-width: 180px; }
.search-box { position: relative; flex: 1; min-width: 190px; }
.search-box i {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--muted); font-size: 13px; pointer-events: none;
}
.search-box input { padding-left: 34px; }
.toolbar select { width: auto; min-width: 150px; }

.tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; margin-bottom: 14px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 13px; font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.tab:hover { color: var(--text); border-color: #2f3948; }
.tab.active { background: var(--gold-soft); border-color: rgba(245, 181, 68, 0.45); color: var(--gold); }
.tab .n { opacity: 0.75; font-weight: 700; margin-left: 4px; }

.list-summary {
  display: flex; gap: 18px; flex-wrap: wrap;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 12.5px;
  color: var(--muted);
}
.list-summary b { color: var(--text); font-size: 13.5px; }

.date-pill {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px; color: var(--muted);
}
.date-pill strong { color: var(--text); font-weight: 600; }

/* ============ Booking rows ============ */
.bk-time { display: flex; flex-direction: column; gap: 1px; }
.bk-time strong { font-size: 13.5px; }
.bk-time span { font-size: 11.5px; color: var(--muted); }
.studio-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  margin-right: 6px; vertical-align: middle;
}
.bk-title { font-weight: 600; }
.bk-sub { font-size: 12px; color: var(--muted); }
.money-cell { font-weight: 600; font-variant-numeric: tabular-nums; }
.money-sub { font-size: 11.5px; color: var(--muted); }
.paid-ok { color: var(--green); }
.paid-part { color: var(--gold); }
.paid-none { color: var(--red); }

/* ============ Detail modal ============ */
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.detail-item { background: #0f131a; border: 1px solid var(--line-soft); border-radius: 11px; padding: 10px 12px; }
.detail-item span { display: block; font-size: 11.5px; color: var(--muted); margin-bottom: 3px; }
.detail-item strong { font-size: 14px; font-weight: 600; }
.section-title {
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--muted); font-weight: 700; margin: 18px 0 10px;
}
.pay-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 12px; border-radius: 10px; background: #0f131a; border: 1px solid var(--line-soft);
  margin-bottom: 7px; font-size: 13px;
}
.pay-row .amt { font-weight: 700; color: var(--green); }
.pay-row button { background: none; border: none; color: var(--muted); cursor: pointer; padding: 2px 4px; }
.pay-row button:hover { color: var(--red); }
.status-select-row { display: flex; gap: 8px; flex-wrap: wrap; }
.status-select-row .btn { flex: 1 1 auto; }

/* ============ Calendar ============ */
.cal-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 14px; flex-wrap: wrap;
}
.cal-title { font-size: 17px; font-weight: 700; }
.cal-nav { display: flex; align-items: center; gap: 6px; }
.cal-dow {
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 8px; margin-bottom: 8px;
}
.cal-dow span {
  text-align: center; font-size: 11.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted);
  padding: 4px 0;
}
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.cal-cell {
  min-height: 104px;
  border-radius: 12px;
  border: 1px solid var(--line-soft);
  background: #10141b;
  padding: 7px 8px;
  display: flex; flex-direction: column; gap: 4px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
  overflow: hidden;
}
.cal-cell:hover { border-color: #35405240; background: #131822; }
.cal-cell.out { opacity: 0.35; cursor: default; }
.cal-cell.today { border-color: rgba(245, 181, 68, 0.55); background: rgba(245, 181, 68, 0.06); }
.cal-num { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.cal-cell.today .cal-num { color: var(--gold); }
.cal-item {
  font-size: 10.5px;
  line-height: 1.3;
  padding: 3px 5px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-left: 2px solid var(--gold);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cal-more { font-size: 10.5px; color: var(--muted); padding-left: 3px; }
.cal-dots { display: none; gap: 3px; margin-top: 2px; }
.cal-dot { width: 5px; height: 5px; border-radius: 50%; }

/* ============ Studios ============ */
.studio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 16px;
}
.studio-card {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(26, 32, 41, 0.9), rgba(17, 21, 28, 0.95));
  overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.studio-card:hover { transform: translateY(-2px); border-color: #333d4d; }
.studio-thumb { position: relative; aspect-ratio: 16 / 9; background: #0d1117; overflow: hidden; }
.studio-thumb img { width: 100%; height: 100%; object-fit: cover; opacity: 0.92; }
.studio-thumb .thumb-fallback {
  width: 100%; height: 100%;
  display: grid; place-items: center;
  color: #35405240; font-size: 34px;
}
.studio-thumb .tag {
  position: absolute; left: 10px; top: 10px;
  padding: 3px 9px; border-radius: 999px;
  font-size: 11px; font-weight: 700;
  background: rgba(10, 12, 16, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(4px);
}
.studio-thumb .price-tag {
  position: absolute; right: 10px; bottom: 10px;
  padding: 4px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 700;
  background: rgba(245, 181, 68, 0.94); color: #221705;
}
.studio-body { padding: 14px 15px 15px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.studio-body h3 { font-size: 15.5px; }
.studio-desc { font-size: 12.5px; color: var(--muted); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.studio-meta { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--muted); }
.studio-meta i { color: #4b5766; margin-right: 4px; }
.studio-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line-soft); }
.studio-foot .actions { display: flex; gap: 6px; }

/* ============ Customers ============ */
.avatar-cell { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 34px; height: 34px; flex: 0 0 34px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 13px; font-weight: 700;
  background: rgba(245, 181, 68, 0.14);
  color: var(--gold);
  border: 1px solid rgba(245, 181, 68, 0.28);
}

/* ============ Responsive ============ */
.only-sm { display: none; }

@media (max-width: 1100px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-grid, .dash-grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .hide-md { display: none !important; }
  .cal-cell { min-height: 76px; padding: 5px 6px; }
  .cal-item { display: none; }
  .cal-dots { display: flex; flex-wrap: wrap; }
  .cal-more { font-size: 10px; }
}

@media (max-width: 700px) {
  .kpi-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi { padding: 13px 13px 12px; }
  .kpi-value { font-size: 20px; }
  .kpi-label { font-size: 11px; }
  .hide-sm { display: none !important; }
  .only-sm { display: block; }
  .detail-grid { grid-template-columns: 1fr; }
  .studio-grid { grid-template-columns: 1fr; }
  .dash-grid-2 { gap: 12px; }
  .chart-box { height: 210px; }
  .toolbar select { min-width: 0; flex: 1; }
  table.tbl th, table.tbl td { padding: 10px 10px; }
  table.tbl { font-size: 13px; }
  .list-summary { gap: 12px; padding: 10px 14px; }
}
