/* ธีมทดลอง Neumorphism — แยกจาก Stable 1.0 */
:root {
  --neo-bg: #eee9ef;
  --neo-panel: #f4f0f5;
  --neo-panel-strong: #faf7fa;
  --neo-shadow: rgba(68, 43, 76, .16);
  --neo-highlight: rgba(255, 255, 255, .9);
  --neo-raised: 9px 9px 22px var(--neo-shadow), -9px -9px 22px var(--neo-highlight);
  --neo-raised-sm: 5px 5px 12px rgba(68, 43, 76, .13), -5px -5px 12px rgba(255, 255, 255, .86);
  --neo-inset: inset 4px 4px 9px rgba(68, 43, 76, .12), inset -4px -4px 9px rgba(255, 255, 255, .84);
  --paper: var(--neo-panel);
  --canvas: var(--neo-bg);
  --line: rgba(105, 77, 112, .12);
  --muted: #706675;
}

html, body { background: var(--neo-bg); }
.page[hidden], .page[aria-hidden="true"] { display: none !important; }
.app { grid-template-columns: 270px minmax(0,1fr); transition: grid-template-columns .22s ease; }
body {
  background:
    radial-gradient(circle at 8% 4%, rgba(255,255,255,.75), transparent 30%),
    radial-gradient(circle at 93% 93%, rgba(142,105,151,.11), transparent 33%),
    var(--neo-bg);
}
.content { background: transparent; }

/* แถบด้านข้าง */
.sidebar {
  width: 270px;
  border: 0;
  background:
    radial-gradient(circle at 105% 0, rgba(221,195,154,.15), transparent 32%),
    linear-gradient(160deg,#422849,#35203c);
  box-shadow: 10px 0 28px rgba(43,25,48,.2), inset -1px 0 rgba(255,255,255,.08);
  transition: width .22s ease, padding .22s ease;
}
.sidebar::after { opacity: .1; }
.sidebar-collapse-button {
  position: absolute;
  z-index: 3;
  top: 96px;
  right: -15px;
  display: grid;
  width: 30px;
  height: 42px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 10px;
  color: #fff8e9;
  background: linear-gradient(145deg,#56365e,#38213f);
  box-shadow: 5px 5px 12px rgba(31,17,35,.25), -3px -3px 8px rgba(255,255,255,.12);
  font-size: 24px;
  line-height: 1;
}
.brand > div { min-width: 0; }
.brand strong, .brand small,
.nav-copy strong, .nav-copy small,
.nav-link > span:not(.nav-icon) { white-space: nowrap; word-break: keep-all; }
.brand-logo {
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  object-fit: contain;
  filter: drop-shadow(5px 6px 9px rgba(18,8,21,.34));
}
.nav-link {
  border: 1px solid transparent;
  border-radius: 13px;
  box-shadow: none;
}
.nav-link:hover { background: rgba(255,255,255,.055); box-shadow: inset 3px 3px 7px rgba(16,7,18,.18), inset -2px -2px 6px rgba(255,255,255,.035); }
.nav-link.active {
  border-color: rgba(255,255,255,.08);
  background: #452b4d;
  box-shadow: 5px 5px 11px rgba(18,8,21,.25), -4px -4px 10px rgba(255,255,255,.045), inset 3px 0 #d5bd80;
}
.main-nav .nav-icon {
  border: 0;
  border-radius: 10px;
  box-shadow: inset 2px 2px 5px rgba(18,8,21,.22), inset -2px -2px 5px rgba(255,255,255,.05);
}
.local-badge {
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 14px;
  box-shadow: inset 4px 4px 9px rgba(15,7,17,.2), inset -3px -3px 8px rgba(255,255,255,.035);
}

body.sidebar-collapsed .app { grid-template-columns: 86px minmax(0,1fr); }
body.sidebar-collapsed .sidebar { width: 86px; padding-inline: 12px; }
body.sidebar-collapsed .brand { justify-content: center; padding-inline: 0; }
body.sidebar-collapsed .brand-logo { width: 50px; height: 50px; flex-basis: 50px; }
body.sidebar-collapsed .brand > div,
body.sidebar-collapsed .nav-link > span:not(.nav-icon),
body.sidebar-collapsed .local-badge > div { display: none; }
body.sidebar-collapsed .nav-link { justify-content: center; gap: 0; padding-inline: 0; }
body.sidebar-collapsed .main-nav .nav-icon { flex: 0 0 38px; width: 38px; }
body.sidebar-collapsed .local-badge { justify-content: center; padding-inline: 0; }
body.sidebar-collapsed .sidebar-collapse-button { right: -14px; }

/* ส่วนหัว */
.topbar {
  min-height: 108px;
  margin: 14px 0 28px;
  padding: 14px 20px;
  border: 0;
  border-radius: 18px;
  background: rgba(244,240,245,.82);
  box-shadow: var(--neo-raised-sm);
  backdrop-filter: blur(12px);
}
.topbar::after { display: none; }
.page-identity::before { width: 4px; border-radius: 5px; box-shadow: 2px 2px 5px rgba(83,56,90,.2); }
.public-header-home {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}
.public-header-home[hidden] { display: none; }
.public-header-logo {
  width: 72px;
  height: 72px;
  flex: 0 0 72px;
  object-fit: contain;
  filter: drop-shadow(5px 6px 10px rgba(68,43,76,.2));
  transition: transform .18s ease, filter .18s ease;
}
.public-header-home:hover .public-header-logo { transform: translateY(-2px); filter: drop-shadow(6px 8px 12px rgba(68,43,76,.27)); }
.public-header-home:focus-visible { outline: 3px solid rgba(112,81,122,.3); outline-offset: 4px; }
.today-pill { border-color: rgba(91,65,98,.13); }

/* ปุ่ม */
.primary-button, .secondary-button, .danger-button, .ghost-light-button, .close-button,
.period-switch button, .trend-switch button, .users-view-tabs button, .admin-tabs button {
  border: 0;
  border-radius: 11px;
  transition: transform .15s ease, box-shadow .15s ease, color .15s ease, background .15s ease;
}
.primary-button {
  background: linear-gradient(145deg,#503357,#38213f);
  box-shadow: 5px 5px 12px rgba(57,35,63,.24), -4px -4px 10px rgba(255,255,255,.72);
}
.secondary-button, .close-button {
  color: var(--forest);
  background: var(--neo-panel);
  box-shadow: var(--neo-raised-sm);
}
.danger-button { box-shadow: 5px 5px 12px rgba(109,45,45,.2), -4px -4px 10px rgba(255,255,255,.7); }
.primary-button:active, .secondary-button:active, .close-button:active,
.period-switch button:active, .trend-switch button:active, .users-view-tabs button:active, .admin-tabs button:active {
  transform: translateY(1px);
  box-shadow: var(--neo-inset);
}

/* ฮีโร่และการ์ดสรุป */
.hero-card, .guest-mode .hero-card {
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 22px;
  background: linear-gradient(145deg,#513458,#37203d);
  box-shadow: 12px 12px 28px rgba(61,39,67,.25), -10px -10px 26px rgba(255,255,255,.8);
}
.hero-card::before { opacity: .5; }
.public-hero-title {
  display: grid;
  max-width: 650px;
  gap: 5px;
}
.public-hero-title strong { color: #e5d29d; font-size: 15px; font-weight: 600; line-height: 1.45; }
.public-hero-title small { color: #d6c9d9; font-size: 12px; font-weight: 400; line-height: 1.65; letter-spacing: 0; }
.public-hero-title small span { display: block; white-space: nowrap; }
.public-grand-total {
  border: 0;
  border-radius: 16px;
  background: rgba(255,255,255,.055);
  box-shadow: inset 5px 5px 12px rgba(18,8,21,.22), inset -4px -4px 10px rgba(255,255,255,.045);
}
.public-hero-summary {
  position: relative;
  z-index: 2;
  display: grid;
  width: min(680px, 58vw);
  gap: 13px;
}
.public-hero-summary .public-grand-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  padding: 14px 20px;
  border-left: 0;
  border-radius: 16px;
}
.public-hero-summary .public-grand-total > div { margin-top: 0; }
.public-period-cards { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; }
.public-period-card {
  position: relative;
  min-width: 0;
  min-height: 78px;
  padding: 13px 15px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  background: rgba(255,255,255,.07);
  box-shadow: inset 3px 3px 8px rgba(18,8,21,.18), inset -3px -3px 8px rgba(255,255,255,.035);
}
.public-period-card::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--period-accent); }
.public-period-card span { display: block; color: #d8cbdc; font-size: 12px; line-height: 1.35; white-space: nowrap; }
.public-period-card strong { display: block; margin-top: 6px; color: #fff9eb; font-size: 25px; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.public-period-card.card-day { --period-accent: #9db9d0; }
.public-period-card.card-week { --period-accent: #8fbea6; }
.public-period-card.card-month { --period-accent: #d7bd78; }
.public-period-card.card-year { --period-accent: #c8899e; }
.hero-period-line { display: block; margin-top: 3px; }
.period-switch, .trend-switch {
  padding: 5px;
  border: 0;
  border-radius: 13px;
  background: var(--neo-panel);
  box-shadow: var(--neo-inset);
}
.period-switch button.active, .trend-switch button.active {
  background: linear-gradient(145deg,#75547e,#513658);
  box-shadow: 3px 3px 8px rgba(53,33,59,.22), -2px -2px 6px rgba(255,255,255,.55);
}
.hero-controls .period-switch button {
  color: #66576a;
  font-weight: 500;
  text-shadow: none;
}
.hero-controls .period-switch button.active { color: #fff; }
.hero-controls .period-input-wrap span { color: #66576a; }
.hero-controls .period-input-wrap input {
  color: #38213f;
  color-scheme: light;
  font-weight: 500;
}
.hero-controls .ghost-light-button {
  min-height: 44px;
  border: 1px solid rgba(255,255,255,.5);
  color: #38213f;
  background: linear-gradient(145deg,#fff5d8,#dfc984);
  box-shadow: 5px 5px 12px rgba(22,10,25,.28), -3px -3px 9px rgba(255,255,255,.14);
  font-weight: 600;
  text-shadow: none;
}
.hero-controls .ghost-light-button:hover {
  color: #2f1836;
  background: linear-gradient(145deg,#fff9e8,#e7d397);
  box-shadow: 7px 7px 15px rgba(22,10,25,.32), -3px -3px 9px rgba(255,255,255,.16);
}
.hero-controls .ghost-light-button:active { box-shadow: inset 3px 3px 7px rgba(89,67,35,.2), inset -3px -3px 7px rgba(255,255,255,.65); }
.metrics-grid { gap: 20px; margin-block: 24px; }
button.metric-card {
  border: 0;
  border-radius: 17px;
  background: linear-gradient(145deg,#faf7fa,#e8e2e9);
  box-shadow: var(--neo-raised);
}
button.metric-card::before { border-radius: 4px; }
button.metric-card:hover { border-color: transparent; box-shadow: 12px 12px 26px rgba(68,43,76,.18), -11px -11px 25px rgba(255,255,255,.92); }
button.metric-card.metric-primary {
  background: linear-gradient(145deg,#55365d,#3b2442);
  box-shadow: 9px 9px 22px rgba(58,37,64,.25), -9px -9px 22px rgba(255,255,255,.82);
}
.metric-icon { border-radius: 10px; box-shadow: var(--neo-raised-sm); }
.metric-primary .metric-icon { box-shadow: inset 3px 3px 7px rgba(18,8,21,.2), inset -3px -3px 7px rgba(255,255,255,.08); }
.metric-progress { box-shadow: inset 2px 2px 5px rgba(20,10,23,.32); }

/* พื้นผิวและการ์ดเนื้อหา */
.surface, .admin-panel, .admin-stat, .workflow-strip, .mock-data-notice {
  border: 0;
  border-radius: 18px;
  background: linear-gradient(145deg,var(--neo-panel-strong),#e8e3e9);
  box-shadow: var(--neo-raised);
}
.flower-overview::before { border-radius: 18px 18px 0 0; }
.flower-total-grid { gap: 20px; }
button.flower-total-card {
  border: 0;
  border-radius: 15px;
  background: var(--neo-panel);
  box-shadow: var(--neo-raised-sm);
}
button.flower-total-card:hover { border: 0; transform: translateY(-2px); box-shadow: var(--neo-raised); }
.flower-card-header { border-bottom-color: rgba(94,67,101,.1); background: linear-gradient(145deg,#faf7fa,#ebe6ec); }
.flower-card-header > span { box-shadow: 3px 3px 7px rgba(58,35,63,.25), -2px -2px 6px #fff; }
.flower-total-card .flower-photo { border-bottom-color: rgba(94,67,101,.1); }
.flower-total-card .flower-card-copy { background: linear-gradient(145deg,#f8f4f8,#ebe6ec); }
.ranking-panel, .coverage-panel, .trend-panel { background: linear-gradient(145deg,#f8f5f8,#e8e3e9); }
.mini-track, .district-breakdown-track { box-shadow: var(--neo-inset); }
.donut { box-shadow: var(--neo-raised-sm); }
.donut::after { box-shadow: inset 3px 3px 7px rgba(68,43,76,.1), inset -3px -3px 7px #fff; }
.bar-chart { border-bottom-color: rgba(91,65,98,.13); }

/* ฟอร์ม */
.report-form { border: 0; border-radius: 20px; box-shadow: var(--neo-raised); }
.field input, .field textarea, .field select, .suffix-input, .password-control,
.search-field, .period-input-wrap {
  border: 0 !important;
  background: var(--neo-panel) !important;
  box-shadow: var(--neo-inset) !important;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: 2px solid rgba(112,81,122,.26);
  outline-offset: 2px;
  box-shadow: inset 5px 5px 11px rgba(68,43,76,.14), inset -5px -5px 11px rgba(255,255,255,.9) !important;
}
.entry-tabs { gap: 13px; border-bottom: 0; }
.entry-tabs button {
  border: 0;
  border-radius: 14px;
  background: var(--neo-panel);
  box-shadow: var(--neo-raised-sm);
}
.entry-tabs button.active { border: 0; background: #eee7f0; box-shadow: var(--neo-inset); }
.flower-field, .photo-slot {
  border: 0;
  border-radius: 14px;
  background: var(--neo-panel);
  box-shadow: var(--neo-raised-sm);
}
.photo-slot:hover { border: 0; box-shadow: var(--neo-inset); }

/* ตารางและหน้าหลังบ้าน */
.table-wrap, .metric-detail-table-wrap {
  border: 0;
  border-radius: 15px;
  background: var(--neo-panel);
  box-shadow: var(--neo-inset);
}
table { border-collapse: separate; border-spacing: 0; }
th { background: rgba(94,68,101,.075); }
tbody tr:nth-child(even) { background: rgba(255,255,255,.3); }
.admin-tabs, .users-view-tabs { gap: 10px; padding: 6px; border: 0; border-radius: 14px; background: var(--neo-panel); box-shadow: var(--neo-inset); }
.admin-tabs button, .users-view-tabs button { background: transparent; }
.admin-tabs button.active, .users-view-tabs button.active {
  color: #fff;
  background: linear-gradient(145deg,#75547e,#513658);
  box-shadow: 4px 4px 9px rgba(57,35,63,.22), -3px -3px 8px rgba(255,255,255,.72);
}
.admin-stat-icon, .user-role-badge, .admin-complete, .admin-pending { border-radius: 9px; }
.users-directory, .user-editor-panel { background: linear-gradient(145deg,#f8f5f8,#e9e4ea); }
.user-row-actions { display: flex; justify-content: flex-end; gap: 6px; }
.user-row-actions button { min-height: 32px; padding: 5px 8px; font-size: 12px; }
.account-toggle { display: inline-flex; align-items: center; gap: 8px; min-width: 116px; padding: 3px 0; border: 0; background: transparent; color: #8a657f; font: inherit; cursor: pointer; }
.account-toggle-track { position: relative; width: 42px; height: 23px; flex: 0 0 42px; border-radius: 999px; background: #d3c9d3; box-shadow: inset 2px 2px 5px rgba(75,48,79,.2), inset -2px -2px 4px rgba(255,255,255,.8); transition: background .18s ease; }
.account-toggle-thumb { position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: #fff; box-shadow: 2px 2px 5px rgba(61,39,66,.24); transition: transform .18s ease; }
.account-toggle.active { color: #266348; }
.account-toggle.active .account-toggle-track { background: #78b997; }
.account-toggle.active .account-toggle-thumb { transform: translateX(19px); }
.account-toggle:focus-visible { outline: 2px solid #7a5681; outline-offset: 3px; border-radius: 6px; }
.account-toggle:disabled { cursor: not-allowed; opacity: .6; }
.account-toggle-label { font-size: 12px; font-weight: 600; white-space: nowrap; }
.user-role-help, .users-demo-strip, .own-account-note {
  border: 0;
  border-radius: 12px;
  background: var(--neo-panel);
  box-shadow: var(--neo-inset);
}

/* โมดัล */
dialog {
  border: 0;
  border-radius: 20px !important;
  background: var(--neo-panel);
  box-shadow: 18px 18px 48px rgba(34,20,39,.34), -10px -10px 32px rgba(255,255,255,.42);
}
dialog::backdrop { background: rgba(42,31,45,.55); backdrop-filter: blur(7px); }
.modal-header, .modal-footer, .breakdown-footer { border-color: rgba(96,69,103,.1); background: linear-gradient(145deg,#faf7fa,#eae5eb); }
.breakdown-summary > div, .metric-detail-summary, .detail-cell, .detail-flower {
  border: 0;
  border-radius: 13px;
  background: var(--neo-panel);
  box-shadow: var(--neo-raised-sm);
}
.district-breakdown-row { border-bottom-color: rgba(96,69,103,.1); }
.district-breakdown-row:nth-child(even) { background: rgba(255,255,255,.24); }
.confirm-modal .confirm-mark { box-shadow: var(--neo-raised-sm); }
.account-status-modal { width: min(480px, calc(100vw - 32px)); padding: 24px 28px; text-align: center; }
#accountStatusDialog::backdrop { background: rgba(42,31,45,.42); backdrop-filter: none; }
.account-status-modal h3 { margin: 12px 0 13px; font-size: 20px; }
.account-status-person { display: grid; gap: 2px; margin: 0 0 12px; padding: 11px 14px; border-radius: 11px; background: #eee8ef; box-shadow: inset 2px 2px 5px rgba(74,49,79,.11); }
.account-status-person strong { color: #321b39; font-size: 17px; line-height: 1.35; overflow-wrap: anywhere; }
.account-status-person span { color: #846e85; font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.account-status-modal p { margin: 0 auto 18px; color: #6f5d70; font-size: 13px; line-height: 1.55; white-space: nowrap; }
.account-status-modal > div:last-child { display: flex; justify-content: center; gap: 10px; }
@media (max-width: 520px) { .account-status-modal p { white-space: normal; text-wrap: balance; } }

/* ส่วนท้าย */
.site-footer { border-top: 0; }
.site-footer::before { background: var(--neo-bg); }
.footer-logo { border-radius: 50%; filter: drop-shadow(6px 7px 10px rgba(68,43,76,.2)) drop-shadow(-4px -4px 8px rgba(255,255,255,.8)); }

*:focus-visible { outline: 3px solid rgba(150,115,157,.38) !important; outline-offset: 3px; }

@media(max-width:1050px) {
  .metrics-grid, .flower-total-grid { gap: 16px; }
  .topbar { padding-inline: 15px; }
  .guest-mode .hero-card { align-items: stretch; flex-direction: column; }
  .public-hero-summary { width: 100%; }
}
@media(max-width:790px) {
  .app, body.sidebar-collapsed .app { display: block; }
  .sidebar, body.sidebar-collapsed .sidebar { width: 238px; padding: 30px 18px 20px; }
  body.sidebar-collapsed .brand { justify-content: flex-start; padding-inline: 11px; }
  body.sidebar-collapsed .brand-logo { width: 58px; height: 58px; flex-basis: 58px; }
  body.sidebar-collapsed .brand > div,
  body.sidebar-collapsed .nav-link > span:not(.nav-icon),
  body.sidebar-collapsed .local-badge > div { display: block; }
  body.sidebar-collapsed .nav-link { justify-content: flex-start; gap: 12px; padding-inline: 13px; }
  body.sidebar-collapsed .local-badge { justify-content: flex-start; padding-inline: 13px; }
  .sidebar-collapse-button { display: none; }
  .content { padding-inline: 18px; }
  .topbar { margin-top: 10px; border-radius: 15px; }
  .hero-card, .guest-mode .hero-card { border-radius: 18px; }
  .metrics-grid { margin-block: 18px; }
  .surface, .admin-panel, .report-form { border-radius: 15px; }
  .public-header-logo { width: 58px; height: 58px; flex-basis: 58px; }
}
@media(max-width:520px) {
  .content { padding-inline: 12px; }
  .topbar { padding-inline: 12px; }
  .metrics-grid, .flower-total-grid { gap: 14px; }
  .hero-card, .guest-mode .hero-card { padding: 24px; }
  .public-period-cards { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .public-hero-summary .public-grand-total { align-items: flex-start; flex-direction: column; gap: 7px; }
  .public-header-logo { width: 48px; height: 48px; flex-basis: 48px; }
  .public-hero-title strong { font-size: 13px; }
  .public-hero-title small { font-size: 11px; }
  .public-hero-title small span { white-space: normal; }
}
@media print {
  *, *::before, *::after { box-shadow: none !important; text-shadow: none !important; }
  body, .content, .surface, .admin-panel, .report-form { background: #fff !important; }
}

/* ทะเบียนรายงาน — ขยายข้อมูลโดยคงแนวตาราง */
#reportsPage .list-toolbar {
  gap: 12px;
  margin-bottom: 20px;
  padding: 16px;
}
#reportsPage .search-field { min-width: 300px; min-height: 44px; padding-inline: 14px; }
#reportsPage .search-field input { font-size: 14px; }
#reportsPage .compact-field { gap: 6px; font-size: 12px; }
#reportsPage .compact-field input { width: 150px; min-height: 42px; padding: 10px 12px; font-size: 13px; }
#reportsPage .table-surface > .section-heading { padding: 21px 24px 17px; }
#reportsPage .section-heading .section-kicker { font-size: 11px; }
#reportsPage .section-heading h3 { margin-top: 5px; font-size: 21px; }
#reportsPage .record-count { padding: 7px 12px; border-radius: 10px; font-size: 12px; box-shadow: var(--neo-raised-sm); }
#reportsPage .table-wrap { border-radius: 0 0 18px 18px; }
#reportsPage table { min-width: 1160px; table-layout: fixed; }
#reportsPage th {
  padding: 13px 15px;
  color: #665a69;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
}
#reportsPage td {
  height: 76px;
  padding: 14px 15px;
  border-top-color: rgba(98,71,105,.1);
  font-size: 14px;
  line-height: 1.5;
}
#reportsPage td strong { font-size: 14px; font-weight: 600; line-height: 1.45; }
#reportsPage td small {
  max-width: 100%;
  margin-top: 4px;
  overflow: hidden;
  color: #756b79;
  font-size: 11px;
  line-height: 1.45;
  white-space: nowrap;
  text-overflow: ellipsis;
}
#reportsPage th:nth-child(1) { width: 11%; }
#reportsPage th:nth-child(2) { width: 23%; }
#reportsPage th:nth-child(3) { width: 18%; }
#reportsPage th:nth-child(4) { width: 9%; }
#reportsPage th:nth-child(5) { width: 9%; }
#reportsPage th:nth-child(6) { width: 22%; }
#reportsPage th:nth-child(7) { width: 8%; }
#reportsPage td:nth-child(1), #reportsPage td:nth-child(4), #reportsPage td:nth-child(5) { font-variant-numeric: tabular-nums; white-space: nowrap; }
#reportsPage .table-actions { gap: 8px; }
#reportsPage .table-actions button {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: var(--neo-panel);
  box-shadow: var(--neo-raised-sm);
  font-size: 14px;
}
#reportsPage .table-actions button:active { box-shadow: var(--neo-inset); }

/* หน้าต่างรายละเอียดรายงาน */
.detail-modal { width: min(1040px,calc(100% - 28px)); }
.detail-modal .modal-header h2 { font-size: 23px; }
.detail-modal .modal-body { gap: 18px; padding: 25px; }
.detail-grid { gap: 14px; }
.detail-cell { padding: 15px 17px; }
.detail-cell small { font-size: 12px; line-height: 1.5; }
.detail-cell strong { margin-top: 5px; font-size: 15px; line-height: 1.55; }
.detail-flowers { gap: 11px; }
.detail-flower { padding: 13px 10px; }
.detail-flower small { font-size: 11px; line-height: 1.4; }
.detail-flower strong { margin-top: 5px; font-size: 22px; font-variant-numeric: tabular-nums; }
.detail-photos { gap: 11px; }
.detail-photos img { border-radius: 11px; box-shadow: var(--neo-raised-sm); }

@media(max-width:790px) {
  #reportsPage .list-toolbar { gap: 10px; padding: 13px; }
  #reportsPage .compact-field { flex: 1; }
  #reportsPage .compact-field input { width: 100%; }
  #reportsPage .table-surface > .section-heading { padding-inline: 18px; }
  .detail-modal .modal-body { padding: 18px; }
}
@media(max-width:520px) {
  #reportsPage .list-toolbar > button { flex: 1 1 42%; }
  #reportsPage .section-heading h3 { font-size: 18px; }
  #reportsPage .record-count { font-size: 11px; }
  .detail-grid, .detail-flowers { grid-template-columns: 1fr; }
}

/* บันทึกรายวัน — เพิ่มความชัดเจนในแท็บ 1 และ 2 */
.entry-page-active .entry-tabs button { min-height: 70px; padding: 11px 16px; }
.entry-page-active .entry-tabs strong { font-size: 17px; font-weight: 600; }
.entry-page-active .entry-tabs small { margin-top: 3px; font-size: 13px; }
.entry-page-active .entry-tab-status {
  flex-basis: 34px;
  width: 34px;
  height: 34px;
  font-size: 15px;
  box-shadow: 3px 3px 7px rgba(61,39,67,.2), -2px -2px 6px rgba(255,255,255,.7);
}
.entry-page-active .activity-title,
.entry-page-active .flowers-title { font-size: 17px; }
.entry-page-active .activity-title span > b,
.entry-page-active .flowers-title span > b { width: 28px; height: 28px; font-size: 14px; }
.entry-page-active [data-entry-panel="activity"] .field { gap: 6px; font-size: 15px; font-weight: 500; }
.entry-page-active [data-entry-panel="activity"] .field input,
.entry-page-active [data-entry-panel="activity"] .field textarea {
  height: 46px;
  padding: 10px 13px;
  font-size: 16px;
  font-weight: 400;
}
.entry-page-active [data-entry-panel="activity"] .field > small { font-size: 12px; }
.entry-page-active [data-entry-panel="flowers"] .flower-field { padding: 12px; border-radius: 12px; }
.entry-page-active [data-entry-panel="flowers"] .flower-field > span {
  min-height: 21px;
  margin-bottom: 8px;
  color: #544459;
  font-size: 14.5px;
  font-weight: 500;
}
.entry-page-active [data-entry-panel="flowers"] .flower-field .suffix-input input {
  height: 42px;
  padding: 8px 10px;
  font-size: 16px;
  font-weight: 500;
}
.entry-page-active [data-entry-panel="flowers"] .flower-field .suffix-input span {
  padding-inline: 10px;
  font-size: 12px;
}
.entry-page-active [data-entry-panel="flowers"] .form-total {
  min-height: 48px;
  padding: 11px 15px;
  font-size: 14px;
  box-shadow: var(--neo-inset);
}
.entry-page-active [data-entry-panel="flowers"] .form-total strong { font-size: 21px; }
@media(min-width:1260px) and (max-height:760px) {
  .entry-page-active .entry-tabs button { min-height: 60px; padding-block: 8px; }
  .entry-page-active [data-entry-panel="activity"] .field input,
  .entry-page-active [data-entry-panel="activity"] .field textarea { height: 42px; }
  .entry-page-active [data-entry-panel="flowers"] .flower-field { padding: 9px 11px; }
  .entry-page-active [data-entry-panel="flowers"] .flower-field .suffix-input input { height: 38px; }
}
@media(max-width:680px) {
  .entry-page-active .entry-tabs button { min-height: 54px; padding: 8px; }
  .entry-page-active .entry-tab-status { flex-basis: 32px; width: 32px; height: 32px; }
  .entry-page-active [data-entry-panel="activity"] .field { font-size: 14px; }
  .entry-page-active [data-entry-panel="activity"] .field input,
  .entry-page-active [data-entry-panel="activity"] .field textarea { font-size: 15px; }
}

/* ชื่อขั้นตอนมีอยู่บนแท็บแล้ว จึงไม่แสดงหัวข้อซ้ำในเนื้อหา */
.entry-page-active .entry-tab-panel > .form-section-title { display: none; }
.entry-page-active .entry-tab-panel { padding-top: 10px; }
@media(min-width:1260px) {
  .entry-page-active .entry-tab-panel[data-entry-panel="activity"] { grid-template-rows: minmax(0,1fr); }
  .entry-page-active .entry-tab-panel[data-entry-panel="flowers"] { grid-template-rows: minmax(0,1fr) auto; }
  .entry-page-active .entry-tab-panel[data-entry-panel="flowers"] .flower-inputs { grid-row: 1; }
  .entry-page-active .entry-tab-panel[data-entry-panel="flowers"] .form-total { grid-row: 2; }
  .entry-page-active .entry-tab-panel[data-entry-panel="photos"] { grid-template-rows: auto minmax(0,1fr); }
  .entry-page-active .entry-tab-panel[data-entry-panel="photos"] .photo-help { grid-row: 1; }
  .entry-page-active .entry-tab-panel[data-entry-panel="photos"] .photo-slot-grid { grid-row: 2; }
}
