:root {
  --ink: #22343b;
  --muted: #718188;
  --line: #e3eae7;
  --paper: #f5f8f6;
  --card: #ffffff;
  --teal: #1b6d70;
  --teal-dark: #134f54;
  --teal-soft: #e7f2ef;
  --coral: #e7846f;
  --gold: #e4b85d;
  --shadow: 0 14px 34px rgba(35, 61, 63, 0.07);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
}
button {
  border: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.app-shell {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 252px;
  min-height: 0;
  overflow-y: auto;
  padding: 25px 16px 18px;
  display: flex;
  flex-direction: column;
  color: #e9f2ef;
  background: #183e46;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 13px 30px;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 33px;
  height: 33px;
  border-radius: 10px;
  color: #fff;
  background: var(--coral);
}
.brand-mark img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
}
.brand strong {
  display: block;
  font-size: 14px;
  letter-spacing: 0.01em;
}
.brand small,
.sidebar small {
  display: block;
  margin-top: 4px;
  color: #9db9b7;
  font-size: 11px;
}
.eyebrow {
  display: block;
  color: #88a5a4;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
}
.production-switcher {
  position: relative;
  padding: 0 7px 23px;
}
.production-switcher .eyebrow {
  padding: 0 5px 8px;
}
.production-button {
  display: flex;
  justify-content: space-between;
  width: 100%;
  padding: 12px;
  border: 1px solid #38666c;
  border-radius: 10px;
  color: #e8f1ef;
  background: #234f57;
  text-align: left;
  font-size: 12px;
}
.production-menu {
  display: none;
  position: absolute;
  z-index: 5;
  top: 74px;
  left: 7px;
  right: 7px;
  padding: 5px;
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow);
}
.production-menu.open {
  display: block;
}
.production-menu button {
  display: block;
  width: 100%;
  padding: 10px;
  border-radius: 7px;
  background: transparent;
  text-align: left;
  font-size: 12px;
}
.production-menu button:hover {
  background: #edf5f2;
}
.production-menu small {
  color: var(--muted);
}
.nav {
  display: grid;
  gap: 4px;
}
.nav-section {
  display: grid;
  gap: 4px;
  margin-top: 17px;
}
.nav-section .eyebrow {
  padding: 5px 13px 4px;
  color: #729795;
  font-size: 9px;
}
.nav-group {
  display: grid;
  gap: 4px;
}
.quick-nav {
  padding-bottom: 3px;
  border-bottom: 1px solid #315c63;
}
.nav button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px 13px;
  border-radius: 9px;
  color: #a8c3c1;
  background: transparent;
  text-align: left;
  font-size: 13px;
}
.nav button:hover,
.nav button.active {
  color: #fff;
  background: #285963;
}
.nav-icon {
  width: 18px;
  color: #8fb3ae;
  text-align: center;
  font-size: 16px;
}
.nav-icon svg,
.action-icon {
  width: 18px;
  height: 18px;
  fill: currentColor;
}
.sidebar-footer {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: auto;
  padding: 17px 8px 0;
  border-top: 1px solid #315c63;
  font-size: 11px;
}
.sidebar-footer strong {
  display: block;
  font-size: 11px;
}
.status-dot,
.notification-dot {
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #74d09a;
}
.sidebar-footer .status-dot {
  margin-left: auto;
}
.avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: #5b4824;
  background: #e9c47a;
  font-size: 11px;
  font-weight: 800;
}
.avatar.small {
  width: 28px;
  height: 28px;
  font-size: 10px;
}
.avatar.small img,
.avatar-large img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.main {
  flex: 1;
  min-width: 0;
  margin-left: 252px;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 96px;
  padding: 22px 48px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
}
.topbar h1 {
  margin: 6px 0 0;
  font:
    500 28px Georgia,
    serif;
  letter-spacing: -0.02em;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}
.icon-button {
  position: relative;
  color: var(--muted);
  background: transparent;
  font-size: 22px;
}
.notification-dot,
.notification-count {
  position: absolute;
  top: -7px;
  right: -10px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  border: 1px solid #fff;
  background: var(--coral);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
}
.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
}
.theme-toggle {
  font-size: 19px;
}
.mobile-nav-open,
.mobile-nav-close,
.mobile-nav-backdrop,
.mobile-bottom-nav {
  display: none;
}
.content {
  max-width: 1320px;
  padding: 38px 48px 64px;
}
.page-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 25px;
}
.page-intro h2 {
  margin: 6px 0 6px;
  font:
    500 31px Georgia,
    serif;
  letter-spacing: -0.02em;
}
.page-intro p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.primary {
  padding: 11px 15px;
  border-radius: 8px;
  color: #fff;
  background: var(--teal);
  font-size: 12px;
  font-weight: 750;
}
.primary:hover {
  background: var(--teal-dark);
}
.secondary {
  padding: 10px 13px;
  border: 1px solid #c9d9d6;
  border-radius: 8px;
  color: var(--teal);
  background: #fff;
  font-size: 12px;
  font-weight: 700;
}
.grid {
  display: grid;
  gap: 17px;
}
.stat-grid {
  grid-template-columns: repeat(4, 1fr);
}
.two-col {
  grid-template-columns: 1.15fr 0.85fr;
  margin-top: 18px;
}
.card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  box-shadow: var(--shadow);
}
.stat {
  padding: 19px 20px;
}
.stat-label {
  color: var(--muted);
  font-size: 11px;
}
.stat-value {
  margin-top: 8px;
  font-size: 28px;
  font-weight: 700;
}
.stat-meta {
  margin-top: 5px;
  color: var(--teal);
  font-size: 11px;
}
.section-card {
  padding: 21px;
}
.section-card h3 {
  margin: 0 0 17px;
  font:
    500 19px Georgia,
    serif;
}
.section-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.link {
  color: var(--teal);
  background: transparent;
  font-size: 11px;
  font-weight: 750;
}
.alert {
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
  padding: 14px;
  border-radius: 9px;
  color: #7b6025;
  background: #fff6e5;
  font-size: 12px;
}
.alert strong {
  display: block;
  margin-bottom: 4px;
  color: #674c1b;
}
.event-row,
.message-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 0;
  border-top: 1px solid #edf1ef;
}
.section-card > .event-row {
  width: 100%;
  box-sizing: border-box;
  padding: 14px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--card);
}
.event-row:first-of-type,
.message-row:first-of-type {
  border-top: 0;
}
.date-box {
  width: 45px;
  padding: 6px 3px;
  border-radius: 8px;
  color: var(--teal);
  background: #f0f7f4;
  text-align: center;
}
.date-box strong {
  display: block;
  font-size: 17px;
}
.date-box small {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
}
.row-main {
  flex: 1;
  min-width: 0;
}
.table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 12px;
}
.table th,
.table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.table th { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; }
.table th:first-child, .table td:first-child { width: 42%; }
.table th:nth-child(2), .table td:nth-child(2) { width: 23%; }
.table th:nth-child(3), .table td:nth-child(3) { width: 18%; }
.table th:last-child, .table td:last-child { width: 17%; }
.row-main strong {
  display: block;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.row-main small {
  display: block;
  overflow: hidden;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 8px;
  border-radius: 99px;
  color: var(--teal);
  background: var(--teal-soft);
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}
.pill.coral {
  color: #bc5d4a;
  background: #fff0eb;
}
.pill.gold {
  color: #987229;
  background: #fff7e7;
}
[data-theme="dark"] .pill.coral {
  color: #ffd2c6;
  background: #713e3a;
}
[data-theme="dark"] .pill.gold {
  color: #ffe5a1;
  background: #634e28;
}
[data-theme="dark"] .pill {
  color: #b8e5dc;
  background: #245457;
}
[data-theme="dark"] .date-box {
  color: #b8e5dc;
  background: #245457;
}

.artwork-card {
  display: grid;
  grid-template-columns: 190px 1fr;
  align-items: center;
  gap: 22px;
  margin-bottom: 18px;
  padding: 18px;
}
.artwork-placeholder {
  display: grid;
  place-items: center;
  height: 126px;
  overflow: hidden;
  border-radius: 10px;
  color: #2a6764;
  background: linear-gradient(145deg, #d7eee6, #f5d5a5);
}
.artwork-placeholder strong {
  max-width: 125px;
  font:
    500 18px Georgia,
    serif;
  text-align: center;
}
.artwork-copy h3 {
  margin: 5px 0 7px;
  font:
    500 21px Georgia,
    serif;
}
.artwork-copy p {
  max-width: 530px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.filters {
  display: flex;
  gap: 9px;
  margin-bottom: 17px;
}
.filter {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  background: #fff;
  font-size: 11px;
}
.calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 7px;
}
.weekday {
  padding: 7px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-align: center;
}
.day {
  min-height: 84px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  font-size: 12px;
}
.day.muted {
  color: #a3aeae;
  background: #f5f7f6;
}
.day.today {
  padding: 8px;
  border: 2px solid var(--coral);
}
.day .event {
  display: block;
  margin-top: 10px;
  padding: 5px 6px;
  border-radius: 5px;
  color: var(--teal);
  background: #eaf5f2;
  font-size: 10px;
  font-weight: 750;
}
[data-theme="dark"] .day,
[data-theme="dark"] .calendar .day {
  background: var(--card);
}
[data-theme="dark"] .day.muted {
  color: #71898a;
  background: #142d32;
}
[data-theme="dark"] .day .event {
  color: #c4ebe3;
  background: #245457;
}
.search-row {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}
.search-row input,
.composer input {
  flex: 1;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-size: 12px;
}
.empty {
  padding: 45px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}
.muted {
  color: var(--muted);
  font-size: 11px;
}
.field-label {
  display: grid;
  gap: 7px;
  max-width: 430px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}
.field-label select {
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font: inherit;
}
.role-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.role-card {
  padding: 20px;
}
.role-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.role-icon {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  border-radius: 10px;
  color: #fff;
  background: var(--teal);
}
.role-card h3 {
  margin: 17px 0 7px;
  font:
    500 19px Georgia,
    serif;
}
.role-card p {
  min-height: 51px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.role-owner {
  margin-top: 18px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}
.role-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 15px;
}
.coverage-card {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 20px;
  margin-bottom: 14px;
  padding: 20px;
}
.coverage-card h3 {
  margin: 6px 0 5px;
  font:
    500 20px Georgia,
    serif;
}
.coverage-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}
.coverage-slots {
  display: grid;
  gap: 8px;
}
.coverage-slots div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}
.coverage-slots strong {
  font-size: 12px;
  font-weight: 600;
  text-align: right;
}
.attendance-toolbar {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 22px 0 12px;
}
.attendance-toolbar .pill {
  margin-right: auto;
}
.attendance-list {
  border-top: 1px solid var(--line);
}
.attendance-row,
.roster-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.attendance-row select {
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  font: inherit;
  font-size: 11px;
}
.cast-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.cast-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfdfc;
}
.cast-card strong,
.cast-card small {
  display: block;
}
.cast-card small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}
.contact-btn {
  padding: 7px 9px;
  border: 1px solid #c9d9d6;
  border-radius: 7px;
  color: var(--teal);
  background: #fff;
  font-size: 10px;
  font-weight: 750;
  text-decoration: none;
}
.icon-contact {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 32px;
  padding: 0;
  font-size: 17px;
  line-height: 1;
}
.self-label {
  padding: 7px 5px;
  font-size: 10px;
  font-weight: 800;
}
.coverage-badge { display: inline-flex; align-items: center; margin-left: 6px; padding: 4px 7px; border-radius: 99px; font-size: 9px; font-weight: 800; white-space: nowrap; }
.coverage-badge.uncovered { color: #9b4b2f; background: #fff0e8; }
.coverage-badge.covered { color: #28714f; background: #e6f5eb; }
[data-theme="dark"] .coverage-badge.uncovered { color: #ffd0bd; background: #713e3a; }
[data-theme="dark"] .coverage-badge.covered { color: #b8efce; background: #245b45; }
.event-coverage { margin: 18px 0; padding-top: 14px; border-top: 1px solid var(--line); }
.event-coverage h3 { margin-bottom: 8px; }
.coverage-detail-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }

.chat-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  height: calc(100vh - 225px);
  min-height: 490px;
  max-height: 760px;
}
.calendar-shell { grid-column: 1 / -1; }
.calendar-shell header { align-items: center; }
.calendar-views { display: flex; gap: 6px; }
.calendar-schedule { display: grid; gap: 8px; margin-top: 14px; }
.calendar-schedule-row { width: 100%; }
.calendar-schedule-row .event-row { width: 100%; box-sizing: border-box; }
.calendar-schedule-row .event-row { padding: 15px 16px; border: 1px solid var(--line); border-radius: 9px; background: var(--card); }
.calendar-grid { margin-top: 16px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--card); }
.calendar-weekdays, .calendar-cells { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.calendar-weekdays { background: var(--teal-soft); color: var(--teal); font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.calendar-weekdays > div { padding: 11px 8px; border-right: 1px solid var(--line); text-align: center; }
.calendar-cell { min-height: 128px; padding: 10px; border-top: 1px solid var(--line); border-right: 1px solid var(--line); background: var(--card); }
.calendar-grid-week .calendar-cell { min-height: 290px; }
.calendar-cell:nth-child(7n) { border-right: 0; }
.calendar-day-number { color: var(--ink); font-size: 12px; font-weight: 850; }
.calendar-event-chip { display: grid; width: 100%; margin-top: 8px; padding: 8px; border: 1px solid #b9dcd4; border-radius: 7px; color: #164c53; background: #e2f1ed; text-align: left; cursor: pointer; }
.calendar-event-chip strong { overflow: hidden; font-size: 11px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.calendar-event-chip small { margin-top: 4px; font-size: 10px; font-weight: 650; }
[data-theme="dark"] .calendar-event-chip { border-color: #477f7e; color: #e8f5f1; background: #245457; }
.conversation-list {
  padding: 15px;
  border-right: 1px solid var(--line);
}
.conversation {
  padding: 13px;
  border-radius: 8px;
}
.conversation.active {
  background: var(--teal-soft);
}
.conversation strong {
  font-size: 12px;
}
.conversation small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
}
.chat-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 21px;
}
.chat-header {
  min-width: 0;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.chat-header strong {
  font-size: 14px;
}
.chat-header small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}
.chat-messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 18px 0;
}
.chat-bubble {
  width: fit-content;
  max-width: min(78%, 560px);
  margin: 8px 0;
  padding: 10px 13px;
  border-radius: 14px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.chat-bubble strong {
  display: inline-block;
  margin-bottom: 3px;
  font-size: 11px;
}
.chat-bubble.mine {
  margin-left: auto;
  color: #fff;
  background: var(--teal);
  border-bottom-right-radius: 4px;
}
.chat-bubble.theirs {
  margin-right: auto;
  background: var(--paper);
  border: 1px solid var(--line);
  border-bottom-left-radius: 4px;
}
.chat-empty {
  padding: 30px 0;
  color: var(--muted);
  text-align: center;
}
.typing-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin: 10px 0;
  padding: 9px 12px;
  color: var(--muted);
  font-size: 12px;
  font-style: italic;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.typing-dots { display: inline-flex; gap: 3px; }
.typing-dots i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--teal);
  animation: typing-pulse 1.2s infinite ease-in-out;
}
.typing-dots i:nth-child(2) { animation-delay: .15s; }
.typing-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes typing-pulse { 0%, 60%, 100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-2px); } }
.composer {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
}
.theo {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 370px;
  padding: 30px;
  border-radius: 15px;
  color: #fff;
  background: linear-gradient(135deg, #184f57, #347d78);
}
.theo p {
  max-width: 560px;
  color: #d3e7e3;
  font-size: 13px;
  line-height: 1.6;
}
.theo-ask-form { display: flex; gap: 10px; align-items: flex-end; max-width: 650px; margin-top: 22px; }
.theo-ask-form textarea { flex: 1; min-height: 74px; padding: 11px 13px; border: 1px solid rgba(255,255,255,.28); border-radius: 9px; color: #fff; background: rgba(0,0,0,.12); font: inherit; resize: vertical; }
.theo-ask-form textarea::placeholder { color: #c4ddda; }
.theo-answer { max-width: 650px; margin-top: 18px; padding: 15px; border-radius: 10px; color: #194f53; background: #e7f3ef; }
.theo-answer p { margin: 6px 0 0; color: #194f53; }
.theo h2 {
  margin: 0;
  font:
    500 28px Georgia,
    serif;
}
.theo-head {
  display: flex;
  align-items: center;
  gap: 15px;
}
.theo-avatar {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(145deg, #efc86c, #d98569);
  font-size: 28px;
  box-shadow: 0 7px 15px rgba(0, 0, 0, 0.14);
}
.suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 20px;
}
.suggestion {
  padding: 9px 12px;
  border: 1px solid #609493;
  border-radius: 99px;
  color: #e7f3f0;
  background: transparent;
  font-size: 11px;
}
.star {
  color: #efc86c;
  font-size: 30px;
}

.profile-grid {
  grid-template-columns: 1fr 1fr;
}
.avatar-upload {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 10px 0 20px;
}
.avatar-large {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  overflow: hidden;
  border-radius: 50%;
  color: #5b4824;
  background: #e9c47a;
  font-size: 22px;
  font-weight: 800;
}
.upload-note {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}
.file-input {
  display: none;
}
.upload-button {
  display: inline-block;
  margin-top: 8px;
  color: var(--teal);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.auth-gate {
  max-width: 560px;
  margin: 0 auto;
  padding: 30px 0;
}
.auth-gate .card {
  padding: 28px;
}
.auth-gate h2 {
  margin: 7px 0;
  font:
    500 30px Georgia,
    serif;
}
.auth-gate p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}
.auth-form {
  display: grid;
  gap: 11px;
  margin-top: 22px;
}
.auth-form label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}
.auth-form input {
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
}
.auth-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
}
.auth-error {
  margin-top: 15px;
  padding: 11px 13px;
  border-radius: 8px;
  color: #a8493c;
  background: #fff0eb;
  font-size: 12px;
}
.auth-status {
  margin-top: 15px;
  color: var(--muted);
  font-size: 11px;
}
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 9px;
  padding: 4px 7px;
  border-radius: 99px;
  color: var(--teal);
  background: var(--teal-soft);
  font: 700 9px sans-serif;
  vertical-align: middle;
}
.live-badge::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #54b67d;
}
.add-form {
  display: grid;
  gap: 12px;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.button-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.attach-button {
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
}
.check-list {
  display: grid;
  gap: 8px;
  max-height: 220px;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.add-form label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}
.add-form input,
.add-form select {
  width: 100%;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-size: 12px;
  box-sizing: border-box;
}
.add-form textarea {
  width: 100%;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-size: 12px;
  box-sizing: border-box;
  resize: vertical;
}
.add-form .check-row {
  display: flex;
  align-items: center;
  grid-template-columns: auto 1fr;
}
.add-form .check-row input {
  width: auto;
}
.event-detail {
  cursor: pointer;
}
.event-detail:hover {
  background: #f6faf8;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(21, 48, 51, 0.42);
}
.modal-card {
  position: relative;
  width: min(520px, 100%);
  padding: 28px;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 22px 60px rgba(21, 48, 51, 0.25);
}
.modal-card h2 {
  margin: 7px 0 10px;
  font:
    500 28px Georgia,
    serif;
}
.modal-card p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.modal-card p strong {
  color: var(--ink);
}
.modal-meta {
  margin-bottom: 20px;
  color: var(--teal) !important;
  font-weight: 700;
}
.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  color: var(--muted);
  background: transparent;
  font-size: 24px;
}
.modal-link {
  display: inline-block;
  margin-top: 8px;
  text-decoration: none;
}

[data-theme="dark"] {
  --ink: #edf5f2;
  --muted: #a7bab7;
  --line: #38545a;
  --paper: #11282e;
  --card: #19363d;
  --teal-soft: #214a50;
  --shadow: 0 14px 34px rgba(0, 0, 0, 0.24);
}
[data-theme="dark"] .topbar {
  background: rgba(18, 42, 48, 0.94);
}
[data-theme="dark"] .secondary,
[data-theme="dark"] input,
[data-theme="dark"] textarea,
[data-theme="dark"] select {
  border-color: #45656a;
  color: var(--ink);
  background: #173238;
}
[data-theme="dark"] .contact-btn,
[data-theme="dark"] .filter {
  border-color: #477276;
  color: #c7eee7;
  background: #245457;
}
[data-theme="dark"] .modal-card,
[data-theme="dark"] .auth-gate .card {
  color: var(--ink);
  background: var(--card);
}
[data-theme="dark"] .modal-card p strong,
[data-theme="dark"] .section-card h3,
[data-theme="dark"] label {
  color: var(--ink);
}

@media (max-width: 1100px) {
  .role-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 960px) {
  .sidebar {
    width: 215px;
  }
  .main {
    margin-left: 215px;
    min-width: 0;
    overflow-x: hidden;
  }
  .topbar { min-width: 0; }
  .topbar > div:first-child { min-width: 0; }
  .topbar h1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .topbar,
  .content {
    padding-right: 26px;
    padding-left: 26px;
  }
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .two-col,
  .profile-grid,
  .coverage-card {
    grid-template-columns: 1fr;
  }
  .chat-layout { height: calc(100vh - 190px); min-height: 460px; }
  .conversation-list { max-height: 150px; overflow-y: auto; border-right: 0; border-bottom: 1px solid var(--line); }
}
@media (max-width: 650px) {
  .app-shell {
    display: block;
  }
  .sidebar {
    display: none;
    z-index: 30;
    width: min(290px, 86vw);
    height: 100vh;
    overflow-y: auto;
    box-shadow: 18px 0 40px rgba(0, 0, 0, 0.22);
  }
  .sidebar.mobile-open { display: flex; }
  .mobile-nav-close {
    display: block;
    align-self: flex-end;
    margin: -8px 0 3px;
    padding: 4px 9px;
    color: #d7e9e5;
    background: transparent;
    font-size: 26px;
  }
  .mobile-nav-backdrop {
    position: fixed;
    inset: 0;
    z-index: 20;
    background: rgba(10, 28, 32, 0.52);
  }
  .mobile-nav-backdrop.open { display: block; }
  .main {
    margin-left: 0;
    padding-bottom: 74px;
  }
  .sidebar-footer {
    display: none;
  }
  .topbar {
    min-height: 82px;
    padding: 18px;
  }
  .topbar > div:first-of-type {
    flex: 1 1 auto;
    min-width: 0;
  }
  .top-actions {
    flex: 0 0 auto;
    gap: 6px;
  }
  .top-actions .user-chip {
    gap: 0;
  }
  .top-actions .user-chip > span:not(.avatar) {
    display: none;
  }
  .top-actions .icon-button {
    width: 30px;
    height: 30px;
    padding: 0;
  }
  .mobile-nav-open {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    margin-right: 12px;
    border-radius: 9px;
    color: var(--ink);
    background: var(--teal-soft);
    font-size: 22px;
  }
  .topbar h1 {
    font-size: 22px;
  }
  .content {
    padding: 24px 18px 45px;
  }
  .content > *,
  .content .card,
  .content .section-card,
  .content .grid,
  .content .page-intro,
  .content .event-row,
  .content .message-row {
    min-width: 0;
    max-width: 100%;
  }
  .event-row {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
  }
  .event-row .row-main { min-width: 0; overflow: hidden; }
  .event-row > .pill,
  .event-row > .coverage-badge {
    grid-column: 2;
    justify-self: start;
    margin-left: 0;
  }
  .message-row .row-main { min-width: 0; overflow: hidden; }
  .table {
    display: table;
    width: 100%;
    font-size: 10px;
  }
  .table th,
  .table td {
    padding: 10px 5px;
    overflow-wrap: anywhere;
  }
  .table th { font-size: 9px; letter-spacing: .02em; }
  .chat-layout,
  .chat-panel,
  .chat-messages,
  .composer {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }
  .chat-panel { padding: 15px; }
  .chat-bubble { max-width: 92%; }
  .composer { flex-wrap: wrap; }
  .composer input[name="body"] { min-width: 0; flex: 1 1 100%; }
  .composer .attach-button,
  .composer button { flex: 1 1 0; min-width: 0; }
  .page-intro {
    display: block;
  }
  .page-intro .primary,
  .page-intro .secondary {
    margin-top: 15px;
  }
  .artwork-card {
    grid-template-columns: 1fr;
  }
  .chat-layout {
    grid-template-columns: 1fr;
  }
  .conversation-list {
    display: none;
  }
  .role-grid,
  .cast-grid {
    grid-template-columns: 1fr;
  }
  .attendance-toolbar {
    align-items: stretch;
    flex-wrap: wrap;
  }
  .attendance-toolbar .pill {
    width: 100%;
  }
  .contact-actions {
    margin-left: auto;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .mobile-bottom-nav {
    position: fixed;
    inset: auto 0 0;
    z-index: 15;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    min-height: 64px;
    padding: 5px 4px max(5px, env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: var(--card);
    box-shadow: 0 -8px 22px rgba(25, 55, 58, 0.1);
  }
  .mobile-bottom-nav button {
    display: grid;
    place-items: center;
    gap: 2px;
    min-width: 0;
    padding: 4px 1px;
    border-radius: 8px;
    color: var(--muted);
    background: transparent;
  }
  .mobile-bottom-nav button svg { width: 20px; height: 20px; fill: currentColor; }
  .mobile-bottom-nav button small { overflow: hidden; max-width: 100%; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-bottom-nav button.active { color: var(--teal); background: var(--teal-soft); font-weight: 800; }
}
