:root {
  color-scheme: light;
  --canvas: #f5f7fa;
  --surface: #ffffff;
  --navy: #14223b;
  --navy-dark: #0d192f;
  --ink: #18253b;
  --muted: #6e7c91;
  --line: #e5eaf0;
  --line-soft: #edf1f5;
  --accent: #1d6a78;
  --accent-dark: #135968;
  --accent-soft: #e9f4f4;
  --new: #2359b6;
  --new-bg: #eaf1ff;
  --in-progress: #94600a;
  --in-progress-bg: #fff5df;
  --spam: #b43b45;
  --spam-bg: #ffedef;
  --completed: #13734d;
  --completed-bg: #e7f7ed;
  --shadow: 0 8px 24px rgba(24, 39, 61, .035);
  --round: 14px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--canvas); color: var(--ink); font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif; font-size: 14px; line-height: 1.5; }
a { color: inherit; text-decoration: none; }
button, select { font: inherit; }
button, a, select { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, select:focus-visible { outline: 3px solid #85b9c6; outline-offset: 3px; }
.shell { min-height: 100vh; display: grid; grid-template-columns: 246px minmax(0,1fr); }
.sidebar { background: var(--navy-dark); color: #f4f7fc; padding: 29px 17px 23px; display: flex; flex-direction: column; }
.logo { display: flex; align-items: center; gap: 12px; padding: 0 12px; }
.logo-symbol { width: 38px; height: 38px; border-radius: 11px; background: #267c8b; display: grid; place-items: center; color: white; flex-shrink: 0; }
.logo-symbol svg { width: 22px; height: 22px; }
.logo-name { font-size: 19px; font-weight: 750; letter-spacing: -.75px; line-height: 1.1; }
.logo-subtitle { display: block; margin-top: 5px; color: #8fa5bd; font-size: 9px; letter-spacing: 1.5px; text-transform: uppercase; font-weight: 700; }
.nav-caption { color: #8094b0; font-size: 10px; font-weight: 700; letter-spacing: 1.5px; margin: 46px 12px 10px; text-transform: uppercase; }
.nav-link { display: flex; gap: 12px; align-items: center; padding: 12px 13px; border-radius: 10px; font-size: 13px; color: #b9c6d8; font-weight: 550; margin: 3px 0; transition: background .15s; }
.nav-link svg { width: 18px; height: 18px; stroke-width: 1.8; }
.nav-link.active { background: #213853; color: white; font-weight: 700; }
.nav-link:hover { background: #243b57; color: white; }
.side-note { margin-top: auto; background: #172a45; border: 1px solid #2a425f; border-radius: 12px; padding: 15px; color: #aebed2; font-size: 12px; }
.side-note strong { display: block; color: #f4f8ff; font-size: 12px; margin-bottom: 6px; }
.side-note p { margin: 0; }
.main { min-width: 0; padding: 35px clamp(22px, 3.5vw, 52px) 45px; max-width: 1670px; width: 100%; margin: auto; }
.mobile-bar { display: none; }
.kicker { color: var(--accent); text-transform: uppercase; font-size: 11px; letter-spacing: 1.25px; font-weight: 800; margin-bottom: 5px; }
.page-title { font-size: clamp(27px, 3vw, 34px); line-height: 1.2; letter-spacing: -1.15px; margin: 0 0 7px; font-weight: 760; }
.page-lead { color: var(--muted); font-size: 13.5px; margin: 0; max-width: 680px; }
.tophead { display: flex; justify-content: space-between; align-items: flex-start; gap: 22px; margin-bottom: 28px; }
.demo-chip { background: #e9f3f5; color: #2b7280; border: 1px solid #cfe2e5; padding: 7px 12px; font-size: 11px; font-weight: 750; border-radius: 99px; white-space: nowrap; display: inline-flex; align-items: center; gap: 7px; }
.demo-chip::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #399b94; }
.summary-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-bottom: 25px; }
.stat { min-width: 0; background: var(--surface); border: 1px solid var(--line); padding: 19px 19px 18px; border-radius: var(--round); box-shadow: var(--shadow); }
.stat-label { color: #738197; font-size: 12px; font-weight: 650; display: block; }
.stat-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.stat-icon { width: 31px; height: 31px; border-radius: 9px; background: #f0f3f8; display: grid; place-items: center; color: #697b99; flex-shrink: 0; }
.stat-icon svg { width: 16px; height: 16px; }
.stat-number { display: block; font-size: 32px; font-weight: 780; letter-spacing: -1.15px; margin: 10px 0 3px; font-variant-numeric: tabular-nums; }
.stat-desc { color: #929dad; font-size: 11px; }
.stat-new .stat-icon { background: var(--new-bg); color: var(--new); }
.stat-in-progress .stat-icon { background: var(--in-progress-bg); color: var(--in-progress); }
.stat-spam .stat-icon { background: var(--spam-bg); color: var(--spam); }
.stat-completed .stat-icon { background: var(--completed-bg); color: var(--completed); }
.panel { background: white; border: 1px solid var(--line); border-radius: 15px; overflow: hidden; box-shadow: var(--shadow); margin-bottom: 19px; }
.panel-head { padding: 21px 24px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--line); }
.panel-title { margin: 0 0 4px; font-size: 17px; letter-spacing: -.3px; }
.panel-subtitle { font-size: 12px; color: var(--muted); margin: 0; }
.count-tag { font-size: 12px; padding: 6px 9px; background: #f3f5f8; color: #64748a; border-radius: 8px; font-weight: 700; white-space: nowrap; }
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
.table-dashboard { min-width: 850px; }
.table-submissions { min-width: 860px; }
th { color: #718096; background: #fbfcfe; font-size: 11px; font-weight: 750; text-transform: uppercase; letter-spacing: .6px; text-align: left; padding: 15px 19px; white-space: nowrap; border-bottom: 1px solid var(--line); }
td { padding: 16px 19px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:not(.total-row):hover { background: #fbfdff; }
.table-dashboard .num { text-align: center; }
.table-dashboard .num strong { font-weight: 740; }
.table-dashboard .action { text-align: right; }
.form-title { display: block; font-size: 13px; font-weight: 740; letter-spacing: -.1px; }
.site-line { display: flex; align-items: center; gap: 7px; font-size: 11px; color: #8390a4; margin-top: 4px; }
.site-dot { width: 7px; height: 7px; border-radius: 50%; background: #7b96b4; }
.site-dot.kibops { background: #7c83c9; }
.site-dot.tecknoklient { background: #47a89a; }
.count-pill { display: inline-block; min-width: 35px; padding: 5px 9px; text-align: center; font-size: 12px; font-weight: 750; border-radius: 8px; }
.count-pill.new, .status-badge.new { background: var(--new-bg); color: var(--new); }
.count-pill.in-progress, .status-badge.in-progress { background: var(--in-progress-bg); color: var(--in-progress); }
.count-pill.spam, .status-badge.spam { background: var(--spam-bg); color: var(--spam); }
.count-pill.completed, .status-badge.completed { background: var(--completed-bg); color: var(--completed); }
.total-row { background: #f6f9fc; font-weight: 780; }
.total-row td { border-top: 1px solid var(--line); }
.action-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 13px; background: var(--accent); color: white; border-radius: 9px; font-weight: 700; font-size: 12px; white-space: nowrap; transition: background .15s, transform .15s; }
.action-btn:hover { background: var(--accent-dark); transform: translateY(-1px); }
.action-btn svg { width: 15px; height: 15px; }
.footer-note { color: #8794a5; font-size: 12px; padding: 5px 0 15px; }
/* Form submissions page */
.back-link { display: inline-flex; align-items: center; gap: 8px; color: #61768c; font-size: 12px; font-weight: 650; margin-bottom: 22px; }
.back-link:hover { color: var(--accent); }
.back-link svg { width: 16px; height: 16px; }
.submission-head { margin-bottom: 23px; }
.form-site-label { margin-bottom: 8px; display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 11px; text-transform: uppercase; color: var(--accent); letter-spacing: 1px; }
.form-site-label .site-dot { width: 9px; height: 9px; }
.filter-area { padding: 17px 24px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.filter-label { color: #6f7d91; font-size: 12px; font-weight: 750; }
.filter-options { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.filter-button { background: #fff; border: 1px solid #e1e7ee; color: #596b82; font-size: 12px; font-weight: 700; border-radius: 9px; padding: 8px 11px; cursor: pointer; }
.filter-button:hover { background: #f2f6f8; }
.filter-button.active { color: white; background: var(--accent); border-color: var(--accent); }
.filter-button .filter-number { margin-left: 5px; opacity: .75; }
.records-count { color: #78869b; font-size: 12px; margin-left: auto; }
.submission-ref { color: #657994; font-size: 12px; font-weight: 730; white-space: nowrap; }
.primary-cell { font-weight: 740; font-size: 13px; white-space: nowrap; }
.secondary-cell { color: #617185; font-size: 12px; white-space: nowrap; }
.datetime { white-space: nowrap; font-size: 12px; }
.status-badge { border-radius: 7px; font-size: 11px; font-weight: 780; padding: 5px 10px; white-space: nowrap; display: inline-block; }
.ellipsis { max-width: 240px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.empty-state { text-align: center; padding: 60px 20px; color: #748198; }
.empty-state strong { display: block; color: #3d5068; margin-bottom: 5px; }
.not-found { text-align: center; padding: 70px 25px; }
.not-found h2 { font-size: 22px; margin: 0 0 10px; }
.not-found p { color: var(--muted); margin-bottom: 24px; }
@media (max-width: 1250px) { .summary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 830px) { .shell { grid-template-columns: 1fr; } .sidebar { display: none; } .mobile-bar { background: var(--navy-dark); color: white; display: flex; align-items: center; justify-content: space-between; padding: 13px 20px; } .mobile-brand { display: flex; align-items: center; gap: 8px; font-weight: 780; } .mobile-brand .logo-symbol { width: 28px; height: 28px; border-radius: 8px; } .mobile-brand svg { width: 17px; height: 17px; } .mobile-link { color: #c9d8e7; font-size: 12px; font-weight: 650; } .main { padding: 23px 18px 38px; } .tophead { margin-bottom: 20px; } }
@media (max-width: 600px) { .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; } .stat { padding: 14px; } .stat-number { font-size: 27px; } .stat-desc { display: none; } .stat-icon { width: 27px; height: 27px; } .page-title { font-size: 27px; } .page-lead { font-size: 12px; } .panel-head { padding: 17px 15px; } .filter-area { padding: 15px; gap: 10px; } .records-count { margin-left: 0; flex-basis: 100%; } .demo-chip { font-size: 10px; padding: 6px 9px; } .table-dashboard th, .table-dashboard td, .table-submissions th, .table-submissions td { padding: 13px 14px; } }

/* v3 additions: website/form selection, VIEW links and submission detail */
.selector-row { display: grid; grid-template-columns: minmax(200px,1fr) minmax(240px,1.2fr) minmax(150px,.65fr); align-items: end; gap: 18px; padding: 22px 24px; }
.selector-field { min-width: 0; }
.selector-field label { display: block; font-weight: 750; color: #465973; margin: 0 0 8px; font-size: 12px; }
.selector-field select { background: #fff; color: var(--ink); border: 1px solid #d8e2ea; width: 100%; border-radius: 9px; padding: 12px 37px 12px 13px; font-size: 13px; cursor: pointer; min-height: 45px; }
.selector-field select:hover { border-color: #b8ccd5; }
.selector-summary { display: flex; flex-direction: column; gap: 1px; justify-content: center; align-self: stretch; border-left: 1px solid var(--line); padding-left: 20px; line-height: 1.5; min-width: 0; }
.selector-summary-label { font-weight: 750; font-size: 10px; letter-spacing: .7px; color: #8492a5; text-transform: uppercase; }
.selector-summary strong { font-size: 13px; overflow-wrap: anywhere; }
.selector-summary > span:last-child { color: #7f8ca0; font-size: 11px; }
.view-btn { color: var(--accent); border: 1px solid #b9d7d9; background: #eff8f8; padding: 8px 13px; border-radius: 9px; font-weight: 820; font-size: 11px; display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; }
.view-btn:hover { background: #deeeee; border-color: #92c3c8; }
.view-btn svg { width: 13px; height: 13px; }
.detail-heading { margin-bottom: 23px; }
.detail-section-content { padding: 22px 25px 25px; }
.metadata-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.metadata-item { border: 1px solid #e4eaf0; border-radius: 11px; background: #f9fbfd; padding: 15px 17px; min-width: 0; }
.metadata-label { display: block; font-size: 11px; color: #6d7d92; font-weight: 750; margin-bottom: 6px; }
.limit-hint { font-size: 10px; font-weight: 500; color: #9ba7b4; }
.metadata-value { font-size: 20px; font-weight: 780; letter-spacing: .2px; color: #1b2c45; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.metadata-status { font-size: 13px; padding: 7px 12px; }
.notes-block { margin-top: 25px; border-top: 1px solid var(--line); padding-top: 21px; }
.notes-title-row { display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 14px; }
.subsection-title { font-size: 16px; font-weight: 750; margin: 0; }
.staff-name { font-size: 11px; color: #71829a; background: #f4f7fa; padding: 6px 10px; border-radius: 7px; }
.field-caption { font-weight: 700; color: #566882; font-size: 12px; display: block; margin-bottom: 8px; }
.note-textarea { display: block; width: 100%; min-height: 110px; border: 1px solid #d8e2ea; border-radius: 10px; padding: 13px 14px; resize: vertical; color: var(--ink); background: #fff; font: inherit; font-size: 13px; }
.note-textarea:focus { outline: 3px solid #badbdc; outline-offset: 1px; border-color: var(--accent); }
.note-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.note-actions .action-btn { border: none; min-width: 80px; min-height: 38px; cursor: pointer; }
.button-secondary { padding: 10px 17px; min-height: 38px; border-radius: 9px; border: 1px solid #d6e0ea; background: #fff; color: #53677e; font-weight: 750; cursor: pointer; font-size: 12px; }
.button-secondary:hover { background: #f3f6f9; }
.save-feedback { font-size: 11px; color: #61788b; margin-left: 4px; }
.notes-history { margin-top: 22px; background: #fbfcfe; border: 1px solid #e7edf3; border-radius: 10px; padding: 16px; }
.notes-history-title { font-size: 12px; font-weight: 750; color: #54657c; margin-bottom: 12px; }
.notes-count { color: #8b9aac; font-weight: 500; }
.note-entry { background: white; padding: 12px 13px; border: 1px solid #e8edf2; border-radius: 8px; margin-top: 8px; }
.note-entry-content { font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; white-space: pre-wrap; }
.note-entry-content strong { color: #253e58; font-weight: 800; }
.notes-empty { color: #8a97a7; font-size: 12px; margin: 6px 0; }
.form-preview-head { border: 1px solid var(--line); border-radius: 11px 11px 0 0; background: #f6f9fc; padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.form-preview-head strong { color: #2b3e54; font-size: 14px; }
.form-preview-head span { color: #8796a8; font-size: 12px; }
.submitted-fields { border: 1px solid var(--line); border-top: 0; border-radius: 0 0 11px 11px; padding: 23px 20px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; }
.submitted-field { min-width: 0; }
.submitted-field.full-width { grid-column: 1 / -1; }
.submitted-field label { display: block; margin-bottom: 7px; font-size: 12px; font-weight: 750; color: #52657d; }
.readonly-input { display: block; width: 100%; border: 1px solid #e0e7ee; border-radius: 8px; background: #fbfcff; color: #334860; font: inherit; font-size: 13px; padding: 12px 13px; min-height: 44px; }
.readonly-textarea { resize: none; min-height: 95px; line-height: 1.65; }
.form-preview-disclaimer { font-size: 11px; color: #8493a5; margin: 13px 0 0; }
@media (max-width: 1080px) { .selector-row { grid-template-columns: 1fr 1fr; } .selector-summary { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line); padding: 12px 0 0; } }
@media (max-width: 620px) { .selector-row { grid-template-columns: 1fr; gap: 14px; padding: 16px; } .selector-summary { grid-column: auto; } .detail-section-content { padding: 17px; } .metadata-grid { grid-template-columns: 1fr; gap: 9px; } .metadata-item { padding: 11px 13px; } .metadata-label { margin-bottom: 4px; } .metadata-value { font-size: 17px; } .notes-history { padding: 12px; } .submitted-fields { grid-template-columns: 1fr; padding: 15px; } .submitted-field.full-width { grid-column: auto; } .form-preview-head { padding: 13px 15px; } }

/* v4: dashboard filters are presented before the general statistics. */
.dashboard-filter-panel { margin-bottom: 21px; }
.dashboard-filter-panel .panel-head { padding: 17px 24px; }
.dashboard-filter-panel .selector-row { padding-top: 17px; padding-bottom: 17px; }
.dashboard-filter-panel .selector-summary { min-width: 155px; }
@media (max-width: 620px) {
  .dashboard-filter-panel .panel-head { padding: 16px; }
  .dashboard-filter-panel .selector-row { padding: 16px; }
}
