/*
  Sizing: `rem` tracks the root font size (see `html` below; default is
  typically 16px). Layout, spacing, and radii use `rem` so zoom and user
  font settings scale the UI. `em` appears on a few components so padding
  tracks local `font-size`. Media-query breakpoints stay in `px` (device
  pixels) for predictable layout switches.
*/
:root {
  color-scheme: light;
  --ink: #18202a;
  --muted: #667085;
  --line: #bfd3e2;
  --soft: #eef8fd;
  --white: #ffffff;
  --accent: #0789c3;
  --accent-dark: #026897;
  --accent-soft: #dff5ff;
  --yellow: #fff178;
  --yellow-strong: #f2cf27;
  --green: #8fd14f;
  --green-strong: #4d9f3a;
  --danger: #c33232;
  --danger-soft: #fff1f1;
  --shadow: 0 1.125rem 2.8125rem rgba(24, 32, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  font-size: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: #edf7fb;
  font-family: Arial, Helvetica, sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

button:hover:not(:disabled) {
  transform: translateY(-0.0625rem);
}

.hidden {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 0.0625rem;
  height: 0.0625rem;
  padding: 0;
  margin: -0.0625rem;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.muted-text-inline {
  display: grid;
  gap: 0.4375rem;
  margin-top: 0.25rem;
  color: var(--ink);
  font-weight: 700;
}

.app-shell {
  min-height: 100dvh;
}

/* App shell: sidebar + main (responsive) */
.app-layout {
  display: flex;
  align-items: stretch;
  min-height: 100dvh;
}

@media (min-width: 961px) {
  .app-layout {
    height: 100dvh;
  }
}

.app-main-wrap {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.app-main-wrap .planner-view {
  flex: 1;
}

.app-sidebar {
  width: 15.75rem;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 1.25rem 1rem 1.5rem;
  border-right: 0.0625rem solid var(--line);
  background: linear-gradient(180deg, #ffffff 0%, #f4f9fc 100%);
  box-shadow: 0.25rem 0 1.5rem rgba(24, 32, 42, 0.04);
}

.app-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.25rem 0.25rem 0.5rem;
  border-bottom: 0.0625rem solid rgba(191, 211, 226, 0.7);
}

.app-sidebar-logo {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  object-fit: cover;
  box-shadow: 0 0.375rem 1rem rgba(7, 137, 195, 0.18);
}

.app-sidebar-appname {
  font-size: 0.9375rem;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.25;
}

.app-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.sidebar-nav-link {
  display: block;
  padding: 0.733em 0.933em;
  border-radius: 0.5rem;
  border: 0.0625rem solid transparent;
  color: var(--ink);
  font-weight: 700;
  font-size: 0.9375rem;
  text-decoration: none;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.sidebar-nav-link:hover {
  background: rgba(7, 137, 195, 0.08);
  border-color: rgba(7, 137, 195, 0.2);
  color: var(--accent-dark);
}

.sidebar-nav-link.is-active {
  color: var(--accent-dark);
  border-color: rgba(7, 137, 195, 0.45);
  background: var(--accent-soft);
  box-shadow: 0 0.0625rem 0 rgba(255, 255, 255, 0.9) inset;
}

.app-sidebar-backdrop {
  display: none;
}

.sidebar-menu-toggle {
  display: none;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  margin-right: 0.25rem;
  border: 0.0625rem solid var(--line);
  border-radius: 0.625rem;
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 0.125rem 0.5rem rgba(24, 32, 42, 0.06);
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.sidebar-menu-toggle:hover {
  border-color: #9aa8bb;
  background: #f8fafc;
}

.sidebar-menu-toggle:focus-visible {
  outline: 0.1875rem solid rgba(7, 137, 195, 0.28);
  outline-offset: 0.125rem;
}

.topbar-leading {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  min-width: 0;
  flex: 1;
}

.topbar-leading .planner-title {
  min-width: 0;
}

@media (min-width: 961px) {
  .topbar-logo-desktop {
    display: none;
  }
}

@media (max-width: 960px) {
  .app-layout {
    display: block;
    position: relative;
  }

  .app-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: min(18.25rem, 88vw);
    z-index: 1050;
    transform: translateX(-100%);
    transition: transform 200ms ease;
    overflow-y: auto;
    box-shadow: 0.5rem 0 2.5rem rgba(24, 32, 42, 0.15);
  }

  .app-layout.sidebar-open .app-sidebar {
    transform: translateX(0);
  }

  .app-sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1040;
    background: rgba(15, 23, 42, 0.48);
    border: 0;
    padding: 0;
    margin: 0;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .app-layout.sidebar-open .app-sidebar-backdrop {
    display: block;
  }

  .sidebar-menu-toggle {
    display: inline-flex;
  }

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

  .topbar-leading {
    align-items: flex-start;
  }
}

.auth-view {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem 1.125rem;
  background: linear-gradient(135deg, #e8f7fd 0%, #ffffff 58%, #eefaff 100%);
}

.auth-panel {
  width: min(31.25rem, 100%);
  padding: 2.25rem;
  border: 0.0625rem solid var(--line);
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.auth-panel > div:first-child {
  text-align: center;
}

.brand-logo {
  display: block;
  width: 5.375rem;
  height: 5.375rem;
  margin: 0 auto 1rem;
  border-radius: 0.5rem;
  object-fit: cover;
  box-shadow: 0 0.75rem 1.75rem rgba(7, 137, 195, 0.2);
}

.eyebrow {
  margin: 0 0 0.5rem;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(1.75rem, 4vw, 2.625rem);
  line-height: 1.05;
}

.auth-panel h1 {
  font-size: clamp(2.125rem, 7vw, 3rem);
  line-height: 1;
}

h2 {
  font-size: 1.5rem;
}

.auth-copy {
  max-width: 25.625rem;
  margin: 0.875rem auto 0;
  color: var(--muted);
  line-height: 1.5;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.25rem;
  margin: 1.75rem 0 1.25rem;
  padding: 0.25rem;
  border: 0.0625rem solid var(--line);
  border-radius: 0.5rem;
  background: var(--soft);
}

.auth-tab {
  min-height: 2.625rem;
  border: 0;
  border-radius: 0.375rem;
  color: var(--muted);
  background: transparent;
  font-weight: 700;
}

.auth-tab.active {
  color: var(--accent-dark);
  background: var(--white);
  box-shadow: 0 0.0625rem 0.25rem rgba(24, 32, 42, 0.12);
}

.auth-form,
.modal-panel {
  display: grid;
  gap: 1rem;
}

.auth-form {
  gap: 1.125rem;
}

label {
  display: grid;
  gap: 0.4375rem;
  font-weight: 700;
}

input,
select {
  width: 100%;
  min-height: 2.75rem;
  border: 0.0625rem solid var(--line);
  border-radius: 0.375rem;
  padding: 0.5625rem 0.6875rem;
  color: var(--ink);
  background: var(--white);
}

textarea {
  width: 100%;
  min-height: 5rem;
  border: 0.0625rem solid var(--line);
  border-radius: 0.375rem;
  padding: 0.5625rem 0.6875rem;
  color: var(--ink);
  background: var(--white);
  resize: vertical;
  font: inherit;
}

input:focus,
select:focus,
textarea:focus {
  outline: 0.1875rem solid rgba(7, 137, 195, 0.18);
  border-color: var(--accent);
}

.primary-action,
.ghost-action,
.danger-action,
.icon-action {
  min-height: 2.375rem;
  border: 0.0625rem solid transparent;
  border-radius: 0.375rem;
  padding: 0.5rem 0.75rem;
  font-weight: 700;
}

.primary-action {
  color: var(--white);
  background: var(--accent);
}

.primary-action:hover {
  background: var(--accent-dark);
  box-shadow: 0 0.5rem 1.125rem rgba(7, 137, 195, 0.22);
}

.ghost-action {
  color: var(--ink);
  border-color: var(--line);
  background: var(--white);
}

.ghost-action:hover {
  border-color: #9aa8bb;
  background: #f8fafc;
}

.ghost-action.nav-link-active {
  color: var(--accent-dark);
  border-color: rgba(7, 137, 195, 0.45);
  background: var(--accent-soft);
  box-shadow: 0 0.0625rem 0 rgba(255, 255, 255, 0.9) inset;
}

.ghost-action.nav-link-active:hover {
  background: #d0eefb;
  border-color: rgba(7, 137, 195, 0.55);
}

.danger-action {
  color: var(--white);
  background: var(--danger);
}

.form-message {
  min-height: 1.125rem;
  margin: 0;
  color: var(--danger);
  font-size: 0.875rem;
}

.planner-view {
  flex: 1;
  min-height: 0;
  padding: 1.375rem;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow-y: auto;
  overflow-x: clip;
}

@media (min-width: 961px) {
  .planner-view--calendar-month {
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .planner-view--calendar-month .topbar {
    flex-shrink: 0;
  }

  .planner-view--calendar-month .planner-page-scroll {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
  }

  .planner-view--calendar-month .planner-page-scroll .filters,
  .planner-view--calendar-month .planner-page-scroll .summary-row {
    margin-bottom: 0;
  }

  .planner-view--calendar-month .calendar-wrap {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    max-width: none;
    width: 100%;
  }

  .planner-view--calendar-month .filters,
  .planner-view--calendar-month .summary-row,
  .planner-view--calendar-month .topbar {
    max-width: none;
    width: 100%;
  }

  .planner-view--calendar-month .weekday-row {
    flex-shrink: 0;
  }

  /* Scroll dates only; weekday header stays pinned */
  .planner-view--calendar-month .calendar-grid-scroll {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
  }

  /* Fill viewport height on large screens: stretch rows instead of a short grid + empty gap */
  .planner-view--calendar-month .calendar-grid {
    flex: 1;
    min-height: 0;
    grid-auto-rows: minmax(5.25rem, 1fr);
  }
}

/* Calendar month: tighter chrome + typography for laptops / 1080p */
.planner-view--calendar-month {
  padding: 0.75rem 0.875rem;
}

.planner-view--calendar-month .topbar {
  margin-bottom: 0.625rem;
}

.planner-view--calendar-month .planner-title {
  gap: 0.625rem;
}

.planner-view--calendar-month .planner-title h1 {
  font-size: clamp(1.375rem, 2.2vw, 1.75rem);
  line-height: 1.15;
}

.planner-view--calendar-month .topbar-logo {
  width: 2.5rem;
  height: 2.5rem;
}

.planner-view--calendar-month .user-actions {
  font-size: 0.8125rem;
  min-width: 0;
}

.planner-view--calendar-month .user-actions-identity {
  max-width: min(42vw, 20rem);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.planner-view--calendar-month .user-actions .ghost-action {
  min-height: 2.125rem;
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
}

.planner-view--calendar-month .filters {
  gap: 0.625rem;
  padding: 0.625rem 0.75rem;
}

.planner-view--calendar-month .filters label {
  gap: 0.3125rem;
  font-size: 0.75rem;
}

.planner-view--calendar-month .filters select,
.planner-view--calendar-month .filters input[type="month"] {
  min-height: 2.25rem;
  padding: 0.375rem 0.625rem;
  font-size: 0.8125rem;
}

.planner-view--calendar-month .summary-row {
  gap: 0.625rem;
}

.planner-view--calendar-month .summary-item {
  min-height: 3.25rem;
  padding: 0.5rem 0.75rem;
  gap: 0.625rem;
}

.planner-view--calendar-month .summary-item span {
  width: 2.125rem;
  height: 2.125rem;
  font-size: 1rem;
}

.planner-view--calendar-month .summary-item p {
  font-size: 0.8125rem;
}

.planner-view--calendar-month .weekday-row {
  min-height: 2rem;
  font-size: 0.75rem;
}

.planner-view--calendar-month .weekday-row span {
  padding: 0.25rem;
}

@media (min-width: 961px) and (max-height: 940px) {
  .planner-view--calendar-month .calendar-grid {
    grid-auto-rows: minmax(4.625rem, 1fr);
  }

  .planner-view--calendar-month .filters select,
  .planner-view--calendar-month .filters input[type="month"] {
    min-height: 2.125rem;
  }
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 auto 1.125rem;
  max-width: 88.75rem;
}

.planner-title {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

.topbar-logo {
  width: 3.375rem;
  height: 3.375rem;
  border-radius: 0.5rem;
  object-fit: cover;
  box-shadow: 0 0.5rem 1.25rem rgba(7, 137, 195, 0.16);
}

.context-line,
.modal-context {
  margin: 0.5rem 0 0;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 700;
}

.user-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--muted);
  font-weight: 700;
}

.user-actions-identity {
  color: var(--muted);
}

.ghost-action-subtle {
  font-size: 0.8125rem;
  padding: 0.375rem 0.625rem;
  min-height: 2.125rem;
  opacity: 0.85;
}

.filters {
  display: grid;
  grid-template-columns: minmax(11.875rem, 1fr) minmax(11.875rem, 1fr) minmax(10rem, 0.7fr);
  gap: 0.875rem;
  max-width: 88.75rem;
  margin: 0 auto 0.875rem;
  padding: 1rem;
  border: 0.0625rem solid #c5d4e0;
  border-radius: 0.5rem;
  background: #e8edf2;
}

.filters select,
.filters input[type="month"] {
  background: var(--white);
}

.filters label {
  font-weight: 700;
}

.summary-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  max-width: 88.75rem;
  margin: 0 auto 0.875rem;
}

.summary-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 4.375rem;
  padding: 0.875rem 1rem;
  border: 0.0625rem solid var(--line);
  border-radius: 0.5rem;
  background: var(--white);
}

.summary-item-empty {
  background: #e9ecef;
  border-color: #cfd6dd;
}

.summary-item span {
  display: grid;
  place-items: center;
  width: 2.625rem;
  height: 2.625rem;
  border-radius: 0.375rem;
  background: var(--soft);
  font-size: 1.25rem;
  font-weight: 800;
}

.summary-item-empty span {
  background: #dee2e6;
  color: #495057;
}

.summary-item p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.summary-item.uploaded span {
  background: var(--yellow);
}

.summary-item.published span {
  background: var(--green);
}

.calendar-wrap {
  max-width: 88.75rem;
  margin: 0 auto;
  border: 0.0625rem solid rgba(12, 86, 117, 0.45);
  border-radius: 0.75rem;
  background: var(--white);
  box-shadow: 0 0.625rem 1.75rem rgba(24, 32, 42, 0.08);
  overflow: hidden;
}

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

.weekday-row {
  min-height: 2.25rem;
  color: var(--white);
  background: var(--accent-dark);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}

.weekday-row span {
  display: grid;
  place-items: center;
  padding: 0.375rem 0.25rem;
  border-right: 0.0625rem solid rgba(255, 255, 255, 0.22);
}

.weekday-row span:last-child {
  border-right: 0;
}

.calendar-grid {
  min-height: 0;
}

@media (max-width: 980px) {
  .calendar-grid {
    grid-auto-rows: minmax(6.5rem, auto);
  }
}

.day-cell {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 0.25rem;
  min-height: 0;
  overflow: hidden;
  padding: 0.5rem;
  border-top: 0.0625rem solid rgba(191, 211, 226, 0.95);
  border-right: 0.0625rem solid rgba(191, 211, 226, 0.95);
  background: var(--white);
  transition: box-shadow 160ms ease, transform 160ms ease, background 160ms ease;
}

.day-cell:not(.empty-slot):hover {
  z-index: 1;
  box-shadow: inset 0 0 0 0.125rem rgba(7, 137, 195, 0.42), 0 0.5rem 1.375rem rgba(24, 32, 42, 0.12);
}

.day-cell:nth-child(7n) {
  border-right: 0;
}

.day-cell.empty-slot {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 50%, #eef2f6 100%);
  pointer-events: none;
}

.day-cell.uploaded {
  background: var(--yellow);
  border-top-color: rgba(242, 207, 39, 0.65);
  border-right-color: rgba(242, 207, 39, 0.35);
}

.day-cell.published {
  background: var(--green);
  border-top-color: rgba(77, 159, 58, 0.55);
  border-right-color: rgba(77, 159, 58, 0.35);
}

.today-badge {
  align-self: flex-start;
  flex-shrink: 0;
  padding: 0.125rem 0.4375rem;
  border-radius: 999em;
  color: var(--white);
  background: var(--accent-dark);
  font-size: 0.625rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.04em;
  box-shadow: 0 0.0625rem 0.25rem rgba(2, 104, 151, 0.22);
}

.day-cell.today:not(.empty-slot) {
  box-shadow: inset 0 0 0 0.125rem rgba(7, 137, 195, 0.32);
}

.day-cell.today:not(.empty-slot):hover {
  box-shadow: inset 0 0 0 0.125rem rgba(7, 137, 195, 0.5), 0 0.5rem 1.375rem rgba(24, 32, 42, 0.12);
}

.day-cell-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.375rem;
  min-height: 0;
  position: relative;
  z-index: 4;
}

.day-header-spacer {
  flex: 1;
  min-width: 0.5rem;
  min-height: 0.5rem;
}

.day-number {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  min-width: 1.625rem;
  height: 1.625rem;
  color: #111b25;
  font-size: 0.9375rem;
  font-weight: 800;
  line-height: 1;
}

.day-number-link {
  display: grid;
  place-items: center;
  min-width: 1.625rem;
  height: 1.625rem;
  color: inherit;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  border-radius: 0.375rem;
  pointer-events: auto;
}

.day-number-link:hover {
  color: var(--accent-dark);
  background: rgba(7, 137, 195, 0.08);
}

.day-number-link:focus-visible {
  outline: 0.125rem solid var(--accent);
  outline-offset: 0.125rem;
}

.day-summary-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  position: relative;
  z-index: 4;
}

.day-open-table {
  display: grid;
  place-items: center;
  box-sizing: border-box;
  flex-shrink: 0;
  width: 1.625rem;
  height: 1.625rem;
  margin-inline: auto;
  border: 0.0625rem solid rgba(17, 24, 32, 0.22);
  border-radius: 0.375rem;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 0.0625rem 0 rgba(255, 255, 255, 0.6) inset;
  color: var(--accent-dark);
  text-decoration: none;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.day-open-table:hover {
  background: var(--white);
  border-color: rgba(7, 137, 195, 0.45);
  color: var(--accent);
}

.day-open-table:focus-visible {
  outline: 0.1875rem solid rgba(7, 137, 195, 0.28);
  outline-offset: 0.125rem;
}

.day-open-table svg {
  width: 0.9375rem;
  height: 0.9375rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  pointer-events: none;
}

.day-toolbar-hint {
  margin: 0;
  font-size: 0.625rem;
  font-weight: 600;
  line-height: 1.35;
  color: rgba(49, 58, 69, 0.88);
}

/* Legacy calendar summary block (static prototype) */
.day-summary {
  align-self: end;
  min-height: 2.125rem;
  max-width: 100%;
  padding-right: 0.25rem;
  position: relative;
  z-index: 2;
  color: #313a45;
  font-size: 0.8125rem;
  line-height: 1.35;
  pointer-events: none;
}

.summary-multi-hint {
  display: block;
  overflow: hidden;
  margin-top: 0.25rem;
  color: rgba(49, 58, 69, 0.85);
  font-size: 0.6875rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  max-width: min(100%, calc(100% - 2.625rem));
  margin: 0;
  padding: 0.25rem 0.625rem;
  border: 0.0625rem solid rgba(24, 32, 42, 0.16);
  border-radius: 999em;
  background: rgba(255, 255, 255, 0.7);
  font-size: 0.6875rem;
  font-weight: 800;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.summary-text {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.day-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.1875rem;
  min-height: 0;
  margin-top: 0.125rem;
  position: relative;
  z-index: 6;
  isolation: isolate;
}

@media (hover: none) {
  .day-summary-body {
    min-height: 0;
  }
}

.day-action {
  display: grid;
  place-items: center;
  box-sizing: border-box;
  flex: 0 0 auto;
  width: 1.625rem;
  height: 1.625rem;
  min-height: 1.625rem;
  padding: 0;
  border: 0.0625rem solid rgba(17, 24, 32, 0.2);
  border-radius: 0.375rem;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 0.0625rem 0 rgba(255, 255, 255, 0.65) inset;
  font-weight: 700;
}

.day-action:hover {
  background: var(--white);
  border-color: rgba(7, 137, 195, 0.45);
}

.day-action svg {
  width: 0.9375rem;
  height: 0.9375rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  pointer-events: none;
}

.day-action:disabled {
  cursor: not-allowed;
  opacity: 0.28;
  transform: none;
}

.upload-action {
  color: var(--accent);
}

.download-action {
  color: var(--accent-dark);
}

.day-action.delete-action:hover {
  color: var(--danger);
  border-color: rgba(195, 50, 50, 0.35);
  background: var(--danger-soft);
}

.delete-action {
  color: #c33232;
}

.day-action.publish-action:not(:disabled) {
  color: #174d25;
  border-color: rgba(23, 77, 37, 0.26);
}

.day-action.publish-action.is-published {
  background: rgba(255, 255, 255, 0.5);
}

/* Day detail — layout, back nav, posts table */
.day-view-content {
  max-width: 60rem;
  margin: 0 auto;
}

.day-back-nav {
  margin-bottom: 1.25rem;
}

.day-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  max-width: 100%;
  padding: 0.75rem 1rem;
  border: 0.0625rem solid var(--line);
  border-radius: 0.625rem;
  background: var(--white);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 0.25rem 0.875rem rgba(24, 32, 42, 0.06);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.day-back-link:hover {
  border-color: rgba(7, 137, 195, 0.4);
  background: #fbfdff;
  box-shadow: 0 0.5rem 1.375rem rgba(7, 137, 195, 0.12);
}

.day-back-link:focus-visible {
  outline: 0.1875rem solid rgba(7, 137, 195, 0.28);
  outline-offset: 0.125rem;
}

.day-back-nav__arrow {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.5rem;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 1.125rem;
  line-height: 1;
  flex-shrink: 0;
}

.day-back-nav__text {
  display: grid;
  gap: 0.125rem;
  min-width: 0;
  text-align: left;
}

.day-back-nav__label {
  font-size: 0.9375rem;
  color: var(--ink);
}

.day-back-nav__hint {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
}

.day-empty-state {
  margin-bottom: 1.5rem;
  padding: 1.75rem 1.375rem;
  text-align: center;
  border: 0.0625rem dashed rgba(102, 112, 133, 0.55);
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
}

.day-empty-state__title {
  margin: 0 0 0.5rem;
  font-size: 1.0625rem;
  font-weight: 800;
  color: var(--ink);
}

.day-empty-state__text {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
  max-width: 36rem;
  margin-inline: auto;
}

.day-posts-panel {
  margin-bottom: 1.5rem;
  border: 0.0625rem solid var(--line);
  border-radius: 0.75rem;
  background: var(--white);
  box-shadow: 0 0.5rem 1.5rem rgba(24, 32, 42, 0.07);
  overflow: hidden;
}

.day-posts-panel-head {
  padding: 1.25rem 1.375rem 1rem;
  border-bottom: 0.0625rem solid rgba(191, 211, 226, 0.65);
  background: linear-gradient(180deg, #fbfdff 0%, var(--white) 100%);
}

.day-posts-heading {
  margin: 0 0 0.5rem;
  font-size: clamp(1.0625rem, 2.4vw, 1.25rem);
  font-weight: 800;
  color: #111b25;
  letter-spacing: -0.02em;
}

.day-posts-sub {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  max-width: 42rem;
}

.table-scroll-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.day-posts-table {
  width: 100%;
  min-width: 35rem;
  border-collapse: collapse;
  font-size: 0.875rem;
  table-layout: fixed;
}

.day-col-index {
  width: 3rem;
}

.day-col-status {
  width: 9.5rem;
}

.day-col-files {
  width: 5.5rem;
}

.day-col-actions {
  width: 7.5rem;
}

.day-posts-table th,
.day-posts-table td {
  padding: 0.875rem 1.125rem;
  text-align: left;
  border-bottom: 0.0625rem solid rgba(191, 211, 226, 0.55);
  vertical-align: middle;
}

.day-posts-table th {
  font-size: 0.6875rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  background: #f1f5f9;
}

.day-posts-table tbody tr:last-child td {
  border-bottom: 0;
}

.day-posts-table tbody tr:hover td {
  background: rgba(7, 137, 195, 0.045);
}

.day-posts-index {
  font-weight: 800;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.day-posts-title-cell {
  font-weight: 700;
  color: var(--ink);
  word-break: break-word;
}

.day-posts-files-cell {
  font-size: 0.8125rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.day-posts-notes-cell {
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.4;
  word-break: break-word;
}

.day-posts-actions-cell {
  white-space: nowrap;
  text-align: right;
}

.slot-open-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.375rem;
  padding: 0.5rem 0.875rem;
  border-radius: 0.5rem;
  border: 0.0625rem solid rgba(7, 137, 195, 0.45);
  background: var(--white);
  color: var(--accent-dark);
  font-weight: 700;
  font-size: 0.8125rem;
  text-decoration: none;
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.slot-open-button:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  box-shadow: 0 0.25rem 0.75rem rgba(7, 137, 195, 0.18);
}

.slot-open-button:focus-visible {
  outline: 0.1875rem solid rgba(7, 137, 195, 0.28);
  outline-offset: 0.125rem;
}

.day-posts-status {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.625rem;
  border-radius: 999em;
  font-size: 0.6875rem;
  font-weight: 800;
  line-height: 1.3;
  text-transform: none;
  letter-spacing: 0.01em;
}

.add-slot-card {
  margin-top: 0.5rem;
  padding: 1.375rem;
  border: 0.0625rem solid var(--line);
  border-radius: 0.75rem;
  background: var(--white);
  box-shadow: 0 0.375rem 1.25rem rgba(24, 32, 42, 0.06);
}

.add-slot-card__intro {
  margin-bottom: 1.125rem;
}

.add-slot-card .eyebrow {
  margin-bottom: 0.375rem;
}

.add-slot-card__help {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  max-width: 40rem;
}

.add-slot-form__fields {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.875rem;
}

.add-slot-field {
  flex: 1 1 13.75rem;
  min-width: min(100%, 13.75rem);
}

.add-slot-label {
  display: block;
  margin: 0 0 0.5rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--ink);
}

.add-slot-input {
  width: 100%;
  min-height: 2.875rem;
  padding: 0.625rem 0.875rem;
  border: 0.0625rem solid var(--line);
  border-radius: 0.5rem;
  font-size: 0.9375rem;
  background: var(--white);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.add-slot-input:hover {
  border-color: #9eb9cd;
}

.add-slot-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 0.1875rem rgba(7, 137, 195, 0.18);
}

.add-slot-submit {
  flex: 0 0 auto;
  min-height: 2.875rem;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
  border-radius: 0.5rem;
}

/* Slot manage (upload assets) */
.manage-view-content {
  max-width: 45rem;
  margin: 0 auto;
}

.manage-slot-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin-bottom: 1.25rem;
}

.manage-slot-meta__line {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted);
}

.manage-slot-meta__sep {
  margin: 0 0.2em;
  opacity: 0.55;
}

.manage-published-banner {
  margin-bottom: 1.25rem;
  padding: 0.875rem 1rem;
  border: 0.0625rem solid rgba(7, 137, 195, 0.35);
  border-radius: 0.625rem;
  background: var(--accent-soft);
  color: var(--ink);
  font-size: 0.875rem;
  line-height: 1.45;
}

.manage-published-banner strong {
  color: var(--accent-dark);
}

.manage-card {
  margin-bottom: 1.25rem;
  padding: 1.375rem;
  border: 0.0625rem solid var(--line);
  border-radius: 0.75rem;
  background: var(--white);
  box-shadow: 0 0.375rem 1.25rem rgba(24, 32, 42, 0.06);
}

.manage-card__eyebrow {
  margin: 0 0 0.5rem;
}

.manage-card__lede {
  margin: 0 0 1.25rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  max-width: 38rem;
}

.manage-inline-code {
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  background: #f1f5f9;
  font-size: 0.75rem;
  font-weight: 700;
  color: #334155;
}

.manage-locked-note {
  margin: 0;
  padding: 0.875rem;
  border-radius: 0.5rem;
  background: #f8fafc;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 600;
}

.manage-upload-form {
  display: grid;
  gap: 1.375rem;
}

.manage-field {
  display: grid;
  gap: 0.5rem;
}

.manage-label {
  font-size: 0.875rem;
  font-weight: 800;
  color: var(--ink);
}

.manage-field-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.4;
}

.manage-textarea {
  width: 100%;
  max-width: 100%;
  min-height: 8.75rem;
  padding: 0.75rem 0.875rem;
  border: 0.0625rem solid var(--line);
  border-radius: 0.625rem;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--ink);
  background: var(--white);
  resize: vertical;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.manage-textarea:hover {
  border-color: #9eb9cd;
}

.manage-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 0.1875rem rgba(7, 137, 195, 0.18);
}

.manage-file-shell {
  padding: 0.75rem 0.875rem;
  border: 0.0625rem dashed rgba(102, 112, 133, 0.45);
  border-radius: 0.625rem;
  background: #f8fafc;
  transition: border-color 160ms ease, background 160ms ease;
}

.manage-file-shell:focus-within {
  border-color: rgba(7, 137, 195, 0.5);
  background: #fbfdff;
}

.manage-file-input {
  width: 100%;
  max-width: 100%;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink);
}

.manage-file-input::file-selector-button {
  margin-right: 0.75rem;
  padding: 0.5rem 0.875rem;
  border-radius: 0.5rem;
  border: 0.0625rem solid var(--line);
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease;
}

.manage-file-input::file-selector-button:hover {
  background: var(--accent-soft);
  border-color: rgba(7, 137, 195, 0.35);
}

.manage-file-input::-webkit-file-upload-button {
  margin-right: 0.75rem;
  padding: 0.5rem 0.875rem;
  border-radius: 0.5rem;
  border: 0.0625rem solid var(--line);
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.manage-form-actions {
  padding-top: 0.25rem;
}

.manage-btn-primary {
  min-height: 2.875rem;
  padding: 0.625rem 1.375rem;
  border-radius: 0.5rem;
}

.manage-secondary-actions {
  margin-top: 1.375rem;
  padding-top: 1.25rem;
  border-top: 0.0625rem solid rgba(191, 211, 226, 0.65);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
}

.manage-btn-zip {
  min-height: 2.75rem;
  padding: 0.625rem 1.125rem;
  border-radius: 0.5rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.manage-secondary-hint {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.35;
  max-width: 20rem;
}

.manage-zip-disabled {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.45;
}

.manage-table-wrap {
  overflow-x: auto;
  margin-top: 0.5rem;
  border: 0.0625rem solid rgba(191, 211, 226, 0.6);
  border-radius: 0.625rem;
}

.manage-file-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.manage-file-table th,
.manage-file-table td {
  padding: 0.75rem 0.875rem;
  text-align: left;
  border-bottom: 0.0625rem solid rgba(191, 211, 226, 0.55);
  vertical-align: middle;
}

.manage-file-table thead th {
  font-size: 0.6875rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  background: #f1f5f9;
}

.manage-file-table tbody tr:last-child td {
  border-bottom: none;
}

.manage-file-name {
  font-weight: 600;
  word-break: break-word;
}

.manage-file-remove-cell {
  white-space: nowrap;
  text-align: right;
}

.manage-card--footer {
  padding-bottom: 1.125rem;
}

.manage-footer-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.75rem;
}

.manage-footer-form {
  margin: 0;
}

.manage-footer-form .primary-action,
.manage-footer-form .ghost-action {
  min-height: 2.75rem;
}

.manage-btn-delete {
  border-color: rgba(195, 50, 50, 0.4);
  color: var(--danger);
}

.manage-btn-delete:hover {
  background: var(--danger-soft);
  border-color: rgba(195, 50, 50, 0.55);
}

.manage-footer-hint {
  margin: 0.875rem 0 0;
  font-size: 0.75rem;
}

@media (max-width: 520px) {
  .manage-secondary-actions {
    flex-direction: column;
    align-items: flex-start;
  }
}

.day-posts-status.status-empty {
  background: #e9ecef;
  color: #495057;
}

.day-posts-status.status-uploaded {
  background: var(--yellow);
  color: #3d3206;
}

.day-posts-status.status-published {
  background: var(--green);
  color: #0f2918;
}

.upload-modal {
  width: min(32.5rem, calc(100vw - 1.75rem));
  max-height: calc(100vh - 1.75rem);
  overflow: auto;
  border: 0;
  border-radius: 0.5rem;
  padding: 0;
  box-shadow: var(--shadow);
}

.upload-modal::backdrop {
  background: rgba(15, 23, 42, 0.52);
}

.modal-panel {
  padding: 1.5rem;
}

.modal-header,
.modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.modal-footer {
  justify-content: flex-end;
}

.icon-action {
  width: 2.375rem;
  padding: 0;
  color: var(--muted);
  border-color: var(--line);
  background: var(--white);
  font-size: 1.125rem;
}

.file-preview {
  min-height: 3rem;
  padding: 0.75rem;
  border: 0.0625rem dashed #aeb8c8;
  border-radius: 0.5rem;
  color: var(--muted);
  background: #f8fafc;
  font-size: 0.875rem;
  line-height: 1.45;
}

.toast {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 20;
  max-width: min(22.5rem, calc(100vw - 2.5rem));
  padding: 0.75rem 0.875rem;
  border-radius: 0.5rem;
  color: var(--white);
  background: var(--accent-dark);
  box-shadow: var(--shadow);
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transform: translateY(0.75rem);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .planner-view {
    padding: 0.75rem;
  }

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

  .filters {
    grid-template-columns: 1fr;
    gap: 0.625rem;
    padding: 0.75rem;
  }

  .summary-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
  }

  .weekday-row,
  .calendar-grid {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    min-width: 0;
  }

  .weekday-row {
    min-height: 2.25rem;
  }

  .weekday-row span {
    font-size: 0.75rem;
  }

  .calendar-grid {
    min-height: 0;
  }

  .day-cell {
    min-height: 8.25rem;
    padding: 0.625rem;
  }

  .day-number {
    min-width: 1.75rem;
    height: 1.75rem;
    font-size: 1.0625rem;
  }

  .day-number-link {
    min-width: 1.75rem;
    height: 1.75rem;
  }

  .day-summary-body {
    min-height: 0;
  }

  .day-open-table {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 0.375rem;
  }

  .day-open-table svg {
    width: 1rem;
    height: 1rem;
  }

  .day-toolbar-hint {
    font-size: 0.625rem;
  }

  .summary-item {
    gap: 0.5rem;
    min-height: 3.375rem;
    padding: 0.5625rem;
  }

  .summary-item span {
    width: 2.125rem;
    height: 2.125rem;
    font-size: 1.0625rem;
  }

  .summary-item p {
    font-size: 0.75rem;
    line-height: 1.2;
  }

  .day-actions {
    gap: 0.25rem;
    min-height: 0;
  }

  .day-action {
    width: 1.75rem;
    height: 1.75rem;
    min-height: 1.75rem;
    border-radius: 0.375rem;
  }

  .day-action svg {
    width: 1rem;
    height: 1rem;
  }
}

@media (max-width: 560px) {
  .planner-view {
    padding: 0.5rem;
  }

  .auth-panel {
    padding: 1.625rem 1.125rem;
  }

  .brand-logo {
    width: 4.75rem;
    height: 4.75rem;
  }

  .auth-panel h1 {
    font-size: 2.375rem;
  }

  .auth-copy {
    font-size: 1rem;
  }

  .topbar-logo {
    width: 2.75rem;
    height: 2.75rem;
    max-width: none;
  }

  .planner-title h1 {
    font-size: 1.75rem;
  }

  .context-line {
    font-size: 0.75rem;
  }

  .calendar-wrap {
    border-radius: 0.375rem;
  }

  .day-cell {
    min-height: 8rem;
    padding: 0.5rem;
  }

  .day-number {
    min-width: 1.625rem;
    height: 1.625rem;
    font-size: 0.9375rem;
  }

  .day-number-link {
    min-width: 1.625rem;
    height: 1.625rem;
  }

  .day-summary-body {
    min-height: 0;
  }

  .day-actions {
    gap: 0.25rem;
    min-height: 0;
    margin-top: 0.25rem;
  }

  .day-action {
    width: 1.625rem;
    height: 1.625rem;
    min-height: 1.625rem;
  }

  .day-open-table {
    width: 1.625rem;
    height: 1.625rem;
    border-radius: 0.375rem;
  }

  .day-open-table svg {
    width: 0.9375rem;
    height: 0.9375rem;
  }

  .day-action svg {
    width: 0.9375rem;
    height: 0.9375rem;
  }

  .today-badge {
    padding: 0.1875rem 0.5rem;
    font-size: 0.625rem;
  }

  .modal-header,
  .modal-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .modal-footer button {
    width: 100%;
  }
}

/* Yii bridge — aligns ActiveForm / admin with legacy planner */
.auth-form div[class*="field-"] { display: grid; gap: 0.4375rem; margin: 0; }
.auth-form .help-block,.auth-form .invalid-feedback{margin:0.25rem 0 0;color:var(--danger);font-size:0.875rem;font-weight:700;}
.auth-form .field-loginform-rememberme label,.auth-form div.field-loginform-rememberme label{display:inline-flex;align-items:center;gap:0.625rem;font-weight:700;}
.auth-form .field-loginform-rememberme input[type="checkbox"]{width:auto;min-height:auto;}
.auth-tabs a.auth-tab{text-decoration:none;color:inherit;display:grid;place-items:center;}
.auth-tabs a.auth-tab.active{pointer-events:none;}
.planner-month-strip{display:flex;align-items:center;justify-content:space-between;gap:0.875rem;flex-wrap:wrap;max-width:88.75rem;margin:0 auto 0.875rem;padding:0.875rem 1.125rem;border:0.0625rem solid var(--line);border-radius:0.5rem;background:var(--white);box-shadow:0 0.375rem 1.125rem rgba(24,32,42,0.06);}
article.day-cell{box-sizing:border-box;}
.legacy-soft-card{border:0.0625rem solid var(--line);border-radius:0.5rem;background:var(--white);padding:1.125rem;margin:0.875rem auto;box-shadow:0 0.375rem 1.375rem rgba(24,32,42,0.06);}.legacy-soft-card.tint{background:var(--soft);}
.max-content{max-width:61.25rem;margin-inline:auto;}
.user-actions{display:flex;align-items:center;gap:0.75rem;color:var(--muted);font-weight:700;margin-left:auto;flex-wrap:wrap;justify-content:flex-end;}
.user-actions .ghost-action{text-decoration:none;display:inline-flex;align-items:center;}
#site-toast-stack{position:fixed;right:1.25rem;bottom:1.25rem;z-index:1100;display:flex;flex-direction:column-reverse;gap:0.625rem;align-items:flex-end;}
#site-toast-stack>.toast{position:static!important;right:auto!important;bottom:auto!important;}
.toast.notice-msg{background:var(--accent-dark);}.toast.error-msg{background:var(--danger);}
.compact-table-modern{border-collapse:collapse;width:100%;}
.compact-table-modern th,.compact-table-modern td{padding:0.625rem;border-bottom:0.0625rem solid var(--line);text-align:left;}
.compact-table-modern thead th{font-size:0.75rem;text-transform:uppercase;color:var(--muted);}
.inline-nav-link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0.375rem 0.75rem;
  border-radius:0.375rem;
  border:0.0625rem solid var(--line);
  background:var(--white);
  color:var(--accent-dark);
  font-weight:700;
  text-decoration:none;
  font-size:0.8125rem;
  transition:background 160ms ease,border-color 160ms ease,box-shadow 160ms ease;
}
.inline-nav-link:hover{
  border-color:rgba(7,137,195,0.45);
  background:var(--accent-soft);
  box-shadow:0 0.25rem 0.75rem rgba(7,137,195,0.12);
}
.registry-page{max-width:57.5rem;margin:0 auto;}
.registry-hero{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:1.25rem;
  flex-wrap:wrap;
  margin-bottom:1.25rem;
}
.registry-lede{
  margin:0 0 0.5rem;
  color:var(--muted);
  font-size:0.9375rem;
  line-height:1.5;
  max-width:33.75rem;
}
.registry-meta{
  margin:0;
  font-size:0.8125rem;
  color:var(--ink);
  font-weight:700;
}
.registry-meta strong{color:var(--accent-dark);font-weight:800;}
.registry-hero-actions{display:flex;flex-wrap:wrap;gap:0.625rem;align-items:center;}
.registry-hero-actions .primary-action,
.registry-hero-actions .ghost-action,
.registry-empty-actions .primary-action,
.registry-empty-actions .ghost-action{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
}
.registry-panel{
  border:0.0625rem solid var(--line);
  border-radius:0.75rem;
  background:var(--white);
  box-shadow:0 0.5rem 1.75rem rgba(24,32,42,0.08);
  overflow:hidden;
}
.registry-table-scroll{overflow-x:auto;}
.registry-panel .compact-table-modern thead th{
  background:linear-gradient(180deg,#f9fcfe 0%,#eef6fb 100%);
  border-bottom:0.0625rem solid var(--line);
  letter-spacing:0.04em;
  font-weight:800;
}
.registry-panel .compact-table-modern tbody tr{transition:background 140ms ease;}
.registry-panel .compact-table-modern tbody tr:hover td{background:rgba(223,245,255,0.55);}
.registry-panel .compact-table-modern tbody tr:last-child td{border-bottom:none;}
.registry-panel .compact-table-modern th,.registry-panel .compact-table-modern td{padding:0.875rem 1rem;}
.registry-id-cell{
  font-variant-numeric:tabular-nums;
  color:var(--muted);
  font-weight:800;
  width:4.5rem;
}
.registry-name-cell{font-weight:700;color:var(--ink);font-size:0.9375rem;}
.registry-name-row{display:inline-flex;align-items:center;gap:0.75rem;min-width:0;}
.registry-avatar{
  width:2.375rem;
  height:2.375rem;
  border-radius:0.6875rem;
  display:inline-grid;
  place-items:center;
  font-size:0.875rem;
  font-weight:800;
  color:var(--accent-dark);
  background:linear-gradient(145deg,var(--accent-soft) 0%,#ffffff 92%);
  border:0.0625rem solid rgba(7,137,195,0.2);
  flex-shrink:0;
  box-shadow:0 0.125rem 0.5rem rgba(7,137,195,0.08);
}
.priority-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:2.25rem;
  padding:0.3125rem 0.6875rem;
  border-radius:999em;
  background:linear-gradient(180deg,#fffdf0 0%,var(--yellow) 100%);
  border:0.0625rem solid rgba(242,207,39,0.55);
  color:#5c4a08;
  font-weight:800;
  font-size:0.8125rem;
  font-variant-numeric:tabular-nums;
}
.registry-row-actions{display:inline-flex;align-items:center;gap:0.625rem;flex-wrap:wrap;justify-content:flex-end;width:100%;}
.registry-empty{padding:3.25rem 1.75rem;text-align:center;color:var(--muted);font-size:0.9375rem;line-height:1.55;}
.registry-empty strong{display:block;color:var(--ink);font-size:1.125rem;margin-bottom:0.625rem;font-weight:800;}
.registry-empty-actions{margin-top:1.25rem;display:flex;gap:0.625rem;justify-content:center;flex-wrap:wrap;}
.registry-panel .pager-soft{
  margin:0;
  padding:1rem 1.125rem;
  border-top:0.0625rem solid var(--line);
  background:linear-gradient(180deg,#fbfdff 0%,#f4f9fc 100%);
}
@media (max-width:600px){
  .registry-hero-actions{width:100%;}
  .registry-hero-actions .primary-action,.registry-hero-actions .ghost-action{flex:1;justify-content:center;}
}
.link-button-danger-soft{appearance:none;border:none;background:none;color:var(--danger);font-weight:700;text-decoration:underline;padding:0.5rem;}
.pager-soft{display:flex;gap:0.5rem;flex-wrap:wrap;justify-content:center;list-style:none;padding:0.875rem;margin:0.875rem auto 0;}
.pager-soft li a{padding:0.5rem 0.75rem;border-radius:0.375rem;border:0.0625rem solid var(--line);font-weight:700;background:var(--white);color:inherit;text-decoration:none;}
.planner-item-list-box{max-width:45rem;list-style:none;padding:1.125rem;margin:0.875rem auto;border:0.0625rem solid var(--line);border-radius:0.5rem;background:var(--white);}
.planner-item-list-box li{padding:0.75rem;border-bottom:0.0625rem solid rgba(191,211,226,0.7);border-radius:0.5rem;display:flex;}
.planner-item-list-box li:last-child{border-bottom:none;}
.assign-companies-list{list-style:none;padding:1.125rem;margin:0 auto 1.125rem;border:0.0625rem solid var(--line);border-radius:0.5rem;background:var(--white);max-width:33.75rem;}
.assign-companies-list .checkbox-line{margin:0.875rem;padding:0;border:none;}
.assign-companies-list .modern-checkbox-inline{display:flex;align-items:center;gap:0.625rem;font-weight:700;}
.file-table-modern{width:100%;border-collapse:collapse;}
.file-table-modern th,.file-table-modern td{border-bottom:0.0625rem solid var(--line);padding:0.5rem;}
