:root {
  --bg: #07131f;
  --panel: #10243a;
  --muted: #a9bed5;
  --text: #f7fbff;
  --accent: #4ecca3;
  --danger: #ff6b6b;
  --line: rgba(255, 255, 255, .12);
  --app-bg: radial-gradient(circle at top left, rgba(78, 204, 163, .18), transparent 30%), linear-gradient(180deg, #081421, #07111d);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #07131f;
  background-image: var(--app-bg);
  background-repeat: no-repeat;
  background-size: cover;
}

body {
  margin: 0;
  min-height: 100dvh;
  color: var(--text);
  font-family: Trebuchet MS, Segoe UI, sans-serif;
  background: var(--app-bg);
  background-repeat: no-repeat;
  background-size: cover;
  line-height: 1.45;
}

body.login-page {
  overflow: hidden;
}

body.login-page .wrap {
  max-width: 100%;
  padding: 0;
}

.app-shell {
  position: relative;
  min-height: 100dvh;
  background: transparent;
}

.pull-refresh {
  position: fixed;
  top: calc(10px + env(safe-area-inset-top));
  left: 50%;
  z-index: 10001;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(78, 204, 163, .34);
  border-radius: 999px;
  background: rgba(12, 31, 49, .96);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .28);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -76px) scale(.92);
  transition: opacity .18s ease, transform .18s ease;
}

.pull-refresh-icon {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform: rotate(var(--pull-rotation, 0deg));
}

.pull-refresh.visible {
  opacity: 1;
}

.pull-refresh.refreshing .pull-refresh-icon {
  animation: spin .72s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

a {
  color: #77ffd1;
  text-decoration: none;
}

.wrap {
  max-width: 1160px;
  margin: 0 auto;
  padding: calc(16px + env(safe-area-inset-top)) calc(16px + env(safe-area-inset-right)) calc(56px + env(safe-area-inset-bottom)) calc(16px + env(safe-area-inset-left));
}

.banner {
  background: #b42323;
  color: white;
  text-align: center;
  font-weight: 800;
  padding: 12px;
}

.card {
  position: relative;
  background: linear-gradient(180deg, rgba(19, 43, 69, .82), rgba(12, 31, 49, .80));
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 20px;
  margin-bottom: 18px;
  box-shadow: 0 18px 55px rgba(0, 0, 0, .28), inset 0 1px 0 rgba(255, 255, 255, .06);
  backdrop-filter: blur(14px) saturate(125%);
  -webkit-backdrop-filter: blur(14px) saturate(125%);
  transition: transform .22s cubic-bezier(.22, .61, .36, 1), box-shadow .22s ease, border-color .22s ease;
  animation: cardIn .52s cubic-bezier(.22, .61, .36, 1) both;
}

.card:nth-of-type(1) { animation-delay: .02s; }
.card:nth-of-type(2) { animation-delay: .07s; }
.card:nth-of-type(3) { animation-delay: .12s; }
.card:nth-of-type(4) { animation-delay: .17s; }
.card:nth-of-type(5) { animation-delay: .22s; }
.card:nth-of-type(6) { animation-delay: .27s; }
.card:nth-of-type(7) { animation-delay: .32s; }
.card:nth-of-type(8) { animation-delay: .37s; }

@keyframes cardIn {
  from { opacity: 0; translate: 0 12px; }
  to { opacity: 1; translate: 0 0; }
}

.hero {
  border-color: rgba(78, 204, 163, .34);
}

h1,
h2,
h3 {
  margin: 0 0 10px;
}

p {
  margin: 0 0 10px;
}

.muted {
  color: var(--muted);
}

.msg {
  padding: 14px 16px;
  border: 1px solid rgba(78, 204, 163, .30);
  background: rgba(78, 204, 163, .12);
  border-radius: 16px;
  margin-bottom: 16px;
}

.msg-error {
  border-color: rgba(255, 107, 107, 0.40);
  background: rgba(255, 107, 107, 0.10);
  color: #ff8989;
}

.nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: grid;
  gap: 8px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-logo {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  object-fit: contain;
}

.logo {
  display: inline-grid;
  gap: 0;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0;
}

.logo-main {
  font-weight: 900;
  font-size: 1.08rem;
  color: #f7fbff;
}

.logo-sub {
  margin-top: 3px;
  font-size: .64rem;
  font-weight: 800;
  color: #4ecca3;
}

.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: .82rem;
  font-weight: 800;
  border: 1px solid var(--line);
}

.chip-user {
  background: rgba(78, 204, 163, .18);
  color: #baffea;
  border-color: rgba(78, 204, 163, .42);
}

.chip-role {
  background: rgba(99, 164, 255, .18);
  color: #cfe2ff;
  border-color: rgba(99, 164, 255, .42);
}

.chip-mode-remote {
  background: rgba(99, 164, 255, .18);
  color: #cfe2ff;
  border-color: rgba(99, 164, 255, .42);
}

.chip-pending {
  background: rgba(255, 200, 80, .18);
  color: #ffe9a0;
  border-color: rgba(255, 200, 80, .4);
}

.chip-skipped {
  background: rgba(169, 190, 213, 0.10);
  color: rgba(169, 190, 213, 0.75);
  border-color: rgba(169, 190, 213, 0.22);
}

.links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.nav-toggle,
.mobile-links {
  display: none;
}

.hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .05);
  cursor: pointer;
  list-style: none;
}

.hamburger span,
.hamburger span::before,
.hamburger span::after {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  content: "";
}

.hamburger span::before {
  transform: translateY(-7px);
}

.hamburger span::after {
  transform: translateY(5px);
}

.pill,
.btn,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  border: 1px solid var(--line);
  padding: 11px 14px;
  font-weight: 800;
  min-height: 44px;
  cursor: pointer;
  transition: transform .08s ease, opacity .08s ease;
}

.pill {
  background: rgba(255, 255, 255, .05);
  color: var(--text);
}

.pill.active {
  background: rgba(78, 204, 163, .22);
  border-color: rgba(78, 204, 163, .65);
  color: #baffea;
  box-shadow: inset 0 0 0 1px rgba(78, 204, 163, .18);
}

.btn,
button {
  background: linear-gradient(135deg, var(--accent), #39b28b);
  color: #072217;
}

.danger {
  background: linear-gradient(135deg, #ff8989, #ff5f73) !important;
  color: #30090d !important;
}

.alt {
  background: linear-gradient(135deg, #63a4ff, #3a78e0) !important;
  color: #071a38 !important;
}

.iconbtn {
  width: 28px;
  min-height: 28px;
  height: 28px;
  padding: 0;
  border-radius: 8px;
  font-size: .9rem;
  line-height: 1;
}

.inlineform {
  display: inline-flex;
  margin: 0;
}

.btn-ghost-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  border: 1px solid rgba(255, 107, 107, 0.45);
  padding: 11px 14px;
  font-weight: 800;
  min-height: 44px;
  cursor: pointer;
  background: rgba(255, 107, 107, 0.08);
  color: #ff8989;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.08s ease, opacity 0.08s ease;
}

.btn-ghost-danger:hover {
  background: rgba(255, 107, 107, 0.16);
  border-color: rgba(255, 107, 107, 0.7);
}

.btn-ghost-danger:active {
  transform: scale(0.97);
  opacity: 0.85;
}

.btn-ghost-neutral {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  border: 1px solid var(--line);
  padding: 11px 14px;
  font-weight: 800;
  min-height: 44px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.08s ease, opacity 0.08s ease;
}

.btn-ghost-neutral:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.22);
}

.btn-ghost-delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  min-height: 36px;
  height: 36px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid rgba(255, 107, 107, 0.30);
  background: rgba(255, 107, 107, 0.07);
  color: rgba(255, 107, 107, 0.70);
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.08s ease;
}

.btn-ghost-delete:hover {
  background: rgba(255, 107, 107, 0.14);
  border-color: rgba(255, 107, 107, 0.55);
  color: #ff8989;
}

.btn-ghost-delete:active {
  transform: scale(0.92);
  opacity: 0.80;
}

.btn-ghost-delete svg,
.btn-ghost-delete i {
  width: 15px;
  height: 15px;
}

.btn-ghost-load-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 14px;
  border: 1px solid var(--line);
  padding: 11px 24px;
  font-weight: 800;
  min-height: 44px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  transition: background 0.18s ease, transform 0.08s ease, opacity 0.08s ease;
  width: 100%;
}

.btn-ghost-load-more:active {
  transform: scale(0.97);
  opacity: 0.85;
}

.bottom-nav {
  display: none;
}

.bottom-nav-item {
  color: var(--muted);
  text-decoration: none;
}

.bottom-nav-item.active {
  color: var(--accent);
}

.bottom-nav-item.bottom-nav-logout {
  color: #ff8989;
}

.bottom-nav-icon {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  line-height: 1;
}

.bottom-nav-icon svg,
.bottom-nav-icon i {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bottom-nav-label {
  font-size: .68rem;
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
}

.detail-toggle-row {
  display: none;
}

.confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 10002;
  display: none;
  align-items: center;
  justify-content: center;
  padding: calc(18px + env(safe-area-inset-top)) calc(18px + env(safe-area-inset-right)) calc(18px + env(safe-area-inset-bottom)) calc(18px + env(safe-area-inset-left));
}

.confirm-modal.visible {
  display: flex;
}

.confirm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 8, 14, .72);
  backdrop-filter: blur(8px);
}

.confirm-dialog {
  position: relative;
  width: min(420px, 100%);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  background: linear-gradient(180deg, rgba(19, 43, 69, .98), rgba(12, 31, 49, .98));
  box-shadow: 0 24px 70px rgba(0, 0, 0, .44);
}

.confirm-dialog h2 {
  margin-bottom: 8px;
  font-size: 1.15rem;
}

.confirm-dialog p {
  color: var(--muted);
}

.confirm-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.grid,
.split,
.stats {
  display: grid;
  gap: 14px;
}

.split {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.split > * {
  min-width: 0;
}

.grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.stats {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

input,
select {
  width: 100%;
  min-height: 48px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(4, 15, 24, .42);
  color: var(--text);
  margin-top: 7px;
}

.scheduler-time-input {
  -webkit-appearance: none;
  appearance: none;
}

input[type="checkbox"] {
  width: 18px;
  min-height: 0;
  height: 18px;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  accent-color: var(--accent);
  flex: 0 0 auto;
}

label {
  font-weight: 800;
}

.check {
  display: flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  max-width: 100%;
  margin: 8px 0;
}

.checkrow {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.checkrow label {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.settings-preferences-split {
  align-items: stretch;
}

.settings-card-hint {
  margin-bottom: 14px;
  font-size: .9rem;
}

.ntfy-topic-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-top: 12px;
}

.ntfy-topic-row label {
  min-width: 0;
}

.ntfy-topic-row button {
  min-width: 174px;
  margin-top: 0;
  white-space: nowrap;
}

.office-day-picker {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.office-day-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 56px;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(4, 15, 24, .32);
  color: var(--text);
  font-size: .94rem;
  font-weight: 900;
  cursor: pointer;
  user-select: none;
  transition: background .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease, transform .08s ease;
}

.office-day-toggle input {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  margin: 0;
  padding: 0;
  opacity: 0;
  pointer-events: none;
}

.office-day-toggle:hover {
  border-color: rgba(78, 204, 163, .36);
  background: rgba(78, 204, 163, .08);
}

.office-day-toggle:active {
  transform: scale(.97);
}

.office-day-check {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 1px solid rgba(169, 190, 213, .42);
  border-radius: 6px;
  background: rgba(255, 255, 255, .05);
  color: #072217;
  flex: 0 0 18px;
}

.office-day-check::after {
  content: "";
  width: 8px;
  height: 5px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  opacity: 0;
  transform: rotate(-45deg) translate(1px, -1px);
}

.office-day-toggle input:checked ~ .office-day-check {
  border-color: rgba(78, 204, 163, .95);
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(78, 204, 163, .16);
}

.office-day-toggle input:checked ~ .office-day-check::after {
  opacity: 1;
}

.office-day-toggle:has(input:checked) {
  border-color: rgba(78, 204, 163, .58);
  background: rgba(78, 204, 163, .16);
  color: #d9fff1;
  box-shadow: inset 0 0 0 1px rgba(78, 204, 163, .13);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: .8rem;
  text-transform: uppercase;
}

.table {
  overflow: auto;
}

.table-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.table-action-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, .05);
  color: var(--text);
  font-weight: 800;
}

.table-action-link.danger-link {
  border-color: rgba(255, 107, 107, 0.35);
  background: rgba(255, 107, 107, 0.08);
  color: #ff8989;
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.stat {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, .04);
}

.stat b {
  display: block;
  font-size: 1.35rem;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.panel-head .actions {
  margin-top: 0;
  justify-content: flex-end;
}

.planning-actions button {
  height: 100%;
}

.planning-actions form {
  display: flex;
}

.btn:active,
button:active,
.pill:active,
.iconbtn:active,
a.pill:active {
  transform: scale(0.96);
  opacity: 0.82;
  transition: transform 0.08s ease, opacity 0.08s ease;
}

@keyframes loginCardIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.login-shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: calc(20px + env(safe-area-inset-top)) calc(16px + env(safe-area-inset-right)) calc(20px + env(safe-area-inset-bottom)) calc(16px + env(safe-area-inset-left));
  box-sizing: border-box;
}

.login-card {
  max-width: 480px;
  width: 100%;
  margin: 0 auto;
  margin-bottom: 0;
  animation: loginCardIn 0.38s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.login-card h1,
.login-card > .muted {
  text-align: center;
}

.login-logo-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.login-logo {
  width: 120px;
  height: 120px;
  object-fit: contain;
  filter: drop-shadow(0 0 18px rgba(78, 204, 163, 0.35));
}

.login-card label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--muted);
}

.input-eye-wrap {
  position: relative;
}

.input-eye-wrap input {
  padding-right: 48px;
}

.input-eye-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  min-height: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.18s ease;
  margin-top: 7px;
}

.input-eye-btn:hover {
  color: var(--text);
}

.input-eye-btn:active {
  transform: translateY(-50%) scale(0.92);
}

.pause-form-card {
  overflow: hidden;
  min-width: 0;
  width: 100%;
}

.pause-form-card form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

.pause-form-card label {
  display: block;
  width: 100%;
  min-width: 0;
}

.pause-form-card input[type="date"] {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}

.map-preview-wrap {
  margin-top: 18px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(78, 204, 163, .22);
  background: rgba(4, 15, 24, .55);
}

.map-preview-header {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  font-size: .82rem;
  font-weight: 800;
  color: var(--accent);
}

.map-pin-icon {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  stroke: var(--accent);
}

.map-click-hint {
  color: rgba(169, 190, 213, .65);
  font-size: .78rem;
  font-weight: 600;
}

.map-click-hint::before {
  content: "· ";
}

.map-container {
  position: relative;
  display: block;
  width: 100%;
  height: 240px;
}

.map-container .leaflet-layer,
.map-container .leaflet-tile-pane {
  filter: brightness(.98) saturate(.92);
}

.map-container::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 400;
  pointer-events: none;
  background: rgba(7, 19, 31, .04);
}

.leaflet-popup-content-wrapper {
  border: 1px solid rgba(78, 204, 163, .3) !important;
  border-radius: 10px !important;
  background: rgba(16, 36, 58, .97) !important;
  color: var(--text) !important;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .4) !important;
  font-family: Trebuchet MS, Segoe UI, sans-serif !important;
  font-size: .82rem !important;
}

.leaflet-popup-tip {
  background: rgba(16, 36, 58, .97) !important;
}

.leaflet-popup-close-button {
  color: var(--muted) !important;
}

.leaflet-control-zoom a {
  border-color: rgba(255, 255, 255, .14) !important;
  background: rgba(16, 36, 58, .95) !important;
  color: var(--text) !important;
}

.leaflet-control-zoom a:hover {
  background: rgba(78, 204, 163, .18) !important;
  color: var(--accent) !important;
}

.leaflet-control-attribution {
  background: rgba(7, 19, 31, .7) !important;
  color: rgba(169, 190, 213, .55) !important;
  font-size: .6rem !important;
}

.leaflet-control-attribution a {
  color: rgba(78, 204, 163, .7) !important;
}

.map-coords-readout {
  display: flex;
  gap: 20px;
  padding: 8px 14px;
  border-top: 1px solid rgba(255, 255, 255, .07);
  color: rgba(169, 190, 213, .7);
  font-size: .78rem;
  font-weight: 600;
}

.map-coords-readout b {
  color: var(--accent);
  font-weight: 800;
}

.calendar-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.calendar-panel-head {
  margin-bottom: 18px;
}

.calendar-mobile-mode {
  display: none;
}

.calendar-month-switcher {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 340px;
}

.calendar-month-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, .05);
  color: var(--text);
}

.calendar-month-arrow svg,
.calendar-month-arrow i {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}

.calendar-month-title {
  margin: 0;
  text-align: center;
}

.calendar-board {
  overflow-x: auto;
}

.calendar-weekdays,
.calendar-grid {
  min-width: 960px;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.calendar-weekday {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .04);
  color: var(--muted);
  font-size: .8rem;
  font-weight: 800;
  text-transform: uppercase;
  text-align: center;
}

.calendar-board-compact {
  display: none;
}

.calendar-day-compact,
.calendar-day-compact-empty {
  display: none;
}

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

.calendar-day {
  height: 188px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, .04);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.calendar-day.is-today {
  border-color: rgba(78, 204, 163, .65);
  box-shadow: inset 0 0 0 1px rgba(78, 204, 163, .24);
}

.calendar-day.is-weekend {
  background: rgba(255, 255, 255, .025);
}

.calendar-day.has-entries {
  background: linear-gradient(180deg, rgba(78, 204, 163, .10), rgba(255, 255, 255, .04));
}

.calendar-day.is-holiday {
  border-color: rgba(255, 200, 80, .44);
  box-shadow: inset 0 0 0 1px rgba(255, 200, 80, .12);
}

.calendar-day-empty {
  background: transparent;
  border-style: dashed;
  opacity: .35;
}

.calendar-day-head {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.calendar-day-number {
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1;
}

.calendar-day-window {
  margin: 0;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.calendar-day-holiday {
  align-self: flex-start;
  margin-bottom: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 200, 80, .36);
  background: rgba(255, 200, 80, .12);
  color: #ffe9a0;
  font-size: .68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.calendar-entry-list {
  display: grid;
  gap: 8px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  align-content: start;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.calendar-entry-list::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.calendar-entry {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 14px;
  background: rgba(4, 15, 24, .34);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  overflow: hidden;
}

.calendar-entry strong {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.15;
}

.calendar-entry-event {
  border-color: rgba(255, 107, 107, .38);
  background: rgba(255, 107, 107, .12);
  color: #ffd6d6;
}

.calendar-entry-event .calendar-entry-info-icon {
  color: #ffb3b3;
}

.calendar-entry-event strong {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: .72rem;
}

.calendar-entry-event-confirmed {
  border-color: rgba(255, 107, 107, .82);
  background: rgba(255, 107, 107, .92);
  color: #fff2f2;
}

.calendar-entry-event-confirmed .calendar-entry-info-icon {
  color: #fff2f2;
}

.calendar-entry-event-confirmed strong {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: .72rem;
}

.calendar-entry-presence-in {
  border-color: rgba(78, 204, 163, .46);
  background: rgba(78, 204, 163, .16);
  color: #d9fff1;
}

.calendar-entry-presence-in .calendar-entry-info-icon {
  color: #baffea;
}

.calendar-entry-presence-out {
  border-color: rgba(255, 200, 80, .42);
  background: rgba(255, 200, 80, .16);
  color: #fff0bf;
}

.calendar-entry-presence-out .calendar-entry-info-icon {
  color: #ffe9a0;
}

.calendar-entry-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.calendar-entry-info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  color: var(--muted);
}

.calendar-entry-info-icon svg,
.calendar-entry-info-icon i {
  width: 14px;
  height: 14px;
  stroke: currentColor;
}

.calendar-info-modal {
  position: fixed;
  inset: 0;
  z-index: 10003;
  display: none;
  align-items: center;
  justify-content: center;
  padding: calc(18px + env(safe-area-inset-top)) calc(18px + env(safe-area-inset-right)) calc(18px + env(safe-area-inset-bottom)) calc(18px + env(safe-area-inset-left));
}

.calendar-info-modal.visible {
  display: flex;
}

.calendar-info-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 8, 14, .72);
  backdrop-filter: blur(8px);
}

.calendar-info-dialog {
  position: relative;
  width: min(420px, 100%);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  background: linear-gradient(180deg, rgba(19, 43, 69, .98), rgba(12, 31, 49, .98));
  box-shadow: 0 24px 70px rgba(0, 0, 0, .44);
}

.calendar-info-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  width: 100%;
  min-height: 36px;
}

.calendar-info-head h2 {
  margin: 0;
  min-width: 0;
}

.calendar-info-close {
  width: 36px;
  min-width: 36px;
  min-height: 36px;
  height: 36px;
  padding: 0;
  border-radius: 999px;
  border: 0;
  background: transparent;
  color: var(--text);
  justify-self: end;
  align-self: start;
}

.calendar-info-close svg,
.calendar-info-close i {
  width: 16px;
  height: 16px;
  stroke: currentColor;
}

.calendar-info-body {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.calendar-info-row {
  display: grid;
  gap: 6px;
}

.calendar-info-row-address div {
  color: var(--text);
  font-size: .94rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.calendar-empty {
  margin-top: auto;
  margin-bottom: auto;
  font-size: .84rem;
}

@media (max-width: 800px) {
  .wrap {
    padding: calc(12px + env(safe-area-inset-top)) calc(12px + env(safe-area-inset-right)) calc(72px + env(safe-area-inset-bottom)) calc(12px + env(safe-area-inset-left));
  }

  .nav {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 10px;
  }

  .brand {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 8px 12px;
    max-width: 100%;
  }

  .brand .chips {
    justify-content: flex-end;
    max-width: 118px;
  }

  .brand .chip {
    padding: 5px 8px;
    font-size: .72rem;
  }

  .desktop-links {
    display: none;
  }

  .hamburger,
  .nav-toggle,
  .mobile-links {
    display: none;
  }

  .hamburger {
    grid-column: 2;
    grid-row: 1;
  }

  .mobile-links {
    grid-column: 1 / -1;
    grid-row: 2;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .nav-toggle:checked ~ .mobile-links {
    display: none;
  }

  .bottom-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-around;
    gap: 4px;
    padding: 6px 10px calc(6px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: rgba(10, 26, 42, 0.97);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    transform: translateZ(0);
    will-change: transform;
  }

  .bottom-nav-item {
    display: inline-flex;
    flex: 1 1 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-width: 44px;
    min-height: 56px;
    border-radius: 12px;
  }

  .bottom-nav-item:active {
    transform: scale(0.96);
    opacity: 0.82;
  }

  .links .pill,
  .btn,
  button:not(.btn-ghost-delete):not(.detail-toggle-btn):not(.input-eye-btn),
  .btn-ghost-danger {
    width: 100%;
  }

  .split {
    grid-template-columns: 1fr;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .office-day-picker {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 7px;
  }

  .office-day-toggle {
    min-height: 50px;
    padding: 9px 6px;
    border-radius: 14px;
    gap: 5px;
    font-size: .82rem;
  }

  .office-day-check {
    width: 16px;
    height: 16px;
    flex-basis: 16px;
    border-radius: 5px;
  }

  .ntfy-topic-row {
    grid-template-columns: 1fr;
  }

  .ntfy-topic-row button {
    min-width: 0;
    width: 100%;
  }

  .card {
    padding: 16px;
    border-radius: 18px;
  }

  .pause-form-card {
    overflow: hidden;
    min-width: 0;
    width: 100%;
  }

  .pause-form-card form {
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
  }

  .pause-form-card input {
    max-width: 100%;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
  }

  .pause-form-card input[type="date"] {
    max-width: 100%;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
  }

  .pause-form-card button,
  .pause-form-card .btn {
    width: 100%;
    box-sizing: border-box;
  }

  .map-container {
    height: 200px;
  }

  .map-click-hint {
    display: none;
  }

  .map-preview-header {
    padding: 9px 12px;
    font-size: .78rem;
  }

  .map-coords-readout {
    gap: 14px;
    padding: 7px 12px;
    font-size: .72rem;
  }

  .leaflet-control-zoom a {
    width: 34px !important;
    height: 34px !important;
    font-size: 18px !important;
    line-height: 34px !important;
  }

  .calendar-toolbar {
    grid-template-columns: 1fr;
  }

  .calendar-mobile-mode {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 14px;
  }

  .calendar-mobile-mode-button {
    min-height: 36px;
    padding: 8px 10px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, .05);
    color: var(--muted);
    font-size: .78rem;
    font-weight: 800;
  }

  .calendar-mobile-mode-button.is-active {
    background: rgba(78, 204, 163, .16);
    border-color: rgba(78, 204, 163, .44);
    color: #baffea;
  }

  .calendar-month-switcher {
    max-width: 100%;
  }

  .calendar-day {
    height: 188px;
  }

  .calendar-day-head {
    align-items: center;
    grid-template-columns: 26px minmax(0, 1fr);
    gap: 4px;
  }

  .calendar-day-window {
    font-size: .64rem;
    overflow: visible;
    text-overflow: clip;
  }

  .calendar-entry-event strong,
  .calendar-entry-event-confirmed strong {
    font-size: .62rem;
  }

  .calendar-board-compact[hidden],
  .calendar-board-detailed[hidden] {
    display: none;
  }

  .calendar-board-compact:not([hidden]) {
    display: block;
  }

  .calendar-weekdays-compact,
  .calendar-grid-compact {
    min-width: 0;
  }

  .calendar-weekdays-compact {
    gap: 4px;
    margin-bottom: 4px;
  }

  .calendar-weekday-compact {
    padding: 4px 0;
    border-radius: 8px;
    font-size: .54rem;
  }

  .calendar-grid-compact {
    gap: 4px;
  }

  .calendar-day-compact,
  .calendar-day-compact-empty {
    display: flex;
    flex-direction: column;
    min-height: 72px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(255, 255, 255, .04);
    overflow: hidden;
  }

  .calendar-day-compact.is-today {
    border-color: rgba(78, 204, 163, .65);
  }

  .calendar-day-compact.is-holiday {
    border-color: rgba(255, 200, 80, .44);
  }

  .calendar-day-compact-empty {
    opacity: .28;
    background: transparent;
    border-style: dashed;
  }

  .calendar-day-compact-head {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 3px;
  }

  .calendar-day-compact-number {
    font-size: .62rem;
    font-weight: 900;
    line-height: 1;
  }

  .calendar-day-compact-holiday {
    margin-bottom: 3px;
    padding: 1px 3px;
    border-radius: 4px;
    background: rgba(255, 200, 80, .12);
    color: #ffe9a0;
    font-size: .42rem;
    font-weight: 800;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .calendar-day-compact-list {
    display: grid;
    gap: 2px;
    align-content: start;
  }

  .calendar-entry-compact,
  .calendar-entry-compact-in,
  .calendar-entry-compact-out,
  .calendar-entry-compact-event,
  .calendar-entry-compact-event-confirmed {
    min-height: 12px;
    padding: 1px 3px;
    border-radius: 4px;
    font-size: .46rem;
    font-weight: 800;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .calendar-entry-compact {
    background: rgba(255, 255, 255, .08);
    color: var(--text);
  }

  .calendar-entry-compact-in {
    background: rgba(78, 204, 163, .18);
    color: #d9fff1;
  }

  .calendar-entry-compact-out {
    background: rgba(255, 200, 80, .18);
    color: #fff0bf;
  }

  .calendar-entry-compact-event {
    background: rgba(255, 107, 107, .12);
    color: #ffd6d6;
  }

  .calendar-entry-compact-event-confirmed {
    background: rgba(255, 107, 107, .92);
    color: #fff2f2;
  }

  table {
    min-width: 760px;
  }

  .schedule-table table,
  .mobile-card-table table {
    min-width: 0;
  }

  .schedule-table thead,
  .mobile-card-table thead {
    display: none;
  }

  .schedule-table tbody,
  .mobile-card-table tbody {
    display: grid;
    gap: 12px;
  }

  .schedule-table tr,
  .mobile-card-table tr {
    position: relative;
    display: block;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, .035);
  }

  .schedule-table tr {
    padding-right: 68px;
  }

  .schedule-table td,
  .mobile-card-table td {
    display: grid;
    grid-template-columns: minmax(80px, 32%) minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    padding: 8px 0;
    border-bottom: 1px solid var(--line);
    overflow-wrap: anywhere;
    font-size: 0.88rem;
    font-weight: 600;
  }

  .schedule-table td:last-child,
  .mobile-card-table td:last-child {
    border-bottom: 0;
  }

  .schedule-table td::before,
  .mobile-card-table td::before {
    content: attr(data-label);
    color: rgba(169, 190, 213, 0.65);
    font-size: .72rem;
    font-weight: 800;
    text-transform: uppercase;
  }

  .schedule-table td > *,
  .mobile-card-table td > * {
    font-weight: 600;
  }

  .schedule-table td[data-label="ELABORATA"],
  .mobile-card-table td[data-label="ELABORATA"],
  .schedule-table td[data-label="Elaborata"],
  .mobile-card-table td[data-label="Elaborata"] {
    /* nessuno stile speciale */
  }

  .schedule-table .inlineform,
  .mobile-card-table .inlineform {
    justify-self: start;
  }

  .mobile-card-table .iconbtn,
  .schedule-table .iconbtn {
    width: 44px;
    min-height: 44px;
    height: 44px;
    border-radius: 12px;
    font-size: 1.1rem;
  }

  .schedule-table td[data-label="AZIONI"],
  .mobile-card-table td[data-label="AZIONI"],
  .schedule-table td[data-label="Azioni"],
  .mobile-card-table td[data-label="Azioni"] {
    position: absolute;
    top: 10px;
    right: 12px;
    display: block;
    grid-template-columns: unset;
    padding: 0;
    border-bottom: 0;
  }

  .schedule-table td[data-label="AZIONI"]::before,
  .mobile-card-table td[data-label="AZIONI"]::before,
  .schedule-table td[data-label="Azioni"]::before,
  .mobile-card-table td[data-label="Azioni"]::before {
    display: none;
  }

  .schedule-table td.detail-row,
  .mobile-card-table td.detail-row {
    display: none;
  }

  .schedule-table td.detail-row.visible,
  .mobile-card-table td.detail-row.visible {
    display: grid;
  }

  .detail-toggle-row {
    display: block;
  }

  .detail-toggle-row td,
  td.detail-toggle-row {
    display: block;
    grid-template-columns: unset;
    padding: 6px 0 2px;
    border-bottom: 0;
  }

  .detail-toggle-row td::before,
  td.detail-toggle-row::before {
    display: none;
  }

  .detail-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    width: auto;
    min-height: unset;
    padding: 4px 0;
    border: none;
    border-radius: 0;
    background: transparent;
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
  }

  .panel-head {
    display: block;
  }

  .panel-head .actions {
    justify-content: stretch;
    margin-top: 12px;
  }

  .planning-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 14px;
  }

  .planning-actions.planning-actions-admin {
    grid-template-columns: 1fr;
  }

  .planning-actions form {
    min-width: 0;
  }

  .planning-actions button {
    min-width: 0;
    padding-inline: 8px;
  }

  .schedule-table tr.empty-row,
  .mobile-card-table tr.empty-row {
    display: block;
    padding-right: 12px;
    text-align: center;
  }

  .schedule-table tr.empty-row td,
  .mobile-card-table tr.empty-row td {
    display: block;
    padding: 12px 0;
    border-bottom: 0;
    text-align: center;
  }

  .schedule-table tr.empty-row td::before,
  .mobile-card-table tr.empty-row td::before {
    content: none;
  }

  .admin-users-table .table-actions {
    justify-content: flex-start;
  }

  .admin-users-table .table-action-link {
    min-height: 44px;
  }
}

#pepe-container {
  position: fixed;
  z-index: 99999;
  pointer-events: none;
  width: 130px;
  height: 130px;
}

#pepe-container.clickable {
  pointer-events: auto;
  cursor: pointer;
}

#pepe-guy {
  width: 130px;
  height: 130px;
  object-fit: contain;
  image-rendering: pixelated;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
  filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.55));
}

/* ===== Aurora background ===== */
body::before {
  content: "";
  position: fixed;
  inset: -25%;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(38% 38% at 18% 22%, rgba(78, 204, 163, .22), transparent 62%),
    radial-gradient(34% 34% at 82% 28%, rgba(99, 164, 255, .18), transparent 62%),
    radial-gradient(44% 44% at 62% 82%, rgba(78, 204, 163, .14), transparent 62%);
  filter: blur(34px);
  animation: aurora 28s ease-in-out infinite alternate;
}

@keyframes aurora {
  0% { transform: translate3d(-3%, -2%, 0) rotate(0deg) scale(1.05); }
  50% { transform: translate3d(3%, 2%, 0) rotate(6deg) scale(1.16); }
  100% { transform: translate3d(-2%, 3%, 0) rotate(-4deg) scale(1.09); }
}

/* ===== Custom scrollbar ===== */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(78, 204, 163, .45) transparent;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--accent), #39b28b);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #6fe7c0, #45c79c);
  background-clip: padding-box;
  border: 2px solid transparent;
}

/* ===== Live status chips (dashboard) ===== */
.schedule-table .chip-pending {
  animation: chipPulse 1.9s ease-in-out infinite;
}

.schedule-table .chip-pending i {
  animation: chipFade 1.9s ease-in-out infinite;
}

.schedule-table .chip-user {
  animation: chipPop .45s cubic-bezier(.22, 1.4, .5, 1) both;
}

@keyframes chipPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 200, 80, 0); }
  50% { box-shadow: 0 0 0 5px rgba(255, 200, 80, .12); }
}

@keyframes chipFade {
  0%, 100% { opacity: 1; }
  50% { opacity: .45; }
}

@keyframes chipPop {
  0% { opacity: 0; transform: scale(.7); }
  100% { opacity: 1; transform: scale(1); }
}

/* ===== Day timeline (dashboard) ===== */
.day-timeline {
  margin: 2px 0 18px;
  padding: 28px 16px 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, .03);
}

.dt-track {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .10) 0 1px, transparent 1px 11.1111%),
    linear-gradient(90deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .09));
}

.dt-lunch {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 44.44%;
  right: 44.44%;
  border-radius: 2px;
  background: repeating-linear-gradient(45deg, rgba(255, 255, 255, .10) 0 4px, rgba(255, 255, 255, .02) 4px 8px);
}

.dt-scale-lunch {
  color: rgba(169, 190, 213, .65);
}

.dt-elapsed {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  border-radius: 999px 0 0 999px;
  background: linear-gradient(90deg, rgba(78, 204, 163, .14), rgba(78, 204, 163, .06));
}

.dt-now {
  position: absolute;
  top: 50%;
  width: 2px;
  height: 22px;
  transform: translate(-50%, -50%);
  border-radius: 2px;
  background: var(--text);
  box-shadow: 0 0 9px rgba(247, 251, 255, .65);
}

.dt-now-label {
  position: absolute;
  top: -17px;
  left: 50%;
  transform: translateX(-50%);
  font-size: .64rem;
  font-weight: 800;
  white-space: nowrap;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.dt-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(99, 164, 255, .55), rgba(78, 204, 163, .55));
}

.dt-fill-done {
  background: linear-gradient(90deg, #63a4ff, var(--accent));
  box-shadow: 0 0 16px rgba(78, 204, 163, .35);
}

.dt-marker {
  position: absolute;
  top: 50%;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  border: 2px solid #0a1b2b;
}

.dt-in { background: #63a4ff; }
.dt-out { background: var(--accent); }

.dt-marker.is-done {
  box-shadow: 0 0 0 4px rgba(78, 204, 163, .22);
}

.dt-label {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  font-size: .7rem;
  font-weight: 800;
  white-space: nowrap;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.dt-scale {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: .66rem;
  font-weight: 700;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* ===== Toast ===== */
.toast-stack {
  position: fixed;
  top: calc(14px + env(safe-area-inset-top));
  right: calc(14px + env(safe-area-inset-right));
  z-index: 10050;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(92vw, 420px);
  padding: 13px 14px;
  border-radius: 16px;
  border: 1px solid rgba(78, 204, 163, .32);
  background: rgba(12, 31, 49, .9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: var(--text);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .42);
  transform: translateY(-16px);
  opacity: 0;
  transition: transform .32s cubic-bezier(.22, .61, .36, 1), opacity .32s ease;
}

.toast.toast-in { transform: translateY(0); opacity: 1; }
.toast.toast-out { transform: translateY(-16px); opacity: 0; }

.toast-error {
  border-color: rgba(255, 107, 107, .42);
  background: rgba(38, 16, 20, .9);
  color: #ff8989;
}

.toast-planning {
  border-color: rgba(99, 164, 255, .42);
  color: #cfe2ff;
}

.toast-planning .toast-icon i {
  animation: spin .9s linear infinite;
}

.toast-icon { display: inline-flex; flex: 0 0 auto; }
.toast-icon i { width: 18px; height: 18px; }

.toast-text {
  flex: 1;
  font-weight: 700;
  font-size: .92rem;
  line-height: 1.3;
}

.toast-close {
  all: unset;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  min-height: 26px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--muted);
  flex: 0 0 auto;
  transition: background .15s ease, color .15s ease;
}

.toast-close:hover { background: rgba(255, 255, 255, .08); color: var(--text); }
.toast-close i { width: 16px; height: 16px; }

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  .card,
  body::before,
  .schedule-table .chip-pending,
  .schedule-table .chip-pending i,
  .schedule-table .chip-user,
  .pull-refresh-icon {
    animation: none !important;
  }
}
