:root {
  --paper: #f4f7fc;
  --white: #fff;
  --ink: #182f50;
  --muted: #60728d;
  --line: #dce4f0;
  --blue: #2858d8;
  --blue-soft: #e8efff;
  --mint: #dcf3e9;
  --red: #a33c4b;
  --amber: #8a5c16;
  --radius: 12px;
  font-family: "Avenir Next", Avenir, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 11px 17px;
  background: var(--blue);
  color: white;
  font-weight: 600;
  transition: background 0.15s;
}
button:hover {
  filter: brightness(0.95);
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
button.secondary {
  background: var(--white);
  border-color: var(--line);
  color: var(--ink);
}
button.quiet,
button.icon {
  background: transparent;
  color: var(--muted);
}
button.icon {
  font-size: 26px;
  padding: 0 8px;
}
a {
  color: var(--blue);
}
a,
button,
input,
select,
textarea {
  outline-offset: 4px;
}
*:focus-visible {
  outline: 3px solid #e78d20;
}
input,
select,
textarea {
  width: 100%;
  border: 1px solid #c7d3e4;
  background: white;
  border-radius: 7px;
  padding: 11px 12px;
  color: var(--ink);
}
textarea {
  resize: vertical;
  min-height: 110px;
  line-height: 1.6;
}
label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 18px;
}
label input,
label select,
label textarea {
  display: block;
  margin-top: 7px;
}
input[type="checkbox"] {
  width: auto;
  display: inline;
  margin: 0 8px 0 0;
}
fieldset {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 18px 0;
  padding: 18px;
}
legend {
  font-size: 13px;
  font-weight: 600;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 38px;
  letter-spacing: -1.4px;
  font-weight: 650;
  margin-bottom: 9px;
}
h2 {
  font-size: 24px;
  letter-spacing: -0.7px;
  margin: 0;
}
h3 {
  font-size: 16px;
}
p {
  line-height: 1.6;
  color: var(--muted);
}
small,
.small {
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
}
.wordmark {
  font-family: "Trebuchet MS", sans-serif;
  font-size: 28px;
  letter-spacing: -1.6px;
  color: var(--ink);
  text-decoration: none;
  font-weight: bold;
  display: flex;
  align-items: center;
}
.wordmark span {
  font-weight: normal;
}
.wordmark i {
  width: 9px;
  height: 9px;
  background: var(--blue);
  margin: 5px 0 0 5px;
  border-radius: 2px;
  transform: rotate(-12deg);
}
.shell {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  background: white;
  border-right: 1px solid var(--line);
  padding: 34px 22px;
  display: flex;
  flex-direction: column;
  gap: 37px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.workspace-label {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 12px;
}
.workspace-label small {
  display: block;
  max-width: 140px;
  overflow-wrap: anywhere;
}
.workspace-icon {
  background: var(--blue-soft);
  color: var(--blue);
  padding: 11px 14px;
  border-radius: 8px;
  font-weight: bold;
}
.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.sidebar nav button {
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  background: transparent;
  color: var(--muted);
  padding: 12px;
  font-size: 14px;
}
.sidebar nav button.active {
  color: var(--blue);
  background: var(--blue-soft);
}
.nav-divider {
  height: 1px;
  background: var(--line);
  margin: 16px 0;
}
.count {
  margin-left: auto;
  font-size: 11px;
  border-radius: 4px;
  padding: 1px 6px;
  background: white;
}
.sidebar-bottom {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}
.mode {
  font-size: 11px;
  background: var(--mint);
  padding: 6px 10px;
  border-radius: 5px;
  color: #28624a;
}
.topbar {
  height: 78px;
  border-bottom: 1px solid var(--line);
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
}
.topbar a {
  text-decoration: none;
}
.page {
  padding: 40px;
  max-width: 1600px;
  margin: auto;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}
.page-heading p {
  font-size: 14px;
  margin-bottom: 0;
}
.eyebrow {
  font-size: 10px !important;
  font-weight: 700;
  letter-spacing: 1.8px;
  color: var(--blue);
  margin-bottom: 10px !important;
}
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  gap: 12px;
}
.toolbar h2 {
  font-size: 19px;
}
.toolbar-controls {
  display: flex;
  gap: 7px;
}
.toolbar-controls button {
  padding: 7px 12px;
}
.calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: white;
  min-height: 390px;
}
.day {
  border-right: 1px solid var(--line);
  min-width: 0;
}
.day:last-child {
  border: 0;
}
.day-head {
  display: flex;
  flex-direction: column;
  padding: 17px 14px;
  border-bottom: 1px solid var(--line);
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
}
.day-head strong {
  font-size: 24px;
  letter-spacing: -1px;
  color: var(--ink);
  font-weight: 500;
}
.day.today .day-head {
  background: var(--blue-soft);
}
.day.today .day-head strong {
  color: var(--blue);
}
.day-posts {
  padding: 7px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.calendar-post {
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 10px;
  text-align: left;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.calendar-post strong {
  display: block;
  font-size: 12px;
  margin: 6px 0;
}
.calendar-post .badge {
  font-size: 9px;
  padding: 2px 4px;
}
.time {
  font-family: monospace;
  font-size: 10px;
  color: var(--muted);
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 30px 0 14px;
}
.section-heading h2 {
  font-size: 18px;
}
.section-heading span {
  font-size: 12px;
  color: var(--muted);
}
.list {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.post-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 140px 120px 50px;
  gap: 20px;
  align-items: center;
  padding: 19px 22px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.post-row:last-child {
  border: 0;
}
.post-row strong {
  display: block;
  margin-bottom: 4px;
  overflow-wrap: anywhere;
}
.post-row button {
  padding: 5px;
  background: transparent;
  color: var(--blue);
}
.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 5px;
  background: #edf0f5;
  color: #5d6b82;
  white-space: normal;
}
.badge.scheduled,
.badge.approved {
  background: var(--blue-soft);
  color: var(--blue);
}
.badge.published {
  background: var(--mint);
  color: #28624a;
}
.badge.pending_approval,
.badge.processing {
  background: #fff1d5;
  color: var(--amber);
}
.badge.failed,
.badge.unknown,
.badge.partial {
  background: #fbe8eb;
  color: var(--red);
}
.empty {
  padding: 38px 24px;
  text-align: center;
}
.empty h3 {
  font-size: 17px;
  margin-bottom: 6px;
}
.empty p {
  max-width: 420px;
  margin: 0 auto;
  font-size: 13px;
}
.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
}
.card h3 {
  margin-bottom: 9px;
}
.card p {
  font-size: 13px;
}
.card .provider {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  background: var(--blue-soft);
  border-radius: 9px;
  color: var(--blue);
  font-weight: 700;
  margin-bottom: 17px;
}
.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
}
.card-footer button {
  font-size: 12px;
}
.integration {
  margin-top: 25px;
  padding: 24px;
  background: var(--ink);
  border-radius: 12px;
  color: white;
}
.integration p {
  color: #b9cbe5;
  font-size: 13px;
}
.integration code {
  font-size: 12px;
  overflow-wrap: anywhere;
}
.integration h3 {
  margin-bottom: 8px;
}
.event {
  padding: 17px 22px;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 20px;
  font-size: 13px;
}
.event small {
  overflow-wrap: anywhere;
}
.event:last-child {
  border-bottom: 0;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 0;
  width: 720px;
  max-width: calc(100vw - 24px);
  max-height: 90vh;
  box-shadow: 0 25px 100px #132b4d33;
  color: var(--ink);
}
dialog::backdrop {
  background: #10274470;
  backdrop-filter: blur(3px);
}
#email-dialog {
  width: 440px;
  padding: 28px;
}
#email-form {
  display: grid;
  gap: 12px;
}
#email-message {
  line-height: 1.5;
  color: var(--muted);
}
#signin-code {
  letter-spacing: 0.25em;
  font-size: 22px;
}
.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 25px 30px;
  border-bottom: 1px solid var(--line);
}
.dialog-content,
#editor-body {
  padding: 24px 30px;
  max-height: 62vh;
  overflow: auto;
}
.dialog-foot {
  border-top: 1px solid var(--line);
  padding: 18px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  font-size: 12px;
}
.dialog-foot > div {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.variant {
  border: 1px solid var(--line);
  padding: 20px;
  border-radius: 9px;
  margin: 14px 0;
  background: var(--paper);
}
.variant h3 {
  margin-bottom: 18px;
}
.variant label:last-child {
  margin-bottom: 0;
}
.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.delivery {
  border: 1px solid var(--line);
  padding: 14px;
  border-radius: 8px;
  margin: 10px 0;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.delivery p {
  margin: 7px 0 0;
  font-size: 12px;
}
.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: linear-gradient(130deg, #e9f0ff 0%, #f4f7fc 65%);
}
.login-panel {
  padding: 45px;
  width: 470px;
  max-width: 100vw;
}
.login .wordmark {
  margin-bottom: 60px;
}
.login h1 {
  font-size: 48px;
  line-height: 1.1;
  margin-bottom: 25px;
}
.login form {
  margin-top: 30px;
}
.login button {
  width: 100%;
  margin-bottom: 12px;
}
.login .small {
  margin-top: 20px;
}
.skip {
  position: fixed;
  top: -100px;
  left: 15px;
  padding: 12px;
  background: white;
  z-index: 100;
}
.skip:focus {
  top: 10px;
}
#notice {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  padding: 16px 22px;
  border-radius: 10px;
  background: var(--ink);
  color: white;
  z-index: 50;
  max-width: min(90vw, 700px);
  font-size: 13px;
  box-shadow: 0 8px 30px #132b4d33;
}
#notice.error {
  background: #873849;
}
[hidden] {
  display: none !important;
}
@media (max-width: 1100px) {
  .page {
    padding: 26px;
  }
  .sidebar {
    padding: 30px 14px;
  }
  .shell {
    grid-template-columns: 205px minmax(0, 1fr);
  }
  .calendar {
    min-width: 710px;
  }
  .calendar-wrap {
    overflow-x: auto;
  }
  .post-row {
    grid-template-columns: minmax(0, 1fr) 120px 45px;
  }
  .post-row .row-date {
    display: none;
  }
}
@media (max-width: 700px) {
  .shell {
    display: block;
  }
  .sidebar {
    position: static;
    height: auto;
    padding: 18px;
    gap: 20px;
    border-bottom: 1px solid var(--line);
    border-right: 0;
  }
  .sidebar .wordmark {
    font-size: 25px;
  }
  .workspace-label,
  .sidebar-bottom,
  .nav-divider {
    display: none;
  }
  .sidebar nav {
    flex-direction: row;
    overflow: auto;
    gap: 5px;
  }
  .sidebar nav button {
    font-size: 12px;
    padding: 8px;
    white-space: nowrap;
    gap: 5px;
  }
  .sidebar nav .count {
    display: none;
  }
  .topbar {
    height: 50px;
    padding: 0 20px;
  }
  .page {
    padding: 24px 18px;
  }
  .page-heading {
    align-items: flex-start;
  }
  .page-heading h1 {
    font-size: 32px;
  }
  .page-heading p {
    font-size: 12px;
  }
  .page-heading button {
    font-size: 12px;
    white-space: nowrap;
    padding: 10px;
  }
  .cards {
    grid-template-columns: 1fr;
  }
  .post-row {
    padding: 16px;
    gap: 10px;
    grid-template-columns: minmax(0, 1fr) 90px 30px;
  }
  .dialog-head,
  .dialog-foot {
    padding: 18px;
  }
  #editor-body,
  .dialog-content {
    padding: 18px;
  }
  .row {
    grid-template-columns: 1fr;
  }
  .event {
    grid-template-columns: 1fr;
    gap: 3px;
  }
  .toolbar h2 {
    font-size: 16px;
  }
  .login-panel {
    padding: 30px;
  }
  .login h1 {
    font-size: 42px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}

.media-preview img,
.media-preview video {
  display: block;
  max-width: 100%;
  max-height: 220px;
  border-radius: 8px;
  margin-top: 14px;
}
@media (max-width: 700px) {
  .sidebar-bottom {
    display: flex;
    position: absolute;
    top: 12px;
    right: 16px;
    flex-direction: row;
    align-items: center;
    gap: 4px;
    margin: 0;
  }
  .sidebar-bottom .mode {
    display: none;
  }
  .sidebar-bottom button {
    padding: 8px;
    font-size: 12px;
  }
}
