:root {
  --bg: #f3f4f8;
  --panel: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --line-soft: #eef2f7;
  --accent: #111827;
  --accent-dark: #0b0f16;
  --accent-soft: #e0f2f1;
  --danger: #b91c1c;
  --radius: 18px;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html,
body {
  font-family: "Manrope", "Inter", system-ui, -apple-system, sans-serif;
  background:
    radial-gradient(circle at 12% -10%, rgba(99, 102, 241, 0.18), transparent 45%),
    radial-gradient(circle at 88% 12%, rgba(56, 189, 248, 0.2), transparent 40%),
    #f3f4f8;
  min-height: 100%;
}

.wrap {
  max-width: 1200px;
  background: transparent;
}

.topbar {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
  font-size: 16px;
}

.panel,
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.button,
button {
  border-radius: 999px;
  font-weight: 600;
  background: #111827;
  color: #ffffff;
  border: 1px solid transparent;
  letter-spacing: 0.01em;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.button.secondary,
button.secondary {
  background: #eef2ff;
  color: #111827;
}

.button.danger,
button.danger {
  background: #fee2e2;
  color: #b91c1c;
}

.button:hover,
button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.12);
}

input,
select,
textarea {
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #ffffff;
  font-size: 16px;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.6);
}

.nav-links .button {
  background: #ffffff;
  color: #111827;
  border: 1px solid var(--line);
}

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

.card-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.card-list .card {
  height: 100%;
}
.card-list .card-list {
  grid-template-columns: 1fr;
}
@media (max-width: 900px) {
  .card-list {
    grid-template-columns: 1fr;
  }
}

.map-canvas {
  border-radius: 20px;
  border: 1px solid var(--line);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.12);
}

.redesign-dashboard {
  display: grid;
  gap: 20px;
}
.redesign-shell {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 18px;
  align-items: start;
}
.redesign-sidebar {
  background: #0f172a;
  color: #fff;
  border-radius: 22px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-self: start;
  position: sticky;
  top: 18px;
  max-height: calc(100vh - 36px);
  overflow: auto;
}
.redesign-brand {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.redesign-nav {
  display: grid;
  gap: 10px;
}
.redesign-nav a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}
.redesign-nav a img,
.redesign-nav a svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}
.redesign-nav a.active,
.redesign-nav a:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}
.redesign-list-item {
  text-decoration: none;
  color: inherit;
}
.redesign-list-item:hover {
  border-color: rgba(59, 130, 246, 0.45);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}
.theme-full-redesign .nav-links {
  display: none !important;
}
.redesign-card {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 14px;
  display: grid;
  gap: 12px;
}
.redesign-card .button {
  width: 100%;
}
.redesign-main {
  display: grid;
  gap: 18px;
}

.sidebar-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  padding: 8px;
  width: 40px;
  height: 40px;
  background: #0f172a;
  color: #f8fafc;
  border: 1px solid rgba(15, 23, 42, 0.2);
}
.theme-full-redesign .sidebar-toggle {
  background: #0f172a;
  color: #f8fafc;
  border-color: rgba(15, 23, 42, 0.2);
}
.sidebar-toggle svg {
  width: 20px;
  height: 20px;
}
.sidebar-backdrop {
  display: none;
}
.redesign-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.redesign-header-left {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.theme-full-redesign h1 {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.redesign-header h1 {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.redesign-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.redesign-alert {
  background: #fff7ed;
  border-color: #fdba74;
}
.redesign-alert .alert-number {
  font-weight: 700;
  color: #9a3412;
}
.redesign-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
}
.redesign-stat-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  text-decoration: none;
  color: inherit;
  display: grid;
  gap: 6px;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
}
.redesign-stat-card strong {
  font-size: 1.4rem;
}
.redesign-panels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.redesign-list {
  display: grid;
  gap: 10px;
}
.workload-panels {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  align-items: start;
}
.workload-card-list {
  grid-template-columns: 1fr;
}
.workload-card-list .card {
  min-width: 0;
}
.issue-type-group summary {
  list-style: none;
}
.issue-type-group summary::-webkit-details-marker {
  display: none;
}
.issue-type-group summary::after {
  content: "+";
  margin-left: auto;
  font-weight: 700;
  color: var(--muted);
}
.issue-type-group[open] summary::after {
  content: "–";
}

.contractor-card {
  display: grid;
  gap: 12px;
}
.contractor-card-header {
  align-items: flex-start;
}
.contractor-meta {
  display: grid;
  gap: 6px;
  font-size: 0.9rem;
}
.contractor-meta span.muted {
  display: inline-block;
  min-width: 100px;
}
.contractor-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 0.78rem;
  font-weight: 600;
}
.pill-active {
  background: #dcfce7;
  color: #166534;
}
.pill-inactive {
  background: #fee2e2;
  color: #b91c1c;
}
.contractor-card-actions {
  flex-wrap: wrap;
}
.redesign-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #f8fafc;
  font-weight: 600;
}
.pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: #eef2ff;
  color: #4338ca;
  font-size: 0.75rem;
  font-weight: 700;
}
.empty-card {
  border: 1px dashed var(--line);
  border-radius: 14px;
  padding: 14px;
  text-align: center;
  background: #f8fafc;
}

.notice {
  padding: 12px 14px;
  border-radius: 12px;
  font-weight: 600;
  margin-bottom: 14px;
}
.notice.success {
  background: #dcfce7;
  color: #166534;
}
.notice.error {
  background: #fee2e2;
  color: #b91c1c;
}

.redesign-filter-form select,
.redesign-filter-form input {
  width: 100%;
}

@media (max-width: 900px) {
  .redesign-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .redesign-shell {
    grid-template-columns: 1fr;
  }
  .sidebar-toggle {
    display: inline-flex;
  }
  .redesign-sidebar {
    display: none;
    position: fixed;
    top: 80px;
    left: 12px;
    right: 12px;
    z-index: 60;
    max-height: calc(100vh - 120px);
    overflow: auto;
  }
  .theme-full-redesign.page-dashboard-php .redesign-sidebar {
    display: flex;
    position: static;
    max-height: none;
    overflow: visible;
  }
  .theme-full-redesign.page-dashboard-php .sidebar-toggle {
    display: none;
  }
  .theme-full-redesign.sidebar-open .redesign-sidebar {
    display: flex;
  }
  .sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.35);
    z-index: 50;
  }
  .theme-full-redesign.sidebar-open .sidebar-backdrop {
    display: block;
  }
}

table {
  border-collapse: separate;
  border-spacing: 0 8px;
  width: 100%;
}
th {
  text-align: left;
  color: #6b7280;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
td {
  background: #ffffff;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
}
td:first-child {
  border-left: 1px solid var(--line);
  border-radius: 12px 0 0 12px;
}
td:last-child {
  border-right: 1px solid var(--line);
  border-radius: 0 12px 12px 0;
}
