@font-face {
  font-family: WeSmileThai;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/noto-sans-thai-thai-400-normal.woff2') format('woff2');
  unicode-range: U+0E00-0E7F, U+200C-200D, U+25CC;
}
@font-face {
  font-family: WeSmileThai;
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/noto-sans-thai-thai-600-normal.woff2') format('woff2');
  unicode-range: U+0E00-0E7F, U+200C-200D, U+25CC;
}
@font-face {
  font-family: WeSmileThai;
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/noto-sans-thai-thai-700-normal.woff2') format('woff2');
  unicode-range: U+0E00-0E7F, U+200C-200D, U+25CC;
}
:root {
  font-family: WeSmileThai, Tahoma, 'Noto Sans Thai', system-ui, sans-serif;
  color: #19334e;
  background: #f4f7fb;
  font-size: 16px;
  line-height: 1.65;
  --blue: #1469df;
  --navy: #123763;
  --muted: #62768b;
  --line: #e1e8f1;
  --radius: 18px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #72a9fa;
  outline-offset: 3px;
}
a {
  color: var(--blue);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
button {
  border: 0;
  border-radius: 10px;
  padding: 10px 16px;
  background: #edf3fb;
  color: #214e7c;
  font-weight: 600;
}
button:hover {
  filter: brightness(0.97);
}
.primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 4px 9px #1469df18;
}
.secondary {
  background: white;
  border: 1px solid var(--line);
}
.ghost {
  background: transparent;
}
.small {
  padding: 6px 11px;
  font-size: 0.875rem;
}
.danger {
  color: #ae3036;
  background: #fff0f0;
}
.app-shell {
  display: grid;
  grid-template-columns: 242px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  background: #fff;
  border-right: 1px solid var(--line);
  padding: 30px 22px;
  position: fixed;
  width: 242px;
  height: 100vh;
  display: flex;
  flex-direction: column;
  z-index: 10;
}
.brand {
  padding: 0 12px 30px;
  color: var(--blue);
}
.brand strong {
  font-size: 1.75rem;
  letter-spacing: -1px;
  display: block;
  line-height: 1.2;
}
.brand small {
  font-size: 0.8rem;
  letter-spacing: 1.8px;
  text-transform: uppercase;
}
.smile {
  width: 28px;
  height: 12px;
  border-bottom: 3px solid #44bed3;
  border-radius: 0 0 50% 50%;
  display: inline-block;
  vertical-align: middle;
  margin-left: 5px;
}
.nav {
  display: grid;
  gap: 7px;
}
.nav button {
  text-align: left;
  display: flex;
  gap: 13px;
  align-items: center;
  background: transparent;
  color: #5a6e84;
  padding: 13px 15px;
  font-weight: 500;
}
.nav button.active {
  background: #eaf2ff;
  color: #1265d5;
  font-weight: 700;
}
.icon {
  width: 21px;
  height: 21px;
  display: inline-block;
  flex-shrink: 0;
  vertical-align: middle;
}
.sidebar-bottom {
  margin-top: auto;
  padding: 20px 10px 0;
  font-size: 0.875rem;
  color: var(--muted);
}
.avatar {
  background: #dcecff;
  border-radius: 12px;
  color: #14569e;
  font-weight: bold;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
}
.user {
  display: flex;
  gap: 10px;
  align-items: center;
}
.workspace {
  grid-column: 2;
  min-width: 0;
  padding: 30px 40px 60px;
  max-width: 1800px;
  width: 100%;
  margin: auto;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}
.breadcrumb {
  color: var(--muted);
  font-size: 0.875rem;
}
.topbar h1 {
  margin: 2px 0;
  font-size: 1.7rem;
  letter-spacing: -0.5px;
}
.toolbar {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}
.month-switch {
  display: flex;
  gap: 4px;
  align-items: center;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 11px;
  padding: 3px;
}
.month-switch button {
  background: transparent;
  padding: 6px 10px;
}
.month-switch input {
  border: 0;
  width: 150px;
  color: var(--navy);
  font-size: 0.875rem;
  padding: 5px;
}
.mode-banner {
  padding: 10px 15px;
  background: #eaf2fc;
  color: #385d87;
  border-radius: 10px;
  font-size: 0.875rem;
  margin-bottom: 24px;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.mode-banner strong {
  font-size: 0.875rem;
}
.mode-banner .spacer {
  flex: 1;
}
.hero {
  background: var(--navy);
  border-radius: 20px;
  padding: 26px 30px;
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}
.hero .eyebrow {
  color: #a6cafa;
  font-size: 0.875rem;
}
.hero h2 {
  font-size: 1.35rem;
  margin: 6px 0;
}
.hero p {
  margin: 0;
  color: #d4e3f8;
  font-size: 0.9375rem;
}
.hero button {
  background: #fff;
  color: #154e93;
  flex-shrink: 0;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 25px;
}
.stat {
  background: #fff;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.stat .number {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.25;
  color: #174174;
  margin: 7px 0;
}
.stat label {
  font-size: 0.9375rem;
  color: var(--muted);
}
.stat small {
  color: var(--muted);
  font-size: 0.8125rem;
}
.stat.attention .number {
  color: #bd6b14;
}
.layout-two {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr);
  gap: 22px;
}
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 23px;
  margin-bottom: 22px;
  min-width: 0;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.panel h2,
.panel h3 {
  margin: 0;
  font-size: 1.1rem;
}
.muted {
  color: var(--muted);
}
.meta {
  font-size: 0.875rem;
  color: var(--muted);
}
.empty {
  padding: 30px 15px;
  text-align: center;
  color: var(--muted);
  background: #f8fafd;
  border-radius: 12px;
  border: 1px dashed #d7e1ed;
}
.empty strong {
  display: block;
  color: #385674;
  margin-bottom: 4px;
}
.task-row {
  display: flex;
  gap: 15px;
  padding: 15px 0;
  border-top: 1px solid #edf1f6;
  align-items: flex-start;
}
.task-row:first-child {
  border-top: 0;
  padding-top: 0;
}
.task-row .grow {
  min-width: 0;
  flex: 1;
}
.task-title {
  font-weight: 600;
  background: none;
  padding: 0;
  color: #203c5c;
  text-align: left;
  line-height: 1.6;
  display: block;
}
.task-title:hover {
  color: var(--blue);
}
.date-tile {
  border-radius: 10px;
  background: #eff5fd;
  color: #225c9c;
  min-width: 46px;
  padding: 4px 8px;
  text-align: center;
  line-height: 1.4;
  font-weight: bold;
}
.date-tile small {
  font-size: 0.75rem;
  font-weight: normal;
  display: block;
}
.badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.8125rem;
  padding: 3px 9px;
  border-radius: 6px;
  white-space: normal;
  line-height: 1.5;
  background: #edf2f7;
  color: #526980;
  font-weight: 500;
}
.badge.review,
.badge.pending {
  background: #fff2d7;
  color: #8b5806;
}
.badge.published,
.badge.completed {
  background: #e5f7ef;
  color: #177248;
}
.badge.production,
.badge.active {
  background: #e9f2ff;
  color: #236bc4;
}
.badge.ready,
.badge.approved {
  background: #eaf4fc;
  color: #24657f;
}
.badge.demo {
  background: #f0edfc;
  color: #7354a0;
}
.badge.warning,
.badge.blocked {
  background: #ffeded;
  color: #ac4046;
}
.chips {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 8px;
}
.opportunity {
  padding: 16px;
  background: #f7faff;
  border: 1px solid #e4edf9;
  border-radius: 12px;
  margin-top: 12px;
}
.opportunity h3 {
  font-size: 1rem;
  margin: 5px 0;
}
.filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.filters input {
  flex: 1;
  min-width: 200px;
}
.filters select {
  max-width: 230px;
}
.filters input,
.filters select {
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  color: #35516f;
  font-size: 0.9375rem;
}
.board {
  display: grid;
  grid-template-columns: repeat(5, minmax(225px, 1fr));
  gap: 15px;
  overflow-x: auto;
  padding-bottom: 20px;
  align-items: start;
}
.lane {
  background: #eaf0f7;
  border-radius: 14px;
  padding: 12px;
  min-height: 200px;
}
.lane-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  padding: 2px 3px 14px;
}
.count {
  border-radius: 6px;
  padding: 1px 7px;
  font-size: 0.8125rem;
  background: white;
  color: #6a7a8d;
}
.content-card {
  display: block;
  text-align: left;
  width: 100%;
  border: 1px solid #e0e7f0;
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 3px 5px #20375604;
  color: #24415f;
  font-weight: 400;
}
.content-card:hover {
  border-color: #8cb9f6;
  transform: translateY(-1px);
}
.content-card strong {
  display: block;
  font-size: 0.9375rem;
  line-height: 1.7;
  margin: 8px 0 12px;
}
.card-id {
  font-size: 0.75rem;
  font-weight: bold;
  color: #7a8da3;
  letter-spacing: 0.5px;
}
.card-footer {
  border-top: 1px solid #eef2f7;
  margin-top: 12px;
  padding-top: 10px;
  display: flex;
  justify-content: space-between;
  gap: 5px;
  font-size: 0.8125rem;
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.campaign-card {
  padding: 23px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.campaign-card h2 {
  font-size: 1.15rem;
  margin: 12px 0 6px;
}
.campaign-card p {
  color: var(--muted);
  font-size: 0.9375rem;
  margin: 7px 0 20px;
}
.campaign-card .details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 17px 0;
  font-size: 0.875rem;
}
.details label {
  display: block;
  color: var(--muted);
  font-size: 0.8125rem;
}
.campaign-actions {
  border-top: 1px solid var(--line);
  padding-top: 15px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.calendar-wrap {
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}
.calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}
.weekday {
  text-align: center;
  padding: 12px;
  background: #f8fafd;
  font-size: 0.875rem;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}
.day {
  min-height: 128px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 8px;
  min-width: 0;
}
.day:nth-child(7n) {
  border-right: 0;
}
.day.other {
  background: #f8fafd;
  color: #a4afbd;
}
.day.today {
  background: #f2f7ff;
}
.day-num {
  font-size: 0.875rem;
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  margin-bottom: 5px;
}
.today .day-num {
  background: var(--blue);
  border-radius: 50%;
  color: white;
}
.cal-item {
  display: block;
  text-align: left;
  font-size: 0.75rem;
  line-height: 1.5;
  border-radius: 5px;
  padding: 4px 6px;
  background: #e9f2fe;
  color: #225c9c;
  border-left: 3px solid #4b8ede;
  width: 100%;
  margin-top: 5px;
  overflow-wrap: anywhere;
  font-weight: normal;
}
.cal-item.event {
  background: #f2edff;
  color: #7253a1;
  border-color: #aa81db;
}
.cal-item.prep {
  background: #fff4df;
  color: #936620;
  border-color: #d5a746;
}
.cal-item.shoot {
  background: #e8f7ef;
  color: #2e7558;
  border-color: #59ad86;
}
.cal-item.due {
  background: #ffefef;
  color: #a74444;
  border-color: #d47878;
}
.legend {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 15px;
  font-size: 0.875rem;
}
.legend label {
  display: flex;
  gap: 7px;
  align-items: center;
}
.agenda {
  display: none;
}
.table-scroll {
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.875rem;
}
th {
  text-align: left;
  padding: 12px;
  color: var(--muted);
  background: #f7f9fc;
  font-weight: 500;
  white-space: nowrap;
}
td {
  border-bottom: 1px solid #edf1f6;
  padding: 14px 12px;
  vertical-align: top;
}
td:first-child {
  min-width: 200px;
}
.progress-track {
  height: 7px;
  border-radius: 5px;
  background: #e8edf4;
  overflow: hidden;
  margin-top: 10px;
}
.progress-track span {
  display: block;
  height: 100%;
  background: #3187ec;
}
dialog {
  width: min(900px, calc(100% - 32px));
  max-height: 92dvh;
  border: 0;
  border-radius: 20px;
  padding: 0;
  color: var(--navy);
  box-shadow: 0 25px 100px #10264444;
}
dialog::backdrop {
  background: #10274288;
  backdrop-filter: blur(3px);
}
.dialog-header {
  padding: 22px 25px 16px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 2;
}
.dialog-header h2 {
  font-size: 1.25rem;
  margin: 0;
}
.dialog-body {
  padding: 24px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.9375rem;
}
.field.full {
  grid-column: 1/-1;
}
.field input,
.field select,
.field textarea {
  border: 1px solid #cdd9e7;
  background: #fff;
  border-radius: 9px;
  padding: 10px 12px;
  min-width: 0;
  width: 100%;
  color: #254262;
}
.field textarea {
  min-height: 95px;
  resize: vertical;
  line-height: 1.7;
}
.field input:disabled,
.field select:disabled {
  background: #f4f6f9;
}
.field small {
  font-size: 0.8125rem;
  color: var(--muted);
}
.check {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 0.9375rem;
  margin: 8px 0;
}
.check input {
  margin-top: 7px;
  accent-color: var(--blue);
  width: 17px;
  height: 17px;
}
.form-section {
  margin: 25px 0 14px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 1rem;
}
.dialog-footer {
  position: sticky;
  bottom: 0;
  background: #fff;
  padding: 16px 25px;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  z-index: 2;
}
.form-error {
  color: #a52d38;
  background: #fff0f0;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 15px;
  font-size: 0.9375rem;
}
.form-error:empty {
  display: none;
}
.notice {
  background: #fff8e9;
  color: #855d18;
  border: 1px solid #f2e2ba;
  border-radius: 9px;
  padding: 13px;
  font-size: 0.875rem;
  margin-bottom: 18px;
}
.publish-row {
  display: grid;
  grid-template-columns: 100px 140px 1fr 145px;
  gap: 9px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  align-items: center;
}
.publish-row input,
.publish-row select {
  min-width: 0;
  width: 100%;
  padding: 8px;
  border-radius: 7px;
  border: 1px solid #cdd9e7;
  font-size: 0.875rem;
}
.publish-row label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.875rem;
}
.publish-row label input {
  width: 16px;
}
.publish-row small {
  grid-column: 2/-1;
  color: #aa4646;
}
.tabbar {
  display: flex;
  gap: 5px;
  overflow: auto;
  padding: 12px 25px 0;
  border-bottom: 1px solid var(--line);
  background: white;
}
.tabbar button {
  border-radius: 7px 7px 0 0;
  background: transparent;
  color: #6e7e92;
  white-space: nowrap;
  font-size: 0.9375rem;
  border-bottom: 3px solid transparent;
}
.tabbar button.active {
  border-bottom-color: var(--blue);
  color: var(--blue);
  background: #f1f6ff;
}
.editor-section[hidden] {
  display: none;
}
.audit-note {
  font-size: 0.8125rem;
  color: var(--muted);
  margin-top: 16px;
  overflow-wrap: anywhere;
}
#toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  background: #143b64;
  color: white;
  border-radius: 12px;
  box-shadow: 0 8px 25px #0002;
  padding: 12px 22px;
  z-index: 100;
  font-size: 0.9375rem;
  display: none;
  max-width: 90vw;
}
#toast.visible {
  display: block;
}
.loading {
  padding: 80px;
  text-align: center;
  color: var(--muted);
}
.mobile-brand {
  display: none;
}
.inline-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.revision {
  font-size: 0.8125rem;
  color: #6c7f94;
}
.calendar-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
}
.footnote {
  font-size: 0.8125rem;
  color: var(--muted);
  margin-top: 18px;
}
.result-number {
  font-size: 1.45rem;
  font-weight: bold;
  color: #1f5f9c;
}
.results-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 14px 0;
}
.results-grid label {
  display: block;
  font-size: 0.8125rem;
  color: var(--muted);
}
.form-grid .hint {
  grid-column: 1/-1;
  color: var(--muted);
  font-size: 0.875rem;
  margin: 0;
}
.full-span {
  grid-column: 1/-1;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
@media (min-width: 1600px) {
  .workspace {
    padding: 35px 55px;
  }
  .board {
    grid-template-columns: repeat(5, minmax(240px, 1fr));
  }
}
@media (max-width: 1150px) {
  .sidebar {
    width: 200px;
    padding: 25px 14px;
  }
  .app-shell {
    grid-template-columns: 200px minmax(0, 1fr);
  }
  .workspace {
    padding: 25px;
  }
  .layout-two {
    grid-template-columns: 1fr;
  }
  .stats {
    gap: 10px;
  }
  .stat {
    padding: 15px;
  }
  .topbar {
    align-items: flex-start;
  }
  .toolbar {
    justify-content: flex-end;
  }
  .card-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 760px) {
  .app-shell {
    display: block;
  }
  .sidebar {
    position: fixed;
    bottom: 0;
    top: auto;
    width: 100%;
    height: auto;
    padding: 7px 5px max(7px, env(safe-area-inset-bottom));
    border: 0;
    border-top: 1px solid var(--line);
    background: #fff;
    z-index: 20;
  }
  .brand,
  .sidebar-bottom {
    display: none;
  }
  .nav {
    display: flex;
    justify-content: space-around;
    gap: 0;
  }
  .nav button {
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: 0.75rem;
    padding: 7px 4px;
    border-radius: 8px;
    min-width: 58px;
  }
  .nav .icon {
    width: 20px;
    height: 20px;
  }
  .workspace {
    padding: 20px 16px 115px;
  }
  .topbar {
    display: block;
    margin-bottom: 16px;
  }
  .topbar h1 {
    font-size: 1.45rem;
  }
  .toolbar {
    justify-content: flex-start;
    margin-top: 15px;
    gap: 7px;
  }
  .toolbar button {
    font-size: 0.875rem;
  }
  .month-switch input {
    width: 140px;
  }
  .mode-banner {
    font-size: 0.8125rem;
    margin-bottom: 16px;
  }
  .hero {
    padding: 22px;
    display: block;
  }
  .hero h2 {
    font-size: 1.15rem;
  }
  .hero button {
    margin-top: 15px;
  }
  .stats {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .stat {
    padding: 15px;
  }
  .stat label {
    font-size: 0.875rem;
  }
  .stat .number {
    font-size: 1.7rem;
  }
  .panel {
    padding: 18px;
  }
  .layout-two {
    display: block;
  }
  .panel-head h2 {
    font-size: 1rem;
  }
  .task-row {
    gap: 10px;
  }
  .task-title {
    font-size: 0.9375rem;
  }
  .board {
    display: block;
    overflow: visible;
  }
  .lane {
    margin-bottom: 15px;
    min-height: 0;
  }
  .content-card {
    padding: 15px;
  }
  .filters select {
    flex: 1;
    max-width: none;
    min-width: 130px;
  }
  .calendar-wrap {
    display: none;
  }
  .agenda {
    display: block;
  }
  .legend {
    font-size: 0.8125rem;
    gap: 10px;
  }
  .calendar-controls {
    align-items: flex-start;
  }
  .campaign-card {
    padding: 20px;
  }
  .results-grid {
    grid-template-columns: 1fr 1fr;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .field.full {
    grid-column: auto;
  }
  dialog {
    width: calc(100% - 16px);
    max-height: 94dvh;
    border-radius: 15px;
  }
  .dialog-header {
    padding: 16px;
  }
  .dialog-body {
    padding: 17px;
  }
  .dialog-footer {
    padding: 13px 17px;
  }
  .tabbar {
    padding: 7px 12px 0;
  }
  .publish-row {
    grid-template-columns: 1fr 1fr;
  }
  .publish-row input[type='url'] {
    grid-column: 1/-1;
  }
  .publish-row small {
    grid-column: 1/-1;
  }
  .dialog-header h2 {
    font-size: 1.1rem;
  }
  .hero p {
    font-size: 0.875rem;
  }
  .card-grid {
    gap: 15px;
  }
  .loading {
    padding: 50px 15px;
  }
}

/* Original clinic logo: unchanged PNG, transparent margins framed with CSS. */
.clinic-logo {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 2744/1027;
  overflow: hidden;
}
.clinic-logo img {
  position: absolute;
  width: 127.8425656%;
  height: auto;
  max-width: none;
  left: -13.3017493%;
  top: -60.1752678%;
}
.brand small {
  display: block;
  margin-top: 13px;
  font-size: 0.75rem;
  letter-spacing: 1.5px;
}
.brand {
  padding: 0 8px 30px;
}
.mobile-brand {
  width: 148px;
  margin-bottom: 14px;
}
@media (max-width: 760px) {
  .mobile-brand {
    display: block;
  }
}

/* ---------- V2 additions ---------- */
.nav-short {
  display: none;
}
.dialog-footer .spacer,
.row-actions .spacer {
  flex: 1;
}
.row-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.nowrap {
  white-space: nowrap;
}
.seg {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 11px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.seg button {
  background: transparent;
  padding: 7px 13px;
  font-size: 0.875rem;
  color: #5a6e84;
  font-weight: 500;
}
.seg button.active {
  background: #eaf2ff;
  color: #1265d5;
  font-weight: 700;
}
.results-head {
  display: flex;
  gap: 14px;
  align-items: baseline;
  flex-wrap: wrap;
}
.results-head .seg {
  margin-bottom: 14px;
}
/* status dots: colour always paired with a text label */
.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
  margin-right: 6px;
}
.dot.green {
  background: #1f9d63;
}
.dot.purple {
  background: #8a5cc9;
}
.dot.red {
  background: #d04848;
}
.badge.film-green {
  background: #e5f7ef;
  color: #17603f;
}
.badge.film-purple {
  background: #f2ecfc;
  color: #62419a;
}
.badge.film-red {
  background: #ffeded;
  color: #a43c42;
}
.badge.kind-holiday {
  background: #eef1f5;
  color: #4d5f74;
}
.badge.kind-dental {
  background: #e3f6f6;
  color: #17676a;
}
.badge.kind-season {
  background: #f0edfc;
  color: #6b4f9c;
}
.badge.kind-sales {
  background: #fff1e5;
  color: #9a5410;
}
.badge.kind-default {
  background: #f2edff;
  color: #7253a1;
}
.badge.skip {
  background: #f1f3f6;
  color: #6b7a8c;
}
/* alerts */
.alert-list {
  display: grid;
  gap: 2px;
}
.alert-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 11px 12px;
  border-radius: 10px;
  border-left: 3px solid #9fb6cf;
  background: #f8fafd;
}
.alert-row.warn {
  border-left-color: #d5a746;
  background: #fffaf0;
}
.alert-row.danger {
  border-left-color: #d04848;
  background: #fff5f5;
}
.alert-row .grow {
  min-width: 0;
  flex: 1;
}
.alert-tag {
  font-size: 0.75rem;
  font-weight: 700;
  color: #4d6178;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1px 7px;
  white-space: nowrap;
  margin-top: 2px;
}
.alert-row.danger .alert-tag {
  color: #a43c42;
}
.alert-row.warn .alert-tag {
  color: #8b5806;
}
/* assist boxes inside the editor */
.assist {
  background: #f6f9fd;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 11px 13px;
  font-size: 0.875rem;
  line-height: 1.7;
  margin-bottom: 8px;
  overflow-wrap: anywhere;
}
.assist.warn {
  background: #fff8e9;
  border-color: #f2e2ba;
  color: #77520f;
}
.assist.danger {
  background: #fff1f1;
  border-color: #f3c9c9;
  color: #973237;
}
.pick-doctor {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  margin: 3px 4px 0 0;
  font-size: 0.8125rem;
  font-weight: 500;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
}
.pick-doctor:disabled {
  opacity: 1;
  cursor: default;
}
.delete-confirm {
  background: #fff5f5;
  border: 1px solid #f3c9c9;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
  color: #7a2b30;
  font-size: 0.9375rem;
}
.delete-confirm p {
  margin: 4px 0 12px;
  font-size: 0.875rem;
}
.delete-confirm ul {
  margin: 0 0 12px;
  padding-left: 20px;
  font-size: 0.875rem;
}
.danger {
  border: 1px solid #f3c9c9;
}
/* calendar */
.cal-item.event.holiday {
  background: #eef1f5;
  color: #44566b;
  border-color: #8a9bb0;
}
.cal-item.event.dental {
  background: #e3f6f6;
  color: #17676a;
  border-color: #3ea7a9;
}
.cal-item.event.season {
  background: #f6f3fe;
  color: #6b4f9c;
  border-color: #b49be0;
}
.cal-item.event.sales {
  background: #fff1e5;
  color: #8f4e0f;
  border-color: #e3934b;
}
.cal-item.publish {
  background: #e9f2fe;
}
.day.payday {
  background: #fbfaf2;
}
.day.payday.other {
  background: #f6f6ef;
}
.payday-label {
  display: block;
  font-size: 0.6875rem;
  color: #85772b;
  margin: -2px 0 2px;
}
.calendar-controls select {
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 12px;
  color: #35516f;
  font-size: 0.875rem;
}
.month-group {
  font-size: 0.95rem;
  margin: 22px 0 6px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 8px;
  align-items: center;
}
.panel-head + .month-group,
.seg + .month-group {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}
.month-group + .task-row {
  border-top: 0;
}
/* promotions */
.promo-card .price {
  display: flex;
  gap: 8px;
  align-items: baseline;
  font-size: 1.05rem;
  margin: -8px 0 6px;
  color: #174174;
}
.promo-card .price .was {
  color: var(--muted);
  text-decoration: line-through;
  font-size: 0.9375rem;
}
.campaign-card .details {
  margin-bottom: 14px;
}
.campaign-card .assist {
  margin: 0 0 14px;
}
/* doctors */
.doctor-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr));
}
.doctor-card.inactive {
  opacity: 0.6;
}
.doctor-card p {
  margin-bottom: 12px;
}
.shifts {
  display: grid;
  gap: 6px;
  font-size: 0.875rem;
}
.shift-line {
  display: grid;
  gap: 1px;
}
.shift-line strong {
  font-size: 0.8125rem;
  color: #3b5674;
}
.warn-text {
  color: #9a5410;
}
.inline-field {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 0.9375rem;
  color: #35516f;
}
.duty-list {
  display: grid;
  gap: 8px;
}
.duty-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  padding: 8px 0;
  border-top: 1px solid #edf1f6;
}
.duty-row:first-child {
  border-top: 0;
}
.legend-line {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
  font-size: 0.875rem;
  margin: 0 0 16px;
}
.legend-line > span {
  display: inline-flex;
  align-items: center;
}
/* results charts: one series, one hue, value at the bar tip */
.bars {
  display: grid;
  gap: 12px;
}
.bar-row {
  display: grid;
  grid-template-columns: minmax(80px, 140px) minmax(60px, 1fr) auto;
  gap: 4px 12px;
  align-items: center;
  font-size: 0.875rem;
}
.bars.rank .bar-row {
  grid-template-columns: minmax(0, 1fr) minmax(60px, 0.8fr) auto;
}
.bar-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bar-label .task-title {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
  font-size: 0.875rem;
}
.bar-track {
  display: block;
  height: 14px;
  min-width: 0;
}
.bar {
  display: block;
  height: 14px;
  width: 0;
  min-width: 2px;
  background: var(--blue);
  border-radius: 0 4px 4px 0;
}
.bar-value {
  font-weight: 700;
  color: #19334e;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.bar-note {
  grid-column: 2 / -1;
  color: var(--muted);
  font-size: 0.8125rem;
  margin-top: -6px;
}
table.compact td {
  padding: 10px 12px;
}
table.compact td:first-child {
  min-width: 140px;
}
td.cell-bar {
  min-width: 150px;
}
td.cell-bar .bar-track {
  display: inline-block;
  width: 90px;
  vertical-align: middle;
  margin-right: 8px;
}
tfoot td {
  font-weight: 700;
  background: #f7f9fc;
  border-bottom: 0;
}
td {
  font-variant-numeric: tabular-nums;
}
.panel-head select {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 6px 10px;
  color: #35516f;
  font-size: 0.875rem;
  max-width: 60%;
}
.dialog-footer button {
  white-space: nowrap;
}
@media (max-width: 760px) {
  .dialog-footer {
    gap: 6px;
    padding: 12px;
  }
  .dialog-footer button {
    padding: 10px 11px;
    font-size: 0.875rem;
  }
  .dialog-footer .primary {
    flex: 1;
  }
  .nav {
    justify-content: space-between;
  }
  .nav button {
    min-width: 0;
    flex: 1;
    padding: 6px 1px;
    font-size: 0.6875rem;
    gap: 2px;
    align-items: center;
  }
  .nav .nav-label {
    display: none;
  }
  .nav .nav-short {
    display: block;
    white-space: nowrap;
  }
  #toast {
    bottom: 92px;
  }
  .bar-row {
    grid-template-columns: minmax(70px, 100px) minmax(40px, 1fr) auto;
  }
  .bars.rank .bar-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .bars.rank .bar-track {
    grid-column: 1 / -1;
    grid-row: 2;
  }
  .calendar-controls {
    flex-direction: column;
  }
  .seg {
    width: 100%;
  }
  .seg button {
    flex: 1;
  }
  .dialog-footer .spacer {
    display: none;
  }
}
.user-email {
  font-size: 0.75rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 150px;
}
.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
}
.login-card {
  width: min(420px, 100%);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 28px 26px;
  display: grid;
  gap: 14px;
  box-shadow: 0 20px 60px #10264418;
}
.login-card h1 {
  margin: 4px 0 0;
  font-size: 1.4rem;
}
.login-card .meta {
  margin: 0;
}
.login-card .clinic-logo {
  width: 170px;
}
.login-card .primary {
  padding: 12px 16px;
  font-size: 1rem;
}
.login-card .form-error {
  margin: 0;
}
.sidebar-bottom .logout {
  margin-top: 10px;
  padding-left: 0;
  color: var(--muted);
}
