:root {
  --bg: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e5e7eb;
  --card: #ffffff;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  --radius: 14px;
  --accent: #22c55e;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.35;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  padding: 20px 16px;
}

.header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.site-footer {
  margin-top: 26px;
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.brand-mark {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--accent);
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 14px;
  line-height: 1;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.nav a {
  padding: 8px 10px;
  border-radius: 10px;
  color: var(--muted);
}

.nav a.active {
  background: rgba(34, 197, 94, 0.12);
  color: var(--text);
}

.page-title {
  margin: 18px 0 6px;
  font-size: 26px;
  letter-spacing: -0.02em;
}

.page-subtitle {
  margin: 0 0 18px;
  color: var(--muted);
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}

.stack {
  display: grid;
  gap: 12px;
}

.row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 700px) {
  .row.two {
    grid-template-columns: 1fr 1fr;
  }
  .row.three {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

.field label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
}

.field input,
.field select {
  width: 100%;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  font-size: 16px;
  outline: none;
}

.field input.blurred {
  filter: blur(6px);
  user-select: none;
  pointer-events: none;
}

.field input:focus,
.field select:focus {
  border-color: rgba(34, 197, 94, 0.7);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.14);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.btn {
  appearance: none;
  border: 1px solid transparent;
  background: var(--accent);
  color: #fff;
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn.secondary {
  background: #fff;
  color: var(--text);
  border-color: var(--border);
}

.btn.danger {
  background: #ef4444;
}

.list {
  display: grid;
  gap: 10px;
}

.item {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 12px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.item-title {
  font-weight: 650;
}

.item-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  background: #fff;
}

.notice {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  color: var(--muted);
  background: rgba(100, 116, 139, 0.06);
}

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(100, 116, 139, 0.06);
  object-fit: cover;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

@media (min-width: 700px) {
  .grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  border: 1px solid var(--border);
  object-fit: cover;
  background: rgba(100, 116, 139, 0.06);
}

.calendar {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 900px) {
  .calendar {
    grid-template-columns: 1.35fr 0.65fr;
    align-items: start;
  }
}

.cal-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
}

.cal-head {
  display: grid;
  grid-template-columns: 64px 1fr;
  border-bottom: 1px solid var(--border);
  background: rgba(100, 116, 139, 0.04);
}

.cal-head .time-col {
  border-right: 1px solid var(--border);
}

.cal-masters {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(180px, 1fr);
}

.cal-master {
  padding: 10px 12px;
  border-right: 1px solid var(--border);
  font-weight: 650;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cal-body {
  display: grid;
  grid-template-columns: 64px 1fr;
}

.cal-times {
  border-right: 1px solid var(--border);
  background: rgba(100, 116, 139, 0.02);
}

.cal-times .t {
  height: 72px;
  padding: 8px 10px;
  font-size: 12px;
  color: var(--muted);
  border-bottom: 1px solid rgba(229, 231, 235, 0.7);
}

.cal-grid {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(180px, 1fr);
}

.cal-col {
  position: relative;
  border-right: 1px solid var(--border);
  background-image:
    linear-gradient(to bottom, rgba(229, 231, 235, 0.85) 1px, transparent 1px);
  background-size: 100% 72px;
}

.cal-event {
  position: absolute;
  left: 8px;
  right: 8px;
  border-radius: 14px;
  border: 1px solid rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.12);
  padding: 10px 10px;
  overflow: hidden;
}

.cal-event .title {
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cal-event .meta {
  margin-top: 4px;
  font-size: 12px;
  color: rgba(15, 23, 42, 0.7);
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.cal-event .meta span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cal-event .del {
  appearance: none;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.7);
  color: rgba(15, 23, 42, 0.75);
  padding: 4px 8px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 12px;
}

.cal-scroll {
  overflow: auto;
  max-height: 70vh;
}

/* Prototype-like schedule (Yclients-ish) */
.tabs {
  display: flex;
  background: rgba(100, 116, 139, 0.06);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 4px;
}

.tabs button {
  flex: 1;
  border: 0;
  background: transparent;
  padding: 10px;
  border-radius: 12px;
  color: var(--muted);
  font-weight: 800;
  cursor: pointer;
}

.tabs button.active {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.06);
}

.schedule-wrap {
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
}

.schedule-head {
  display: grid;
  align-items: center;
  border-bottom: 1px solid var(--border);
  background: rgba(100, 116, 139, 0.06);
}

.schedule-head .cell {
  padding: 10px 12px;
  font-weight: 900;
  font-size: 12px;
  color: var(--muted);
  border-right: 1px solid var(--border);
}

.schedule-head .cell.name {
  color: var(--text);
}

.schedule-body {
  display: grid;
  position: relative;
}

.schedule-body .time-col {
  border-right: 1px solid var(--border);
  background: #fff;
}

.schedule-body .time-col .t {
  height: var(--hour-h);
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 6px 10px 0 0;
  font-size: 12px;
  color: var(--muted);
  border-bottom: 1px solid rgba(229, 231, 235, 0.7);
}

.sched-col {
  position: relative;
  min-width: 0;
}

.sched-col + .sched-col {
  border-left: 1px solid var(--border);
}

.sched-col .gridlines {
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(148, 163, 184, 0.22) 0px,
      rgba(148, 163, 184, 0.22) 1px,
      transparent 1px,
      transparent var(--hour-h)
    );
  pointer-events: none;
}

.sched-col .inner {
  position: absolute;
  inset: 0;
}

.booking {
  position: absolute;
  left: 8px;
  right: 8px;
  border-radius: 14px;
  padding: 8px 10px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

.booking .b-title {
  font-weight: 900;
  font-size: 13px;
  line-height: 1.2;
}

.booking .b-sub {
  font-size: 12px;
  opacity: 0.9;
  margin-top: 3px;
}

.booking .b-time {
  font-size: 12px;
  opacity: 0.9;
  margin-top: 6px;
  font-weight: 900;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.booking .b-time button {
  appearance: none;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.7);
  color: rgba(15, 23, 42, 0.75);
  padding: 4px 8px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 12px;
}

.c-mint { background: rgba(22, 163, 74, 0.14); }
.c-blue { background: rgba(59, 130, 246, 0.14); }
.c-amber { background: rgba(245, 158, 11, 0.16); }
.c-rose { background: rgba(244, 63, 94, 0.14); }
.c-violet { background: rgba(139, 92, 246, 0.14); }

.cal-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.cal-topbar .range {
  font-weight: 1000;
  font-size: 16px;
}

.cal-topbar .nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cal-topbar .nav button {
  appearance: none;
  border: 1px solid var(--border);
  background: #fff;
  padding: 8px 10px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 900;
}

.cal-view {
  display: none;
}

.cal-view.active {
  display: block;
}

.week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(160px, 1fr));
  gap: 10px;
  overflow: auto;
}

.week-day {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
  min-height: 160px;
}

.week-day .wh {
  padding: 10px 12px;
  font-weight: 1000;
  font-size: 12px;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  background: rgba(100, 116, 139, 0.06);
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.week-day .wl {
  padding: 10px;
  display: grid;
  gap: 8px;
}

.chip {
  border-radius: 14px;
  padding: 8px 10px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.06);
}

.chip .t {
  font-weight: 1000;
  font-size: 12px;
  opacity: 0.9;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.chip .n {
  font-weight: 1000;
  margin-top: 4px;
  font-size: 13px;
}

.chip .s {
  margin-top: 2px;
  font-size: 12px;
  opacity: 0.9;
}

.chip button {
  appearance: none;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.7);
  color: rgba(15, 23, 42, 0.75);
  padding: 4px 8px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 12px;
}

.month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(120px, 1fr));
  gap: 10px;
  overflow: auto;
}

.month-day {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  padding: 10px;
  min-height: 110px;
  cursor: pointer;
  position: relative;
}

.month-day.off {
  opacity: 0.45;
}

.month-day .d {
  font-weight: 1000;
  font-size: 12px;
  color: var(--muted);
}

.month-day .cnt {
  position: absolute;
  right: 10px;
  top: 10px;
  background: rgba(15, 23, 42, 0.06);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 8px;
  font-weight: 1000;
  font-size: 12px;
  color: var(--text);
}

.month-dow {
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 1000;
  color: var(--muted);
}

.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 18px;
}

.login-card {
  width: 100%;
  max-width: 420px;
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  background: #fff;
  padding: 22px;
}

.login-card h1 {
  font-size: 24px;
  margin: 6px 0 6px;
}

.muted {
  color: var(--muted);
}
