:root {
  --navy-950: #08131f;
  --navy-900: #0d1b2a;
  --navy-800: #15283a;
  --navy-700: #20384d;
  --orange-600: #ea580c;
  --orange-500: #f97316;
  --orange-100: #ffedd5;
  --slate-900: #0f172a;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-400: #94a3b8;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --white: #ffffff;
  --green-700: #15803d;
  --green-100: #dcfce7;
  --amber-700: #b45309;
  --amber-100: #fef3c7;
  --red-700: #b91c1c;
  --red-100: #fee2e2;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow-md: 0 12px 30px rgba(15, 23, 42, .08);
  --shadow-lg: 0 24px 60px rgba(8, 19, 31, .14);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --max: 1280px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--slate-900);
  background: #eef2f6;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  padding: 0 max(24px, calc((100vw - var(--max)) / 2));
  color: var(--white);
  background: rgba(13, 27, 42, .98);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  backdrop-filter: blur(16px);
}
.brand { display: inline-flex; align-items: center; gap: 12px; min-width: 210px; }
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 42px;
  color: var(--white);
  background: var(--orange-500);
  border-radius: 8px 2px 8px 2px;
  font-weight: 900;
  letter-spacing: -.8px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18);
}
.brand > span:last-child { display: grid; line-height: 1.1; }
.brand strong { font-size: 17px; letter-spacing: -.2px; }
.brand small { margin-top: 4px; color: #9fb0c0; font-size: 11px; text-transform: uppercase; letter-spacing: 1.2px; }
.topnav { display: flex; align-items: stretch; align-self: stretch; gap: 8px; }
.topnav a {
  display: inline-flex;
  align-items: center;
  padding: 0 16px;
  color: #c7d2dd;
  border-bottom: 3px solid transparent;
  font-size: 13px;
  font-weight: 700;
  transition: .2s ease;
}
.topnav a:hover { color: var(--white); }
.topnav a.active { color: var(--white); border-bottom-color: var(--orange-500); }

.page-shell, .dashboard-shell { width: min(var(--max), calc(100% - 40px)); margin: 0 auto; padding: 34px 0 72px; }
.form-page { max-width: 1040px; }

.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  overflow: hidden;
  margin-bottom: 24px;
  padding: 38px 42px;
  color: var(--white);
  background:
    radial-gradient(circle at 88% 10%, rgba(249,115,22,.28), transparent 28%),
    linear-gradient(135deg, var(--navy-900), #142a3e);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.hero::after {
  content: "";
  position: absolute;
  right: -70px;
  bottom: -120px;
  width: 320px;
  height: 320px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 50%;
  box-shadow: 0 0 0 45px rgba(255,255,255,.025), 0 0 0 90px rgba(255,255,255,.018);
}
.eyebrow { display: block; color: var(--orange-500); font-size: 10px; font-weight: 900; letter-spacing: 1.8px; }
.hero h1, .page-heading h1, .dashboard-heading h1, .detail-header h1, .success-banner h1 {
  margin: 8px 0 9px;
  letter-spacing: -.8px;
  line-height: 1.1;
}
.hero h1 { font-size: clamp(30px, 4vw, 46px); }
.hero p { max-width: 650px; margin: 0; color: #c5d0db; font-size: 15px; line-height: 1.65; }
.hero-status {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: max-content;
  padding: 10px 14px;
  color: #dbe6ee;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.pulse-dot { width: 8px; height: 8px; background: #35d07f; border-radius: 50%; box-shadow: 0 0 0 5px rgba(53,208,127,.13); }

.enterprise-form { display: grid; gap: 18px; }
.form-card, .detail-card, .side-card, .panel {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}
.form-card { padding: 28px 30px 30px; }
.section-heading { display: flex; align-items: flex-start; gap: 15px; margin-bottom: 24px; padding-bottom: 18px; border-bottom: 1px solid var(--slate-200); }
.section-number {
  display: inline-grid;
  place-items: center;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  color: var(--orange-600);
  background: var(--orange-100);
  border-radius: 11px;
  font-size: 12px;
  font-weight: 900;
}
.section-heading h2 { margin: 1px 0 5px; font-size: 18px; letter-spacing: -.2px; }
.section-heading p { margin: 0; color: var(--slate-500); font-size: 13px; line-height: 1.45; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 19px 20px; }
.field { position: relative; min-width: 0; }
.field-span-2 { grid-column: span 2; }
.field label, .field-label { display: block; margin-bottom: 8px; color: var(--slate-700); font-size: 12px; font-weight: 800; }
.field label b { color: var(--orange-600); }
.input, .filter-bar input, .filter-bar select, .dashboard-filters input, .dashboard-filters select {
  width: 100%;
  min-height: 48px;
  padding: 11px 13px;
  color: var(--slate-900);
  background: var(--white);
  border: 1px solid var(--slate-300);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.input::placeholder { color: var(--slate-400); }
.input:focus, .filter-bar input:focus, .filter-bar select:focus, .dashboard-filters input:focus, .dashboard-filters select:focus {
  border-color: var(--orange-500);
  box-shadow: 0 0 0 4px rgba(249,115,22,.12);
}
.textarea { min-height: 160px; resize: vertical; line-height: 1.6; }
.field-help { display: block; margin-top: 7px; color: var(--slate-500); font-size: 11px; }
.counter { position: absolute; right: 11px; bottom: 9px; padding: 3px 7px; color: var(--slate-500); background: rgba(255,255,255,.9); border-radius: 6px; font-size: 10px; }

.upload-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.upload-box {
  display: flex;
  min-height: 190px;
  padding: 24px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--slate-50);
  border: 1.5px dashed var(--slate-300);
  border-radius: 14px;
  transition: .2s ease;
  cursor: pointer;
}
.upload-box:hover { background: #fff8f3; border-color: var(--orange-500); transform: translateY(-1px); }
.upload-box input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.upload-icon { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 14px; color: var(--orange-600); background: var(--orange-100); border-radius: 14px; font-size: 22px; font-weight: 900; }
.upload-box strong { font-size: 15px; }
.upload-box > span:not(.upload-icon) { margin-top: 5px; color: var(--slate-500); font-size: 12px; }
.upload-box small { margin-top: 18px; color: var(--navy-700); font-size: 11px; font-weight: 800; }
.upload-note { margin: 12px 0 0; color: var(--slate-500); font-size: 11px; }

.form-actions { display: flex; justify-content: flex-end; gap: 12px; padding: 8px 0 0; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 17px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 900;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, opacity .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled { cursor: wait; opacity: .7; transform: none; }
.btn-primary { color: var(--white); background: linear-gradient(135deg, var(--orange-500), var(--orange-600)); box-shadow: 0 9px 20px rgba(234,88,12,.2); }
.btn-primary:hover { box-shadow: 0 12px 24px rgba(234,88,12,.27); }
.btn-secondary { color: var(--navy-900); background: var(--white); border-color: var(--slate-300); }
.btn-dark { color: var(--white); background: var(--navy-900); }
.btn-whatsapp { color: var(--white); background: #128c5e; box-shadow: 0 9px 20px rgba(18,140,94,.18); }
.btn-lg { min-height: 52px; padding-inline: 26px; font-size: 13px; }
.btn-sm { min-height: 36px; padding: 7px 12px; font-size: 11px; }
.btn-block { width: 100%; }
.btn-loading { display: none; }
.btn.is-loading .btn-text { display: none; }
.btn.is-loading .btn-loading { display: inline; }

.page-heading, .dashboard-heading, .detail-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}
.page-heading h1, .dashboard-heading h1 { font-size: clamp(28px, 4vw, 40px); }
.page-heading p, .dashboard-heading p, .detail-header p { margin: 0; color: var(--slate-500); font-size: 14px; }

.filter-bar, .dashboard-filters {
  display: grid;
  align-items: center;
  gap: 10px;
  padding: 15px;
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}
.filter-bar { grid-template-columns: minmax(280px, 1fr) 180px 210px auto auto; }
.search-field { position: relative; min-width: 0; }
.search-field span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--slate-400); font-size: 20px; pointer-events: none; }
.search-field input { padding-left: 42px; }
.filter-clear { color: var(--slate-500); font-size: 11px; font-weight: 800; text-align: center; }
.filter-clear:hover { color: var(--orange-600); }
.result-summary, .table-summary { margin: 18px 2px 11px; color: var(--slate-500); font-size: 12px; }
.result-summary strong, .table-summary strong { color: var(--slate-900); }

.history-list { display: grid; gap: 12px; }
.history-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 20px 22px;
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-left: 4px solid var(--navy-800);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  transition: .18s ease;
}
.history-card:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); border-left-color: var(--orange-500); }
.history-card-main { min-width: 0; }
.history-topline { display: flex; align-items: center; gap: 10px; color: var(--slate-500); font-size: 10px; font-weight: 800; }
.history-card h2 { margin: 9px 0 4px; font-size: 20px; letter-spacing: -.3px; }
.history-card p { margin: 0; color: var(--slate-600); font-size: 12px; }
.history-meta { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 13px; color: var(--slate-500); font-size: 11px; }
.history-meta b { color: var(--slate-700); }
.history-card-actions { display: flex; flex: 0 0 auto; gap: 8px; }
.status-badge { display: inline-flex; align-items: center; width: max-content; padding: 5px 8px; border-radius: 999px; font-size: 9px; font-weight: 900; white-space: nowrap; text-transform: uppercase; letter-spacing: .5px; }
.status-badge.success { color: var(--green-700); background: var(--green-100); }
.status-badge.attention, .status-badge.warning { color: var(--amber-700); background: var(--amber-100); }
.status-badge.danger { color: var(--red-700); background: var(--red-100); }
.text-success { color: var(--green-700) !important; }
.text-attention, .text-warning { color: var(--amber-700) !important; }
.text-danger { color: var(--red-700) !important; }

.empty-state, .panel-empty {
  display: grid;
  place-items: center;
  text-align: center;
  min-height: 270px;
  padding: 30px;
  color: var(--slate-500);
}
.empty-state { background: var(--white); border: 1px dashed var(--slate-300); border-radius: var(--radius-md); }
.empty-state h2 { margin: 10px 0 4px; color: var(--slate-900); }
.empty-state p { margin: 0 0 20px; }
.empty-icon { font-size: 42px; color: var(--orange-500); }

.success-banner {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 22px;
  padding: 23px 26px;
  background: linear-gradient(135deg, #effcf4, #fff);
  border: 1px solid #b7e9c9;
  border-radius: var(--radius-md);
}
.status-symbol { display: grid; place-items: center; flex: 0 0 54px; width: 54px; height: 54px; border-radius: 50%; font-size: 25px; font-weight: 900; }
.status-symbol.success { color: var(--green-700); background: var(--green-100); }
.status-symbol.error { color: var(--red-700); background: var(--red-100); }
.success-banner h1 { margin: 5px 0 4px; font-size: 25px; }
.success-banner p { margin: 0; color: var(--slate-600); }
.detail-header { align-items: center; padding: 4px 2px; }
.detail-header h1 { font-size: clamp(30px, 4vw, 43px); }
.back-link { display: inline-block; margin-bottom: 12px; color: var(--slate-500); font-size: 11px; font-weight: 800; }
.protocol-line { display: flex; align-items: center; gap: 10px; color: var(--slate-500); font-size: 11px; font-weight: 700; }
.detail-actions { display: flex; gap: 10px; }
.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; align-items: start; gap: 18px; }
.detail-main, .detail-side { display: grid; gap: 18px; }
.detail-card { padding: 25px; }
.detail-card-title { display: flex; align-items: center; gap: 11px; margin-bottom: 20px; }
.detail-card-title span { display: grid; place-items: center; width: 32px; height: 32px; color: var(--orange-600); background: var(--orange-100); border-radius: 9px; font-size: 10px; font-weight: 900; }
.detail-card-title h2 { margin: 0; font-size: 17px; }
.data-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin: 0; border: 1px solid var(--slate-200); border-radius: 12px; overflow: hidden; }
.data-grid > div { min-width: 0; padding: 16px; border-right: 1px solid var(--slate-200); border-bottom: 1px solid var(--slate-200); }
.data-grid > div:nth-child(even) { border-right: 0; }
.data-grid > div:nth-last-child(-n+2) { border-bottom: 0; }
.data-grid dt { margin-bottom: 6px; color: var(--slate-500); font-size: 9px; font-weight: 900; text-transform: uppercase; letter-spacing: .7px; }
.data-grid dd { margin: 0; color: var(--slate-900); font-size: 13px; font-weight: 750; line-height: 1.45; word-break: break-word; }
.description-text { color: var(--slate-700); font-size: 13px; line-height: 1.75; white-space: normal; }
.side-card { padding: 21px; }
.side-card h3 { margin: 0 0 14px; font-size: 14px; }
.deadline-card { position: relative; overflow: hidden; color: var(--white); background: var(--navy-900); border: 0; }
.deadline-card::after { content: ""; position: absolute; right: -45px; top: -45px; width: 130px; height: 130px; border: 1px solid rgba(255,255,255,.09); border-radius: 50%; box-shadow: 0 0 0 25px rgba(255,255,255,.025); }
.deadline-card > * { position: relative; z-index: 1; }
.deadline-card .eyebrow { color: #fdba74; }
.deadline-card > strong { display: block; margin: 8px 0 3px; font-size: 23px; }
.deadline-card p { margin: 0; color: #cbd5df; font-size: 12px; }
.deadline-date { margin-top: 20px; padding-top: 15px; border-top: 1px solid rgba(255,255,255,.13); font-size: 19px; font-weight: 900; }
.deadline-card.danger { background: linear-gradient(135deg, #7f1d1d, #b91c1c); }
.deadline-card.warning, .deadline-card.attention { background: linear-gradient(135deg, #78350f, #b45309); }
.deadline-card.success { background: linear-gradient(135deg, #14532d, #15803d); }
.file-list { display: grid; gap: 8px; }
.file-list a { display: flex; align-items: center; gap: 10px; padding: 10px; background: var(--slate-50); border: 1px solid var(--slate-200); border-radius: 9px; }
.file-list a:hover { border-color: var(--orange-500); }
.file-icon { display: grid; place-items: center; flex: 0 0 32px; width: 32px; height: 32px; color: var(--orange-600); background: var(--orange-100); border-radius: 8px; font-weight: 900; }
.file-list a > span:last-child { display: grid; min-width: 0; }
.file-list strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.file-list small { margin-top: 3px; color: var(--slate-500); font-size: 9px; }
.muted { color: var(--slate-500); font-size: 12px; }
.quick-actions { display: grid; }
.quick-actions a { padding: 11px 0; color: var(--navy-700); border-top: 1px solid var(--slate-200); font-size: 11px; font-weight: 800; }
.quick-actions a:hover { color: var(--orange-600); }
.photo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.photo-item { position: relative; overflow: hidden; aspect-ratio: 4/3; background: var(--slate-100); border-radius: 10px; }
.photo-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.photo-item:hover img { transform: scale(1.03); }
.photo-item span { position: absolute; inset: auto 0 0; overflow: hidden; padding: 25px 9px 8px; color: var(--white); background: linear-gradient(transparent, rgba(8,19,31,.88)); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }

.dashboard-body { background: #e9eef3; }
.dashboard-shell { padding-top: 30px; }
.dashboard-heading-actions { display: flex; align-items: center; gap: 14px; }
.last-update { color: var(--slate-500); font-size: 10px; font-weight: 700; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.metric-card { position: relative; display: flex; align-items: center; gap: 15px; min-width: 0; padding: 20px; overflow: hidden; background: var(--white); border: 1px solid var(--slate-200); border-radius: 14px; box-shadow: var(--shadow-sm); }
.metric-card::after { content: ""; position: absolute; right: -24px; bottom: -35px; width: 100px; height: 100px; border-radius: 50%; background: currentColor; opacity: .045; }
.metric-icon { display: grid; place-items: center; flex: 0 0 46px; width: 46px; height: 46px; border-radius: 12px; font-size: 20px; font-weight: 900; }
.metric-card > div:last-child { display: grid; min-width: 0; }
.metric-card span { color: var(--slate-500); font-size: 10px; font-weight: 850; text-transform: uppercase; letter-spacing: .55px; }
.metric-card strong { margin: 3px 0 1px; font-size: 30px; letter-spacing: -1px; }
.metric-card small { color: var(--slate-500); font-size: 10px; }
.metric-total { color: var(--navy-800); }
.metric-total .metric-icon { color: var(--navy-800); background: #e6eef5; }
.metric-success { color: var(--green-700); }
.metric-success .metric-icon { background: var(--green-100); }
.metric-warning { color: var(--amber-700); }
.metric-warning .metric-icon { background: var(--amber-100); }
.metric-danger { color: var(--red-700); }
.metric-danger .metric-icon { background: var(--red-100); }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(320px, .85fr); gap: 16px; margin-bottom: 16px; }
.panel { overflow: hidden; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 22px; border-bottom: 1px solid var(--slate-200); }
.panel-heading h2 { margin: 5px 0 0; font-size: 18px; letter-spacing: -.25px; }
.panel-heading > a:not(.btn) { color: var(--orange-600); font-size: 10px; font-weight: 900; }
.panel-counter { display: grid; place-items: center; min-width: 44px; height: 30px; color: var(--red-700); background: var(--red-100); border-radius: 999px; font-size: 10px; font-weight: 900; }
.ranking-list, .expired-list { display: grid; }
.ranking-row { display: grid; grid-template-columns: 34px minmax(0,1fr) 150px 18px; align-items: center; gap: 13px; padding: 14px 20px; border-bottom: 1px solid var(--slate-100); transition: background .15s ease; }
.ranking-row:last-child { border-bottom: 0; }
.ranking-row:hover { background: var(--slate-50); }
.rank-number { display: grid; place-items: center; width: 30px; height: 30px; color: var(--navy-800); background: var(--slate-100); border-radius: 9px; font-size: 10px; font-weight: 900; }
.rank-main, .rank-date { display: grid; min-width: 0; }
.rank-main strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.rank-main small, .rank-date small { margin-top: 3px; color: var(--slate-500); font-size: 9px; }
.rank-date { text-align: right; }
.rank-date strong { font-size: 11px; }
.rank-date small { font-weight: 800; }
.rank-arrow { color: var(--slate-400); font-size: 22px; }
.expired-list a { display: grid; grid-template-columns: 10px minmax(0,1fr) auto; align-items: center; gap: 11px; padding: 15px 20px; border-bottom: 1px solid var(--slate-100); }
.expired-list a:last-child { border-bottom: 0; }
.expired-list a:hover { background: #fffafa; }
.expired-dot { width: 8px; height: 8px; background: var(--red-700); border-radius: 50%; box-shadow: 0 0 0 5px var(--red-100); }
.expired-list a > span:not(.expired-dot) { display: grid; min-width: 0; }
.expired-list a > span:last-child { text-align: right; }
.expired-list strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.expired-list small { margin-top: 3px; color: var(--slate-500); font-size: 9px; }
.data-panel { scroll-margin-top: 92px; }
.data-heading { padding-bottom: 17px; }
.dashboard-filters { grid-template-columns: minmax(240px, 1fr) 155px 180px 145px 145px auto auto; margin: 14px; padding: 10px; background: var(--slate-50); border-radius: 12px; box-shadow: none; }
.dashboard-filters input, .dashboard-filters select { min-height: 40px; padding: 8px 10px; font-size: 10px; }
.dashboard-filters .search-field input { padding-left: 38px; }
.table-summary { margin: 6px 18px 10px; }
.table-scroll { overflow: auto; border-top: 1px solid var(--slate-200); }
.data-table { width: 100%; min-width: 1180px; border-collapse: collapse; font-size: 10px; }
.data-table thead { position: sticky; top: 0; z-index: 1; }
.data-table th { padding: 11px 13px; color: #d6e0e8; background: var(--navy-900); border-right: 1px solid rgba(255,255,255,.07); text-align: left; font-size: 8px; text-transform: uppercase; letter-spacing: .6px; white-space: nowrap; }
.data-table td { padding: 12px 13px; color: var(--slate-700); border-bottom: 1px solid var(--slate-200); vertical-align: middle; }
.data-table tbody tr:hover { background: #fffaf6; }
.data-table td > strong { display: block; color: var(--slate-900); font-size: 10px; }
.data-table td > small { display: block; margin-top: 3px; color: var(--slate-500); font-size: 8px; }
.attachment-count { display: grid; place-items: center; width: 27px; height: 27px; color: var(--navy-800); background: var(--slate-100); border-radius: 8px; font-weight: 900; }
.table-actions { display: flex; gap: 6px; }
.table-actions a { padding: 6px 8px; color: var(--navy-800); background: var(--slate-100); border-radius: 6px; font-size: 9px; font-weight: 900; }
.table-actions a:hover { color: var(--white); background: var(--orange-600); }
.table-empty { padding: 40px !important; color: var(--slate-500) !important; text-align: center; }

.mobile-nav { display: none; }
.auth-body { display: grid; min-height: 100vh; place-items: center; padding: 20px; background: radial-gradient(circle at top, #20384d, var(--navy-950)); }
.auth-card { width: min(430px, 100%); padding: 34px; background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.auth-card .brand-mark { margin-bottom: 22px; }
.auth-card h1 { margin: 0 0 9px; font-size: 25px; }
.auth-card p { margin: 0 0 22px; color: var(--slate-500); line-height: 1.55; }
.auth-card .input { margin-bottom: 13px; }
.error-card { text-align: center; }
.error-card .status-symbol { margin: 0 auto 18px; }
.alert { padding: 11px 12px; margin-bottom: 14px; border-radius: 9px; font-size: 12px; }
.alert-error { color: var(--red-700); background: var(--red-100); }

@media (max-width: 1040px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .dashboard-filters { grid-template-columns: minmax(260px, 1fr) repeat(2, 150px) auto auto; }
  .dashboard-filters input[type="date"] { display: none; }
  .detail-layout { grid-template-columns: minmax(0, 1fr) 290px; }
  .filter-bar { grid-template-columns: minmax(260px,1fr) 170px 190px auto; }
  .filter-bar .filter-clear { grid-column: 1 / -1; justify-self: end; }
}

@media (max-width: 760px) {
  body { padding-bottom: 72px; }
  .topbar { min-height: 64px; padding: 0 16px; }
  .brand { min-width: 0; }
  .brand-mark { width: 42px; height: 38px; font-size: 14px; }
  .brand strong { font-size: 15px; }
  .brand small { font-size: 9px; }
  .topnav { display: none; }
  .page-shell, .dashboard-shell { width: min(100% - 24px, var(--max)); padding: 20px 0 28px; }
  .hero { align-items: flex-start; margin-bottom: 14px; padding: 28px 23px; border-radius: 18px; }
  .hero-status { display: none; }
  .hero h1 { font-size: 31px; }
  .hero p { font-size: 13px; }
  .form-card { padding: 20px 17px 22px; border-radius: 14px; }
  .section-heading { gap: 11px; margin-bottom: 19px; }
  .section-number { flex-basis: 35px; width: 35px; height: 35px; }
  .section-heading h2 { font-size: 16px; }
  .form-grid, .upload-grid { grid-template-columns: 1fr; }
  .field-span-2 { grid-column: span 1; }
  .upload-box { min-height: 160px; }
  .form-actions { display: grid; grid-template-columns: 1fr; }
  .form-actions .btn-primary { order: -1; }
  .page-heading, .dashboard-heading, .detail-header { align-items: flex-start; flex-direction: column; }
  .page-heading h1, .dashboard-heading h1 { font-size: 31px; }
  .page-heading > .btn, .detail-actions, .dashboard-heading-actions { width: 100%; }
  .page-heading > .btn { display: none; }
  .dashboard-heading-actions { justify-content: space-between; }
  .last-update { display: none; }
  .filter-bar, .dashboard-filters { grid-template-columns: 1fr; }
  .filter-bar .filter-clear, .dashboard-filters .filter-clear { grid-column: auto; justify-self: center; }
  .history-card { align-items: flex-start; flex-direction: column; padding: 17px; }
  .history-card-actions { width: 100%; }
  .history-card-actions .btn { flex: 1; }
  .history-meta { gap: 8px 14px; }
  .success-banner { align-items: flex-start; padding: 19px; }
  .success-banner h1 { font-size: 21px; }
  .detail-actions { display: grid; grid-template-columns: 1fr; }
  .detail-actions .btn { width: 100%; }
  .detail-layout { grid-template-columns: 1fr; }
  .data-grid { grid-template-columns: 1fr; }
  .data-grid > div { border-right: 0; }
  .data-grid > div:nth-last-child(-n+2) { border-bottom: 1px solid var(--slate-200); }
  .data-grid > div:last-child { border-bottom: 0; }
  .photo-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .metric-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 9px; }
  .metric-card { align-items: flex-start; flex-direction: column; gap: 9px; padding: 15px; }
  .metric-icon { width: 38px; height: 38px; flex-basis: 38px; font-size: 16px; }
  .metric-card strong { font-size: 25px; }
  .metric-card span { font-size: 8px; }
  .metric-card small { font-size: 8px; }
  .panel-heading { padding: 17px; }
  .ranking-row { grid-template-columns: 30px minmax(0,1fr) 110px; gap: 9px; padding: 13px 14px; }
  .rank-arrow { display: none; }
  .rank-date small { max-width: 100px; }
  .dashboard-filters { margin: 10px; }
  .dashboard-filters input[type="date"] { display: block; }
  .mobile-nav {
    position: fixed;
    z-index: 80;
    inset: auto 0 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    min-height: 65px;
    padding-bottom: env(safe-area-inset-bottom);
    background: rgba(13,27,42,.98);
    border-top: 1px solid rgba(255,255,255,.08);
    backdrop-filter: blur(14px);
  }
  .mobile-nav a { display: grid; place-items: center; align-content: center; gap: 2px; color: #95a7b6; font-size: 9px; font-weight: 800; }
  .mobile-nav a span { font-size: 18px; line-height: 1; }
  .mobile-nav a.active { color: var(--white); background: rgba(249,115,22,.12); }
}

@media (max-width: 430px) {
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .photo-grid { grid-template-columns: 1fr; }
  .protocol-line { align-items: flex-start; flex-direction: column; }
  .rank-date { max-width: 100px; }
  .expired-list a { grid-template-columns: 10px minmax(0,1fr); }
  .expired-list a > span:last-child { grid-column: 2; text-align: left; }
}
