:root {
  --bg: #f6f7fb;
  --sidebar-bg: #fbfbfd;
  --card: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --muted-2: #9ca3af;
  --border: #e5e7eb;
  --border-strong: #d1d5db;
  --primary: #7c3aed;
  --primary-dark: #6d28d9;
  --primary-soft: #f3e8ff;
  --primary-soft-2: #faf5ff;
  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --success: #067647;
  --success-bg: #ecfdf3;
  --warning-bg: #fffaeb;
  --shadow: 0 18px 45px rgba(17, 24, 39, 0.08);
  --sidebar-shadow: 0 18px 50px rgba(17, 24, 39, 0.10);
  --radius: 18px;
  --radius-lg: 24px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(124, 58, 237, 0.10), transparent 32%),
    linear-gradient(135deg, #ffffff 0%, var(--bg) 42%, #ffffff 100%);
  color: var(--text);
  min-height: 100vh;
}

.app-shell {
  width: min(1500px, calc(100% - 32px));
  min-height: calc(100vh - 40px);
  margin: 20px auto;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 20px;
}

.sidebar {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(251, 251, 253, 0.96)),
    var(--sidebar-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--sidebar-shadow);
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 20px;
  height: calc(100vh - 40px);
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px 20px;
  border-bottom: 1px solid rgba(229, 231, 235, 0.75);
  margin-bottom: 18px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background:
    linear-gradient(135deg, #a78bfa 0%, #7c3aed 48%, #5b21b6 100%);
  color: #ffffff;
  display: grid;
  place-items: center;
  font-weight: 900;
  letter-spacing: -0.08em;
  box-shadow: 0 12px 24px rgba(124, 58, 237, 0.28);
}

.brand-copy {
  min-width: 0;
  flex: 1;
}

.brand-copy strong {
  display: block;
  font-size: 1rem;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.brand-copy span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  margin-top: 2px;
}

.notification-button,
.icon-button {
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--muted);
  border-radius: 14px;
  width: 42px;
  height: 42px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  position: relative;
  box-shadow: 0 8px 18px rgba(17, 24, 39, 0.06);
}

.notification-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--primary);
  position: absolute;
  top: 9px;
  right: 10px;
  border: 2px solid #ffffff;
}

.sidebar-nav {
  flex: 1;
  padding: 2px 0 18px;
}

.nav-section {
  margin-bottom: 24px;
}

.nav-section-title {
  margin: 0 12px 9px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.nav-link {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 13px;
  margin: 4px 0;
  border-radius: 14px;
  color: #4b5563;
  text-decoration: none;
  font-weight: 600;
  position: relative;
  transition: background 0.2s, color 0.2s, transform 0.12s;
}

.nav-link:hover {
  background: #f3f4f6;
  color: var(--text);
  transform: translateX(1px);
}

.nav-link.active {
  color: var(--primary);
  background:
    linear-gradient(90deg, rgba(124, 58, 237, 0.14), rgba(124, 58, 237, 0.06));
}

.nav-link.active::before {
  content: "";
  position: absolute;
  left: -14px;
  top: 11px;
  bottom: 11px;
  width: 4px;
  border-radius: 999px;
  background: var(--primary);
}

.nav-icon,
.button-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.user-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #ffffff;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.05);
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  display: grid;
  place-items: center;
  font-weight: 800;
  flex: 0 0 auto;
}

.user-meta {
  flex: 1;
  min-width: 0;
}

.user-meta strong {
  display: block;
  font-size: 0.92rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-meta span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  margin-top: 2px;
}

.chevron {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: var(--muted);
}

.app-main {
  min-width: 0;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 32px;
  overflow: hidden;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 26px;
}

.page-kicker {
  margin: 0 0 8px;
  color: var(--primary);
  font-weight: 800;
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.page-header h1 {
  margin: 0 0 8px;
  font-size: clamp(2rem, 4vw, 3.1rem);
  letter-spacing: -0.05em;
  line-height: 1;
}

.page-header p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
  max-width: 720px;
}

.page-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.profile-chip {
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--text);
  border-radius: 999px;
  padding: 6px 10px 6px 6px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(17, 24, 39, 0.06);
  font-weight: 800;
}

.profile-chip .avatar {
  width: 32px;
  height: 32px;
  font-size: 0.82rem;
}

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

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.06);
}

.form-card {
  padding: 24px;
  position: sticky;
  top: 24px;
}

.card-header {
  margin-bottom: 20px;
}

.card-header h2 {
  margin: 0 0 6px;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.card-header p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
  font-size: 0.95rem;
}

.form-group {
  margin-bottom: 16px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

label {
  display: block;
  margin-bottom: 6px;
  font-weight: 800;
  font-size: 0.88rem;
  color: #374151;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 12px 13px;
  font: inherit;
  color: var(--text);
  background: #ffffff;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

textarea {
  resize: vertical;
  min-height: 92px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.12);
}

.preview {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  background: var(--primary-soft-2);
  border: 1px dashed rgba(124, 58, 237, 0.40);
  padding: 14px;
  border-radius: 14px;
  margin: 18px 0;
}

.preview span {
  color: var(--muted);
  font-size: 0.92rem;
}

.preview strong {
  font-size: 1.3rem;
  color: var(--primary-dark);
}

.project-context {
  border: 1px solid var(--border);
  background: #fafafa;
  border-radius: 14px;
  padding: 14px;
  margin: 4px 0 18px;
}

.project-context-header {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
}

.project-context-header span,
.project-context-grid span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.project-context-header strong {
  font-size: 0.98rem;
  line-height: 1.35;
}

.project-context-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.project-context-grid div {
  border: 1px solid var(--border);
  background: #ffffff;
  border-radius: 12px;
  padding: 10px;
  display: grid;
  gap: 5px;
}

.project-context-grid strong {
  font-size: 0.95rem;
  color: var(--text);
}

.project-context.is-empty {
  background: #f9fafb;
}

.project-context.is-empty strong {
  color: var(--muted);
}

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

button {
  border: none;
  border-radius: 12px;
  padding: 12px 16px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.12s, background 0.2s, opacity 0.2s;
}

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

button:active {
  transform: translateY(0);
}

.primary-button {
  background: var(--primary);
  color: #ffffff;
  flex: 1;
  box-shadow: 0 12px 24px rgba(124, 58, 237, 0.20);
}

.primary-button:hover {
  background: var(--primary-dark);
}

.secondary-button {
  background: #f3f4f6;
  color: var(--text);
  border: 1px solid var(--border);
}

.danger-button {
  background: var(--danger-bg);
  color: var(--danger);
}

.small-button {
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 0.85rem;
  background: #f3f4f6;
  color: var(--text);
  border: 1px solid var(--border);
}

.small-button.danger {
  background: var(--danger-bg);
  color: var(--danger);
}

.status {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 0.9rem;
  display: none;
}

.status.show {
  display: block;
}

.status.success {
  color: var(--success);
  background: var(--success-bg);
}

.status.error {
  color: var(--danger);
  background: var(--danger-bg);
}

.status.info {
  color: #344054;
  background: var(--warning-bg);
}

.content-stack {
  display: grid;
  gap: 24px;
  min-width: 0;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.summary-card {
  padding: 18px;
}

.summary-card span {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.summary-card strong {
  display: block;
  font-size: 1.7rem;
  letter-spacing: -0.03em;
}

.table-card {
  overflow: hidden;
}

.toolbar {
  padding: 18px;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr auto auto;
  gap: 12px;
  align-items: end;
}

.toolbar .form-group {
  margin: 0;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

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

th {
  background: #fafafa;
  color: #4b5563;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

td {
  font-size: 0.94rem;
  line-height: 1.4;
}

tr:last-child td {
  border-bottom: none;
}

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

.hours-pill {
  display: inline-block;
  background: var(--primary-soft);
  color: var(--primary);
  padding: 5px 9px;
  border-radius: 999px;
  font-weight: 900;
}

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

.empty {
  text-align: center;
  color: var(--muted);
  padding: 28px;
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 270px minmax(0, 1fr);
  }

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

  .form-card {
    position: static;
  }
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 1fr;
    width: min(100% - 24px, 1500px);
    margin: 12px auto;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .app-main {
    padding: 22px;
  }

  .page-header {
    flex-direction: column;
  }

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

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

@media (max-width: 640px) {
  .app-main {
    padding: 18px;
  }

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

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

  .button-row {
    flex-direction: column;
  }

  .button-row button {
    width: 100%;
  }

  .page-actions {
    width: 100%;
    justify-content: space-between;
  }
}

.summary-grid--dashboard {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.metric-card {
  position: relative;
  overflow: hidden;
}

.metric-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), rgba(124, 58, 237, 0.16));
}

.metric-card small {
  display: block;
  color: var(--muted);
  margin-top: 8px;
  font-size: 0.82rem;
  line-height: 1.4;
}

.dashboard-hero {
  position: relative;
  overflow: hidden;
  padding: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.9fr);
  gap: 22px;
  background:
    radial-gradient(circle at top right, rgba(124, 58, 237, 0.12), transparent 34%),
    linear-gradient(180deg, #ffffff 0%, #fbfbff 100%);
}

.dashboard-hero::after {
  content: "";
  position: absolute;
  right: -70px;
  top: -70px;
  width: 220px;
  height: 220px;
  border-radius: 999px;
  background: rgba(124, 58, 237, 0.08);
  filter: blur(10px);
}

.dashboard-hero-copy,
.dashboard-hero-panel {
  position: relative;
  z-index: 1;
}

.dashboard-section-label {
  display: inline-block;
  color: var(--primary);
  font-weight: 800;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}

.dashboard-hero h2,
.chart-header h2,
.table-section-header h2 {
  margin: 0 0 8px;
  font-size: 1.45rem;
  letter-spacing: -0.03em;
}

.dashboard-hero p,
.chart-header p,
.table-section-header p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(124, 58, 237, 0.08);
  border: 1px solid rgba(124, 58, 237, 0.14);
  color: #4c1d95;
  font-size: 0.86rem;
  font-weight: 700;
}

.dashboard-hero-panel {
  display: grid;
  gap: 12px;
}

.hero-panel-item {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.88);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.04);
}

.hero-panel-item span {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.hero-panel-item strong {
  display: block;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.hero-panel-item small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.5;
}

.dashboard-filter-bar {
  padding: 18px;
  display: grid;
  grid-template-columns: 1.3fr 0.8fr 0.8fr auto;
  gap: 12px;
  align-items: end;
}

.dashboard-filter-bar .form-group {
  margin: 0;
}

.dashboard-grid {
  display: grid;
  gap: 24px;
}

.dashboard-grid--primary {
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.9fr);
}

.dashboard-grid--secondary {
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.9fr);
}

.chart-card,
.attention-card,
.dashboard-table-card {
  padding: 20px;
}

.chart-header,
.table-section-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.chart-canvas-wrap {
  position: relative;
  min-height: 320px;
}

.chart-canvas-wrap--small {
  min-height: 260px;
}

.chart-canvas-wrap canvas {
  width: 100% !important;
  height: 320px !important;
}

.chart-canvas-wrap--small canvas {
  height: 260px !important;
}

.status-legend {
  margin-top: 18px;
  display: grid;
  gap: 10px;
}

.legend-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #ffffff;
}

.legend-label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-weight: 700;
}

.legend-value {
  text-align: right;
}

.legend-value strong {
  display: block;
  font-size: 0.95rem;
}

.legend-value small {
  color: var(--muted);
  font-size: 0.78rem;
}

.legend-dot {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  flex: 0 0 auto;
}

.attention-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

.attention-item {
  border: 1px solid var(--border);
  background: #ffffff;
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 8px 18px rgba(17, 24, 39, 0.04);
}

.attention-top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.attention-item strong {
  font-size: 0.95rem;
}

.attention-item span:last-child {
  color: var(--muted);
  line-height: 1.5;
  font-size: 0.88rem;
}

.dashboard-chip,
.health-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 6px 10px;
  font-weight: 800;
  font-size: 0.79rem;
  border: 1px solid transparent;
  white-space: nowrap;
}

.dashboard-chip--solid {
  background: var(--primary-soft);
  color: var(--primary);
  border-color: rgba(124, 58, 237, 0.16);
}

.dashboard-chip--info {
  background: rgba(37, 99, 235, 0.10);
  color: #1d4ed8;
  border-color: rgba(37, 99, 235, 0.14);
}

.dashboard-chip--success,
.health-chip--success {
  background: var(--success-bg);
  color: var(--success);
  border-color: rgba(6, 118, 71, 0.14);
}

.dashboard-chip--warning,
.health-chip--warning {
  background: #fff7ed;
  color: #b45309;
  border-color: rgba(180, 83, 9, 0.14);
}

.dashboard-chip--danger {
  background: var(--danger-bg);
  color: var(--danger);
  border-color: rgba(220, 38, 38, 0.14);
}

.dashboard-chip--neutral,
.health-chip--neutral {
  background: #f3f4f6;
  color: #4b5563;
  border-color: var(--border);
}

.dashboard-subtext {
  margin-top: 8px;
  font-size: 0.82rem;
  line-height: 1.45;
}

.project-timeline {
  min-width: 230px;
}

.timeline-track {
  position: relative;
  height: 12px;
  background: #f3f4f6;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
}

.timeline-bar {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: 999px;
  min-width: 8px;
}

.timeline-bar.is-in-progress {
  background: linear-gradient(90deg, #7c3aed, #a78bfa);
}

.timeline-bar.is-upcoming {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.timeline-bar.is-completed {
  background: linear-gradient(90deg, #10b981, #34d399);
}

.timeline-caption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.78rem;
}

.dashboard-table-card .table-wrap {
  margin: 0 -20px -20px;
}

.dashboard-table-card thead th {
  position: sticky;
  top: 0;
  z-index: 1;
}

@media (max-width: 1180px) {
  .dashboard-hero,
  .dashboard-grid--primary,
  .dashboard-grid--secondary {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 900px) {
  .summary-grid--dashboard {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 640px) {
  .hero-badges {
    flex-direction: column;
    align-items: stretch;
  }
}

.portfolio-snapshot-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.portfolio-snapshot-item {
  border: 1px solid rgba(124, 58, 237, 0.14);
  background: rgba(255, 255, 255, 0.78);
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.04);
}

.portfolio-snapshot-item span {
  display: block;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.portfolio-snapshot-item strong {
  display: block;
  font-size: 1.55rem;
  letter-spacing: -0.04em;
  color: var(--text);
}

.portfolio-snapshot-item small {
  display: block;
  color: var(--muted);
  margin-top: 6px;
  font-size: 0.78rem;
  line-height: 1.35;
}

.portfolio-status-card {
  margin-top: 14px;
  border: 1px solid rgba(124, 58, 237, 0.14);
  background: rgba(255, 255, 255, 0.78);
  border-radius: 16px;
  padding: 14px;
}

.portfolio-status-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.portfolio-status-header span {
  display: block;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.portfolio-status-header strong {
  display: block;
  color: var(--text);
  font-size: 0.98rem;
}

.portfolio-status-bar {
  display: flex;
  width: 100%;
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: #f3f4f6;
  border: 1px solid var(--border);
}

.portfolio-status-segment {
  display: block;
  min-width: 0;
  height: 100%;
}

.portfolio-status-segment.is-progress {
  background: #2563eb;
}

.portfolio-status-segment.is-upcoming {
  background: #f59e0b;
}

.portfolio-status-segment.is-completed {
  background: #10b981;
}

.portfolio-status-segment.is-empty {
  background: #e5e7eb;
}

.portfolio-status-card p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

@media (max-width: 1180px) {
  .portfolio-snapshot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .portfolio-snapshot-grid {
    grid-template-columns: 1fr;
  }
}

.project-breakdown-card {
  overflow: hidden;
}

.project-breakdown-header {
  align-items: center;
}

.project-breakdown-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.project-breakdown-help {
  margin: -4px 20px 18px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--primary-soft-2);
  border: 1px dashed rgba(124, 58, 237, 0.28);
  color: var(--muted);
  line-height: 1.5;
  font-size: 0.9rem;
}

.project-breakdown-help strong {
  color: var(--primary-dark);
}

.project-breakdown-list {
  display: grid;
  gap: 14px;
}

.project-breakdown-panel {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #ffffff;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.04);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.12s;
}

.project-breakdown-panel:hover {
  border-color: rgba(124, 58, 237, 0.28);
  box-shadow: 0 14px 30px rgba(17, 24, 39, 0.07);
  transform: translateY(-1px);
}

.project-breakdown-panel.is-expanded {
  border-color: rgba(124, 58, 237, 0.34);
}

.project-breakdown-toggle {
  width: 100%;
  border-radius: 0;
  background: linear-gradient(180deg, #ffffff 0%, #fbfbff 100%);
  color: var(--text);
  border: none;
  padding: 16px;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(0, 1.4fr);
  gap: 16px;
  align-items: center;
  text-align: left;
}

.project-breakdown-toggle:hover {
  transform: none;
  background: linear-gradient(180deg, #ffffff 0%, #faf5ff 100%);
}

.project-breakdown-title {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.project-breakdown-title strong {
  display: block;
  font-size: 1rem;
}

.project-breakdown-title span:last-child {
  display: block;
  color: var(--muted);
  font-size: 0.86rem;
  margin-top: 3px;
  line-height: 1.35;
}

.project-breakdown-chevron {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  display: inline-grid;
  place-items: center;
  font-weight: 900;
  flex: 0 0 auto;
}

.project-breakdown-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  align-items: stretch;
}

.project-breakdown-summary span {
  border: 1px solid var(--border);
  background: #ffffff;
  border-radius: 14px;
  padding: 10px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.project-breakdown-summary strong {
  display: block;
  color: var(--text);
  font-size: 1rem;
  margin-bottom: 2px;
}

.project-breakdown-content {
  border-top: 1px solid var(--border);
  padding: 16px;
  background:
    radial-gradient(circle at top left, rgba(124, 58, 237, 0.06), transparent 28%),
    #ffffff;
}

.project-activity-list {
  display: grid;
  gap: 12px;
}

.project-activity-card {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.92);
  border-radius: 16px;
  padding: 14px;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto minmax(220px, 0.75fr);
  gap: 16px;
  align-items: center;
}

.project-activity-main {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.project-activity-index {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  display: inline-grid;
  place-items: center;
  font-weight: 900;
  flex: 0 0 auto;
}

.project-activity-main strong {
  display: block;
  font-size: 0.98rem;
}

.project-activity-subtext {
  margin-top: 4px;
  font-size: 0.83rem;
}

.project-activity-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.activity-mini-timeline {
  display: grid;
  gap: 6px;
}

.activity-mini-track {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: #f3f4f6;
  border: 1px solid var(--border);
  overflow: hidden;
}

.activity-mini-bar {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: 999px;
  min-width: 8px;
}

.activity-mini-bar.is-in-progress {
  background: linear-gradient(90deg, #7c3aed, #a78bfa);
}

.activity-mini-bar.is-upcoming {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.activity-mini-bar.is-completed {
  background: linear-gradient(90deg, #10b981, #34d399);
}

.activity-mini-timeline small {
  color: var(--muted);
  font-size: 0.76rem;
}

.project-activity-empty,
.project-breakdown-empty {
  border: 1px dashed var(--border-strong);
  background: #f9fafb;
  border-radius: 16px;
  padding: 18px;
  color: var(--muted);
  display: grid;
  gap: 6px;
  line-height: 1.5;
}

.project-activity-empty strong,
.project-breakdown-empty strong {
  color: var(--text);
}

.activity-count-cell {
  display: grid;
  gap: 6px;
}

.activity-count-cell strong {
  font-size: 1rem;
}

.activity-count-cell span {
  color: var(--muted);
  font-size: 0.86rem;
}

.activity-drilldown-button {
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  line-height: 1.2;
  white-space: nowrap;
  background: var(--primary-soft);
  color: var(--primary);
  border: 1px solid rgba(124, 58, 237, 0.18);
  box-shadow: none;
}

.activity-drilldown-button:hover {
  background: var(--primary);
  color: #ffffff;
}

.dashboard-table-card table {
  min-width: 1040px;
}

/* Assignment module */

.assignment-layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.assignment-setup-column,
.assignment-workspace,
.assignment-entry-zone {
  min-width: 0;
}

.assignment-entry-zone {
  grid-column: 1 / -1;
}

.assignment-setup-card {
  position: sticky;
  top: 24px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
}

.assignment-step-card {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  background: #ffffff;
  margin-bottom: 14px;
}

.assignment-step-number {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  display: grid;
  place-items: center;
  font-weight: 900;
}

.assignment-step-content {
  min-width: 0;
}

.assignment-panel-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.assignment-panel-header span {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}

.assignment-panel-header strong {
  display: block;
  font-size: 0.96rem;
  line-height: 1.35;
  color: var(--text);
}

.assignment-panel-header em {
  font-style: normal;
  font-size: 0.76rem;
  font-weight: 900;
  color: var(--primary);
  background: var(--primary-soft);
  border: 1px solid rgba(124, 58, 237, 0.16);
  border-radius: 999px;
  padding: 5px 8px;
  white-space: nowrap;
}

.assignment-activity-list {
  display: grid;
  gap: 10px;
  max-height: 300px;
  overflow-y: auto;
  padding-right: 2px;
}

.assignment-activity-button {
  width: 100%;
  text-align: left;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #ffffff;
  color: var(--text);
  padding: 12px;
  display: grid;
  gap: 5px;
  box-shadow: none;
}

.assignment-activity-button:hover {
  transform: none;
  border-color: rgba(124, 58, 237, 0.35);
  background: var(--primary-soft-2);
}

.assignment-activity-button.is-active {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.assignment-activity-button strong {
  display: block;
  font-size: 0.94rem;
}

.assignment-activity-button span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.assignment-step-actions {
  margin-top: 8px;
}

.assignment-placeholder {
  min-height: 430px;
  padding: 48px;
  display: grid;
  align-content: center;
  justify-items: start;
  border-style: dashed;
  background:
    radial-gradient(circle at top right, rgba(124, 58, 237, 0.08), transparent 32%),
    #ffffff;
}

.assignment-placeholder-icon {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  background: var(--primary-soft);
  color: var(--primary);
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 1.5rem;
  margin-bottom: 20px;
}

.assignment-placeholder span {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.assignment-placeholder h2 {
  margin: 0 0 8px;
  font-size: 1.65rem;
  letter-spacing: -0.03em;
}

.assignment-placeholder p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  max-width: 560px;
}

.assignment-workspace-header {
  padding: 22px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.9fr);
  gap: 22px;
  align-items: start;
  background:
    radial-gradient(circle at top right, rgba(124, 58, 237, 0.10), transparent 34%),
    linear-gradient(180deg, #ffffff 0%, #fbfbff 100%);
}

.assignment-workspace-header h2 {
  margin: 0 0 8px;
  font-size: 1.4rem;
  letter-spacing: -0.03em;
}

.assignment-workspace-header p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.assignment-context-grid {
  display: grid;
  gap: 10px;
}

.assignment-context-grid div {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.88);
  border-radius: 14px;
  padding: 12px;
}

.assignment-context-grid span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.assignment-context-grid strong {
  display: block;
  font-size: 0.95rem;
  line-height: 1.35;
}

.assignment-summary-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.assignment-summary-card {
  position: relative;
  overflow: hidden;
}

.assignment-summary-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), rgba(124, 58, 237, 0.16));
}

.assignment-summary-card small {
  display: block;
  color: var(--muted);
  margin-top: 8px;
  font-size: 0.82rem;
  line-height: 1.4;
}

.assignment-entry-card {
  width: 100%;
  max-width: none;
  overflow: visible;
}

.assignment-entry-header {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 18px;
  align-items: end;
}

.assignment-entry-header h2 {
  margin: 0 0 4px;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.assignment-entry-header p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
  font-size: 0.86rem;
  max-width: 430px;
}

.assignment-toolbar-actions {
  width: 100%;
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: 10px;
}

.assignment-toolbar-actions .form-group {
  margin: 0;
  width: min(100%, 320px);
  min-width: 0;
}

.assignment-entry-list {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.assignment-entry-row {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 0.9fr);
  gap: 22px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 10px 22px rgba(17, 24, 39, 0.045);
  align-items: center;
}

.assignment-entry-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px;
  gap: 22px;
  align-items: center;
  min-width: 0;
}

.assignment-entry-worker {
  min-width: 0;
}

.assignment-entry-worker strong {
  display: block;
  font-size: 1rem;
  line-height: 1.35;
}

.assignment-entry-worker > span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.4;
}

.assignment-recorded-note {
  margin-top: 10px;
  display: inline-grid;
  gap: 3px;
  justify-self: start;
  border: 1px dashed rgba(124, 58, 237, 0.24);
  background: var(--primary-soft-2);
  border-radius: 12px;
  padding: 8px 10px;
}

.assignment-recorded-note span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.assignment-recorded-note strong {
  color: var(--primary-dark);
  font-size: 0.82rem;
}

.assignment-entry-logged {
  display: grid;
  gap: 6px;
  justify-items: start;
}

.assignment-entry-logged span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.assignment-entry-logged strong {
  color: var(--primary);
  font-size: 1.18rem;
}

.assignment-progress-track {
  width: 100%;
  max-width: 150px;
  height: 8px;
  margin-top: 2px;
  background: #f3f4f6;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
}

.assignment-progress-track span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #a78bfa);
  border-radius: 999px;
}

.assignment-entry-allocation {
  display: grid;
  grid-template-columns: minmax(170px, 240px) auto;
  gap: 14px;
  align-items: end;
  justify-content: end;
  padding-top: 0;
  border-top: none;
  min-width: 0;
}

.assignment-entry-input {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.assignment-entry-input label {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.assignment-entry-input .assignment-hours-input {
  width: 100%;
  min-width: 0;
  max-width: none;
  padding: 10px 12px;
  border-radius: 12px;
  font-weight: 800;
}

.assignment-entry-input small {
  color: var(--muted);
  font-size: 0.78rem;
}

.assignment-entry-actions {
  min-width: max-content;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.assignment-save-button {
  flex: 0 0 auto;
  min-width: 76px;
  padding: 10px 16px;
  box-shadow: 0 10px 20px rgba(124, 58, 237, 0.16);
}

.assignment-clear-button {
  flex: 0 0 auto;
  min-width: 72px;
  padding: 10px 14px;
}

.assignment-entry-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
}

.assignment-entry-empty {
  border: 1px dashed var(--border-strong);
  background: #f9fafb;
  border-radius: 16px;
  padding: 24px;
  color: var(--muted);
  text-align: center;
  line-height: 1.5;
}

@media (max-width: 1180px) {
  .assignment-layout {
    grid-template-columns: 1fr;
  }

  .assignment-entry-zone {
    grid-column: auto;
  }

  .assignment-setup-card {
    position: static;
    max-height: none;
    overflow-y: visible;
  }

  .assignment-workspace-header,
  .assignment-entry-header {
    grid-template-columns: 1fr;
  }

  .assignment-toolbar-actions {
    justify-content: stretch;
  }

  .assignment-toolbar-actions .form-group {
    width: 100%;
  }

  .assignment-entry-top {
    grid-template-columns: 1fr;
  }

  .assignment-entry-allocation {
    grid-template-columns: 1fr;
    justify-content: stretch;
  }

  .assignment-entry-actions {
    justify-content: flex-start;
    min-width: 0;
  }
}

@media (max-width: 900px) {
  .assignment-summary-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .assignment-step-card {
    grid-template-columns: 1fr;
  }

  .assignment-step-number {
    width: 30px;
    height: 30px;
  }

  .assignment-placeholder {
    padding: 28px;
    min-height: 320px;
  }

  .assignment-toolbar-actions,
  .assignment-entry-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .assignment-entry-actions button {
    width: 100%;
  }
}

/* Assignment row action layout refinement */

.assignment-entry-allocation {
  display: grid;
  grid-template-columns: 150px 96px;
  gap: 12px;
  align-items: end;
  justify-content: end;
  padding-top: 0;
  border-top: none;
}

.assignment-entry-input {
  max-width: 150px;
}

.assignment-entry-input .assignment-hours-input {
  width: 150px;
  min-width: 0;
  max-width: 150px;
}

.assignment-entry-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: end;
  gap: 8px;
  min-width: 0;
  width: 96px;
}

.assignment-clear-button {
  order: 1;
  width: 100%;
  min-width: 0;
  padding: 9px 10px;
}

.assignment-save-button {
  order: 2;
  width: 100%;
  min-width: 0;
  flex: 0 0 auto;
  padding: 9px 10px;
}

@media (max-width: 760px) {
  .assignment-entry-allocation {
    grid-template-columns: 1fr;
    justify-content: stretch;
  }

  .assignment-entry-input,
  .assignment-entry-input .assignment-hours-input,
  .assignment-entry-actions {
    width: 100%;
    max-width: none;
  }
}