:root {
  --bg: #f2ede4;
  --panel: rgba(255, 251, 245, 0.88);
  --panel-strong: #fffefb;
  --line: rgba(26, 49, 57, 0.12);
  --line-strong: rgba(26, 49, 57, 0.18);
  --text: #172529;
  --muted: #607076;
  --teal: #0f766e;
  --teal-deep: #0a4f4a;
  --teal-soft: #d5f0ea;
  --amber: #c56b10;
  --amber-soft: #fff0db;
  --rose-soft: #ffe4de;
  --rose-text: #b54732;
  --violet-soft: #efe7ff;
  --violet-text: #6d46c7;
  --shadow: 0 20px 50px rgba(63, 72, 70, 0.12);
  --radius-xl: 30px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --font-main: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-main);
  color: var(--text);
  background:
    radial-gradient(circle at top right, rgba(15, 118, 110, 0.18), transparent 22%),
    radial-gradient(circle at bottom left, rgba(197, 107, 16, 0.18), transparent 26%),
    linear-gradient(135deg, #f7f2ea 0%, #f1f4f2 100%);
  min-height: 100vh;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(100%, 460px);
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
  border-radius: var(--radius-xl);
  padding: 28px;
}

.login-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--muted);
  margin: 14px 0;
}

.login-divider::before,
.login-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line-strong);
}

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

button {
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.app-shell {
  display: grid;
  grid-template-columns: 330px 1fr;
  min-height: 100vh;
}

.sidebar {
  padding: 26px 22px;
  background: rgba(255, 248, 239, 0.76);
  border-inline-start: 1px solid rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(18px);
}

.brand-card,
.quick-panel,
.panel,
.hero,
.stats-grid article {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
}

.brand-card,
.quick-panel,
.panel {
  border-radius: var(--radius-lg);
}

.brand-card {
  padding: 22px;
  margin-bottom: 18px;
}

.brand-kicker,
.panel-kicker,
.eyebrow {
  margin: 0 0 8px;
  color: var(--teal);
  font-size: 0.82rem;
  font-weight: 700;
}

.brand-card h1,
.hero h2,
.panel h3,
.panel h4 {
  margin: 0;
}

.brand-copy,
.hero-copy,
.meta-copy,
.inline-note {
  color: var(--muted);
  line-height: 1.8;
}

.nav-sections {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.nav-button,
.ghost-button,
.primary-button {
  border-radius: 999px;
  border: 0;
  padding: 12px 18px;
  cursor: pointer;
}

.full-width {
  width: 100%;
}

.nav-button {
  text-align: right;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  border: 1px solid var(--line);
}

.nav-button.active,
.nav-button:hover,
.primary-button {
  background: linear-gradient(135deg, #0e756d, #17988e);
  color: white;
  box-shadow: 0 12px 28px rgba(15, 118, 110, 0.28);
}

.ghost-button {
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
  border: 1px solid var(--line);
}

.nav-button:hover,
.ghost-button:hover,
.primary-button:hover {
  transform: translateY(-2px);
}

.quick-panel,
.panel {
  padding: 18px;
  margin-bottom: 18px;
}

.stack-list,
.tag-cloud,
.assignment-list,
.timeline,
.people-grid,
.checkbox-cloud {
  display: grid;
  gap: 12px;
}

.compact-stack {
  gap: 8px;
}

.branch-card,
.assignment-card,
.timeline-item,
.person-card,
.stat-card,
.mini-card,
.workflow-card {
  border-radius: var(--radius-md);
  padding: 14px;
  background: var(--panel-strong);
  border: 1px solid var(--line);
}

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

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

.checkbox-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
}

.tag-chip,
.status-chip,
.pill-chip {
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.88rem;
  width: fit-content;
}

.tag-chip,
.pill-chip.teal,
.status-chip.available {
  background: var(--teal-soft);
  color: var(--teal);
}

.status-chip.assigned,
.pill-chip.amber {
  background: var(--amber-soft);
  color: var(--amber);
}

.status-chip.maintenance,
.pill-chip.violet {
  background: var(--violet-soft);
  color: var(--violet-text);
}

.pill-chip.rose,
.status-chip.pending {
  background: var(--rose-soft);
  color: var(--rose-text);
}

.main-content {
  padding: 28px;
}

.hero {
  border-radius: 34px;
  padding: 30px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  margin-bottom: 22px;
}

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

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}

.stats-grid article {
  border-radius: 24px;
  padding: 20px;
}

.stats-grid h3 {
  margin: 10px 0 6px;
  font-size: 2rem;
}

.stats-grid p {
  margin: 0;
}

.workspace-grid {
  display: grid;
  grid-template-columns: 1.45fr 0.95fr;
  gap: 18px;
  margin-bottom: 18px;
}

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

.triple-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.wide-panel {
  min-width: 0;
}

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

.filter-row,
.inline-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

input,
select,
textarea {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--line);
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--text);
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(15, 118, 110, 0.15);
  border-color: rgba(15, 118, 110, 0.35);
}

textarea {
  resize: vertical;
}

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

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

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

.form-title {
  margin-bottom: 2px;
}

.info-banner {
  padding: 12px 14px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.08), rgba(197, 107, 16, 0.08));
  border: 1px dashed rgba(15, 118, 110, 0.24);
  margin-bottom: 14px;
  color: var(--teal-deep);
}

.error-banner {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(181, 71, 50, 0.1);
  border: 1px solid rgba(181, 71, 50, 0.2);
  color: var(--rose-text);
  margin: 12px 0;
}

.table-wrap {
  overflow: auto;
  border-radius: 20px;
  border: 1px solid var(--line);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 920px;
  background: rgba(255, 255, 255, 0.82);
}

th,
td {
  padding: 14px;
  text-align: right;
  border-bottom: 1px solid rgba(36, 56, 62, 0.08);
  vertical-align: top;
}

th {
  background: rgba(15, 118, 110, 0.08);
  color: var(--teal);
  font-size: 0.9rem;
}

.asset-title {
  font-weight: 700;
  margin-bottom: 4px;
}

.asset-subcopy,
.meta-copy {
  font-size: 0.9rem;
}

.subsection {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.people-grid,
.assignment-list {
  margin-top: 16px;
}

.person-card h4,
.assignment-card h4,
.branch-card h4,
.mini-card h4 {
  margin: 0 0 8px;
}

.timeline-item {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
}

.cluster-panel {
  margin-bottom: 18px;
}

.mini-metric {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.invoice-thumb {
  width: 100%;
  max-width: 180px;
  height: 120px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--line);
  margin-top: 10px;
}

.workflow-card strong {
  display: inline-block;
  margin-bottom: 6px;
}

.inline-note {
  margin-top: 10px;
}

.history-panel {
  margin-bottom: 0;
}

.print-sheet {
  display: none;
}

@media print {
  body * {
    visibility: hidden;
  }

  .print-sheet,
  .print-sheet * {
    visibility: visible;
  }

  .print-sheet {
    display: block;
    position: absolute;
    inset: 0;
    padding: 24px;
    background: white;
    color: black;
  }
}

@media (max-width: 1320px) {
  .stats-grid,
  .triple-grid,
  .lower-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1180px) {
  .app-shell,
  .workspace-grid,
  .stats-grid,
  .triple-grid,
  .lower-grid {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-inline-start: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.4);
  }
}

@media (max-width: 720px) {
  .main-content,
  .sidebar {
    padding: 18px;
  }

  .hero,
  .panel-header,
  .filter-row,
  .inline-form {
    flex-direction: column;
  }

  .form-grid,
  .checkbox-cloud,
  .tag-cloud {
    grid-template-columns: 1fr;
  }
}
