:root {
  --ink: #0e2921;
  --deep: #12484c;
  --teal: #2b7574;
  --ember: #861211;
  --mist: #e2e2e0;
  --paper: rgba(226, 226, 224, 0.86);
  --line: rgba(226, 226, 224, 0.18);
  --shadow: 0 30px 90px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--mist);
  background:
    radial-gradient(circle at 18% 12%, rgba(43, 117, 116, 0.36), transparent 28rem),
    radial-gradient(circle at 84% 22%, rgba(134, 18, 17, 0.22), transparent 24rem),
    linear-gradient(135deg, #081712 0%, var(--ink) 44%, #06110f 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}

a {
  color: inherit;
}

.ambient {
  position: fixed;
  z-index: -1;
  border-radius: 999px;
  filter: blur(12px);
  opacity: 0.7;
  pointer-events: none;
}

.ambient-one {
  width: 28rem;
  height: 28rem;
  left: -10rem;
  top: 20rem;
  background: rgba(43, 117, 116, 0.24);
  animation: drift 16s ease-in-out infinite;
}

.ambient-two {
  width: 22rem;
  height: 22rem;
  right: -8rem;
  top: 4rem;
  background: rgba(134, 18, 17, 0.18);
  animation: drift 18s ease-in-out infinite reverse;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(8, 23, 18, 0.72);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.navbar {
  padding: 1rem 0;
}

.brand-mark {
  display: inline-flex;
  gap: 0.7rem;
  align-items: center;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-glyph {
  display: inline-grid;
  width: 2.2rem;
  height: 2.2rem;
  place-items: center;
  color: var(--ink);
  background: var(--mist);
  border-radius: 0.65rem;
}

.nav-link {
  color: rgba(226, 226, 224, 0.78) !important;
}

.nav-link:hover,
.nav-link:focus {
  color: #fff !important;
}

.nav-action {
  padding: 0.5rem 0.75rem;
  text-decoration: none;
}

.page-shell {
  min-height: calc(100vh - 76px);
}

.btn {
  border-radius: 999px;
  font-weight: 750;
  letter-spacing: 0;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

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

.btn-primary-glow,
.btn-primary-soft {
  color: #fff;
  border: 1px solid rgba(226, 226, 224, 0.24);
  background: linear-gradient(135deg, var(--teal), var(--deep));
  box-shadow: 0 18px 42px rgba(43, 117, 116, 0.28);
}

.btn-primary-glow {
  padding: 0.85rem 1.35rem;
}

.btn-primary-soft {
  padding: 0.65rem 1rem;
}

.btn-ghost {
  padding: 0.85rem 1.35rem;
  color: var(--mist);
  border: 1px solid var(--line);
  background: rgba(226, 226, 224, 0.06);
}

.hero-section,
.auth-shell,
.workspace,
.settings-shell {
  padding-top: clamp(3rem, 8vw, 7rem);
  padding-bottom: 4rem;
}

.hero-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(20rem, 0.92fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}

.eyebrow {
  margin-bottom: 0.75rem;
  color: rgba(226, 226, 224, 0.64);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 12ch;
  margin-bottom: 1rem;
  color: #fff;
  font-size: clamp(3.2rem, 10vw, 7rem);
  font-weight: 850;
  line-height: 0.92;
}

h2 {
  color: #fff;
  font-size: clamp(1.4rem, 3vw, 2rem);
}

.hero-text,
.auth-art p,
.workspace-hero p,
.empty-state p,
.calm-panel p {
  max-width: 42rem;
  color: rgba(226, 226, 224, 0.76);
  font-size: 1.06rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

.dashboard-preview,
.auth-card,
.panel,
.metric-card {
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(226, 226, 224, 0.14), rgba(226, 226, 224, 0.045));
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
}

.dashboard-preview {
  min-height: 31rem;
  padding: 1rem;
  border-radius: 1.5rem;
  transform: perspective(1000px) rotateY(-8deg) rotateX(4deg);
}

.preview-header {
  display: flex;
  gap: 0.45rem;
  padding: 0.45rem 0.4rem 1rem;
}

.preview-header span {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 999px;
  background: rgba(226, 226, 224, 0.42);
}

.preview-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1rem;
}

.preview-panel {
  min-height: 9rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: rgba(14, 41, 33, 0.58);
}

.preview-panel.tall {
  grid-row: span 2;
  min-height: 19rem;
}

.preview-panel small,
.metric-card span,
.process-item span,
.panel-heading span {
  display: block;
  color: rgba(226, 226, 224, 0.6);
}

.preview-panel strong,
.metric-card strong,
.process-item strong {
  display: block;
  color: #fff;
}

.preview-panel strong {
  margin-top: 0.5rem;
  font-size: 1.35rem;
}

.progress-line,
.process-progress {
  height: 0.5rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(226, 226, 224, 0.12);
}

.progress-line {
  margin-top: 10rem;
}

.progress-line i,
.process-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--mist));
}

.preview-wave {
  grid-column: 1 / -1;
  height: 7rem;
  border: 1px solid rgba(226, 226, 224, 0.12);
  border-radius: 1rem;
  background:
    linear-gradient(135deg, transparent 0 28%, rgba(43, 117, 116, 0.42) 28% 36%, transparent 36%),
    linear-gradient(45deg, transparent 0 45%, rgba(134, 18, 17, 0.26) 45% 53%, transparent 53%),
    rgba(226, 226, 224, 0.055);
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(20rem, 28rem);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}

.auth-art h1,
.workspace-hero h1,
.section-title h1 {
  max-width: 16ch;
  font-size: clamp(2.5rem, 6vw, 4.8rem);
}

.auth-card,
.panel {
  border-radius: 1.25rem;
}

.auth-card {
  padding: clamp(1.4rem, 4vw, 2.2rem);
}

.form-stack {
  display: grid;
  gap: 0.7rem;
}

.form-stack label {
  color: rgba(226, 226, 224, 0.74);
  font-weight: 700;
}

.form-control {
  min-height: 3rem;
  color: #fff;
  border: 1px solid rgba(226, 226, 224, 0.16);
  border-radius: 0.85rem;
  background: rgba(8, 23, 18, 0.58);
}

.form-control:focus {
  color: #fff;
  border-color: rgba(43, 117, 116, 0.8);
  background: rgba(8, 23, 18, 0.72);
  box-shadow: 0 0 0 0.22rem rgba(43, 117, 116, 0.18);
}

.text-danger {
  color: #ffb4b2 !important;
}

.check-row {
  display: flex;
  gap: 0.65rem;
  align-items: center;
}

.check-row input {
  accent-color: var(--teal);
}

.form-footer {
  margin: 1rem 0 0;
  color: rgba(226, 226, 224, 0.7);
}

.form-footer a {
  color: #fff;
  font-weight: 800;
}

.workspace-hero {
  display: flex;
  gap: 1.5rem;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.metric-grid,
.content-grid {
  display: grid;
  gap: 1rem;
}

.metric-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 1rem;
}

.metric-card {
  padding: 1.25rem;
  border-radius: 1rem;
}

.metric-card strong {
  margin-top: 0.3rem;
  font-size: 2.6rem;
}

.content-grid {
  grid-template-columns: minmax(0, 1.35fr) minmax(18rem, 0.65fr);
}

.panel {
  padding: clamp(1.2rem, 3vw, 1.7rem);
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.empty-state {
  padding: 2rem;
  border: 1px dashed rgba(226, 226, 224, 0.24);
  border-radius: 1rem;
  background: rgba(14, 41, 33, 0.34);
}

.empty-state strong {
  display: block;
  margin-bottom: 0.4rem;
  color: #fff;
}

.process-list {
  display: grid;
  gap: 0.85rem;
}

.process-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 9rem;
  gap: 1rem;
  align-items: center;
  padding: 1rem;
  border: 1px solid rgba(226, 226, 224, 0.12);
  border-radius: 0.95rem;
  background: rgba(14, 41, 33, 0.38);
}

.calm-panel {
  position: relative;
  min-height: 18rem;
  overflow: hidden;
}

.pulse-orbit {
  position: absolute;
  right: -4rem;
  bottom: -4rem;
  width: 12rem;
  height: 12rem;
  border: 1px solid rgba(226, 226, 224, 0.18);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(43, 117, 116, 0.36), transparent 62%);
  animation: breathe 5s ease-in-out infinite;
}

.section-title {
  margin-bottom: 1.2rem;
}

.form-panel {
  max-width: 44rem;
}

.status-message {
  margin-bottom: 1rem;
  padding: 0.9rem 1rem;
  color: #fff;
  border: 1px solid rgba(43, 117, 116, 0.4);
  border-radius: 0.9rem;
  background: rgba(43, 117, 116, 0.18);
}

.form-panel-wide {
  max-width: 58rem;
}

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

.field-span-2 {
  grid-column: 1 / -1;
}

.form-grid > div {
  display: grid;
  gap: 0.45rem;
}

textarea.form-control {
  resize: vertical;
}

.form-range {
  min-height: 3rem;
  accent-color: var(--teal);
}

.form-actions,
.filter-actions,
.row-actions,
.compact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}

.form-actions {
  justify-content: flex-end;
  margin-top: 1rem;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(14rem, 1.5fr) repeat(3, minmax(10rem, 0.8fr)) auto;
  gap: 0.85rem;
  align-items: end;
  margin-bottom: 1rem;
}

.filter-bar label {
  display: block;
  margin-bottom: 0.4rem;
  color: rgba(226, 226, 224, 0.72);
  font-size: 0.86rem;
  font-weight: 700;
}

.filter-actions {
  flex-wrap: nowrap;
}

.table-panel {
  overflow: hidden;
}

.data-table {
  width: 100%;
  min-width: 68rem;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 0.9rem 0.75rem;
  border-bottom: 1px solid rgba(226, 226, 224, 0.1);
  vertical-align: middle;
}

.data-table th {
  color: rgba(226, 226, 224, 0.56);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

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

.table-title {
  color: #fff;
  font-weight: 750;
  text-decoration: none;
}

.table-title:hover {
  color: var(--mist);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.75rem;
  padding: 0.25rem 0.55rem;
  color: rgba(226, 226, 224, 0.84);
  border: 1px solid rgba(226, 226, 224, 0.14);
  border-radius: 0.4rem;
  background: rgba(226, 226, 224, 0.07);
  font-size: 0.78rem;
  white-space: nowrap;
}

.status-completed,
.reminder-sent {
  border-color: rgba(43, 117, 116, 0.55);
  background: rgba(43, 117, 116, 0.22);
}

.status-waiting,
.reminder-pending {
  border-color: rgba(226, 226, 224, 0.24);
}

.reminder-failed,
.danger-text {
  color: #ffb4b2;
}

.reminder-failed {
  border-color: rgba(134, 18, 17, 0.65);
  background: rgba(134, 18, 17, 0.22);
}

.inline-progress {
  display: grid;
  grid-template-columns: minmax(5rem, 1fr) auto;
  gap: 0.6rem;
  align-items: center;
  min-width: 8rem;
}

.inline-progress > span {
  color: rgba(226, 226, 224, 0.62);
  font-size: 0.8rem;
}

.btn-table {
  min-height: 2rem;
  padding: 0.35rem 0.6rem;
  color: var(--mist);
  border: 1px solid rgba(226, 226, 224, 0.15);
  border-radius: 0.45rem;
  background: rgba(226, 226, 224, 0.06);
  font-size: 0.78rem;
}

.btn-danger-soft {
  color: #ffcfcd;
  border-color: rgba(134, 18, 17, 0.52);
  background: rgba(134, 18, 17, 0.18);
}

.pagination-bar {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: center;
  padding-top: 1.25rem;
}

.pagination-bar span {
  color: rgba(226, 226, 224, 0.65);
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(20rem, 0.8fr);
  gap: 1rem;
}

.detail-progress {
  height: 0.7rem;
  margin-bottom: 1.4rem;
}

.detail-list {
  margin: 0;
}

.detail-list > div {
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(226, 226, 224, 0.1);
}

.detail-list > div:last-child {
  border-bottom: 0;
}

.detail-list dt {
  color: rgba(226, 226, 224, 0.58);
  font-weight: 600;
}

.detail-list dd {
  margin: 0;
  color: #fff;
  font-weight: 750;
  text-align: right;
}

.reminder-panel {
  margin-top: 1rem;
}

.reminder-list {
  display: grid;
  gap: 0.75rem;
}

.reminder-item,
.dashboard-row {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border-bottom: 1px solid rgba(226, 226, 224, 0.1);
}

.reminder-item:last-child,
.dashboard-row:last-child {
  border-bottom: 0;
}

.reminder-item strong {
  display: block;
  margin-top: 0.6rem;
  color: #fff;
}

.reminder-item p {
  max-width: 44rem;
  margin: 0.3rem 0 0;
  color: rgba(226, 226, 224, 0.62);
}

.reminder-meta {
  display: grid;
  flex: 0 0 auto;
  gap: 0.5rem;
  justify-items: end;
}

.reminder-meta time,
.dashboard-row time {
  color: rgba(226, 226, 224, 0.72);
  white-space: nowrap;
}

.reminder-meta small {
  max-width: 18rem;
  color: #ffb4b2;
}

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

.dashboard-section {
  min-width: 0;
}

.dashboard-wide {
  grid-column: 1 / -1;
}

.dashboard-section .panel-heading a {
  color: rgba(226, 226, 224, 0.72);
  font-weight: 700;
}

.compact-empty {
  padding: 1.25rem;
}

.process-link,
.dashboard-row {
  color: inherit;
  text-decoration: none;
  transition: border-color 180ms ease, background 180ms ease;
}

.process-link:hover,
.dashboard-row:hover {
  color: inherit;
  border-color: rgba(43, 117, 116, 0.45);
  background: rgba(43, 117, 116, 0.13);
}

.dashboard-row div {
  min-width: 0;
}

.dashboard-row strong,
.dashboard-row span {
  display: block;
}

.dashboard-row strong {
  overflow: hidden;
  color: #fff;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-row span {
  margin-top: 0.2rem;
  color: rgba(226, 226, 224, 0.56);
  font-size: 0.84rem;
}

.overdue-panel {
  border-color: rgba(134, 18, 17, 0.34);
}

.timora-toast {
  color: #fff;
  border: 1px solid rgba(226, 226, 224, 0.18);
  background: rgba(8, 23, 18, 0.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.toast-success {
  border-left: 4px solid var(--teal);
}

.toast-error {
  border-left: 4px solid var(--ember);
}

.is-loading {
  opacity: 0.78;
  pointer-events: none;
}

.reveal-up {
  animation: revealUp 700ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.delay-1 {
  animation-delay: 120ms;
}

.delay-2 {
  animation-delay: 220ms;
}

@keyframes revealUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

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

@keyframes drift {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }

  50% {
    transform: translate3d(2rem, -1.4rem, 0) scale(1.08);
  }
}

@keyframes breathe {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.8;
  }

  50% {
    transform: scale(1.12);
    opacity: 0.45;
  }
}

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

  .dashboard-preview {
    transform: none;
  }

  .workspace-hero {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .filter-search,
  .filter-actions {
    grid-column: 1 / -1;
  }

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

@media (max-width: 767px) {
  .hero-section,
  .auth-shell,
  .workspace,
  .settings-shell {
    padding-top: 2rem;
  }

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

  .preview-grid,
  .process-item {
    grid-template-columns: 1fr;
  }

  .process-progress {
    width: 100%;
  }

  .navbar-collapse {
    padding-top: 1rem;
  }

  .form-grid,
  .filter-bar,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .field-span-2,
  .filter-search,
  .filter-actions,
  .dashboard-wide {
    grid-column: auto;
  }

  .reminder-item,
  .dashboard-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .reminder-meta {
    width: 100%;
    justify-items: start;
  }

  .row-actions {
    width: 100%;
  }

  .compact-actions {
    margin-top: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
