:root {
  --panel: rgba(255, 255, 255, 0.96);
  --panel-strong: #ffffff;
  --line: rgba(32, 111, 230, 0.14);
  --text: #152647;
  --muted: #55637d;
  --accent: #206fe6;
  --accent-dark: #1757b6;
  --green: #152647;
  --green-soft: #eef4ff;
  --shadow: 0 18px 50px rgba(21, 38, 71, 0.08);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(32, 111, 230, 0.14), transparent 26%),
    radial-gradient(circle at top right, rgba(21, 38, 71, 0.1), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, #f2f3f5 100%);
}

body {
  min-height: 100vh;
}

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

button {
  cursor: pointer;
  border: none;
}

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

textarea {
  resize: vertical;
}

label {
  display: block;
}

label span {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--muted);
}

.shell {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  padding: 28px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, #152647 0%, #1c3768 100%);
  color: #f9fbff;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand-block {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 18px;
}

.brand-mark {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: #ffffff;
  display: grid;
  place-items: center;
  padding: 10px;
  box-shadow: 0 12px 30px rgba(10, 23, 49, 0.16);
}

.brand-icon {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: brightness(0) saturate(100%) invert(32%) sepia(95%) saturate(1460%) hue-rotate(200deg) brightness(92%) contrast(95%);
}

.sidebar h1,
.hero h2,
.section-head h3 {
  margin: 0;
}

.eyebrow,
.panel-label {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 11px;
  font-weight: 700;
}

.sidebar-copy,
.summary-note,
.hero-copy,
.muted {
  color: rgba(249, 247, 243, 0.72);
  line-height: 1.6;
}

.hero-copy,
.panel .muted {
  color: var(--muted);
}

.summary-card {
  margin-top: 28px;
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.summary-card.accent {
  background: rgba(32, 111, 230, 0.18);
}

.summary-label {
  margin: 0 0 8px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(249, 247, 243, 0.68);
}

.summary-value {
  font-size: 34px;
  font-weight: 800;
  margin-bottom: 16px;
}

.summary-grid {
  display: grid;
  gap: 14px;
}

.summary-grid span {
  display: block;
  font-size: 12px;
  color: rgba(249, 247, 243, 0.62);
}

.summary-grid strong {
  font-size: 18px;
}

.sidebar-actions {
  margin-top: 18px;
  display: grid;
  gap: 10px;
}

.search-row {
  margin-bottom: 18px;
}

.search-field {
  max-width: 420px;
}

.content {
  padding: 28px;
}

.hero,
.panel {
  background: var(--panel);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
  border-radius: 28px;
}

.hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 28px;
  margin-bottom: 24px;
}

.panel {
  padding: 24px;
  margin-bottom: 24px;
}

.two-col,
.three-col {
  display: grid;
  gap: 24px;
}

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

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

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

.full-width {
  margin-top: 16px;
}

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

.section-head.compact {
  margin-bottom: 14px;
}

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

.primary-button,
.secondary-button,
.ghost-button,
.small-button,
.remove-button {
  border-radius: 14px;
  padding: 12px 16px;
  font-weight: 700;
}

.primary-button {
  background: var(--green);
  color: #fff;
}

.secondary-button {
  background: #eef4ff;
  color: var(--accent);
}

.ghost-button {
  background: transparent;
  color: var(--accent);
  border: 1px solid rgba(32, 111, 230, 0.18);
}

.small-button {
  background: rgba(32, 111, 230, 0.1);
  color: var(--accent-dark);
  padding: 8px 12px;
}

.remove-button {
  background: rgba(125, 43, 43, 0.1);
  color: #8d2c2c;
  padding: 8px 12px;
}

.stack-list,
.mini-list {
  display: grid;
  gap: 16px;
}

.module-card,
.mini-card,
.task-card {
  border: 1px solid var(--line);
  background: var(--panel-strong);
  border-radius: 24px;
}

.module-card {
  padding: 18px;
}

.mini-card,
.task-card {
  padding: 16px;
}

.module-top,
.task-top,
.mini-top,
.metric-row,
.proposal-total-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.module-top h4,
.task-top h5,
.mini-top h4,
.proposal-sheet h3,
.proposal-sheet h4 {
  margin: 0;
}

.tag-row,
.task-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.tag {
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  background: var(--green-soft);
  color: var(--green);
}

.task-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.task-card {
  background: #f9fbff;
}

.task-metrics,
.module-metrics,
.mini-meta,
.inline-pair {
  display: grid;
  gap: 12px;
}

.task-metrics,
.module-metrics,
.inline-pair {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 12px;
}

.metrics {
  display: grid;
  gap: 12px;
}

.metric-row {
  padding: 14px 16px;
  border-radius: 18px;
  background: #f8fbff;
  border: 1px solid var(--line);
}

.metric-row span {
  color: var(--muted);
}

.proposal-preview {
  display: grid;
  gap: 24px;
}

.list-view {
  display: grid;
  gap: 24px;
}

.estimates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.estimate-card {
  border: 1px solid var(--line);
  background: var(--panel-strong);
  border-radius: 24px;
  padding: 22px;
  display: grid;
  gap: 14px;
}

.estimate-card h4,
.estimate-card p {
  margin: 0;
}

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

.estimate-meta span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}

.proposal-sheet {
  background: #fff;
  border-radius: 28px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  padding: 28px;
}

.proposal-head {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.logo-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 220px;
  min-height: 72px;
  padding: 12px 18px;
  border-radius: 24px;
  background: #f2f3f5;
}

.proposal-logo {
  display: block;
  width: 100%;
  max-width: 180px;
  height: auto;
}

.proposal-copy {
  line-height: 1.7;
  color: #152647;
}

.proposal-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
}

.proposal-table th,
.proposal-table td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  vertical-align: top;
}

.proposal-total-row {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.notice {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 18px;
  background: #eef4ff;
  color: #17458c;
}

.signature-block {
  margin-top: 24px;
  display: grid;
  gap: 10px;
}

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

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

@media (max-width: 900px) {
  .two-col,
  .three-col,
  .field-grid,
  .task-metrics,
  .module-metrics,
  .inline-pair {
    grid-template-columns: 1fr;
  }

  .hero,
  .section-head,
  .proposal-head,
  .proposal-total-row,
  .module-top,
  .task-top,
  .mini-top {
    flex-direction: column;
  }

  .content,
  .sidebar {
    padding: 18px;
  }
}
