:root {
  color-scheme: dark;
  --bg: #090b12;
  --surface: #111725;
  --surface-soft: rgba(255, 255, 255, 0.04);
  --text: #f2f5fb;
  --muted: #8fa1bc;
  --border: rgba(255, 255, 255, 0.08);
  --accent: #53c7ff;
  --accent-strong: #71d2ff;
  --danger: #ff6f6f;
  --success: #6ee2a5;
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: radial-gradient(circle at top left, rgba(83, 199, 255, 0.16), transparent 24%),
              radial-gradient(circle at bottom right, rgba(113, 94, 255, 0.14), transparent 18%),
              var(--bg);
  color: var(--text);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: none;
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1rem;
  min-height: 100vh;
  padding: 1rem;
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  background: rgba(17, 23, 37, 0.95);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.brand {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.side-nav nav {
  display: grid;
  gap: 0.9rem;
}

.side-nav a {
  display: block;
  padding: 0.9rem 1.1rem;
  border-radius: 16px;
  color: var(--muted);
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.side-nav a.active,
.side-nav a:hover {
  background: rgba(83, 199, 255, 0.12);
  color: var(--text);
}

.help-box {
  margin-top: auto;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 20px;
}

.help-box h3 {
  margin-top: 0;
  margin-bottom: 0.65rem;
  font-size: 1rem;
}

.main-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.3rem 1.5rem;
  border-radius: var(--radius);
  background: rgba(17, 23, 37, 0.95);
  border: 1px solid var(--border);
}

.top-bar h1 {
  margin: 0 0 0.4rem;
  font-size: clamp(1.8rem, 2vw, 2.4rem);
}

.top-bar p {
  margin: 0;
  color: var(--muted);
}

.section-panel {
  padding: 1.8rem;
  border-radius: var(--radius);
  background: rgba(17, 23, 37, 0.95);
  border: 1px solid var(--border);
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.eyebrow {
  margin: 0 0 0.55rem;
  color: var(--accent);
  font-size: 0.85rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.7rem, 2.5vw, 2.25rem);
}

.metrics-grid,
.report-grid {
  display: grid;
  gap: 1rem;
}

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

.metric-card,
.report-card,
.alert-card {
  padding: 1.3rem;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.metric-card h3,
.report-card h3 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  color: var(--accent);
}

.metric-card strong {
  display: block;
  font-size: 2rem;
}

.alert-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.alert-card p {
  margin: 0;
  color: var(--muted);
}

.task-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

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

.form-grid label {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  color: var(--text);
}

.form-grid label span {
  color: var(--danger);
}

input,
select,
textarea {
  width: 100%;
  padding: 0.95rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
}

textarea {
  resize: vertical;
}

.full-width {
  grid-column: 1 / -1;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.primary-button,
.secondary-button {
  padding: 0.95rem 1.6rem;
  border-radius: 999px;
  font-weight: 600;
}

.primary-button {
  background: linear-gradient(135deg, var(--accent), #7f8cff);
  color: #08101d;
}

.primary-button:hover {
  opacity: 0.95;
}

.secondary-button {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.table-filters {
  display: grid;
  grid-template-columns: 1fr repeat(3, minmax(140px, 1fr));
  gap: 0.9rem;
  width: 100%;
}

.table-filters input,
.table-filters select {
  min-width: 0;
}

.table-wrapper {
  overflow-x: auto;
}

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

th,
td {
  padding: 1rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

th {
  color: var(--muted);
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.task-name {
  max-width: 240px;
}

.task-priority,
.task-status {
  font-weight: 600;
}

.progress-chip {
  display: inline-flex;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: rgba(83, 199, 255, 0.12);
}

.progress-chip span {
  margin-left: 0.5rem;
}

.actions-col {
  min-width: 150px;
}

.action-button {
  margin-right: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
}

.action-button.delete {
  border-color: rgba(255, 111, 111, 0.25);
  color: #ff8a8a;
}

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

.calendar-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.calendar-card {
  padding: 1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.calendar-card h4 {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  color: var(--accent);
}

.calendar-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .form-grid,
.table-filters,
.report-grid {
    grid-template-columns: 1fr;
  }

  .top-bar {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 640px) {
  .app-shell {
    padding: 0.75rem;
  }

  th,
  td {
    padding: 0.85rem 0.7rem;
  }
}
