:root {
  --ink: #20142f;
  --muted: #776985;
  --line: #e4ddec;
  --paper: #fbf7ff;
  --panel: #ffffff;
  --accent: #7c3aed;
  --accent-dark: #5b21b6;
  --accent-soft: #ede9fe;
  --rose: #d946ef;
  --planned: #8b5cf6;
  --production: #f59e0b;
  --completed: #10b981;
  --skipped: #8b8494;
  --hold: #ec4899;
  --shadow: 0 24px 70px rgba(70, 36, 112, 0.16);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, Arial, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(124, 58, 237, 0.22), transparent 30%),
    linear-gradient(135deg, rgba(217, 70, 239, 0.12), transparent 28%),
    linear-gradient(315deg, rgba(91, 33, 182, 0.13), transparent 34%),
    var(--paper);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 22px;
  min-height: 100vh;
  padding: 22px;
}

.side-panel,
.calendar-panel,
.details-panel,
.booking-form {
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(228, 221, 236, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.side-panel {
  display: flex;
  flex-direction: column;
  gap: 24px;
  border-radius: 8px;
  padding: 24px;
}

.brand,
.manager-card,
.topbar,
.panel-heading,
.calendar-header,
.modal-header,
.modal-actions,
.form-row {
  display: flex;
  align-items: center;
}

.brand {
  gap: 14px;
}

.brand-mark,
.avatar {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 8px;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--rose));
}

.brand h1,
.topbar h2,
.booking-form h2,
.panel-heading h3,
.calendar-header h3,
.manager-card h2 {
  margin: 0;
  letter-spacing: 0;
}

.eyebrow,
.muted,
.small,
.section-title {
  margin: 0;
  color: var(--muted);
}

.eyebrow {
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.small {
  margin-top: 7px;
  line-height: 1.5;
}

.manager-card {
  align-items: flex-start;
  gap: 14px;
  padding: 18px;
  border-radius: 8px;
  background: var(--accent-soft);
  border: 1px solid #ddd0fb;
}

.avatar {
  flex: 0 0 auto;
  background: var(--accent-dark);
}

.quick-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.quick-stats div {
  padding: 14px 10px;
  border-radius: 8px;
  background: #2d1746;
  color: #fff;
}

.quick-stats strong,
.quick-stats span {
  display: block;
}

.quick-stats strong {
  font-size: 1.45rem;
}

.quick-stats span {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.78rem;
}

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

.section-title {
  font-weight: 700;
  color: var(--ink);
}

.filter-chip {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 12px 14px;
  text-align: left;
  color: var(--ink);
  line-height: 1.25;
}

.filter-chip.active,
.filter-chip:hover {
  background: linear-gradient(135deg, var(--accent), var(--rose));
  color: #fff;
  border-color: var(--accent);
}

.workspace {
  display: grid;
  grid-template-rows: auto minmax(430px, 1fr) auto;
  gap: 18px;
}

.topbar {
  justify-content: space-between;
  min-height: 82px;
  padding: 4px 4px 4px 0;
}

.topbar h2 {
  font-size: clamp(2rem, 5vw, 4.6rem);
  line-height: 0.95;
}

.primary-btn,
.secondary-btn,
.icon-btn,
.close-btn {
  border: 0;
  border-radius: 8px;
  min-height: 44px;
}

.primary-btn {
  padding: 0 18px;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--rose));
  box-shadow: 0 12px 26px rgba(124, 58, 237, 0.24);
}

.primary-btn:hover {
  background: linear-gradient(135deg, var(--accent-dark), #a21caf);
}

.secondary-btn {
  padding: 0 16px;
  color: var(--ink);
  font-weight: 800;
  background: var(--accent-soft);
  border: 1px solid var(--line);
}

.calendar-panel,
.details-panel {
  border-radius: 8px;
  padding: 18px;
}

.calendar-header {
  justify-content: space-between;
  margin-bottom: 14px;
}

.calendar-header h3 {
  font-size: 1.35rem;
}

.icon-btn,
.close-btn {
  width: 44px;
  background: var(--accent-soft);
  color: var(--ink);
  font-size: 1.7rem;
}

.weekday-row,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.weekday-row {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-align: center;
}

.day-cell {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 92px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.day-cell:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 10px 26px rgba(124, 58, 237, 0.12);
}

.day-cell.is-muted {
  opacity: 0.36;
}

.day-cell.is-selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.18);
}

.day-cell.is-today .date-number {
  color: var(--rose);
}

.date-number {
  font-weight: 900;
}

.booking-dot {
  display: inline-flex;
  margin-top: auto;
  min-width: 28px;
  height: 24px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--planned);
  color: #fff;
  font-size: 0.74rem;
  font-weight: 900;
}

.booking-dot.in-production {
  background: var(--production);
}

.booking-dot.completed {
  background: var(--completed);
}

.booking-dot.skipped {
  background: var(--skipped);
}

.booking-dot.in-hold {
  background: var(--hold);
}

.panel-heading {
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.booking-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.booking-card {
  border: 1px solid var(--line);
  border-left: 5px solid var(--accent);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
}

.booking-card.planned {
  border-left-color: var(--planned);
}

.booking-card.in-production {
  border-left-color: var(--production);
}

.booking-card.completed {
  border-left-color: var(--completed);
}

.booking-card.skipped {
  border-left-color: var(--skipped);
}

.booking-card.in-hold {
  border-left-color: var(--hold);
}

.booking-card header,
.booking-meta,
.card-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.booking-card header {
  justify-content: space-between;
  margin-bottom: 12px;
}

.booking-card h4 {
  margin: 0;
  font-size: 1.02rem;
}

.booking-card p {
  margin: 6px 0;
  color: var(--muted);
}

.status-pill {
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.72rem;
  font-weight: 900;
  background: rgba(139, 92, 246, 0.14);
  color: #5b21b6;
}

.status-pill.in-production {
  background: rgba(242, 153, 74, 0.18);
  color: #98602e;
}

.status-pill.completed {
  background: rgba(33, 150, 83, 0.14);
  color: #176b3c;
}

.status-pill.skipped {
  background: rgba(130, 130, 130, 0.16);
  color: #555;
}

.status-pill.in-hold {
  background: rgba(236, 72, 153, 0.15);
  color: #9d174d;
}

.card-actions {
  margin-top: 14px;
  flex-wrap: wrap;
}

.mini-btn {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbf8ff;
  min-height: 34px;
  padding: 0 10px;
  font-weight: 700;
}

.empty-state {
  min-height: 130px;
  display: grid;
  place-items: center;
  border: 1px dashed #cbd6d8;
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
}

.booking-modal {
  width: min(580px, calc(100vw - 28px));
  border: 0;
  background: transparent;
  padding: 0;
}

.booking-modal::backdrop {
  background: rgba(32, 20, 47, 0.62);
  backdrop-filter: blur(4px);
}

.booking-form {
  display: grid;
  gap: 14px;
  border-radius: 8px;
  padding: 22px;
}

.modal-header {
  justify-content: space-between;
}

label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 13px;
  color: var(--ink);
  background: #fff;
}

textarea {
  resize: vertical;
}

.form-row {
  gap: 12px;
}

.form-row label {
  flex: 1;
}

.modal-actions {
  justify-content: flex-end;
  gap: 10px;
}

@media (max-width: 920px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .side-panel {
    order: 2;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 620px) {
  .app-shell {
    padding: 12px;
  }

  .calendar-panel,
  .details-panel,
  .side-panel {
    padding: 14px;
  }

  .weekday-row,
  .calendar-grid {
    gap: 5px;
  }

  .day-cell {
    min-height: 68px;
    padding: 7px;
  }

  .form-row,
  .panel-heading {
    align-items: stretch;
    flex-direction: column;
  }
}
