:root {
  --bg: #0b1220;
  --bg-soft: #101a2c;
  --panel: rgba(17, 27, 40, 0.88);
  --panel-strong: rgba(15, 24, 36, 0.96);
  --card-top: rgba(255, 255, 255, 0.06);
  --text: #e8eef6;
  --muted: #9eb0c7;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.18);
  --accent: #71d3c8;
  --accent-2: #7aa8ff;
  --good: #65d18a;
  --warn: #f4bf4f;
  --bad: #f07178;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
  --radius: 18px;
  --radius-sm: 12px;
  --input-bg: rgba(255, 255, 255, 0.04);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background:
    radial-gradient(circle at top, rgba(122, 168, 255, 0.12), transparent 30%),
    radial-gradient(circle at left, rgba(113, 211, 200, 0.1), transparent 25%),
    linear-gradient(180deg, #09111d, #0c1422 55%, #0b1220);
  color: var(--text);
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  min-height: 100%;
}

body {
  min-height: 100vh;
}

.hidden {
  display: none !important;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.shell {
  max-width: 1500px;
  margin: 0 auto;
  padding: 24px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 72px;
  padding: 10px 24px;
  border-bottom: 1px solid var(--border);
  background: rgba(8, 14, 21, 0.8);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 20;
  overflow: visible;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-wide {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 1100px;
}

.brand-stacked {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 0;
  padding: 0;
  overflow: visible;
}

.brand-logo {
  width: 42px;
  height: 42px;
  object-fit: contain;
  border-radius: 12px;
  flex: 0 0 auto;
}

.brand-logo-wide {
  width: 120px;
  height: 60px;
  border-radius: 14px;
  object-fit: contain;
}

.brand-logo-hero {
  width: 340px;
  height: 74px;
  max-width: none;
  object-fit: contain;
  display: block;
  margin: -4px 0;
}

.brand-text {
  min-width: 0;
}

.brand-text-under {
  padding-left: 8px;
}

.brand-subtitle {
  font-size: 13px;
  letter-spacing: 0.4px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.card,
.task-card,
.summary-box,
.modal,
.day-col,
.admin-region-card {
  background:
    linear-gradient(180deg, var(--card-top), rgba(255, 255, 255, 0.03)),
    linear-gradient(180deg, rgba(18, 28, 39, 0.92), rgba(14, 22, 32, 0.94));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.card,
.summary-box,
.admin-region-card,
.day-col {
  padding: 16px;
}

.hero {
  max-width: 780px;
  margin: 40px auto 0;
  padding: 28px;
}

.hero h1 {
  margin: 0 0 10px;
  font-size: 32px;
  line-height: 1.1;
}

.hero p {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.5;
}

.section-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
}

.task-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
}

.task-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.label {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.input,
textarea,
select {
  width: 100%;
  background: var(--input-bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 11px 12px;
  font: inherit;
  outline: none;
}

.input:focus,
textarea:focus,
select:focus {
  border-color: rgba(113, 211, 200, 0.55);
  box-shadow: 0 0 0 3px rgba(113, 211, 200, 0.14);
}

textarea {
  resize: vertical;
  min-height: 110px;
}

.btn {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border-radius: 12px;
  padding: 10px 14px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.btn:hover {
  transform: translateY(-1px);
  border-color: var(--border-strong);
}

.btn:focus-visible {
  outline: 2px solid rgba(113, 211, 200, 0.55);
  outline-offset: 2px;
}

.btn-primary {
  background: linear-gradient(180deg, rgba(113, 211, 200, 0.28), rgba(113, 211, 200, 0.15));
  border-color: rgba(113, 211, 200, 0.4);
}

.btn-secondary {
  background: linear-gradient(180deg, rgba(122, 168, 255, 0.22), rgba(122, 168, 255, 0.12));
  border-color: rgba(122, 168, 255, 0.38);
}

.btn-danger {
  background: linear-gradient(180deg, rgba(240, 113, 120, 0.22), rgba(240, 113, 120, 0.12));
  border-color: rgba(240, 113, 120, 0.32);
}

.btn-good {
  background: linear-gradient(180deg, rgba(101, 209, 138, 0.22), rgba(101, 209, 138, 0.12));
  border-color: rgba(101, 209, 138, 0.34);
}

.pill,
.assignment-pill,
.completed-by-pill,
.overdue-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.pill {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
}

.assignment-pill {
  background: rgba(122, 168, 255, 0.14);
  border: 1px solid rgba(122, 168, 255, 0.26);
  color: #d8e4ff;
}

.completed-by-pill {
  background: rgba(101, 209, 138, 0.16);
  border: 1px solid rgba(101, 209, 138, 0.3);
  color: #dff7e7;
}

.overdue-pill {
  background: rgba(240, 113, 120, 0.16);
  border: 1px solid rgba(240, 113, 120, 0.32);
  color: #ffdce0;
}

.task-card-button,
.profile-card-button {
  cursor: pointer;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}

.task-card-button:hover,
.profile-card-button:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.2);
}

.task-card-button:focus-visible,
.profile-card-button:focus-visible {
  outline: 2px solid rgba(113, 211, 200, 0.55);
  outline-offset: 2px;
}

.task-card {
  padding: 14px;
}

.task-card.compact {
  padding: 12px;
}

.priority-low {
  border-color: rgba(113, 211, 200, 0.2);
}

.priority-medium {
  border-color: rgba(122, 168, 255, 0.22);
}

.priority-high {
  border-color: rgba(244, 191, 79, 0.28);
}

.priority-critical {
  border-color: rgba(240, 113, 120, 0.34);
}

.compliant {
  box-shadow:
    var(--shadow),
    0 0 0 1px rgba(101, 209, 138, 0.18) inset;
}

.overlap-card {
  border-style: dashed;
}

.reference-card {
  background:
    linear-gradient(180deg, rgba(122, 168, 255, 0.08), rgba(255, 255, 255, 0.02)),
    linear-gradient(180deg, rgba(18, 28, 39, 0.92), rgba(14, 22, 32, 0.94));
}

.external-assignment {
  border-color: rgba(122, 168, 255, 0.28);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.row.wrap {
  flex-wrap: wrap;
}

.row-spread {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.gap-sm {
  gap: 8px;
}

.gap-md {
  gap: 14px;
}

.gap-lg {
  gap: 22px;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 13px;
}

.tiny {
  font-size: 12px;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
}

.summary-card {
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.summary-card.glass {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.03)),
    linear-gradient(180deg, rgba(20, 30, 44, 0.9), rgba(14, 22, 32, 0.96));
}

.summary-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.summary-value {
  margin-top: 8px;
  font-size: 28px;
  font-weight: 800;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 14px;
}

.day-col {
  min-height: 240px;
}

.day-col.today {
  border-color: rgba(113, 211, 200, 0.36);
  box-shadow:
    var(--shadow),
    0 0 0 1px rgba(113, 211, 200, 0.16) inset;
}

.day-head {
  margin-bottom: 14px;
}

.day-title {
  font-size: 15px;
  font-weight: 800;
}

.day-sub {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

.day-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.task-sites {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.site-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 700;
}

.site-chip.done {
  background: rgba(101, 209, 138, 0.15);
  border-color: rgba(101, 209, 138, 0.28);
}

.site-chip.overdue {
  background: rgba(240, 113, 120, 0.15);
  border-color: rgba(240, 113, 120, 0.3);
}

.broadcast-strip {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.empty-state {
  padding: 18px;
  border-radius: 14px;
  border: 1px dashed var(--border);
  color: var(--muted);
  text-align: center;
}

.check-row,
.list-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.subtle {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02)),
    linear-gradient(180deg, rgba(18, 28, 39, 0.76), rgba(14, 22, 32, 0.84));
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.checkbox-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  cursor: pointer;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.requirement-row {
  display: grid;
  grid-template-columns: 1.6fr 1fr auto;
  gap: 12px;
  align-items: end;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
}

.supporting-content-block,
.task-notes-block,
.supporting-file-block {
  padding: 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
}

.supporting-content-title {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
}

.task-support-html p {
  margin: 0 0 10px;
  line-height: 1.5;
}

.task-support-html p:last-child {
  margin-bottom: 0;
}

.task-support-html a {
  color: #8cb7ff;
  text-decoration: underline;
}

.preview-thumb {
  max-width: 140px;
  max-height: 140px;
  width: auto;
  height: auto;
  border-radius: 12px;
  display: block;
  border: 1px solid var(--border);
}

.preview-medium {
  max-width: 280px;
  max-height: 240px;
  width: auto;
  height: auto;
  border-radius: 14px;
  display: block;
  border: 1px solid var(--border);
}

.image-link {
  display: inline-block;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 13, 0.68);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 100;
}

.modal {
  width: min(980px, 100%);
  max-height: min(88vh, 1000px);
  overflow: auto;
  padding: 18px;
}

a {
  color: #8cb7ff;
}

details > summary {
  list-style: none;
}

details > summary::-webkit-details-marker {
  display: none;
}

@media (max-width: 1200px) {
  .calendar-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .brand-logo-hero {
    width: 260px;
    height: 64px;
  }
}

.admin-layout {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(0, 3fr);
  gap: 20px;
  align-items: start;
}

.admin-layout-left,
.admin-layout-right {
  min-width: 0;
}

.admin-site-row {
  align-items: center;
}

.admin-region-card {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.admin-site-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.admin-site-chip input[type="checkbox"] {
  margin: 0;
}

@media (max-width: 1200px) {
  .calendar-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .brand-logo-hero {
    width: 260px;
    height: 64px;
  }
}

@media (max-width: 980px) {
  .admin-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 780px) {
  .shell {
    padding: 16px;
  }

  .topbar {
    padding: 10px 16px;
  }

  .row-spread {
    align-items: flex-start;
    flex-direction: column;
  }

  .calendar-grid,
  .grid-3,
  .requirement-row {
    grid-template-columns: 1fr;
  }

  .brand-logo-hero {
    width: 200px;
    height: 56px;
  }

  .topbar-right {
    width: 100%;
    justify-content: flex-end;
  }
}