:root {
  --red: #f10808;
  --blue: #004aad;
  --ink: #121522;
  --muted: #697082;
  --line: #e8ebf1;
  --soft: #f6f8fb;
  --white: #fff;
  --shadow: 0 20px 60px rgba(18, 21, 34, .08);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: #f8fafc;
}
a { color: inherit; text-decoration: none; }
input, textarea, select, button { font: inherit; }

.app-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  padding: 16px clamp(18px, 4vw, 48px);
  background: rgba(255,255,255,.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}
.brand, .brand-lockup { display: flex; align-items: center; gap: 12px; }
.brand small, .muted, .panel-head span, .data-table small { display: block; color: var(--muted); font-size: 12px; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  background: var(--blue);
  color: white;
  border-radius: 8px;
  font-weight: 900;
  box-shadow: inset 4px 0 0 var(--red);
}
.brand-mark.large { width: 52px; height: 52px; font-size: 24px; }
.top-nav { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.user-chip { padding: 8px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 13px; }
.page-shell { width: min(1180px, calc(100% - 32px)); margin: 28px auto 56px; }
.site-footer { padding: 24px; color: var(--muted); text-align: center; border-top: 1px solid var(--line); background: white; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  cursor: pointer;
  font-weight: 700;
}
.btn-primary { background: var(--red); border-color: var(--red); color: white; box-shadow: 0 12px 24px rgba(241,8,8,.18); }
.btn.small { min-height: 34px; padding: 7px 10px; font-size: 12px; margin-top: 8px; }
.btn.full { width: 100%; }
.danger { color: var(--red); }

.login-view {
  min-height: calc(100vh - 180px);
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 28px;
  align-items: stretch;
}
.login-art, .dashboard-hero, .form-hero {
  background: linear-gradient(135deg, rgba(0,74,173,.95), rgba(18,21,34,.94)), url('https://source.unsplash.com/1600x1000/?luxury,resort,travel');
  background-size: cover;
  color: white;
  border-radius: 8px;
  padding: clamp(28px, 5vw, 64px);
  box-shadow: var(--shadow);
}
.login-art h1, .dashboard-hero h1, .form-hero h1 { margin: 8px 0 12px; max-width: 760px; font-size: clamp(34px, 5vw, 62px); line-height: 1; letter-spacing: 0; }
.login-art p, .dashboard-hero p, .form-hero p { max-width: 650px; color: rgba(255,255,255,.82); }
.eyebrow { color: var(--red); text-transform: uppercase; font-weight: 900; letter-spacing: 0; font-size: 12px; }
.auth-card, .panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  box-shadow: var(--shadow);
}
.auth-card { align-self: center; }
.alert { padding: 12px; background: #fff1f1; color: #a40000; border: 1px solid #ffd0d0; border-radius: 8px; margin: 16px 0; }

.dashboard-hero, .form-hero {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
  margin-bottom: 22px;
}
.dashboard-hero h1, .form-hero h1 { font-size: clamp(32px, 4vw, 52px); }
.panel { margin-bottom: 20px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 18px; }
.panel-head h2 { margin: 0; }
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; min-width: 860px; }
.data-table th { text-align: left; color: var(--muted); font-size: 12px; text-transform: uppercase; }
.data-table th, .data-table td { padding: 14px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.actions { display: flex; gap: 12px; white-space: nowrap; font-weight: 700; font-size: 13px; }
.empty { text-align: center; color: var(--muted); padding: 36px !important; }

label { display: grid; gap: 7px; color: #33394a; font-weight: 700; font-size: 13px; }
input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  background: white;
  color: var(--ink);
}
textarea { resize: vertical; }
input:focus, textarea:focus, select:focus { outline: 2px solid rgba(0,74,173,.16); border-color: var(--blue); }

.grid-2, .grid-3, .grid-4 { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
.span-4 { grid-column: span 4; }
.inline-fields { grid-template-columns: repeat(3, 1fr); }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.repeat-row { border: 1px solid var(--line); border-radius: 8px; padding: 18px; background: var(--soft); margin-bottom: 14px; }
.row-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; font-weight: 900; }
.icon { width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line); background: white; cursor: pointer; }
.check { display: flex; align-items: center; gap: 10px; padding: 30px 0 0; }
.check input { width: auto; }
.quote-total {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr 1.2fr;
  gap: 12px;
  align-items: center;
  padding: 18px;
  background: #071225;
  color: white;
  border-radius: 8px;
}
.quote-total span { color: rgba(255,255,255,.72); }
.quote-total strong { font-size: 24px; }
.sticky-submit {
  position: sticky;
  bottom: 12px;
  display: flex;
  justify-content: flex-end;
  padding: 12px;
  background: rgba(255,255,255,.72);
  backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  border-radius: 8px;
}

@media (max-width: 900px) {
  .app-header, .dashboard-hero, .form-hero { align-items: flex-start; flex-direction: column; }
  .login-view, .grid-2, .grid-3, .grid-4, .inline-fields { grid-template-columns: 1fr; }
  .span-2, .span-4 { grid-column: auto; }
  .quote-total { grid-template-columns: 1fr; }
  .top-nav { width: 100%; }
}
