@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@600;700;800&display=swap');
@import url('accessibility.css');

:root {
  --brand-purple: #5c068c;
  --brand-purple-dark: #36034f;
  --brand-purple-deep: #21032f;
  --brand-blue: #2c7fc3;
  --brand-blue-dark: #1d5f97;
  --brand-pink: #e71b7e;
  --brand-pink-dark: #b70d5e;
  --brand-cyan: #e5f6fb;
  --ink: #1d2230;
  --ink-soft: #707687;
  --paper: #f5f7fb;
  --card: #ffffff;
  --line: #e5e8f0;
  --line-strong: #d7dce8;
  --success: #14836b;
  --success-soft: #e8f8f2;
  --warning: #ad6900;
  --warning-soft: #fff4dc;
  --danger: #bd2d57;
  --danger-soft: #fff0f4;
  --shadow: 0 22px 55px rgba(35, 22, 61, .10);
  --shadow-soft: 0 9px 25px rgba(36, 31, 60, .07);
  --radius-lg: 26px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* { box-sizing: border-box; }
html { background: var(--paper); scroll-behavior: smooth; }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 76% -12%, rgba(44, 127, 195, .14), transparent 28rem),
    radial-gradient(circle at 7% 110%, rgba(231, 27, 126, .07), transparent 25rem),
    var(--paper);
  font: 14px/1.55 'DM Sans', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }
::selection { color: #fff; background: var(--brand-pink); }

/* Shell administrativo */
.app-shell {
  display: grid;
  grid-template-columns: 276px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  min-height: 600px;
  overflow: hidden auto;
  padding: 24px 16px 18px;
  color: #f9f6ff;
  background:
    radial-gradient(circle at 108% -5%, rgba(44, 127, 195, .52), transparent 15rem),
    radial-gradient(circle at -15% 83%, rgba(231, 27, 126, .22), transparent 18rem),
    linear-gradient(155deg, #210330 0%, #3d075c 50%, #27053c 100%);
  box-shadow: 18px 0 45px rgba(34, 5, 53, .12);
  z-index: 5;
}

.sidebar::before,
.sidebar::after {
  position: absolute;
  content: '';
  pointer-events: none;
  border: 1px solid rgba(255,255,255,.10);
  transform: rotate(28deg);
}
.sidebar::before {
  width: 210px;
  height: 210px;
  top: -148px;
  right: -94px;
  border-radius: 42px;
}
.sidebar::after {
  width: 150px;
  height: 150px;
  bottom: 66px;
  left: -112px;
  border-radius: 50%;
}

.brand {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: max-content;
  margin: 0 10px 42px;
  z-index: 1;
}
.brand-mark {
  display: block;
  width: 46px;
  height: 46px;
  object-fit: contain;
  filter: drop-shadow(0 9px 14px rgba(0,0,0,.20));
}
.brand-copy {
  display: grid;
  gap: 4px;
  line-height: 1;
}
.brand-copy small,
.auth-company {
  color: #c6dbf5;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .19em;
}
.brand-copy strong {
  color: #fff;
  font: 800 18px/1 'Manrope', Arial, sans-serif;
  letter-spacing: -.03em;
}

.sidebar nav {
  position: relative;
  display: grid;
  gap: 6px;
  z-index: 1;
}
.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 11px 13px;
  border: 1px solid transparent;
  border-radius: 14px;
  color: rgba(245,240,255,.72);
  font-size: 12px;
  font-weight: 700;
  transition: color .2s ease, background .2s ease, border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.sidebar nav a b {
  display: inline-grid;
  place-items: center;
  width: 22px;
  color: #91c8ee;
  font-size: 16px;
  font-weight: 500;
}
.sidebar nav a:hover {
  color: #fff;
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.10);
  transform: translateX(3px);
}
.sidebar nav a.active {
  color: #fff;
  background: linear-gradient(110deg, rgba(44,127,195,.42), rgba(231,27,126,.33));
  border-color: rgba(255,255,255,.16);
  box-shadow: inset 3px 0 0 #ff75b4, 0 9px 22px rgba(19, 0, 33, .17);
}
.sidebar nav a.active b { color: #fff; }
.sidebar-footer {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding: 18px 10px 2px;
  border-top: 1px solid rgba(255,255,255,.14);
  font-size: 11px;
  z-index: 1;
}
.sidebar-footer span {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  max-width: 165px;
  overflow: hidden;
  color: rgba(255,255,255,.84);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sidebar-footer span i,
.eyebrow i {
  display: inline-block;
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #70e0ce;
  box-shadow: 0 0 0 4px rgba(112,224,206,.12);
}
.sidebar-footer a { color: #ff9fc7; font-weight: 800; }
.sidebar-footer a:hover { color: #fff; }

.main-content {
  width: 100%;
  max-width: 1680px;
  min-width: 0;
  padding: 32px clamp(18px, 4vw, 56px) 72px;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 30px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}
.topbar h1,
.auth-card h1,
.public-hero h1,
.print-head h1,
.schedule-hero h2,
.panel-dark h2 {
  font-family: 'Manrope', Arial, sans-serif;
}
.topbar h1 {
  margin: 8px 0 0;
  color: var(--brand-purple-dark);
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1.08;
  letter-spacing: -.055em;
}
.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--brand-purple);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.eyebrow i { width: 6px; height: 6px; background: var(--brand-pink); box-shadow: none; }
.profile-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-purple) 58%, var(--brand-pink));
  border: 4px solid #fff;
  border-radius: 16px;
  box-shadow: 0 9px 20px rgba(92,6,140,.22);
  font-weight: 800;
  transition: transform .2s ease, box-shadow .2s ease;
}
.profile-chip:hover { transform: translateY(-2px) rotate(2deg); box-shadow: 0 14px 27px rgba(92,6,140,.28); }

/* Cartões, painéis e métricas */
.panel,
.metrics article,
.day-card,
.empty-card {
  background: rgba(255,255,255,.94);
  border: 1px solid rgba(226,230,239,.95);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
}
.panel { padding: 27px; }
.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 16px;
  margin-bottom: 22px;
}
.metrics article {
  position: relative;
  isolation: isolate;
  min-height: 150px;
  overflow: hidden;
  padding: 23px;
}
.metrics article::before {
  position: absolute;
  right: -30px;
  top: -44px;
  width: 145px;
  height: 145px;
  content: '';
  border: 22px solid rgba(44,127,195,.08);
  border-radius: 50%;
  z-index: -1;
}
.metrics article:nth-child(2)::before { border-color: rgba(231,27,126,.09); }
.metrics article:nth-child(3)::before { border-color: rgba(92,6,140,.09); }
.metrics span { color: var(--ink-soft); font-size: 12px; font-weight: 700; }
.metrics strong {
  display: block;
  margin: 17px 0 7px;
  color: var(--brand-purple-dark);
  font: 800 40px/1 'Manrope', Arial, sans-serif;
  letter-spacing: -.07em;
}
.metrics small,
.muted { color: var(--ink-soft); }
.split-grid { display: grid; grid-template-columns: minmax(0,1.05fr) minmax(0,1fr); gap: 20px; }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.section-heading h2,
.form-panel h2 {
  margin: 7px 0 0;
  color: var(--brand-purple-dark);
  font: 800 23px/1.18 'Manrope', Arial, sans-serif;
  letter-spacing: -.045em;
}
.text-link { color: var(--brand-purple); font-size: 12px; font-weight: 800; transition: color .18s ease; }
.text-link:hover { color: var(--brand-pink); }
.panel-dark {
  position: relative;
  min-height: 260px;
  overflow: hidden;
  padding: 34px;
  color: #fff;
  background:
    radial-gradient(circle at 93% 5%, rgba(44,127,195,.50), transparent 14rem),
    radial-gradient(circle at 18% 120%, rgba(231,27,126,.42), transparent 15rem),
    linear-gradient(135deg, #2c0750, #5c068c 58%, #3c247e);
  border-color: transparent;
  box-shadow: 0 22px 50px rgba(77, 8, 116, .20);
}
.panel-dark::after {
  position: absolute;
  right: -58px;
  top: -78px;
  width: 210px;
  height: 210px;
  content: '';
  border: 1px solid rgba(255,255,255,.21);
  border-radius: 44px;
  transform: rotate(32deg);
}
.panel-dark > * { position: relative; z-index: 1; }
.panel-dark .eyebrow { color: #c5e7fb; }
.panel-dark .eyebrow i { background: #73dfcf; }
.panel-dark h2 { margin: 16px 0 12px; color: #fff; font-size: 31px; }
.panel-dark p { max-width: 450px; color: rgba(255,255,255,.78); }

/* Listas, status e pills */
.compact-list { display: grid; }
.compact-list > a,
.compact-list > div {
  display: grid;
  grid-template-columns: 120px minmax(0,1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px 4px;
  border-top: 1px solid var(--line);
  transition: background .18s ease, padding .18s ease;
}
.compact-list > a:first-child,
.compact-list > div:first-child { border-top: 0; }
.compact-list > a:hover { padding-left: 9px; padding-right: 9px; background: linear-gradient(90deg, rgba(44,127,195,.07), transparent); }
.compact-list span { color: var(--ink-soft); font-size: 11px; }
.compact-list strong { min-width: 0; overflow-wrap: anywhere; }
.compact-list em { color: var(--ink-soft); font-style: normal; }
.status,
.scope-pill,
.manual-only-badge {
  display: inline-flex;
  align-items: center;
  width: max-content;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
  padding: 6px 10px;
  text-transform: uppercase;
}
.status.publicada { color: var(--success); background: var(--success-soft); }
.status.rascunho { color: var(--warning); background: var(--warning-soft); }
.scope-pill { color: var(--brand-purple); background: #f0e8fb; }

/* Botões */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 43px;
  padding: 11px 17px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: -.01em;
  white-space: nowrap;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease, color .18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn-primary {
  color: #fff;
  background: linear-gradient(115deg, var(--brand-blue), var(--brand-purple) 68%, var(--brand-pink));
  box-shadow: 0 10px 22px rgba(92,6,140,.22);
}
.btn-primary:hover { box-shadow: 0 15px 28px rgba(92,6,140,.30); }
.btn-secondary {
  color: var(--brand-purple);
  background: #f1eafa;
  border-color: #e5d8f5;
}
.btn-secondary:hover { color: var(--brand-purple-dark); background: #e9dcf7; border-color: #d9c5ee; }
.btn-light { margin-top: 8px; color: var(--brand-purple); background: #fff; box-shadow: 0 8px 18px rgba(25,7,47,.12); }
.btn-light:hover { color: var(--brand-pink); }
.btn-ghost { color: var(--ink); background: #fff; border-color: var(--line-strong); }
.btn-ghost:hover { color: var(--brand-purple); border-color: #b99bd4; }
.btn-contrast { color: #fff; background: #181523; box-shadow: 0 10px 20px rgba(19,17,29,.15); }
.btn-contrast:hover { background: var(--brand-purple-dark); }

/* Formulários e filtros */
.page-actions { margin: -10px 0 24px; padding: 7px 0 7px 14px; color: var(--ink-soft); border-left: 3px solid var(--brand-pink); }
.form-panel { padding: 29px; }
.inline-form,
.entry-form { display: flex; flex-wrap: wrap; align-items: end; gap: 13px; }
.inline-form label,
.entry-form label { flex: 1; min-width: 150px; }
.stack-form { display: grid; gap: 15px; margin-top: 23px; }
.stack-form label,
.inline-form label,
.entry-form label,
.settings-grid label,
.filters label,
.manual-fields label {
  display: grid;
  gap: 7px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 800;
}
.stack-form small { font-size: 10px; font-weight: 500; }
.stack-form input,
.stack-form select,
.stack-form textarea,
.inline-form input,
.inline-form select,
.entry-form input,
.entry-form select,
.settings-grid input,
.filters input,
.filters select,
.manual-fields input,
.manual-fields select {
  width: 100%;
  min-height: 43px;
  padding: 10px 12px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  outline: 0;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.stack-form textarea { resize: vertical; }
.stack-form input:hover,
.stack-form select:hover,
.stack-form textarea:hover,
.inline-form input:hover,
.inline-form select:hover,
.entry-form input:hover,
.entry-form select:hover,
.settings-grid input:hover,
.filters input:hover,
.filters select:hover,
.manual-fields input:hover,
.manual-fields select:hover { border-color: #b9a4c9; }
.stack-form input:focus,
.stack-form select:focus,
.stack-form textarea:focus,
.inline-form input:focus,
.inline-form select:focus,
.entry-form input:focus,
.entry-form select:focus,
.settings-grid input:focus,
.filters input:focus,
.filters select:focus,
.manual-fields input:focus,
.manual-fields select:focus {
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 4px rgba(44,127,195,.13);
}
.inline-form .btn,
.entry-form .btn { min-height: 43px; }
.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 11px;
  margin: 0 0 20px;
  padding: 14px;
  background: linear-gradient(115deg, #fbfcff, #f5effa);
  border: 1px solid var(--line);
  border-radius: 15px;
}
.filters select,
.filters input { min-height: 38px; padding: 7px 9px; }
.filters .btn { min-height: 38px; padding: 8px 14px; }

/* Tabelas */
.table-wrap { overflow: auto; border-radius: 13px; }
table { width: 100%; border-collapse: collapse; }
th {
  color: #8b91a0;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .11em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}
th, td { padding: 14px 10px; border-bottom: 1px solid var(--line); }
td { font-size: 13px; vertical-align: middle; }
tbody tr { transition: background .16s ease; }
tbody tr:hover { background: #faf8fd; }

/* Pessoas e componentes auxiliares */
.people-layout { grid-template-columns: minmax(330px,.86fr) minmax(0,1.14fr); }
.two-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stack-form fieldset,
.settings-grid fieldset {
  margin: 0;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.stack-form legend,
.settings-grid legend { padding: 0 6px; color: var(--brand-purple); font-size: 11px; font-weight: 800; }
.check-row { display: flex !important; align-items: center !important; gap: 10px; font-size: 12px !important; }
.check-row input { width: 16px !important; min-height: 0 !important; accent-color: var(--brand-pink); }
.people-list { display: grid; }
.people-list article { display: grid; grid-template-columns: 42px minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 15px 0; border-top: 1px solid var(--line); }
.people-list article:first-child { border-top: 0; }
.avatar { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; color: var(--brand-purple); background: linear-gradient(135deg, #e4f2fb, #f7e4f2); border: 1px solid #e0d9ed; border-radius: 14px; font-weight: 800; }
.people-list p { margin: 3px 0 0; color: var(--ink-soft); font-size: 11px; }
.row-actions { display: flex; gap: 13px; font-size: 11px; font-weight: 800; }
.row-actions a,
.row-actions button { padding: 0; color: var(--brand-purple); background: none; border: 0; }
.row-actions a:hover,
.row-actions button:hover { color: var(--brand-pink); }
.inline-delete { justify-self: end; }
.inline-delete button,
.entry-chip button { padding: 3px 5px; color: var(--danger); background: transparent; border: 0; font-size: 20px; line-height: 1; }
.inline-delete button:hover,
.entry-chip button:hover { color: var(--brand-pink); transform: scale(1.1); }

/* Calendário */
.calendar-nav { display: flex; gap: 7px; }
.calendar-nav a { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; color: var(--brand-purple); background: #f0eafa; border: 1px solid #e6d8f4; border-radius: 10px; font-weight: 800; transition: all .18s ease; }
.calendar-nav a:hover { color: #fff; background: var(--brand-purple); transform: translateY(-2px); }
.calendar-weekdays,
.holiday-calendar { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); }
.calendar-weekdays { color: var(--ink-soft); font-size: 9px; font-weight: 800; text-align: center; text-transform: uppercase; }
.calendar-weekdays span { padding: 9px 0; }
.holiday-calendar { overflow: hidden; border-top: 1px solid var(--line); border-left: 1px solid var(--line); border-radius: 12px; }
.calendar-day { min-height: 80px; padding: 9px; color: var(--ink); text-align: left; background: #fff; border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); transition: background .18s ease, box-shadow .18s ease; }
.calendar-day strong { display: block; font-size: 12px; }
.calendar-day span { display: block; overflow: hidden; margin-top: 6px; padding: 4px 5px; color: var(--danger); background: #fff0f4; border-radius: 7px; font-size: 9px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.calendar-day:hover { background: #f8fbff; box-shadow: inset 0 0 0 2px rgba(44,127,195,.14); }
.calendar-day.outside { color: #adb2bf; background: #fbfcfe; }
.calendar-day.has-holiday { box-shadow: inset 0 3px 0 var(--brand-pink); }

/* Regras e escala mensal */
.settings-panel { max-width: 940px; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 24px; }
.settings-grid fieldset { display: grid; gap: 14px; }
.settings-grid .btn { grid-column: 1 / -1; justify-self: start; }
.schedule-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  overflow: hidden;
  margin-bottom: 20px;
  padding: 30px 32px;
  color: #fff;
  background:
    radial-gradient(circle at 90% 0%, rgba(44,127,195,.45), transparent 14rem),
    linear-gradient(120deg, #26043a, #5c068c 60%, #813174);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 42px rgba(62,5,92,.19);
}
.schedule-hero::before { position: absolute; right: -72px; top: -114px; width: 245px; height: 245px; content: ''; border: 1px solid rgba(255,255,255,.16); border-radius: 52px; transform: rotate(28deg); }
.schedule-hero > * { position: relative; z-index: 1; }
.schedule-hero .scope-pill { color: var(--brand-purple); background: #eff7fd; }
.schedule-hero h2 { margin: 10px 0 6px; color: #fff; font-size: clamp(25px, 3vw, 32px); letter-spacing: -.055em; }
.schedule-hero p { max-width: 620px; margin: 0; color: rgba(255,255,255,.76); }
.schedule-hero-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.schedule-hero-actions form { margin: 0; }
.manual-allocation { padding: 0; }
.manual-allocation summary { padding: 20px 23px; cursor: pointer; list-style: none; font-weight: 800; }
.manual-allocation summary::-webkit-details-marker { display: none; }
.manual-allocation summary::after { float: right; content: '＋'; color: var(--brand-pink); font-size: 18px; line-height: 1; }
.manual-allocation[open] summary::after { content: '−'; }
.manual-allocation summary span { margin-right: 8px; color: var(--brand-pink); font-size: 19px; }
.manual-allocation-body { padding: 23px; border-top: 1px solid var(--line); }
.manual-intro { margin-bottom: 20px; padding: 3px 0 3px 14px; border-left: 3px solid var(--brand-blue); }
.manual-intro h3 { margin: 4px 0; color: var(--brand-purple-dark); font: 800 17px/1.25 'Manrope', Arial, sans-serif; }
.manual-intro p { max-width: 780px; margin: 5px 0 0; color: var(--ink-soft); font-size: 12px; }
.manual-review-form { display: grid; gap: 17px; }
.manual-fields { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 13px; }
.manual-fields input,
.manual-fields select { min-width: 0; }
.manual-fields small,
.manual-readonly small { color: var(--ink-soft); font-size: 10px; font-weight: 500; }
.manual-notes { grid-column: span 2; }
.manual-readonly { display: grid; align-content: start; gap: 3px; padding: 10px 12px; color: var(--ink); background: #f9fbfe; border: 1px dashed #c8d4e3; border-radius: 11px; }
.manual-readonly span { color: var(--ink-soft); font-size: 10px; font-weight: 800; }
.manual-readonly strong { color: var(--brand-purple-dark); font-size: 12px; }
.manual-actions { display: flex; justify-content: flex-end; }
.manual-review-summary { margin-top: 20px; padding: 16px; color: var(--success); background: var(--success-soft); border: 1px solid #c6ecdf; border-radius: 14px; }
.manual-review-summary.has-alert { color: var(--warning); background: var(--warning-soft); border-color: #f1d8a1; }
.manual-review-summary > strong { display: block; font-size: 13px; }
.manual-review-summary > p { margin: 6px 0; font-size: 12px; }
.manual-confirm-form { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 15px; }
.manual-confirm-form .check-row { flex: 1; min-width: 260px; }
.schedule-days { display: grid; gap: 12px; margin-top: 20px; }
.day-card { overflow: hidden; padding: 0; }
.day-card.holiday { border-color: #eab8cc; }
.day-card header { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; background: linear-gradient(100deg, #fbfcff, #f8f0fb); }
.day-card header strong { font-size: 13px; }
.day-card header > span { color: var(--ink-soft); font-size: 11px; }
.holiday-tag { display: inline-block; margin-left: 8px; padding: 5px 8px; color: var(--danger); background: var(--danger-soft); border-radius: 8px; font-size: 10px; font-weight: 800; }
.entry-chips { display: grid; gap: 8px; padding: 14px 20px; }
.entry-chip { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 12px; background: #fcfdff; border: 1px solid #edf0f5; border-radius: 12px; transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.entry-chip:hover { border-color: #d5c7e4; box-shadow: 0 8px 18px rgba(49,30,72,.06); transform: translateY(-1px); }
.entry-chip > div { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.entry-chip strong { font-size: 12px; }
.entry-chip small { color: var(--ink-soft); font-size: 10px; }
.duty-badge { display: inline-flex; align-items: center; padding: 5px 8px; border-radius: 8px; font-size: 9px; font-weight: 800; letter-spacing: .03em; }
.duty-badge.plantao { color: var(--brand-purple); background: #eee5fb; }
.duty-badge.sobreaviso { color: var(--brand-pink-dark); background: #ffe6f1; }

/* Mensagens — ajustes gerais; detalhes dos links únicos em messages.css */
.message-hero { margin-bottom: 20px; }
.message-hero h2 { margin: 7px 0; color: var(--brand-purple-dark); font: 800 26px/1.18 'Manrope', Arial, sans-serif; letter-spacing: -.05em; }
.message-hero p { max-width: 680px; margin: 7px 0 0; }
.message-token-guide { display: flex; flex-wrap: wrap; gap: 8px; max-width: 500px; padding: 14px; background: linear-gradient(135deg, #fbfcff, #f8f0fc); border: 1px solid var(--line); border-radius: 15px; }
.message-token-guide strong { width: 100%; font-size: 11px; }
.message-token-guide code,
.cron-command { overflow-wrap: anywhere; padding: 5px 7px; color: var(--brand-purple); background: #f0e6fa; border-radius: 7px; font-size: 10px; font-weight: 700; }
.message-layout { align-items: start; margin-bottom: 20px; }
.message-template { display: grid; gap: 12px; }
.message-template textarea { min-height: 126px; }
.message-preview-link { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; padding: 11px; background: #fbfcff; border: 1px dashed #cfc4dc; border-radius: 12px; }
.message-preview-link label { flex: 1; min-width: 170px; }
.compact-form { margin-bottom: 20px; }
.message-recipient-list { display: grid; }
.message-recipient-list > div { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 7px; align-items: center; padding: 13px 0; border-top: 1px solid var(--line); }
.message-recipient-list span { color: var(--ink-soft); font-size: 10px; font-weight: 800; }
.message-recipient-list strong { grid-row: 2; overflow-wrap: anywhere; font-size: 11px; }
.message-recipient-list form { grid-column: 2; grid-row: 1 / 3; }
.message-manual-review { margin-bottom: 20px; }
.message-preview-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.message-preview-grid article { padding: 16px; background: #fbfcff; border: 1px solid var(--line); border-radius: 14px; }
.message-preview-grid span { display: block; color: var(--ink-soft); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.message-preview-grid strong { display: block; margin: 5px 0 9px; }
.message-preview-grid p { margin: 0; font-size: 12px; line-height: 1.6; }
.cron-command { display: block; margin: 14px 0; white-space: normal; }

/* Alertas, vazios e autenticação */
.flash { margin: -8px 0 21px; padding: 13px 15px; border-radius: 13px; font-weight: 700; }
.flash.success { color: var(--success); background: var(--success-soft); border: 1px solid #c4e9dc; }
.flash.error { color: var(--danger); background: var(--danger-soft); border: 1px solid #f1c5d3; }
.empty-card { padding: 39px; text-align: center; }
.empty-card strong { color: var(--brand-purple-dark); font: 800 21px 'Manrope', Arial, sans-serif; }
.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
  background:
    radial-gradient(circle at 8% 14%, rgba(231,27,126,.28), transparent 18rem),
    radial-gradient(circle at 92% 82%, rgba(44,127,195,.35), transparent 24rem),
    linear-gradient(135deg, #230331, #5c068c 58%, #3c237b);
}
.auth-card { width: 100%; max-width: 480px; padding: 40px; background: rgba(255,255,255,.97); border: 1px solid rgba(255,255,255,.72); border-radius: var(--radius-lg); box-shadow: 0 28px 75px rgba(22,2,33,.32); }
.auth-card > .brand-mark { width: 66px; height: 66px; margin-bottom: 14px; }
.auth-company { display: block; margin-bottom: 19px; color: var(--brand-purple); }
.auth-card h1 { margin: 13px 0; color: var(--brand-purple-dark); font-size: 33px; line-height: 1.08; letter-spacing: -.06em; }
.auth-card > p { margin: 0; color: var(--ink-soft); }
.auth-card .flash { margin: 20px 0 -4px; }

/* Páginas públicas */
.public-page {
  background:
    radial-gradient(circle at 93% -6%, rgba(44,127,195,.55), transparent 19rem),
    radial-gradient(circle at 6% 38%, rgba(231,27,126,.26), transparent 17rem),
    linear-gradient(150deg, #260331 0, #5c068c 42%, #3c237d 61%, var(--paper) 61%);
}
.public-shell { max-width: 1020px; margin: auto; padding: 36px 25px 76px; }
.public-brand { display: flex; align-items: center; gap: 11px; margin-bottom: 48px; color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .14em; }
.public-brand .brand-mark { width: 42px; height: 42px; }
.public-brand b { color: #ffadd1; }
.public-hero { max-width: 680px; margin-bottom: 45px; color: #fff; }
.public-hero .eyebrow { color: #cbe8fb; }
.public-hero .eyebrow i { background: #75dfcf; }
.public-hero h1 { margin: 14px 0; color: #fff; font-size: clamp(36px, 6vw, 52px); line-height: 1.03; letter-spacing: -.075em; }
.public-hero p { max-width: 600px; margin: 0; color: rgba(255,255,255,.77); font-size: 15px; }
.public-section { margin-bottom: 25px; }
.public-hero + .split-grid { padding-top: 20px; }
.public-section .section-heading { margin: 0 0 13px; }
.public-section h2 { margin: 0; color: var(--brand-purple-dark); font: 800 23px/1.2 'Manrope', Arial, sans-serif; letter-spacing: -.05em; }
.public-page .public-section:not(.public-daily-card) {
  margin-bottom: 24px;
  padding: 24px;
  background: rgba(255,255,255,.98);
  border: 2px solid #d7cce3;
  border-radius: 22px;
  box-shadow: 0 16px 34px rgba(48, 20, 71, .09);
}
.public-page .public-section:not(.public-daily-card) h2 {
  color: #2b0b40;
  font-size: clamp(25px, 3vw, 31px);
  font-weight: 800;
  line-height: 1.12;
  text-shadow: 0 1px 0 rgba(255,255,255,.75);
}
.public-page .public-section:not(.public-daily-card) .section-heading {
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e2dbea;
}
.public-page .public-section:not(.public-daily-card) .muted {
  color: #4d5665;
  font-size: 13px;
}
.public-daily-card { margin: 0; padding: 23px; background: rgba(255,255,255,.97); border: 1px solid rgba(255,255,255,.82); border-radius: var(--radius-md); box-shadow: 0 18px 36px rgba(40,8,61,.15); }
.public-daily-card > .section-heading > span { padding: 6px 10px; color: var(--brand-purple); background: #eee7fb; border-radius: 999px; font-size: 10px; font-weight: 800; }
.assignment-list { display: grid; gap: 10px; }
.assignment-card { display: grid; grid-template-columns: 220px 185px minmax(0,1fr); gap: 14px; padding: 17px; background: #fff; border: 2px solid #ddd6e7; border-radius: 16px; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.assignment-card:hover { border-color: #b99bd4; box-shadow: 0 13px 28px rgba(62,20,81,.12); transform: translateY(-2px); }
.public-daily-card .assignment-card {
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  align-items: center;
  min-width: 0;
}
.public-daily-card .assignment-duty,
.public-daily-card .colleagues {
  min-width: 0;
}
.public-daily-card .assignment-duty { overflow-wrap: anywhere; }
.public-daily-card .colleagues {
  overflow: hidden;
  padding-left: 16px;
}
.public-daily-card .colleagues span {
  display: block;
  overflow-wrap: anywhere;
  color: #505968;
  font-size: 10px;
  line-height: 1.35;
}
.public-daily-card .colleagues p {
  min-width: 0;
  margin: 6px 0 0;
  overflow-wrap: anywhere;
}
.public-daily-card .colleagues p strong {
  display: inline;
  color: #2f1246;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.assignment-date { display: grid; gap: 5px; }
.assignment-date strong { font-size: 12px; }
.assignment-duty { align-self: center; }
.colleagues { padding-left: 15px; border-left: 1px solid var(--line); }
.colleagues span { color: var(--ink-soft); font-size: 9px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.colleagues p { margin: 4px 0; font-size: 11px; }
.colleagues small { color: var(--ink-soft); }

/* Mural e impressão */
.print-layout { padding: 26px; background: #fff; }
.print-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 17px; padding-bottom: 13px; border-bottom: 2px solid var(--brand-purple); }
.print-head h1 { margin: 5px 0; color: var(--brand-purple-dark); font-size: 30px; line-height: 1.08; letter-spacing: -.06em; }
.print-head p { margin: 0; color: var(--ink-soft); font-size: 10px; }
.print-compact-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 7px; }
.print-day-card { min-width: 0; padding: 8px 9px; background: #fbfcff; border: 1px solid #d9dfe9; border-radius: 9px; }
.print-day-card.is-holiday { background: #fff3f7; border-color: #e2a9bd; }
.print-day-card header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 5px; padding-bottom: 4px; border-bottom: 1px solid #e2e5ed; }
.print-day-card header strong { color: var(--brand-purple); font-size: 13px; }
.print-day-card header span { color: var(--ink-soft); font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.print-day-card p { display: grid; grid-template-columns: 15px minmax(0,1fr); align-items: baseline; gap: 6px; margin: 3px 0; font-size: 10.5px; line-height: 1.28; }
.print-day-card p b { color: var(--brand-purple); font-size: 9.5px; }
.print-day-card p span { overflow-wrap: anywhere; }
.copy-link.copied { color: var(--success); }
.no-print { display: inline-flex; }
.mural-page { min-height: 100vh; color: #111; background: #fff; }
.mural-shell { max-width: 1240px; margin: 0 auto; }
.mural-actions { display: flex; gap: 8px; }
.mural-grid .print-day-card { background: #fff; border: 1.5px solid #1b1b1b; border-radius: 3px; }
.mural-grid .print-day-card.is-holiday { background: #fff0f4; border-color: #8b1641; }
.mural-grid .print-day-card header { border-color: #5a5a5a; }
.mural-grid .print-day-card header strong,
.mural-grid .print-day-card p b { color: #111; }
.mural-grid .print-day-card p { color: #111; font-weight: 600; }

/* Responsividade */
@media (max-width: 1120px) {
  .app-shell { grid-template-columns: 244px minmax(0,1fr); }
  .main-content { padding-right: 28px; padding-left: 28px; }
  .manual-fields { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .manual-notes { grid-column: auto; }
  .assignment-card { grid-template-columns: 180px 165px minmax(0,1fr); }
}

@media (max-width: 900px) {
  .app-shell { display: block; }
  .sidebar { position: relative; height: auto; min-height: 0; padding: 18px 16px 16px; border-radius: 0 0 24px 24px; }
  .brand { margin-bottom: 22px; }
  .sidebar nav { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .sidebar nav a { justify-content: center; min-height: 42px; padding: 9px 7px; font-size: 11px; text-align: center; }
  .sidebar nav a b { display: none; }
  .sidebar-footer { display: none; }
  .main-content { padding: 25px 20px 58px; }
  .metrics,
  .split-grid,
  .people-layout,
  .settings-grid { grid-template-columns: 1fr; }
  .topbar { margin-bottom: 24px; }
  .schedule-hero { align-items: flex-start; flex-direction: column; }
  .assignment-card { grid-template-columns: 1fr; }
  .public-daily-card .assignment-card { grid-template-columns: 1fr; gap: 13px; }
  .colleagues,
  .public-daily-card .colleagues { padding-top: 11px; padding-left: 0; border-top: 1px solid var(--line); border-left: 0; }
  .public-daily-card .colleagues p strong { font-size: 14px; }
  .inline-form,
  .entry-form { display: grid; grid-template-columns: 1fr 1fr; align-items: stretch; }
  .inline-form .btn,
  .entry-form .btn { grid-column: 1 / -1; }
  .compact-list > a,
  .compact-list > div { grid-template-columns: 1fr auto; }
  .compact-list strong { grid-row: 2; }
  .compact-list em { grid-column: 2; grid-row: 1; }
  .message-hero { flex-direction: column; }
  .message-token-guide { max-width: none; width: 100%; }
  .public-shell { padding: 29px 18px 58px; }
  .public-brand { margin-bottom: 37px; }
  .public-hero { margin-bottom: 35px; }
}

@media (max-width: 600px) {
  .sidebar nav { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .main-content { padding: 20px 14px 48px; }
  .topbar { align-items: flex-start; padding-bottom: 17px; }
  .topbar h1 { font-size: 27px; }
  .profile-chip { width: 42px; height: 42px; border-radius: 14px; }
  .panel { padding: 20px; border-radius: 18px; }
  .metrics { gap: 11px; }
  .metrics article { min-height: 130px; padding: 19px; }
  .metrics strong { margin-top: 13px; font-size: 34px; }
  .two-columns,
  .inline-form,
  .entry-form,
  .manual-fields { grid-template-columns: 1fr; }
  .manual-fields label { min-width: 0; }
  .manual-allocation-body { padding: 17px; }
  .manual-confirm-form { display: grid; align-items: stretch; }
  .manual-confirm-form .btn { width: 100%; }
  .schedule-hero { padding: 23px; }
  .schedule-hero h2 { font-size: 26px; }
  .schedule-hero-actions { width: 100%; }
  .schedule-hero-actions > * { flex: 1; }
  .schedule-hero-actions .btn { width: 100%; }
  .row-actions { grid-column: 2; }
  .people-list article { grid-template-columns: 40px minmax(0,1fr); }
  .calendar-day { min-height: 61px; padding: 6px; }
  .calendar-day span { font-size: 8px; }
  .print-layout { padding: 0; }
  .print-head { align-items: flex-start; flex-direction: column; gap: 12px; }
  .print-head h1 { font-size: 24px; }
  .print-compact-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .public-page { background: linear-gradient(154deg, #260331 0, #5c068c 30%, #3c237d 39%, var(--paper) 39%); }
  .public-brand { margin-bottom: 31px; }
  .public-hero h1 { font-size: 39px; }
  .public-hero p { font-size: 13px; }
  .public-daily-card { padding: 17px; }
  .public-daily-card > .section-heading { align-items: flex-start; }
  .public-page .public-section:not(.public-daily-card) { padding: 18px 16px; border-width: 2px; border-radius: 19px; }
  .public-page .public-section:not(.public-daily-card) .section-heading { padding-bottom: 13px; }
  .public-page .public-section:not(.public-daily-card) h2 { font-size: 25px; }
  .assignment-card { padding: 14px; border-width: 2px; }
  .auth-page { padding: 15px; }
  .auth-card { padding: 28px 22px; border-radius: 22px; }
  .auth-card h1 { font-size: 29px; }
}

@media (max-width: 700px) and (orientation: portrait) {
  .mural-shell { padding: 16px; }
  .mural-grid { grid-template-columns: 1fr; }
  .mural-grid .print-day-card { padding: 12px; }
}

/* Departamento Pessoal */
.dp-calendar .calendar-day { min-height: 118px; align-items: stretch; justify-content: flex-start; gap: 6px; }
.dp-calendar .calendar-day.holiday { background: #fff7d6; border: 2px solid #a855f7; box-shadow: inset 0 0 0 1px #fff1a8; }
.dp-holiday-label { display: block; width: 100%; padding: 6px 7px; border-radius: 6px; background: #eadbff; color: #5b1a91; border: 2px solid #a855f7; font-size: 11px; font-weight: 900; line-height: 1.2; overflow-wrap: anywhere; text-align: center; }
.dp-event { display: block; width: 100%; padding: 5px 6px; border-radius: 7px; background: #eef3ff; color: #243b6b; font-size: 11px; line-height: 1.25; }
.dp-event.sobreaviso { background: #edf8f1; color: #1f5b3a; }
.dp-event.sobreaviso.infraestrutura { background: #fff0dc; color: #9a4f00; }
.dp-event.substituicao-ativa { background: #b9d8ff; color: #073b82; border: 3px solid #5b1a91; box-shadow: 0 0 0 2px #e7f1ff, 0 2px 6px rgba(23, 105, 210, .35); font-weight: 700; }
.dp-event small { font-size: 10px; }
.status.admin { color: #4d267f; background: #e9defd; }
.status.dp { color: #176143; background: #dff4ec; }
.status.user { color: #36506c; background: #e8eef5; }
@media (max-width: 900px) { .dp-calendar .calendar-day { min-height: 92px; } .dp-event { font-size: 10px; } }

@media print {
  html, body { background: #fff !important; }
  .sidebar,
  .topbar,
  .flash,
  .manual-allocation,
  .no-print { display: none !important; }
  .app-shell { display: block; min-height: 0; }
  .main-content { max-width: none; padding: 0; }
  .panel { box-shadow: none; }
  .print-layout { padding: 0; }
  .print-head { margin-bottom: 9px; padding-bottom: 7px; }
  .print-head h1 { font-size: 22px; }
  .print-compact-grid { grid-template-columns: repeat(4, minmax(0,1fr)); gap: 4px; }
  .print-day-card { padding: 5px 6px; border-radius: 4px; }
  .print-day-card header { margin-bottom: 2px; padding-bottom: 2px; }
  .print-day-card header strong { font-size: 10px; }
  .print-day-card header span { font-size: 7px; }
  .print-day-card p { gap: 3px; margin: 2px 0; font-size: 8px; }
  .print-day-card p b { font-size: 7px; }
  @page { size: A4 landscape; margin: 9mm; }
}
