:root {
  --bg: #08111d;
  --surface-soft: rgba(255, 255, 255, 0.06);
  --surface-border: rgba(255, 255, 255, 0.08);
  --text: #edf3ff;
  --muted: #8fa4c2;
  --line: rgba(255, 255, 255, 0.08);
  --success-soft: rgba(72, 211, 154, 0.16);
  --warning-soft: rgba(255, 156, 84, 0.16);
  --danger-soft: rgba(255, 107, 107, 0.16);
  --shadow: 0 28px 80px rgba(1, 8, 20, 0.42);
  --radius: 28px;
  --scroll-track: rgba(255, 255, 255, 0.04);
  --scroll-thumb: linear-gradient(180deg, rgba(96, 137, 255, 0.86), rgba(94, 176, 255, 0.82));
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(85, 130, 255, 0.22), transparent 30%),
    radial-gradient(circle at top right, rgba(58, 160, 255, 0.16), transparent 24%),
    radial-gradient(circle at bottom left, rgba(56, 84, 189, 0.14), transparent 30%),
    linear-gradient(180deg, #0a1220 0%, #09111d 48%, #0c1726 100%);
  min-height: 100vh;
  scrollbar-width: thin;
  scrollbar-color: rgba(112, 151, 255, 0.9) rgba(255, 255, 255, 0.05);
}

*::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

*::-webkit-scrollbar-track {
  background: var(--scroll-track);
  border-radius: 999px;
}

*::-webkit-scrollbar-thumb {
  background: var(--scroll-thumb);
  border-radius: 999px;
  border: 2px solid rgba(6, 13, 24, 0.85);
}

*::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #7ca2ff, #67bbff);
}

body::before,
body::after {
  content: "";
  position: fixed;
  border-radius: 999px;
  filter: blur(70px);
  pointer-events: none;
  z-index: 0;
}

body::before {
  top: -8rem;
  left: -6rem;
  width: 18rem;
  height: 18rem;
  background: rgba(85, 130, 255, 0.18);
}

body::after {
  right: -5rem;
  bottom: 3rem;
  width: 14rem;
  height: 14rem;
  background: rgba(106, 213, 255, 0.14);
}

a {
  color: inherit;
  text-decoration: none;
}

code {
  color: #c6d8ff;
}

.page-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-frame {
  width: min(1380px, calc(100vw - 2rem));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  padding-top: 1rem;
  backdrop-filter: blur(18px);
}

.topbar {
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--surface-border);
  background: rgba(10, 18, 31, 0.76);
  box-shadow: var(--shadow);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.95rem;
  min-width: 0;
}

.brand-logo,
.footer-logo,
.auth-panel-logo {
  display: block;
  width: auto;
}

.brand-logo {
  height: 42px;
}

.brand-lockup {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.brand-kicker,
.panel-kicker,
.hero-note-label {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #a7bbe0;
}

.brand-text {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.topbar-form {
  margin: 0;
}

.page-main {
  flex: 1;
  padding: 1.35rem 0 1.5rem;
}

.site-footer {
  padding: 0 0 1rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--surface-border);
  background: rgba(10, 18, 30, 0.84);
  box-shadow: var(--shadow);
}

.footer-copy {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.footer-copy p {
  margin: 0;
  max-width: 38rem;
  color: var(--muted);
}

.footer-logo {
  height: 34px;
}

.footer-links {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.footer-link {
  padding: 0.7rem 1rem;
  border-radius: 999px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  color: #dce7ff;
  font-weight: 700;
}

.dashboard {
  display: grid;
  gap: 1.25rem;
}

.hero-card,
.metric,
.panel,
.auth-copy,
.auth-panel {
  border: 1px solid var(--surface-border);
  background: linear-gradient(180deg, rgba(18, 29, 45, 0.92), rgba(12, 21, 34, 0.92));
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
  border-radius: var(--radius);
}

.hero-card {
  padding: clamp(1.5rem, 2vw, 2.2rem);
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.95fr);
  gap: 1.5rem;
  align-items: start;
}

.hero-card h1,
.auth-copy h1 {
  margin: 0.85rem 0 0.9rem;
  font-size: clamp(2.2rem, 4vw, 4rem);
  line-height: 0.98;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.hero-card p,
.auth-copy p,
.panel-subtitle,
.section-head p,
.hero-note p,
.auth-panel-head p {
  margin: 0;
  color: var(--muted);
}

.hero-actions {
  margin-top: 1.25rem;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.hero-side {
  display: grid;
  gap: 0.9rem;
  align-content: start;
}

.hero-note,
.quick-item,
.auth-feature {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
}

.hero-note {
  padding: 1rem 1.1rem;
}

.hero-note strong {
  display: block;
  margin: 0.5rem 0 0.45rem;
  font-size: 1.1rem;
  line-height: 1.25;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.quick-item {
  padding: 1rem;
}

.quick-item span,
.metric span {
  display: block;
  color: #a2b6d6;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.quick-item strong {
  display: block;
  margin-top: 0.4rem;
  font-size: 1.15rem;
}

.eyebrow,
.live-badge,
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.48rem 0.82rem;
  border-radius: 999px;
  border: 1px solid rgba(85, 130, 255, 0.18);
  background: rgba(85, 130, 255, 0.12);
  color: #d6e2ff;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.metric {
  min-height: 142px;
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.metric strong {
  font-size: 2.3rem;
  line-height: 1;
  letter-spacing: -0.04em;
}

.metric-danger {
  background: linear-gradient(180deg, rgba(38, 24, 24, 0.92), rgba(28, 19, 25, 0.94));
}

.panel {
  min-height: 0;
  padding: 1.45rem;
}

.panel h2 {
  margin: 0.35rem 0 0.35rem;
  font-size: 1.25rem;
  font-weight: 800;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 1rem;
}

.table-meta {
  color: var(--muted);
  font-size: 0.92rem;
}

.portal-form p {
  margin-bottom: 1rem;
}

.portal-form label,
.auth-panel label {
  display: block;
  margin-bottom: 0.5rem;
  color: #dce7ff;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.portal-form input,
.portal-form select,
.portal-form textarea,
.auth-panel input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border-radius: 18px;
  padding: 0.95rem 1rem;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.portal-form .deadline-input,
.portal-form input[type="date"],
.portal-form input[type="datetime-local"] {
  font-weight: 700;
  letter-spacing: 0.02em;
  color-scheme: dark;
  padding-right: 3.1rem;
  border-color: rgba(95, 137, 255, 0.26);
  background:
    linear-gradient(180deg, rgba(31, 47, 71, 0.7), rgba(20, 33, 52, 0.82)),
    rgba(255, 255, 255, 0.05);
}

.portal-form .deadline-input:hover,
.portal-form input[type="date"]:hover,
.portal-form input[type="datetime-local"]:hover {
  border-color: rgba(116, 161, 255, 0.48);
}

.portal-form .deadline-input::-webkit-calendar-picker-indicator,
.portal-form input[type="date"]::-webkit-calendar-picker-indicator,
.portal-form input[type="datetime-local"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.9;
  padding: 0.3rem;
  border-radius: 10px;
  background: rgba(100, 146, 255, 0.28);
  filter: invert(92%) sepia(8%) saturate(1090%) hue-rotate(183deg) brightness(112%) contrast(105%);
  transition: transform 0.15s ease, opacity 0.15s ease, background-color 0.15s ease;
}

.portal-form .deadline-input::-webkit-calendar-picker-indicator:hover,
.portal-form input[type="date"]::-webkit-calendar-picker-indicator:hover,
.portal-form input[type="datetime-local"]::-webkit-calendar-picker-indicator:hover {
  transform: scale(1.04);
  opacity: 1;
  background: rgba(118, 166, 255, 0.35);
}

.portal-form input::placeholder,
.portal-form textarea::placeholder,
.auth-panel input::placeholder {
  color: rgba(220, 231, 255, 0.36);
}

.portal-form select option {
  background: #112033;
}

.portal-form textarea {
  min-height: 140px;
  resize: vertical;
}

.portal-form input:focus,
.portal-form select:focus,
.portal-form textarea:focus,
.auth-panel input:focus {
  border-color: rgba(85, 130, 255, 0.38);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 0 0 4px rgba(85, 130, 255, 0.12);
}

.portal-form .helptext {
  display: block;
  margin-top: 0.45rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.push-grid .push-form {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 0.2rem;
}

.push-grid .push-form .helptext {
  min-height: 3.3rem;
}

.push-grid .push-form .btn {
  margin-top: auto;
}

.push-grid .push-form select[multiple] {
  min-height: 260px;
}

.deadline-picker {
  position: relative;
  margin-top: 0.2rem;
}

.deadline-trigger {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.55rem;
  border-radius: 18px;
  border: 1px solid rgba(95, 137, 255, 0.26);
  background:
    linear-gradient(180deg, rgba(31, 47, 71, 0.7), rgba(20, 33, 52, 0.82)),
    rgba(255, 255, 255, 0.05);
  color: #edf3ff;
  padding: 0.95rem 1rem;
  font-size: 0.96rem;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.deadline-trigger:hover {
  border-color: rgba(116, 161, 255, 0.48);
}

.deadline-trigger:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(85, 130, 255, 0.12);
}

.deadline-trigger-icon {
  width: 1.45rem;
  text-align: center;
}

.deadline-popover {
  position: absolute;
  top: calc(100% + 0.55rem);
  left: 0;
  width: 100%;
  z-index: 40;
  padding: 0.9rem;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, rgba(22, 34, 52, 0.98), rgba(15, 25, 40, 0.98));
  box-shadow: 0 24px 48px rgba(2, 9, 21, 0.45);
  display: none;
}

.deadline-picker.is-open .deadline-popover {
  display: block;
}

.deadline-popover-label {
  display: block;
  margin-bottom: 0.35rem;
  color: #dce7ff;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.deadline-popover .deadline-date,
.deadline-popover .deadline-time {
  width: 100%;
  margin-bottom: 0.7rem;
}

.deadline-popover-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.portal-form ul.errorlist,
.auth-panel ul.errorlist {
  list-style: none;
  margin: 0 0 0.6rem;
  padding: 0;
  color: #ffb4ad;
  font-size: 0.92rem;
}

.muted,
.table-secondary {
  color: var(--muted);
}

.table-primary {
  font-weight: 700;
  color: #f2f6ff;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border-radius: 18px;
  padding: 0.84rem 1.1rem;
  font-weight: 700;
  border: 1px solid transparent;
  transition: transform 0.18s ease, opacity 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, #5582ff, #6997ff);
  color: #fff;
  box-shadow: 0 16px 32px rgba(85, 130, 255, 0.24);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.05);
  color: #edf3ff;
  border-color: rgba(255, 255, 255, 0.08);
}

.btn-danger-soft {
  background: var(--danger-soft);
  color: #ffc4be;
}

.btn-success-soft {
  background: var(--success-soft);
  color: #abffd9;
}

.btn-warning-soft {
  background: var(--warning-soft);
  color: #ffd0ac;
}

.btn-sm {
  padding: 0.55rem 0.9rem;
  border-radius: 14px;
  font-size: 0.88rem;
}

.alert {
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1rem 1.15rem;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.alert-danger {
  background: rgba(255, 107, 107, 0.12);
  color: #ffd1cb;
}

.alert-success {
  background: rgba(72, 211, 154, 0.14);
  color: #c4ffe5;
}

.alert-warning {
  background: rgba(255, 156, 84, 0.14);
  color: #ffe0c7;
}

.alert-info {
  background: rgba(85, 130, 255, 0.14);
  color: #d8e4ff;
}

.app-table {
  --bs-table-bg: transparent;
  --bs-table-striped-bg: transparent;
  --bs-table-color: var(--text);
  --bs-table-border-color: rgba(255, 255, 255, 0.08);
  margin-bottom: 0;
}

.app-table thead th {
  color: #9eb3d3;
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  border-bottom-width: 1px;
}

.app-table tbody td {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.table-responsive {
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.table-scroll {
  max-height: 420px;
  overflow: auto;
  scrollbar-gutter: stable both-edges;
}

.table-scroll::-webkit-scrollbar,
.portal-form textarea::-webkit-scrollbar,
.portal-form select[multiple]::-webkit-scrollbar {
  width: 10px;
}

.table-scroll::-webkit-scrollbar-track,
.portal-form textarea::-webkit-scrollbar-track,
.portal-form select[multiple]::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03);
}

.table-scroll::-webkit-scrollbar-thumb,
.portal-form textarea::-webkit-scrollbar-thumb,
.portal-form select[multiple]::-webkit-scrollbar-thumb {
  border-color: rgba(9, 17, 29, 0.9);
}

.compact-panel {
  padding: 1.2rem;
}

.access-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  padding: 0.9rem 1rem;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.55rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.68rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: #dce7ff;
  font-size: 0.76rem;
  font-weight: 700;
}

.status-pill {
  font-size: 0.72rem;
  padding: 0.42rem 0.72rem;
}

.status-active {
  background: rgba(72, 211, 154, 0.14);
  border-color: rgba(72, 211, 154, 0.22);
  color: #c8ffdf;
}

.status-overdue {
  background: rgba(255, 107, 107, 0.14);
  border-color: rgba(255, 107, 107, 0.22);
  color: #ffd0ca;
}

.status-closed {
  background: rgba(160, 174, 197, 0.12);
  border-color: rgba(160, 174, 197, 0.2);
  color: #d9e2f3;
}

.auth-stage {
  min-height: calc(100vh - 210px);
  display: grid;
  align-items: center;
}

.auth-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.85fr);
  gap: 1.25rem;
  align-items: stretch;
}

.auth-copy {
  padding: clamp(1.5rem, 3vw, 2.4rem);
}

.auth-feature-list {
  display: grid;
  gap: 0.9rem;
  margin-top: 1.5rem;
}

.auth-feature {
  padding: 1rem 1.1rem;
}

.auth-feature strong {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 1rem;
}

.auth-panel {
  padding: 1.55rem;
  align-self: center;
}

.auth-panel-logo {
  height: 42px;
  margin-bottom: 1rem;
}

.auth-panel-head {
  margin-bottom: 1.25rem;
}

.auth-panel-head h2 {
  margin: 0.8rem 0 0.45rem;
  font-size: 1.65rem;
  font-weight: 800;
}

@media (max-width: 991px) {
  .hero-card,
  .auth-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-card {
    gap: 1rem;
  }
}

@media (max-width: 767px) {
  .site-frame {
    width: min(1380px, calc(100vw - 1rem));
  }

  .site-header {
    padding-top: 0.5rem;
  }

  .topbar {
    padding: 1rem;
    border-radius: 22px;
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar-actions,
  .hero-actions,
  .footer-links {
    width: 100%;
    justify-content: flex-start;
  }

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

  .panel,
  .hero-card,
  .auth-copy,
  .auth-panel,
  .footer-inner {
    border-radius: 22px;
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .page-main {
    padding-top: 1rem;
  }
}
