:root {
  --primary: #075dbd;
  --primary-dark: #063b7b;
  --primary-deep: #032c60;
  --primary-light: #e9f3ff;
  --accent: #1d8bff;
  --bg: #f2f6fb;
  --surface: #ffffff;
  --surface-soft: #f8fbff;
  --text: #14233d;
  --muted: #64748b;
  --border: #d9e4f0;
  --border-strong: #b9cde2;
  --success: #087a56;
  --success-bg: #dff7ec;
  --danger: #b42318;
  --danger-bg: #fee9e7;
  --warning: #9a6700;
  --shadow-sm: 0 8px 24px rgba(15, 50, 91, .08);
  --shadow-md: 0 18px 50px rgba(15, 50, 91, .13);
  --radius-sm: 11px;
  --radius-md: 18px;
  --radius-lg: 26px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  background:
    radial-gradient(circle at 12% 0%, rgba(29, 139, 255, .08), transparent 25%),
    var(--bg);
  color: var(--text);
  line-height: 1.55;
}
button, input, textarea, select { font: inherit; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin-top: 0; }
h1 { letter-spacing: -.035em; }
h2 { letter-spacing: -.02em; }
code { overflow-wrap: anywhere; }

.topbar {
  min-height: 74px;
  padding: 10px max(3%, calc((100% - 1500px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  position: sticky;
  top: 0;
  z-index: 50;
  color: #fff;
  background: linear-gradient(120deg, var(--primary-deep), var(--primary) 68%, #1179dc);
  box-shadow: 0 8px 28px rgba(3, 44, 96, .23);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.brand > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.brand strong { font-size: 15px; letter-spacing: .045em; white-space: nowrap; }
.brand small { color: rgba(255,255,255,.73); font-size: 11px; letter-spacing: .02em; }
.brand-mark {
  width: 43px;
  height: 43px;
  flex: 0 0 43px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: var(--primary-deep);
  background: #fff;
  font-weight: 900;
  letter-spacing: -.04em;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.55), 0 8px 18px rgba(0,0,0,.15);
}
.brand-mark-large { width: 58px; height: 58px; flex-basis: 58px; border-radius: 17px; background: linear-gradient(145deg, var(--primary), var(--primary-dark)); color: #fff; }
.nav { display: flex; align-items: center; justify-content: flex-end; gap: 10px; min-width: 0; }
.user-chip {
  max-width: 250px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 11px 6px 7px;
  border: 1px solid rgba(255,255,255,.23);
  border-radius: 999px;
  background: rgba(255,255,255,.11);
  backdrop-filter: blur(8px);
}
.user-chip span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; font-weight: 700; }
.avatar { width: 35px; height: 35px; border-radius: 50%; object-fit: cover; background: #e5edf6; }

.btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 11px;
  min-height: 42px;
  padding: 10px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 800;
  font-size: 14px;
  line-height: 1.1;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, opacity .18s ease;
}
.btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(8, 59, 123, .14); }
.btn:focus-visible, .input:focus-visible, .textarea:focus-visible, .select:focus-visible { outline: 3px solid rgba(29,139,255,.22); outline-offset: 2px; }
.btn:disabled { opacity: .52; cursor: not-allowed; box-shadow: none; transform: none; }
.btn-primary { color: #fff; background: linear-gradient(135deg, var(--primary), #0876db); }
.btn-light { color: var(--primary-dark); background: #fff; }
.btn-outline-light { color: #fff; border-color: rgba(255,255,255,.45); background: rgba(255,255,255,.08); }
.btn-soft { color: var(--primary-dark); border-color: #cfe2f8; background: var(--primary-light); }
.btn-ghost { color: var(--primary-dark); border-color: var(--border); background: #fff; }
.btn-danger { color: #fff; background: linear-gradient(135deg, #b42318, #d13b2e); }
.btn-danger-soft { color: var(--danger); border-color: #f5c7c2; background: var(--danger-bg); }
.btn-sm { min-height: 35px; padding: 8px 11px; font-size: 12px; border-radius: 9px; }
.btn-block { width: 100%; }

.container { width: min(1500px, 94%); margin: 28px auto 0; }
.page-stack { display: flex; flex-direction: column; gap: 20px; }
.card {
  background: rgba(255,255,255,.98);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}

.hero {
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
  padding: clamp(28px, 5vw, 52px);
  color: #fff;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(125deg, rgba(3,44,96,.97), rgba(7,93,189,.94)),
    radial-gradient(circle at right, #3fa4ff, transparent 40%);
  box-shadow: var(--shadow-md);
}
.hero::after {
  content: "";
  position: absolute;
  width: 320px;
  height: 320px;
  right: -85px;
  top: -115px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 50%;
  box-shadow: 0 0 0 48px rgba(255,255,255,.045), 0 0 0 98px rgba(255,255,255,.025);
}
.hero > * { position: relative; z-index: 1; }
.hero h1 { max-width: 850px; margin: 8px 0 12px; font-size: clamp(31px, 4.2vw, 55px); line-height: 1.06; }
.hero p { max-width: 760px; margin: 0; color: rgba(255,255,255,.84); font-size: clamp(15px, 1.5vw, 18px); }
.hero-badge {
  width: 155px;
  height: 155px;
  flex: 0 0 155px;
  display: grid;
  place-content: center;
  text-align: center;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(10px);
}
.hero-badge span { display: block; font-size: 43px; font-weight: 900; line-height: 1; }
.hero-badge small { display: block; margin-top: 8px; color: rgba(255,255,255,.75); font-weight: 700; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; color: rgba(255,255,255,.75); }
.eyebrow-blue { color: var(--primary); }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stat-card { min-height: 145px; display: flex; flex-direction: column; justify-content: center; position: relative; overflow: hidden; }
.stat-card::after { content: ""; position: absolute; width: 86px; height: 86px; right: -25px; bottom: -32px; border-radius: 50%; background: var(--primary-light); }
.stat-card span { color: var(--muted); font-size: 13px; font-weight: 800; }
.stat-card strong { margin: 4px 0 2px; color: var(--primary); font-size: 35px; line-height: 1.1; }
.stat-card .stat-word { font-size: 22px; }
.stat-card small { color: #8a99aa; }
.admin-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 22px; margin-bottom: 22px; }
.section-heading.compact { margin-bottom: 18px; }
.section-heading h1, .section-heading h2 { margin: 5px 0 5px; }
.section-heading h1 { font-size: clamp(25px, 3vw, 38px); }
.section-heading h2 { font-size: clamp(22px, 2vw, 30px); }
.section-heading p { margin-bottom: 0; color: var(--muted); }
.security-pill, .record-count {
  flex: 0 0 auto;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--primary-dark);
  background: var(--primary-light);
  font-size: 12px;
  font-weight: 800;
}

.workflow-card { padding: clamp(19px, 3vw, 30px); }
.workflow-line { height: 6px; margin: 0 8px 20px; overflow: hidden; border-radius: 999px; background: #e4edf6; }
.workflow-line span { display: block; height: 100%; width: 8%; border-radius: inherit; background: linear-gradient(90deg, var(--primary), var(--accent)); transition: width .35s ease; }
.workflow-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.process-step {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface-soft);
  transition: border-color .22s ease, box-shadow .22s ease, transform .22s ease;
}
.process-step.is-active { border-color: #77afe8; box-shadow: 0 0 0 4px rgba(29,139,255,.08); }
.process-step.is-processing { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(29,139,255,.11); }
.process-step.is-complete { border-color: #87cfb3; background: linear-gradient(180deg, #f8fffc, #fff); }
.process-step__head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: start; margin-bottom: 17px; }
.process-step__head h3 { margin: 1px 0 2px; font-size: 18px; }
.process-step__head p { margin: 0; color: var(--muted); font-size: 13px; }
.step-number { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; color: #fff; background: var(--primary); font-weight: 900; }
.step-status { padding: 6px 9px; border-radius: 999px; color: #52647a; background: #e7edf4; font-size: 10px; font-weight: 900; white-space: nowrap; }
.is-processing .step-status { color: #07539f; background: #dceeff; }
.is-complete .step-status { color: #096444; background: var(--success-bg); }
.is-complete .step-number { background: var(--success); }

.dropzone {
  min-height: 230px;
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 2px dashed #91bce7;
  border-radius: 16px;
  background: #fff;
  transition: .2s ease;
}
.dropzone.drag { border-color: var(--primary); background: #eef7ff; transform: scale(1.008); }
.dropzone b { max-width: 100%; overflow-wrap: anywhere; }
.dropzone p { margin: 5px 0 15px; color: var(--muted); font-size: 13px; }
.upload-icon { width: 55px; height: 55px; margin-bottom: 10px; display: grid; place-items: center; border-radius: 16px; color: var(--primary); background: var(--primary-light); font-size: 30px; font-weight: 900; }
.generate-panel {
  min-height: 230px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 1px solid #dce8f5;
  border-radius: 16px;
  background: #fff;
}
.generate-panel p { max-width: 480px; color: var(--muted); font-size: 13px; }
.generate-visual { display: flex; align-items: center; gap: 13px; margin-bottom: 17px; }
.generate-visual span { min-width: 82px; padding: 13px 15px; border-radius: 12px; color: var(--primary-dark); background: var(--primary-light); font-weight: 900; }
.generate-visual i { color: var(--primary); font-size: 25px; font-style: normal; }
.workflow-progress { margin-top: 18px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 13px; background: #f8fbff; }
.progress { height: 10px; overflow: hidden; border-radius: 999px; background: #e2eaf3; }
.progress > div { width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--primary), #3ea0ff); transition: width .3s ease; }
.progress-copy { margin-top: 8px; display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 12px; }
.progress-copy strong { color: var(--text); }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.form-grid .full { grid-column: 1 / -1; }
.matrix-form-grid { padding: 20px; border: 1px solid var(--border); border-radius: 16px; background: #f9fbfe; }
.label { display: block; margin: 0 0 6px; color: #233751; font-size: 13px; font-weight: 850; }
.input, .select, .textarea {
  width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 11px 12px;
  color: var(--text);
  background: #fff;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.input:hover, .textarea:hover, .select:hover { border-color: #97b5d4; }
.textarea { min-height: 105px; resize: vertical; }
.footer-editor { min-height: 95px; }
.field-help { display: block; margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.file-input { padding: 8px; }
.file-input::file-selector-button { margin-right: 10px; border: 0; border-radius: 8px; padding: 8px 11px; color: var(--primary-dark); background: var(--primary-light); font-weight: 800; cursor: pointer; }
.form-actions { margin-top: 18px; display: flex; justify-content: flex-end; align-items: center; gap: 10px; }
.sticky-actions { position: sticky; bottom: 12px; z-index: 8; padding: 12px; border: 1px solid var(--border); border-radius: 14px; background: rgba(255,255,255,.93); box-shadow: 0 10px 30px rgba(16,51,88,.13); backdrop-filter: blur(10px); }
.stack-form { display: flex; flex-direction: column; gap: 14px; }

.alert { margin: 14px 0 0; padding: 13px 15px; border: 1px solid transparent; border-radius: 12px; font-weight: 650; overflow-wrap: anywhere; }
.alert-error { color: var(--danger); border-color: #f5c8c3; background: var(--danger-bg); }
.alert-success { color: #096444; border-color: #bce8d5; background: var(--success-bg); }
.badge { display: inline-flex; align-items: center; justify-content: center; padding: 6px 9px; border-radius: 999px; font-size: 11px; font-weight: 900; text-transform: capitalize; white-space: nowrap; }
.badge-info { color: #07539f; background: #dceeff; }
.badge-success { color: #096444; background: var(--success-bg); }
.badge-danger { color: var(--danger); background: var(--danger-bg); }

.records-card { overflow: hidden; }
.table-wrap { width: 100%; overflow: auto; border: 1px solid var(--border); border-radius: 14px; background: #fff; }
table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { padding: 13px 14px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
th { position: sticky; top: 0; z-index: 2; color: #0b437f; background: #eaf3fc; font-size: 11px; letter-spacing: .055em; text-transform: uppercase; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fbfdff; }
.records-table { min-width: 1050px; }
.admin-user-table { min-width: 900px; }
.record-title { min-width: 210px; max-width: 390px; font-weight: 800; line-height: 1.35; }
td small { color: var(--muted); }
.action-group { display: flex; flex-wrap: wrap; gap: 7px; }
.user-cell { display: flex; align-items: center; gap: 10px; min-width: 160px; }
.empty-state { padding: 45px 20px; text-align: center; border: 1px dashed var(--border-strong); border-radius: 14px; background: var(--surface-soft); }
.empty-state span { width: 52px; height: 52px; margin: 0 auto 12px; display: grid; place-items: center; border-radius: 15px; color: var(--primary); background: var(--primary-light); font-size: 26px; }
.empty-state h3 { margin-bottom: 4px; }
.empty-state p { color: var(--muted); margin: 0; }

.page-title-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 25px 28px;
  border: 1px solid var(--border);
  border-left: 6px solid var(--primary);
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.page-title-card h1 { margin: 5px 0 2px; font-size: clamp(27px, 3.4vw, 42px); }
.page-title-card p { margin: 0; color: var(--muted); }
.manage-grid { display: grid; grid-template-columns: minmax(275px, 330px) minmax(0, 1fr); gap: 20px; align-items: start; }
.manage-sidebar { position: sticky; top: 94px; }
.manage-main { min-width: 0; }
.file-meta { display: grid; gap: 8px; padding: 13px; border-radius: 12px; background: #f5f8fc; }
.file-meta span { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 12px; }
.file-meta strong { color: var(--text); }
.divider { height: 1px; margin: 20px 0; background: var(--border); }
.danger-zone { display: flex; flex-direction: column; gap: 9px; padding: 14px; border: 1px solid #f2cfca; border-radius: 13px; background: #fff9f8; }
.danger-zone h3 { margin: 0 0 4px; color: var(--danger); font-size: 14px; }
.mini-progress { display: flex; flex-direction: column; gap: 6px; }
.mini-progress small { color: var(--muted); }
.toolbar-row { margin: -4px 0 18px; display: flex; flex-wrap: wrap; gap: 9px; }

.sidebar-layout { display: grid; grid-template-columns: 245px minmax(0, 1fr); gap: 20px; align-items: start; }
.sidebar {
  position: sticky;
  top: 94px;
  padding: 13px;
  color: #fff;
  border-radius: 18px;
  background: linear-gradient(180deg, var(--primary-deep), var(--primary-dark));
  box-shadow: var(--shadow-md);
}
.sidebar-title { padding: 9px 11px 13px; color: rgba(255,255,255,.62); font-size: 11px; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
.sidebar a { display: block; margin: 4px 0; padding: 12px; border-radius: 10px; font-weight: 750; font-size: 13px; }
.sidebar a:hover, .sidebar a.active { background: rgba(255,255,255,.14); }
.info-panel { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: start; }
.info-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; color: #fff; background: var(--primary); font-family: Georgia, serif; font-weight: 900; }
.info-panel h2 { margin-bottom: 5px; font-size: 19px; }
.info-panel p { margin: 0; color: var(--muted); }
.settings-section { padding: clamp(20px, 3vw, 30px); }
.settings-note { margin-top: 20px; display: grid; gap: 6px; padding: 14px; border-radius: 12px; color: var(--muted); background: #f5f8fc; font-size: 12px; }
.settings-note strong { color: var(--text); }
.footer-preview { margin-top: 12px; display: flex; gap: 8px; padding: 13px; border: 1px dashed var(--border-strong); border-radius: 12px; color: var(--muted); background: #f8fbff; font-size: 13px; }
.footer-preview strong { color: var(--text); }

.login-page { display: flex; flex-direction: column; }
.login-shell {
  flex: 1;
  min-height: calc(100vh - 84px);
  padding: 28px 20px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 15% 15%, rgba(75, 165, 255, .32), transparent 28%),
    radial-gradient(circle at 85% 80%, rgba(46, 118, 219, .28), transparent 30%),
    linear-gradient(135deg, var(--primary-deep), #064a94 60%, #0872d3);
}
.login-card { width: min(560px, 96%); padding: clamp(28px, 5vw, 45px); border: 1px solid rgba(255,255,255,.65); border-radius: 27px; background: rgba(255,255,255,.97); box-shadow: 0 28px 80px rgba(0,25,58,.4); }
.login-brand { margin-bottom: 30px; display: flex; align-items: center; gap: 13px; }
.login-brand > div { display: flex; flex-direction: column; }
.login-brand strong { color: var(--primary-deep); font-size: 16px; letter-spacing: .055em; }
.login-brand small { color: var(--muted); }
.login-card h1 { margin: 8px 0 12px; font-size: clamp(29px, 5vw, 42px); line-height: 1.1; }
.login-description { color: var(--muted); }
.google-login-btn { margin-top: 22px; min-height: 52px; }
.google-g { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; color: #4285f4; background: #fff; font-weight: 900; }
.login-features { margin-top: 20px; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.login-features span { padding: 6px 9px; border-radius: 999px; color: var(--primary-dark); background: var(--primary-light); font-size: 11px; font-weight: 800; }

.site-footer { margin-top: 36px; padding: 22px 3%; color: rgba(255,255,255,.86); background: linear-gradient(120deg, var(--primary-deep), var(--primary-dark)); }
.site-footer__inner { width: min(1500px, 100%); margin: auto; display: flex; align-items: center; justify-content: center; gap: 11px; text-align: center; }
.site-footer__mark { width: 30px; height: 30px; flex: 0 0 30px; display: grid; place-items: center; border-radius: 9px; color: var(--primary-dark); background: #fff; font-size: 10px; font-weight: 900; }
.site-footer p { margin: 0; font-size: 13px; font-weight: 650; }
.login-page .site-footer { margin-top: 0; }

.scroll-cue {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 45;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 8px 13px;
  border: 1px solid rgba(255,255,255,.55);
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 12px 28px rgba(3,44,96,.3);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: .22s ease;
}
.scroll-cue.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.scroll-cue__text { font-size: 11px; font-weight: 800; }
.scroll-cue__icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: var(--primary-dark); background: #fff; font-size: 21px; font-weight: 900; animation: cueBounce 1.5s infinite; }
@keyframes cueBounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(4px); } }

@media (max-width: 1120px) {
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sidebar-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; display: flex; align-items: center; gap: 5px; overflow-x: auto; }
  .sidebar-title { display: none; }
  .sidebar a { white-space: nowrap; margin: 0; }
  .manage-grid { grid-template-columns: 1fr; }
  .manage-sidebar { position: static; }
}

@media (max-width: 820px) {
  .topbar { min-height: 68px; }
  .brand small { display: none; }
  .workflow-grid { grid-template-columns: 1fr; }
  .hero { align-items: flex-start; }
  .hero-badge { width: 112px; height: 112px; flex-basis: 112px; }
  .hero-badge span { font-size: 32px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .full { grid-column: auto; }
  .page-title-card { align-items: flex-start; flex-direction: column; }
  .section-heading { flex-direction: column; }
  .records-table, .admin-user-table { min-width: 0; }
  .responsive-table thead { display: none; }
  .responsive-table, .responsive-table tbody, .responsive-table tr, .responsive-table td { display: block; width: 100%; }
  .responsive-table tr { padding: 13px; border-bottom: 1px solid var(--border); }
  .responsive-table tr:last-child { border-bottom: 0; }
  .responsive-table td { display: grid; grid-template-columns: minmax(105px, 34%) minmax(0, 1fr); gap: 12px; padding: 8px 3px; border: 0; }
  .responsive-table td::before { content: attr(data-label); color: #0b437f; font-size: 10px; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; }
  .record-title { min-width: 0; max-width: none; }
  .user-cell { min-width: 0; }
}

@media (max-width: 620px) {
  .hide-mobile { display: none !important; }
  .container { width: 94%; margin-top: 17px; }
  .card { padding: 16px; border-radius: 15px; }
  .topbar { padding: 9px 3%; }
  .brand-mark { width: 38px; height: 38px; flex-basis: 38px; border-radius: 11px; }
  .brand strong { font-size: 13px; }
  .nav { gap: 6px; }
  .nav .btn { min-height: 38px; padding: 9px 11px; font-size: 12px; }
  .hero { padding: 26px 20px; flex-direction: column; border-radius: 20px; }
  .hero h1 { font-size: 31px; }
  .hero-badge { width: auto; height: auto; padding: 13px 17px; display: flex; align-items: center; gap: 8px; border-radius: 14px; }
  .hero-badge span { font-size: 25px; }
  .hero-badge small { margin: 0; }
  .stats-grid, .admin-stats { grid-template-columns: 1fr; }
  .stat-card { min-height: 120px; }
  .workflow-card { padding: 15px; }
  .process-step { padding: 14px; }
  .process-step__head { grid-template-columns: auto minmax(0, 1fr); }
  .step-status { grid-column: 2; justify-self: start; }
  .dropzone, .generate-panel { min-height: 205px; padding: 20px 14px; }
  .matrix-form-grid { padding: 13px; }
  .form-actions { align-items: stretch; flex-direction: column-reverse; }
  .form-actions .btn { width: 100%; }
  .sticky-actions { bottom: 8px; }
  .responsive-table td { grid-template-columns: 95px minmax(0, 1fr); }
  .action-group { flex-direction: column; align-items: stretch; }
  .action-group .btn { width: 100%; }
  .sidebar { padding: 8px; }
  .sidebar a { padding: 10px; font-size: 12px; }
  .login-shell { padding: 18px 12px; }
  .login-card { width: 100%; padding: 25px 19px; border-radius: 21px; }
  .login-brand { align-items: flex-start; }
  .site-footer__inner { align-items: flex-start; }
  .site-footer p { font-size: 11px; }
  .scroll-cue { right: 12px; bottom: 12px; }
  .scroll-cue__text { display: none; }
}

.pagination { margin-top: 16px; display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--muted); font-size: 12px; font-weight: 750; }
.pagination .is-disabled { pointer-events: none; opacity: .45; }
@media (max-width: 620px) { .pagination { justify-content: space-between; } .pagination span { text-align: center; } }

/* DATABASE JURNAL V6 — responsive/cache-safe corrections */
html, body { width: 100%; max-width: 100%; overflow-x: hidden; }
body { display: flex; flex-direction: column; }
main { flex: 1 0 auto; }
.topbar, .container, .site-footer { min-width: 0; }
.topbar > *, .nav > *, .brand > * { min-width: 0; }
.brand { flex: 1 1 auto; }
.brand > span:last-child { line-height: 1.12; }
.brand strong, .brand small { display: block; }
.brand small { margin-top: 3px; }
.nav { flex: 0 1 auto; }
.card, .process-step, .generate-panel, .dropzone { min-width: 0; }
.stats-grid { grid-template-columns: repeat(4, minmax(190px, 1fr)); }
.admin-stats { grid-template-columns: repeat(3, minmax(190px, 1fr)); }
.workflow-grid { align-items: stretch; }
.process-step { height: 100%; }
.dropzone, .generate-panel { height: calc(100% - 72px); }
.action-form { display: inline-flex; margin: 0; }
.action-form .btn { width: auto; }
.delete-form-inline { display: inline-flex; margin: 0; }
.native-message { margin-top: 0; }

@media (max-width: 1180px) {
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topbar { padding-left: 3%; padding-right: 3%; }
}

@media (max-width: 860px) {
  .topbar { position: relative; flex-wrap: wrap; align-items: center; padding-top: 10px; padding-bottom: 10px; }
  .brand { width: auto; }
  .nav { margin-left: auto; }
  .workflow-grid { grid-template-columns: 1fr; }
  .dropzone, .generate-panel { height: auto; }
  .process-step__head { grid-template-columns: auto minmax(0, 1fr) auto; }
}

@media (max-width: 680px) {
  .topbar { gap: 8px; }
  .brand { width: calc(100% - 95px); }
  .brand strong { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
  .brand small { display: none; }
  .nav { flex: 0 0 auto; }
  .nav .btn { min-height: 38px; padding: 9px 10px; }
  .stats-grid, .admin-stats { grid-template-columns: 1fr; }
  .stat-card { min-height: 105px; }
  .section-heading { gap: 10px; }
  .security-pill, .record-count { white-space: normal; }
  .workflow-card { padding: 14px; }
  .workflow-line { margin-left: 0; margin-right: 0; }
  .process-step__head { grid-template-columns: auto minmax(0, 1fr); }
  .step-status { grid-column: 2; justify-self: start; }
  .responsive-table td { grid-template-columns: minmax(90px, 34%) minmax(0, 1fr); }
  .action-form, .delete-form-inline { display: flex; width: 100%; }
  .action-form .btn, .delete-form-inline .btn { width: 100%; }
  .page-title-card .action-group { width: 100%; }
  .page-title-card .action-group .btn { width: 100%; }
}

@media (max-width: 420px) {
  .container { width: calc(100% - 20px); }
  .card { padding: 14px; }
  .topbar { padding-left: 10px; padding-right: 10px; }
  .brand-mark { width: 36px; height: 36px; flex-basis: 36px; }
  .brand strong { font-size: 12px; letter-spacing: .02em; }
  .process-step { padding: 12px; }
  .dropzone, .generate-panel { min-height: 185px; }
  .responsive-table td { display: block; padding: 8px 2px; }
  .responsive-table td::before { display: block; margin-bottom: 4px; }
}
.danger-zone .action-form { display: flex; width: 100%; }
.danger-zone .action-form .btn { width: 100%; }

/* DATABASE JURNAL V7 — bulk CSV/Excel export and admin record management */
.export-toolbar {
  margin: 14px 0 16px;
  padding: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: linear-gradient(135deg, #f7fbff, #edf5ff);
}
.export-toolbar__group { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.export-toolbar__label { color: var(--primary-dark); font-size: 12px; font-weight: 850; }
.export-toolbar__count { min-width: 92px; color: var(--muted); font-size: 12px; font-weight: 750; }
.check-cell { width: 46px; text-align: center; }
.record-checkbox { width: 18px; height: 18px; accent-color: var(--primary); cursor: pointer; }
.record-checkbox:disabled { cursor: not-allowed; opacity: .35; }
.btn-excel { color: #0b5f35; border-color: #b9dfc9; background: #eaf8f0; }
.btn-excel:hover { color: #074b2a; background: #dff3e8; }
.btn-csv { color: #805300; border-color: #ead39d; background: #fff7df; }
.btn-csv:hover { color: #684300; background: #ffefc5; }
.row-export-actions { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.admin-filter-card { padding: 15px; }
.admin-filter-grid { display: grid; grid-template-columns: minmax(220px, 2fr) repeat(3, minmax(145px, 1fr)) auto; gap: 10px; align-items: end; }
.admin-record-owner { display: flex; align-items: center; gap: 9px; min-width: 180px; }
.admin-record-owner .avatar { width: 34px; height: 34px; flex-basis: 34px; }
.admin-record-owner span { min-width: 0; display: flex; flex-direction: column; }
.admin-record-owner small { overflow: hidden; text-overflow: ellipsis; }
.bulk-admin-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.bulk-admin-actions select { min-width: 210px; }
.records-admin-table { min-width: 1180px; }

@media (max-width: 1120px) {
  .admin-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-filter-grid .filter-search { grid-column: 1 / -1; }
}
@media (max-width: 820px) {
  .export-toolbar { align-items: stretch; flex-direction: column; }
  .export-toolbar__group { width: 100%; }
  .export-toolbar__group .btn { flex: 1 1 150px; }
  .records-admin-table { min-width: 0; }
  .check-cell { width: auto; text-align: left; }
  .responsive-table td.check-cell { display: flex; align-items: center; justify-content: space-between; }
}
@media (max-width: 620px) {
  .admin-filter-grid { grid-template-columns: 1fr; }
  .admin-filter-grid .filter-search { grid-column: auto; }
  .export-toolbar__group { flex-direction: column; align-items: stretch; }
  .export-toolbar__group .btn { width: 100%; }
  .bulk-admin-actions { flex-direction: column; align-items: stretch; }
  .bulk-admin-actions select, .bulk-admin-actions .btn { width: 100%; }
}
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
