:root {
  --navy: #01102F;
  --navy-surface: #0B1B3A;
  --navy-surface-light: #122A54;
  --teal: #179EA3;
  --teal-light: #1CA8AD;
  --teal-deep: #0A4D5C;
  --white: #FFFFFF;
  --text-muted: #A9B7CE;
  --text-muted-dark: #5B6B84;
  --border: rgba(255, 255, 255, 0.1);
  --border-dark: rgba(1, 16, 47, 0.1);
  --danger: #E5484D;
  --success: #2FB380;
  --radius: 12px;
  --max-width: 1120px;
  --shadow: 0 20px 50px rgba(1, 16, 47, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--white);
  color: var(--navy);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Nav ---------- */

.site-nav {
  background: var(--navy);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}

.site-nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 17px;
  color: var(--white);
  letter-spacing: 0.2px;
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 8px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 14.5px;
  color: var(--text-muted);
}

.nav-links a:hover {
  color: var(--white);
}

.nav-cta {
  background: var(--teal);
  color: var(--white) !important;
  padding: 9px 18px;
  border-radius: 999px;
  font-weight: 600;
  transition: background 0.15s ease;
}

.nav-cta:hover {
  background: var(--teal-light);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--white);
  width: 38px;
  height: 38px;
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
}

@media (max-width: 720px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--navy);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px 24px 20px;
  }
  .nav-links.open {
    display: flex;
  }
  .nav-links a {
    width: 100%;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }
  .nav-links .nav-cta {
    margin-top: 12px;
    text-align: center;
  }
  .nav-toggle {
    display: inline-flex;
  }
}

/* ---------- Hero ---------- */

.hero {
  background: radial-gradient(circle at 15% 20%, var(--navy-surface-light), var(--navy) 60%);
  color: var(--white);
  padding: 96px 0 110px;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  right: -120px;
  top: -80px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(23, 158, 163, 0.35), transparent 70%);
  pointer-events: none;
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
  position: relative;
}

@media (max-width: 860px) {
  .hero .wrap {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-actions {
    justify-content: center;
  }
  .hero-art {
    margin: 0 auto;
  }
}

.eyebrow {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--teal-light);
  background: rgba(23, 158, 163, 0.14);
  border: 1px solid rgba(23, 158, 163, 0.3);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.1;
  margin: 0 0 20px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.hero h1 span {
  background: linear-gradient(90deg, var(--teal-light), #6FE3E8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  font-size: 17.5px;
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 0 32px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--teal);
  color: var(--white);
  box-shadow: 0 12px 24px rgba(23, 158, 163, 0.28);
}

.btn-primary:hover {
  background: var(--teal-light);
}

.btn-ghost {
  background: transparent;
  color: var(--white);
  border-color: var(--border);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.06);
}

.btn-block {
  width: 100%;
}

.hero-art {
  background: var(--navy-surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
  box-shadow: var(--shadow);
  max-width: 420px;
}

.hero-art img {
  border-radius: 14px;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 20px;
}

.stat-card {
  background: var(--navy-surface-light);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  text-align: center;
}

.stat-card .num {
  font-size: 20px;
  font-weight: 800;
  color: var(--teal-light);
}

.stat-card .label {
  font-size: 11.5px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

/* ---------- Sections ---------- */

section {
  padding: 88px 0;
}

.section-head {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 52px;
}

.section-head .eyebrow {
  color: var(--teal-deep);
  background: rgba(23, 158, 163, 0.1);
  border-color: rgba(23, 158, 163, 0.2);
}

.section-head h2 {
  font-size: clamp(26px, 3.4vw, 36px);
  margin: 0 0 12px;
  font-weight: 800;
  letter-spacing: -0.3px;
}

.section-head p {
  color: var(--text-muted-dark);
  font-size: 16px;
  margin: 0;
}

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

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

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

.feature-card {
  background: var(--white);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius);
  padding: 26px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.feature-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--teal), var(--teal-deep));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
  margin-bottom: 16px;
}

.feature-card h3 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 700;
}

.feature-card p {
  margin: 0;
  color: var(--text-muted-dark);
  font-size: 14.5px;
}

.band {
  background: var(--navy-surface);
  color: var(--white);
}

.band .section-head p {
  color: var(--text-muted);
}

.band .section-head .eyebrow {
  color: var(--teal-light);
  background: rgba(23, 158, 163, 0.14);
  border-color: rgba(23, 158, 163, 0.3);
}

.cta-band {
  background: linear-gradient(120deg, var(--teal-deep), var(--navy) 70%);
  color: var(--white);
  text-align: center;
  padding: 80px 0;
}

.cta-band h2 {
  font-size: clamp(24px, 3.4vw, 34px);
  margin: 0 0 14px;
  font-weight: 800;
}

.cta-band p {
  color: var(--text-muted);
  margin: 0 0 30px;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--navy);
  color: var(--text-muted);
  padding: 56px 0 28px;
  font-size: 14px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

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

.footer-grid h4 {
  color: var(--white);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin: 0 0 14px;
}

.footer-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.footer-grid a:hover {
  color: var(--white);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- Auth pages ---------- */

.auth-shell {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 20% 10%, var(--navy-surface-light), var(--navy) 65%);
  padding: 40px 20px;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--navy-surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 36px 32px;
  box-shadow: var(--shadow);
  color: var(--white);
}

.auth-card .logo-mark {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  margin: 0 auto 18px;
}

.auth-card h1 {
  font-size: 22px;
  text-align: center;
  margin: 0 0 6px;
  font-weight: 800;
}

.auth-card .sub {
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  margin: 0 0 28px;
}

.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.field input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--white);
  font-size: 15px;
  outline: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.field input:focus {
  border-color: var(--teal);
  background: rgba(255, 255, 255, 0.07);
}

.field input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.form-msg {
  font-size: 13.5px;
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 16px;
  display: none;
}

.form-msg.error {
  display: block;
  background: rgba(229, 72, 77, 0.14);
  border: 1px solid rgba(229, 72, 77, 0.35);
  color: #FF9B9E;
}

.form-msg.success {
  display: block;
  background: rgba(47, 179, 128, 0.14);
  border: 1px solid rgba(47, 179, 128, 0.35);
  color: #7FE3BB;
}

.auth-footer-link {
  text-align: center;
  font-size: 13.5px;
  color: var(--text-muted);
  margin-top: 20px;
}

.auth-footer-link a {
  color: var(--teal-light);
  font-weight: 600;
}

.auth-links-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-top: -6px;
  margin-bottom: 20px;
}

.auth-links-row a {
  color: var(--text-muted);
}

.auth-links-row a:hover {
  color: var(--white);
}

.spinner {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: var(--white);
  animation: spin 0.7s linear infinite;
  display: none;
}

.btn.loading .spinner {
  display: inline-block;
}

.btn.loading .btn-label {
  opacity: 0.7;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---------- App (coming soon) ---------- */

.app-shell {
  min-height: calc(100vh - 64px);
  background: var(--navy);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.app-shell .badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(23, 158, 163, 0.14);
  border: 1px solid rgba(23, 158, 163, 0.3);
  color: var(--teal-light);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 7px 16px;
  border-radius: 999px;
  margin-bottom: 22px;
}

.app-shell h1 {
  font-size: clamp(26px, 4vw, 38px);
  margin: 0 0 14px;
  font-weight: 800;
}

.app-shell p {
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto 30px;
  font-size: 16px;
}

.user-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--navy-surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 8px 8px 16px;
  margin-bottom: 36px;
  font-size: 14px;
}

.user-pill .avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), var(--teal-deep));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12.5px;
}

.roadmap {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  max-width: 720px;
  margin: 0 auto;
}

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

.roadmap-item {
  background: var(--navy-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 12px;
  font-size: 13px;
  color: var(--text-muted);
}

.roadmap-item .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal-light);
  margin: 0 auto 8px;
}

/* ---------- Legal / content pages ---------- */

.page-hero {
  background: var(--navy);
  color: var(--white);
  padding: 64px 0 48px;
  text-align: center;
}

.page-hero h1 {
  font-size: clamp(28px, 4vw, 40px);
  margin: 0 0 10px;
  font-weight: 800;
}

.page-hero p {
  color: var(--text-muted);
  margin: 0;
}

.prose {
  max-width: 760px;
  margin: 0 auto;
  padding: 64px 24px;
}

.prose h2 {
  font-size: 21px;
  margin: 36px 0 12px;
  font-weight: 800;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose p, .prose li {
  color: var(--text-muted-dark);
  font-size: 15.5px;
}

.prose ul {
  padding-left: 20px;
}

.prose .updated {
  color: var(--text-muted-dark);
  font-size: 13.5px;
  margin-bottom: 40px;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 40px;
}

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

.value-card {
  background: var(--white);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius);
  padding: 24px;
}

.value-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.value-card p {
  margin: 0;
  color: var(--text-muted-dark);
  font-size: 14.5px;
}

/* ---------- Web app (dashboard / deals / CIT) ---------- */

.app-topbar {
  background: var(--navy);
  border-bottom: 1px solid var(--border);
}

.app-topbar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.app-nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.app-nav-links a {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 999px;
  transition: background 0.15s ease, color 0.15s ease;
}

.app-nav-links a:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.06);
}

.app-nav-links a.active {
  color: var(--white);
  background: rgba(23, 158, 163, 0.22);
}

.app-topbar .user-pill {
  margin-bottom: 0;
}

.app-topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

@media (max-width: 720px) {
  .app-nav-links a { padding: 8px 10px; font-size: 13px; }
  .app-topbar .user-pill span { display: none; }
}

.app-signout {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.app-signout:hover {
  color: var(--white);
  border-color: var(--text-muted);
}

.app-page {
  background: var(--white);
  min-height: calc(100vh - 64px);
  padding: 40px 0 80px;
}

.app-page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 28px;
}

.app-page-head h1 {
  font-size: 26px;
  margin: 0 0 4px;
  font-weight: 800;
}

.app-page-head .sub {
  color: var(--text-muted-dark);
  font-size: 14.5px;
  margin: 0;
}

.app-loading {
  padding: 60px 0;
  text-align: center;
  color: var(--text-muted-dark);
  font-size: 14.5px;
}

.app-error {
  background: rgba(229, 72, 77, 0.08);
  border: 1px solid rgba(229, 72, 77, 0.25);
  color: #B3302F;
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 14px;
  margin-bottom: 24px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 36px;
}

@media (max-width: 860px) {
  .metric-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .metric-grid { grid-template-columns: 1fr; }
}

.metric-tile {
  background: var(--white);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius);
  padding: 18px;
}

.metric-tile .label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-muted-dark);
  font-weight: 700;
  margin-bottom: 8px;
}

.metric-tile .value {
  font-size: 26px;
  font-weight: 800;
  color: var(--navy);
}

.metric-tile.warn .value {
  color: #B3302F;
}

.panel {
  background: var(--white);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
}

.panel h2 {
  font-size: 16px;
  margin: 0 0 18px;
  font-weight: 800;
}

.penetration-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 9px 0;
}

.penetration-row .name {
  width: 130px;
  flex-shrink: 0;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--navy);
}

.penetration-row .track {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: var(--border-dark);
  overflow: hidden;
}

.penetration-row .fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--teal), var(--teal-light));
}

.penetration-row .pct {
  width: 46px;
  text-align: right;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted-dark);
  flex-shrink: 0;
}

.toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.toolbar input[type="search"],
.toolbar select {
  padding: 10px 14px;
  border-radius: 9px;
  border: 1px solid var(--border-dark);
  background: var(--white);
  font-size: 14px;
  color: var(--navy);
  outline: none;
}

.toolbar input[type="search"] {
  flex: 1;
  min-width: 180px;
}

.toolbar input[type="search"]:focus,
.toolbar select:focus {
  border-color: var(--teal);
}

.data-table-wrap {
  background: var(--white);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius);
  overflow: hidden;
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

table.data-table th {
  text-align: left;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-muted-dark);
  font-weight: 700;
  padding: 12px 16px;
  background: rgba(1, 16, 47, 0.03);
  border-bottom: 1px solid var(--border-dark);
  white-space: nowrap;
}

table.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-dark);
  color: var(--navy);
  vertical-align: middle;
}

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

table.data-table tr:hover td {
  background: rgba(23, 158, 163, 0.04);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.status-delivered, .status-funded { background: rgba(47, 179, 128, 0.14); color: #1F8C5C; }
.status-booked, .status-sent_to_lender { background: rgba(59, 130, 246, 0.14); color: #2563EB; }
.status-funding, .status-awaiting_docs { background: rgba(245, 158, 11, 0.16); color: #B7791F; }
.status-cancelled, .status-held { background: rgba(229, 72, 77, 0.14); color: #C0342F; }

.product-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(23, 158, 163, 0.12);
  color: var(--teal-deep);
  margin-right: 4px;
  margin-bottom: 2px;
}

.days-badge {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.days-badge.risk {
  color: #C0342F;
}

.empty-row td {
  text-align: center;
  color: var(--text-muted-dark);
  padding: 40px 16px;
}

/* ---------- app page extras: header actions, ghost buttons on light bg ---------- */

.app-page-head-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.app-btn-sm {
  padding: 9px 18px;
  font-size: 13.5px;
  box-shadow: none;
}

.app-btn-ghost {
  background: transparent;
  color: var(--teal-deep);
  border-color: var(--border-dark);
}

.app-btn-ghost:hover {
  background: rgba(23, 158, 163, 0.08);
}

.btn-danger {
  background: transparent;
  color: #C0342F;
  border-color: rgba(229, 72, 77, 0.4);
}

.btn-danger:hover {
  background: rgba(229, 72, 77, 0.08);
}

.data-table-clickable tbody tr {
  cursor: pointer;
}

/* ---------- Deal import ---------- */

.file-drop {
  border: 2px dashed var(--border-dark);
  border-radius: var(--radius);
  padding: 36px 20px;
  text-align: center;
  color: var(--text-muted-dark);
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.file-drop:hover,
.file-drop.drag-over {
  border-color: var(--teal);
  background: rgba(23, 158, 163, 0.05);
  color: var(--teal-deep);
}

.warning-list {
  margin: 8px 0 0;
  padding-left: 20px;
  color: var(--text-muted-dark);
  font-size: 13px;
  line-height: 1.6;
}

.import-result-success {
  background: rgba(47, 179, 128, 0.1);
  border: 1px solid rgba(47, 179, 128, 0.3);
  color: #1F8C5C;
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 14px;
  font-weight: 600;
}

/* ---------- CIT detail modal ---------- */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(1, 16, 47, 0.55);
  z-index: 100;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px;
  overflow-y: auto;
}

.modal {
  background: var(--white);
  border-radius: var(--radius);
  width: 100%;
  max-width: 620px;
  box-shadow: 0 30px 60px rgba(1, 16, 47, 0.35);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-dark);
}

.modal-header h2 {
  font-size: 18px;
  font-weight: 800;
  margin: 0;
  color: var(--navy);
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  line-height: 1;
  color: var(--text-muted-dark);
  cursor: pointer;
  padding: 4px;
}

.modal-close:hover {
  color: var(--navy);
}

.modal-body {
  padding: 24px;
}

.modal-section {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--border-dark);
}

.modal-section h3 {
  font-size: 14px;
  font-weight: 800;
  margin: 0 0 12px;
  color: var(--navy);
}

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

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-wide {
  grid-column: 1 / -1;
}

.field label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--text-muted-dark);
}

.field input,
.field select,
.field textarea {
  padding: 10px 12px;
  border-radius: 9px;
  border: 1px solid var(--border-dark);
  background: var(--white);
  font-size: 14px;
  font-family: inherit;
  color: var(--navy);
  outline: none;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--teal);
}

.field-static {
  padding: 10px 12px;
  font-size: 14px;
  color: var(--navy);
  font-weight: 600;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.attachment-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.attachment-thumb {
  position: relative;
  width: 84px;
  height: 84px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border-dark);
  background: rgba(1, 16, 47, 0.03);
}

.attachment-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.attachment-file-icon {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  color: var(--text-muted-dark);
}

.attachment-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: none;
  background: rgba(1, 16, 47, 0.7);
  color: var(--white);
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.comment-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 14px;
  max-height: 220px;
  overflow-y: auto;
}

.comment {
  background: rgba(1, 16, 47, 0.03);
  border-radius: 10px;
  padding: 10px 12px;
}

.comment-meta {
  font-size: 12px;
  color: var(--text-muted-dark);
  margin-bottom: 4px;
}

.comment-body {
  font-size: 14px;
  color: var(--navy);
  white-space: pre-wrap;
}

.comment-form {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.comment-form textarea {
  flex: 1;
  padding: 10px 12px;
  border-radius: 9px;
  border: 1px solid var(--border-dark);
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
}

@media (max-width: 560px) {
  .field-grid { grid-template-columns: 1fr; }
  .comment-form { flex-direction: column; }
}

/* ---------- 404 ---------- */

.error-shell {
  min-height: calc(100vh - 64px);
  background: var(--navy);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
}

.error-shell .code {
  font-size: 88px;
  font-weight: 800;
  color: var(--teal-light);
  line-height: 1;
  margin-bottom: 10px;
}
