@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  --bg: #F6F7FA; --surface: #FFFFFF; --surface-alt: #EDF1F6;
  --ink: #182230; --muted: #5B6675; --border: #DCE2EA;
  --primary: #163654; --primary-dark: #0E2439;
  --accent: #D97B32; --accent-soft: #F7E4D2;
  --good: #2F7D5C; --good-soft: #DCEEE5;
  --warn: #B8862B; --warn-soft: #F5E7CB;
  --danger: #B23A34; --danger-soft: #F5DEDC;
  --radius-md: 8px; --radius-lg: 12px;
  --shadow: 0 1px 2px rgba(20,30,45,0.06), 0 4px 14px rgba(20,30,45,0.06);
  --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 24px; --space-6: 32px; --space-7: 48px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: 'IBM Plex Sans', system-ui, sans-serif; line-height: 1.6; }
code, .mono { font-family: 'IBM Plex Mono', monospace; }
.wrap { max-width: 1000px; margin: 0 auto; padding: 0 24px; }
h1, h2, h3, h4 { font-weight: 700; margin: 0 0 8px; color: var(--ink); }
p { margin: 0 0 0.9em; }
a { color: var(--primary); }
.text-muted { color: var(--muted); }
.text-center { text-align: center; }

/* Header */
.site-header { border-bottom: 1px solid var(--border); background: var(--surface); }
.site-header-inner { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { width: 32px; height: 32px; border-radius: 8px; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-family: 'IBM Plex Mono', monospace; }
.brand-name { font-weight: 700; color: var(--ink); font-size: 1.05rem; }
.nav-admin-link { font-size: 0.88rem; font-weight: 600; color: var(--muted); text-decoration: none; }
.nav-admin-link:hover { color: var(--primary); }

.site-footer { padding: 32px 0; text-align: center; color: var(--muted); font-size: 0.82rem; margin-top: 48px; }

/* Hero / picker */
.hero { padding: 56px 0 32px; text-align: center; }
.hero h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
.hero p { color: var(--muted); font-size: 1.05rem; max-width: 560px; margin: 0 auto; }

.industry-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding: 24px 0 64px; }
.industry-card {
  display: block; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 22px; text-decoration: none; color: inherit; box-shadow: var(--shadow); transition: transform .1s, box-shadow .1s;
  position: relative;
}
.industry-card:hover { transform: translateY(-2px); box-shadow: 0 4px 20px rgba(20,30,45,0.12); }
.industry-card.unavailable { opacity: 0.5; pointer-events: none; }
.industry-card .icon-wrap { width: 40px; height: 40px; border-radius: 10px; background: var(--surface-alt); color: var(--primary); display: flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.industry-card h3 { font-size: 1rem; margin-bottom: 4px; }
.industry-card .status { position: absolute; top: 18px; right: 18px; font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; padding: 3px 8px; border-radius: 999px; }
.industry-card .status.ready { background: var(--good-soft); color: var(--good); }
.industry-card .status.soon { background: var(--surface-alt); color: var(--muted); }

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

/* Forms */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-5); margin-bottom: var(--space-5); box-shadow: var(--shadow); }
.field { margin-bottom: var(--space-4); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
.field label { display: block; font-weight: 600; font-size: 0.85rem; margin-bottom: 6px; }
.field .hint { font-weight: 400; color: var(--muted); font-size: 0.8rem; }
input[type=text], input[type=email], input[type=tel], input[type=number], input[type=password], input[type=date], input[type=file], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-md);
  font: inherit; font-size: 0.92rem; background: #fff; color: var(--ink);
}
input[type=color] { width: 56px; height: 40px; padding: 2px; border: 1px solid var(--border); border-radius: var(--radius-md); }
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--primary); outline-offset: 1px; }
.color-row { display: flex; gap: var(--space-4); flex-wrap: wrap; align-items: center; }
.color-field { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.color-field label { font-size: 0.75rem; }

.service-row { display: grid; grid-template-columns: 2fr 3fr 1fr; gap: var(--space-3); align-items: end; margin-bottom: var(--space-3); padding-bottom: var(--space-3); border-bottom: 1px solid var(--border); }
.service-row:last-child { border-bottom: none; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-weight: 600; font-size: 0.9rem; padding: 11px 20px; border-radius: var(--radius-md); border: 1px solid var(--border); background: var(--surface); color: var(--ink); cursor: pointer; text-decoration: none; }
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline { background: #fff; }
.btn-sm { padding: 6px 12px; font-size: 0.8rem; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Flash */
.flash { margin: var(--space-4) 0; padding: 12px 16px; border-radius: var(--radius-md); font-weight: 600; font-size: 0.9rem; }
.flash-success { background: var(--good-soft); color: #16653B; border: 1px solid #B7E6C9; }
.flash-error { background: var(--danger-soft); color: #8A2E22; border: 1px solid #F3C1BA; }
.flash-info { background: var(--surface-alt); color: var(--primary-dark); border: 1px solid var(--border); }

/* Stat tiles */
.stat-row { display: flex; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); margin-bottom: var(--space-5); }
.stat { flex: 1; padding: 16px 20px; border-right: 1px solid var(--border); }
.stat:last-child { border-right: none; }
.stat .n { font-family: 'IBM Plex Mono', monospace; font-size: 1.4rem; font-weight: 600; color: var(--primary); display: block; }
.stat .l { font-size: 0.78rem; color: var(--muted); }

/* Tables */
.table-scroll { overflow-x: auto; }
table.data-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
table.data-table th { text-align: left; color: var(--muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: .03em; padding: 10px 12px; border-bottom: 2px solid var(--border); }
table.data-table td { padding: 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
table.data-table tr:hover td { background: var(--surface-alt); }

.badge { display: inline-block; font-size: 0.7rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; text-transform: uppercase; letter-spacing: 0.03em; }
.badge-new { background: #EAF0FE; color: #2A4FBD; }
.badge-progress { background: var(--warn-soft); color: var(--warn); }
.badge-completed { background: var(--good-soft); color: var(--good); }
.badge-failed { background: var(--danger-soft); color: var(--danger); }
.badge-hosted { background: var(--surface-alt); color: var(--muted); }

/* Admin shell (mirrors the client-site admin so it feels like the same family) */
.dash-shell { display: flex; min-height: 100vh; }
.dash-sidebar { width: 240px; background: var(--primary-dark); color: #fff; padding: 24px 18px; flex-shrink: 0; display: flex; flex-direction: column; }
.dash-sidebar .brand { color: #fff; margin-bottom: 4px; }
.dash-sidebar .brand-name { color: #fff; }
.dash-sidebar .sub { font-size: 0.72rem; color: rgba(255,255,255,0.5); margin-bottom: 24px; }
.dash-nav { display: flex; flex-direction: column; gap: 2px; }
.dash-nav a { color: rgba(255,255,255,0.78); text-decoration: none; padding: 9px 12px; border-radius: 7px; font-size: 0.9rem; font-weight: 500; }
.dash-nav a:hover { background: rgba(255,255,255,0.06); color: #fff; }
.dash-nav a.active { background: rgba(255,255,255,0.12); color: #fff; }
.dash-main { flex: 1; padding: 32px 40px; max-width: 1200px; }
.dash-topbar { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 24px; }

.mb-0 { margin-bottom: 0; }

.login-shell { max-width: 380px; margin: 90px auto; }
.login-shell .panel { }
