:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --soft: #f1f5f9;
  --line: #e2e8f0;
  --line-soft: #f1f5f9;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --green: #16a34a;
  --amber: #d97706;
  --red: #dc2626;
  --violet: #7c3aed;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  letter-spacing: 0;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
label { display: grid; gap: 6px; font-size: 12px; font-weight: 600; color: #475569; text-transform: uppercase; letter-spacing: .04em; }
input, select, textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
  color: var(--ink);
  outline: none;
  text-transform: none;
  letter-spacing: 0;
}
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37,99,235,.18); }
textarea { resize: vertical; }
table { width: 100%; border-collapse: collapse; background: #fff; font-size: 14px; }
th {
  background: #f8fafc;
  color: #64748b;
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 700;
  padding: 12px 20px;
  white-space: nowrap;
}
td { padding: 12px 20px; border-top: 1px solid var(--line-soft); color: #334155; vertical-align: middle; }
tr { cursor: pointer; }
pre { white-space: pre-wrap; overflow: auto; background: #0b1220; color: #e2e8f0; padding: 16px; border-radius: 12px; }

.nav-toggle { position: fixed; opacity: 0; pointer-events: none; }
.nav-scrim { display: none; }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 256px;
  height: 100vh;
  background: #fff;
  border-right: 1px solid var(--line);
  z-index: 50;
  display: flex;
  flex-direction: column;
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px;
  border-bottom: 1px solid var(--line-soft);
}
.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--blue);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 18px;
}
.brand-title { font-weight: 700; line-height: 1.1; }
.brand-subtitle { color: #64748b; font-size: 11px; line-height: 1.2; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 8px 12px; }
.sidebar-section {
  padding: 16px 12px 6px;
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 9px 13px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #475569;
  font-size: 14px;
  transition: background .15s, color .15s;
}
.sidebar-link:hover { background: #f1f5f9; color: #0f172a; }
.sidebar-link.active { background: var(--blue); color: #fff; }
.nav-icon { width: 18px; display: inline-flex; justify-content: center; font-weight: 700; }
.sidebar-footer { border-top: 1px solid var(--line-soft); padding: 12px; }
.user-chip { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 10px; }
.user-chip:hover { background: #f8fafc; }
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 800;
  flex: 0 0 auto;
}
.small-avatar { width: 32px; height: 32px; font-size: 12px; }
.user-name { font-size: 14px; font-weight: 600; line-height: 1.2; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-role { color: #64748b; font-size: 11px; line-height: 1.2; }
.signout { color: #dc2626; margin-top: 4px; }
.signout:hover { background: #fef2f2; color: #b91c1c; }

.app-frame { min-height: 100vh; margin-left: 256px; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 57px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}
.hamburger { display: none; font-size: 22px; line-height: 1; color: #334155; cursor: pointer; text-transform: none; letter-spacing: 0; }
.mobile-title { display: none; font-weight: 700; }
.top-search {
  max-width: 430px;
  flex: 1;
  position: relative;
}
.top-search span { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #94a3b8; z-index: 1; }
.top-search input {
  min-height: 38px;
  padding-left: 36px;
  border-color: transparent;
  background: #f1f5f9;
  font-size: 14px;
}
.top-search input:focus { background: #fff; border-color: #cbd5e1; box-shadow: none; }
.top-user { display: flex; align-items: center; gap: 9px; padding-left: 12px; border-left: 1px solid var(--line); margin-left: auto; }

.shell { width: min(100%, 1280px); margin: 0 auto; padding: 24px; }
.narrow { width: min(760px, 100%); }
.panel, .login-panel, .table-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}
.panel, .login-panel { padding: 24px; }
.button, .ghost, .hero-primary, .hero-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  border-radius: 8px;
  padding: 0 14px;
  border: 1px solid transparent;
  font-weight: 650;
  font-size: 14px;
}
.button { background: var(--blue); color: #fff; }
.button:hover { background: var(--blue-dark); }
.ghost { background: #fff; border-color: #cbd5e1; color: #334155; }
.ghost:hover { background: #f8fafc; }
.danger { color: #b91c1c; border-color: #fecaca; }
.danger:hover { background: #fef2f2; color: #991b1b; }
.danger:disabled { opacity: .45; cursor: not-allowed; }
.small { min-height: 34px; padding: 0 10px; }
.large { min-height: 52px; font-size: 15px; }
.wide { width: 100%; }
.muted { color: #64748b; }
.eyebrow {
  color: var(--blue);
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
}

.hero {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  padding: 30px 32px;
  color: #fff;
  margin-bottom: 24px;
  background-image:
    linear-gradient(115deg, rgba(15,23,42,.88) 0%, rgba(15,23,42,.62) 58%, rgba(37,99,235,.62) 100%),
    url("https://images.unsplash.com/photo-1581091226825-a6a2a5aee158?auto=format&fit=crop&w=1600&q=70");
  background-size: cover;
  background-position: center;
}
.hero-kicker {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(255,255,255,.15);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.hero h1 { margin: 10px 0 6px; font-size: clamp(25px, 3vw, 34px); line-height: 1.12; letter-spacing: 0; }
.hero p { max-width: 680px; margin: 0; color: rgba(255,255,255,.82); line-height: 1.55; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.hero-primary { background: #fff; color: #0f172a; }
.hero-primary:hover { background: #f1f5f9; }
.hero-secondary { background: rgba(255,255,255,.15); color: #fff; border-color: rgba(255,255,255,.25); backdrop-filter: blur(8px); }
.hero-secondary:hover { background: rgba(255,255,255,.24); }

.stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  min-width: 0;
}
.stat span { display: block; color: #64748b; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.stat strong { display: block; color: #0f172a; font-size: 28px; line-height: 1.1; margin-top: 6px; }
.stat-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 20px;
}
.stat-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  font-weight: 800;
  font-size: 13px;
}
.stat-icon.blue { color: #2563eb; background: #dbeafe; }
.stat-icon.green { color: #059669; background: #d1fae5; }
.stat-icon.amber { color: #d97706; background: #fef3c7; }
.stat-icon.violet { color: #7c3aed; background: #ede9fe; }
.stat-icon.red { color: #dc2626; background: #fee2e2; }
.stat-card span { display: block; color: #64748b; font-size: 12px; }
.stat-card strong { display: block; font-size: 27px; line-height: 1.1; margin-top: 3px; font-weight: 700; }
.stat-card small { display: block; color: #94a3b8; font-size: 11px; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.toolbar.sticky { position: sticky; top: 69px; z-index: 8; background: var(--bg); padding-bottom: 12px; }
.search-form {
  display: grid;
  grid-template-columns: 1fr 130px 150px auto;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  margin-bottom: 12px;
}
.search-form input, .search-form select { font-size: 14px; }
.table-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line-soft);
}
.table-title h2 { margin: 0; font-size: 16px; }
.table-title p { margin: 3px 0 0; color: #64748b; font-size: 12px; }
.desktop-table { overflow-x: auto; }
.table-row:hover { background: #f8fafc; }
.mobile-cards { display: none; }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.status-pill::before { content: ""; width: 6px; height: 6px; border-radius: 999px; background: currentColor; opacity: .65; }
.status-verified { background: #dcfce7; color: #166534; }
.status-draft { background: #fef3c7; color: #92400e; }
.status-production { background: #e0f2fe; color: #075985; }
.status-dispatched { background: #ede9fe; color: #5b21b6; }
.status-closed { background: #f1f5f9; color: #334155; }
.pill { display: inline-flex; padding: 4px 9px; border-radius: 999px; background: #dbeafe; color: var(--blue); font-size: 12px; font-weight: 700; }

.wo-card {
  display: grid;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
}
.wo-card > div { display: flex; justify-content: space-between; gap: 10px; }
.wo-card h2 { margin: 0; font-size: 16px; }
.wo-card p { margin: 0; color: #64748b; font-size: 14px; }
.wo-card dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0; color: #64748b; font-size: 12px; }
.wo-card dd { margin: 0; color: #0f172a; }
.machine-list { white-space: pre-line; }
.doc-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.doc-strip { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; padding: 14px 16px; }
.doc-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 8px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
  cursor: pointer;
}
.doc-button:hover { background: #bfdbfe; }
.doc-missing {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 0 9px;
  border-radius: 8px;
  background: #f8fafc;
  color: #94a3b8;
  border: 1px solid #e2e8f0;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

.login-screen { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: linear-gradient(135deg, #eff6ff, #fff 45%, #f1f5f9); }
.login-panel { width: min(430px, 100%); display: grid; gap: 20px; border-radius: 16px; box-shadow: 0 20px 25px -5px rgba(148,163,184,.45), 0 10px 10px -5px rgba(148,163,184,.2); }
.login-panel h1 { margin: 0; font-size: 22px; }
.login-brand { display: flex; align-items: center; gap: 12px; justify-content: center; margin-bottom: 2px; }
.stack { display: grid; gap: 13px; }
.alert { background: #fff7ed; border: 1px solid #fed7aa; color: #b45309; border-radius: 12px; padding: 12px; }

.upload-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.drop-zone {
  min-height: 150px;
  border: 2px dashed #cbd5e1;
  border-radius: 16px;
  background: #fff;
  padding: 22px;
  place-items: center;
  text-align: center;
  cursor: pointer;
  color: #0f172a;
  font-size: 15px;
  text-transform: none;
  letter-spacing: 0;
}
.drop-zone:hover { border-color: var(--blue); background: #eff6ff; }
.drop-zone span { color: #64748b; font-weight: 500; font-size: 13px; }
.drop-zone input { display: none; }
.full, progress, .upload-grid button { grid-column: 1 / -1; width: 100%; }
progress { height: 12px; accent-color: var(--blue); }

.page-title { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.page-title h1 { margin: 0; font-size: 26px; }
.verify-layout { display: grid; grid-template-columns: minmax(360px, .9fr) minmax(420px, 1.1fr); gap: 16px; align-items: start; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.field-grid label:has(textarea), .check { grid-column: 1 / -1; }
.span-2 { grid-column: 1 / -1; }
.items-editor { display: grid; gap: 12px; margin-top: 10px; }
.item-edit-card { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: #f8fafc; }
.item-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.admin-user-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) auto; gap: 12px; align-items: end; }
.smtp-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; align-items: end; }
.redaction-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.admin-table { overflow-x: auto; }
.admin-table td { vertical-align: top; }
.admin-table input, .admin-table select { min-width: 180px; margin-bottom: 6px; }
.row-actions { display: flex; gap: 8px; align-items: flex-start; }
.needs-review input, .needs-review textarea { border-color: #f59e0b; background: #fffaf0; }
small { color: #64748b; font-weight: 500; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; align-items: center; }
.tab-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.tab-head h2 { margin: 0; }
.compact-upload { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.attachment-upload { margin-bottom: 16px; justify-content: flex-start; }
.file-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px dashed #94a3b8;
  border-radius: 8px;
  background: #f8fafc;
  color: #334155;
  font-weight: 650;
  cursor: pointer;
}
.file-pill input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.revision-alert { margin-bottom: 16px; }
.revision-upload {
  display: grid;
  grid-template-columns: minmax(220px, .8fr) minmax(360px, 1.4fr);
  gap: 16px;
  align-items: center;
  padding: 16px;
  margin-bottom: 18px;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  background: #eff6ff;
}
.revision-upload h2 { margin: 0 0 4px; }
.revision-upload p { margin: 0; }
.revision-upload-form {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 10px;
  align-items: center;
}
.compact-revision-upload { margin-bottom: 20px; }
.preview-stack { display: grid; gap: 16px; }
.pdf-panel h2 { margin-top: 0; }
.pdf-viewer { min-height: 560px; overflow: auto; background: #e9eef5; border-radius: 12px; border: 1px solid var(--line); }
.pdf-viewer.tall { min-height: 72vh; }
.pdf-native-frame { display: block; width: 100%; min-height: 72vh; border: 0; background: #fff; }
.pdf-tools { position: sticky; top: 0; display: flex; gap: 8px; align-items: center; padding: 8px; background: rgba(255,255,255,.95); border-bottom: 1px solid var(--line); z-index: 2; }
.pdf-tools button { min-height: 34px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
canvas { display: block; margin: 10px auto; max-width: 100%; height: auto; box-shadow: 0 8px 24px rgba(15, 23, 42, .14); }
.ga-preview-list { display: grid; gap: 16px; }
.ga-card { border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 12px; }
.ga-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.ga-card-head div { min-width: 0; display: grid; gap: 3px; }
.ga-card-head strong { overflow-wrap: anywhere; }
.ga-card-head span { color: #64748b; font-size: 12px; font-weight: 650; }
.drawing-image { max-width: 100%; border-radius: 12px; border: 1px solid var(--line); }
.tabs, .mobile-tabs { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 12px; }
.tabs button, .mobile-tabs button { border: 1px solid #cbd5e1; background: #fff; border-radius: 8px; padding: 10px 13px; white-space: nowrap; color: #334155; }
.tabs button.active, .mobile-tabs button.active { background: var(--blue); color: #fff; border-color: var(--blue); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }
.summary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.summary-grid div { background: #f8fafc; border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: grid; gap: 6px; }
.summary-grid span { color: #64748b; font-size: 13px; }
.file-list, .timeline { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.file-list li, .timeline li { display: flex; gap: 12px; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line-soft); padding-bottom: 10px; }
.timeline li { display: grid; justify-content: stretch; }
.file-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: flex-end; }
.file-actions form { margin: 0; }
.link-danger {
  border: 0;
  background: transparent;
  padding: 0;
  color: #b91c1c;
  font-weight: 700;
  min-height: 0;
}
.file-delete-form { margin-top: 14px; }
.upload-meta { color: #64748b; font-size: 13px; font-weight: 650; }
.inline-progress { width: 180px; max-width: 100%; height: 8px; }
.mobile-tabs { display: none; }
.design-hero {
  background-image:
    linear-gradient(115deg, rgba(15,23,42,.88) 0%, rgba(15,23,42,.58) 58%, rgba(22,163,74,.52) 100%),
    url("https://images.unsplash.com/photo-1581092160607-ee22621dd758?auto=format&fit=crop&w=1600&q=70");
}
.design-stats { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.compact-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.two-column { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-bottom: 18px; align-items: start; }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-bottom: 18px; align-items: start; }
.wide-left { grid-template-columns: minmax(0, 1.45fr) minmax(280px, .55fr); }
.section-head, .table-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line-soft); }
.section-head h2, .table-title h2 { margin: 0; font-size: 17px; }
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 12px;
  font-weight: 800;
}
.code-area { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace; min-height: 300px; }
.preview-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; margin-top: 16px; }
.email-preview { width: 100%; min-height: 480px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.mobile-preview { width: 320px; min-height: 560px; margin: 0 auto; display: block; }
.mobile-preview-wrap { overflow: auto; }
.mini-list { display: grid; gap: 8px; padding: 12px; }
.mini-row, .mini-card { display: grid; gap: 7px; border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 12px; }
.mini-row { grid-template-columns: 1fr auto; align-items: center; }
.mini-row span, .mini-card span { display: block; color: #64748b; font-size: 12px; margin-top: 3px; }
.empty-state { color: #64748b; padding: 18px; text-align: center; }
.design-search { grid-template-columns: minmax(180px, 1fr) repeat(5, minmax(120px, .55fr)) auto; }
.daily-report-filter { grid-template-columns: 150px 150px minmax(170px, .7fr) minmax(240px, 1fr) auto; align-items: end; }
.progress-line { width: 96px; max-width: 100%; height: 8px; background: #e2e8f0; border-radius: 999px; overflow: hidden; }
.progress-line span { display: block; height: 100%; background: var(--blue); border-radius: inherit; }
.priority-urgent, .status-revision-required { background: #fee2e2; color: #991b1b; }
.priority-high, .status-waiting-for-approval, .status-waiting { background: #fef3c7; color: #92400e; }
.priority-normal, .status-in-progress { background: #dbeafe; color: #1d4ed8; }
.priority-low, .status-not-started, .status-on-hold { background: #f1f5f9; color: #334155; }
.status-completed, .status-approved { background: #dcfce7; color: #166534; }
.status-cancelled, .status-rejected { background: #fee2e2; color: #991b1b; }
.preline { white-space: pre-line; line-height: 1.55; }
.path-list { display: grid; gap: 10px; margin-top: 18px; }
.path-list div { display: grid; gap: 4px; border-top: 1px solid var(--line-soft); padding-top: 10px; }
.path-list span { color: #64748b; font-size: 12px; font-weight: 700; text-transform: uppercase; }
.path-list a { overflow-wrap: anywhere; color: var(--blue); }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.inline-form { display: grid; grid-template-columns: minmax(190px, 1fr) 180px 140px 150px auto; gap: 10px; margin-top: 16px; align-items: end; }
.roomy { margin-top: 18px; }
.text-fit { font-size: clamp(16px, 2vw, 22px) !important; overflow-wrap: anywhere; }
.quick-entry-shell { max-width: 720px; }
.quick-entry .button { margin-top: 6px; }
.mobile-fab {
  display: none;
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 20;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  place-items: center;
  font-size: 28px;
  font-weight: 700;
  box-shadow: 0 12px 24px rgba(37,99,235,.28);
}
.preview-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(15,23,42,.82);
  display: grid;
  grid-template-rows: auto 1fr;
}
.preview-modal-bar {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.preview-modal-body {
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 14px;
}
.preview-modal iframe {
  width: min(1100px, 100%);
  height: 100%;
  border: 0;
  background: #fff;
  border-radius: 8px;
}
.preview-modal img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 8px;
  background: #fff;
}
.email-event-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

@media (max-width: 1180px) {
  .stats, .stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .design-search { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .daily-report-filter { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .sidebar { transform: translateX(-100%); transition: transform .18s ease; }
  .nav-toggle:checked ~ .sidebar { transform: translateX(0); }
  .nav-scrim { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 40; }
  .nav-toggle:checked ~ .nav-scrim { display: block; }
  .app-frame { margin-left: 0; }
  .topbar { height: 57px; padding: 12px 16px; }
  .hamburger, .mobile-title { display: block; }
  .top-search, .top-user { display: none; }
  .shell { padding: 16px 11px 90px; }
  .hero { padding: 22px; border-radius: 16px; }
  .hero h1 { font-size: 25px; }
  .stats, .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat-card { padding: 14px; gap: 12px; }
  .stat-icon { width: 38px; height: 38px; }
  .stat-card strong { font-size: 23px; }
  .toolbar.sticky { top: 57px; }
  .search-form { grid-template-columns: 1fr; border-radius: 16px; }
  .desktop-table { display: none; }
  .mobile-cards { display: grid; gap: 12px; }
  .tab-head { align-items: stretch; flex-direction: column; }
  .compact-upload, .compact-upload .button, .file-pill { width: 100%; }
  .revision-upload, .revision-upload-form { grid-template-columns: 1fr; }
  .upload-grid, .verify-layout, .field-grid, .summary-grid { grid-template-columns: 1fr; }
  .two-column, .two-col, .preview-grid, .design-search, .inline-form, .card-grid { grid-template-columns: 1fr; }
  .mobile-preview { width: 100%; min-height: 460px; }
  .daily-report-filter { grid-template-columns: 1fr; }
  .email-event-grid { grid-template-columns: 1fr; }
  .compact-stats, .design-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mini-row { grid-template-columns: 1fr; }
  .mobile-fab { display: grid; }
  .tabs { padding-bottom: 3px; }
  .admin-user-form { grid-template-columns: 1fr; }
  .smtp-form { grid-template-columns: 1fr; }
  .redaction-form { grid-template-columns: 1fr; }
  .row-actions { flex-direction: column; }
  .preview-stack { display: contents; }
  .mobile-tabs { display: flex; }
  .verify-shell .tab-pane { display: none; }
  .verify-shell .tab-pane.active { display: block; }
  .pdf-viewer { min-height: 70vh; }
  .page-title { align-items: flex-start; }
  .ga-card { padding: 10px; }
  .ga-card-head { align-items: flex-start; flex-direction: column; }
  .file-list li { align-items: flex-start; flex-direction: column; }
  .file-actions { justify-content: flex-start; }
}
@media (min-width: 821px) {
  .verify-shell .mobile-tabs { display: none; }
  .verify-shell .tab-pane { display: block; }
}
