:root {
  --green-900: #143d1c;
  --green-700: #1f6b2c;
  --green-600: #2e8b3d;
  --green-500: #3aa64c;
  --green-100: #e6f4e8;
  --green-50: #f2faf3;
  --amber-500: #e8a33d;
  --amber-100: #fdf3e0;
  --red-600: #c0392b;
  --red-100: #fdecea;
  --blue-600: #2b6cb0;
  --blue-100: #e8f1fb;
  --gray-900: #1f2933;
  --gray-700: #46525f;
  --gray-500: #7b8794;
  --gray-300: #cbd2d9;
  --gray-200: #e4e7eb;
  --gray-100: #f5f7fa;
  --white: #ffffff;
  --radius: 10px;
  --shadow: 0 2px 10px rgba(20, 61, 28, 0.12);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font);
  color: var(--gray-900);
  background: var(--gray-100);
  font-size: 15px;
  max-width: 100%;
  overflow-x: clip;
}

button, input, select, textarea { font-family: inherit; font-size: inherit; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--gray-300);
  background: var(--white);
  color: var(--gray-900);
  border-radius: 8px;
  padding: 8px 14px;
  cursor: pointer;
  font-weight: 500;
  transition: background 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.btn:hover { background: var(--gray-100); }
.btn:disabled { opacity: 0.55; cursor: default; }
.btn-primary { background: var(--green-600); border-color: var(--green-600); color: #fff; }
.btn-primary:hover { background: var(--green-700); }
.btn-danger { background: var(--red-600); border-color: var(--red-600); color: #fff; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.15); }
.btn-sm { padding: 5px 10px; font-size: 13px; }
.btn-ico { font-size: 14px; line-height: 1; }
.tab-ico { margin-right: 6px; font-size: 14px; }

/* ---------- Login ---------- */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(150deg, var(--green-900) 0%, var(--green-700) 55%, var(--green-500) 100%);
  padding: 20px;
}
.login-card {
  width: 100%;
  max-width: 380px;
  background: var(--white);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  padding: 32px 28px;
}
.login-logo { font-size: 44px; text-align: center; line-height: 1; }
.login-title { text-align: center; font-size: 20px; font-weight: 700; margin: 12px 0 4px; color: var(--green-900); }
.login-sub { text-align: center; color: var(--gray-500); font-size: 13px; margin-bottom: 22px; }
.login-card .field { margin-bottom: 14px; }
.login-error {
  display: none;
  background: var(--red-100);
  color: var(--red-600);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  margin-bottom: 14px;
}
.login-error.show { display: block; }
.login-lang { display: flex; justify-content: center; gap: 8px; margin-top: 18px; }
.lang-btn {
  border: 1px solid var(--gray-300);
  background: var(--white);
  border-radius: 6px;
  padding: 4px 12px;
  cursor: pointer;
  font-size: 13px;
}
.lang-btn.active { background: var(--green-600); border-color: var(--green-600); color: #fff; }

.login-roles { display: flex; flex-direction: column; gap: 12px; margin-bottom: 4px; }
.role-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  border: 1px solid var(--gray-300);
  background: var(--white);
  border-radius: 12px;
  padding: 15px 18px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s, transform 0.1s;
}
.role-btn:hover:not(:disabled) { border-color: var(--green-500); background: var(--green-50); box-shadow: 0 4px 14px rgba(20, 61, 28, 0.14); }
.role-btn:active:not(:disabled) { transform: translateY(1px); }
.role-btn:disabled { opacity: 0.6; cursor: default; }
.role-btn .role-ico {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--green-100);
  font-size: 22px;
}
.role-btn.role-operator .role-ico { background: var(--blue-100); }
.role-btn .role-text { flex: 1; min-width: 0; }
.role-btn .role-name { font-size: 17px; font-weight: 700; color: var(--green-900); }
.role-btn .spinner { border-color: rgba(31, 107, 44, 0.22); border-top-color: var(--green-600); }

.field label { display: block; font-size: 13px; font-weight: 600; color: var(--gray-700); margin-bottom: 5px; }
.field input, .field select {
  width: 100%;
  border: 1px solid var(--gray-300);
  border-radius: 8px;
  padding: 9px 12px;
  outline: none;
  background: var(--white);
}
.field input:focus, .field select:focus { border-color: var(--green-500); box-shadow: 0 0 0 3px var(--green-100); }
.field .hint { font-size: 12px; color: var(--gray-500); margin-top: 4px; }

/* ---------- App shell ---------- */
.topbar {
  background: var(--green-900);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 18px;
  height: 56px;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}
.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 16px; white-space: nowrap; }
.brand .logo { font-size: 22px; }
.tabs { display: flex; gap: 4px; flex: 1; }
.tab {
  display: inline-flex;
  align-items: center;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.75);
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
}
.tab:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.tab.active { background: rgba(255, 255, 255, 0.18); color: #fff; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.user-label { font-size: 13px; color: rgba(255, 255, 255, 0.85); white-space: nowrap; }
.lang-select {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  padding: 5px 8px;
  cursor: pointer;
}
.lang-select option { color: var(--gray-900); }

/* ---------- Mobile hamburger menu ---------- */
.mobile-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 36px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 8px;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.mobile-menu-btn:hover { background: rgba(255, 255, 255, 0.26); }
.mobile-menu { display: none; }
.mobile-menu-list { display: flex; flex-direction: column; }
.mobile-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  border-radius: 10px;
  padding: 12px;
  font-size: 15px;
  font-weight: 600;
  color: var(--gray-900);
  cursor: pointer;
}
.mobile-menu-item:hover { background: var(--gray-100); }
.mobile-menu-item.active { background: var(--green-100); color: var(--green-900); }
.mobile-menu-item .mm-ico { font-size: 18px; width: 22px; text-align: center; }
.mobile-menu-lang { display: flex; gap: 8px; padding: 10px 12px 2px; }
.mm-lang-btn {
  flex: 1;
  border: 1px solid var(--gray-300);
  background: #fff;
  color: var(--gray-700);
  border-radius: 8px;
  padding: 8px 0;
  font-weight: 600;
  cursor: pointer;
}
.mm-lang-btn.active { background: var(--green-600); border-color: var(--green-600); color: #fff; }
.mobile-menu-user {
  padding: 10px 12px 2px;
  margin-top: 6px;
  border-top: 1px solid var(--gray-200);
  font-size: 13px;
  color: var(--gray-500);
}
.mobile-menu-logout {
  display: block;
  width: 100%;
  margin-top: 8px;
  background: var(--green-900);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.mobile-menu-logout:hover { background: #0f2f15; }

main { padding: 16px; max-width: 100%; }
.view { display: none; }
.view.active { display: block; }

.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.month-nav { display: flex; align-items: center; gap: 6px; }
.month-nav .month-label {
  font-weight: 700;
  font-size: 16px;
  min-width: 170px;
  text-align: center;
  text-transform: capitalize;
  cursor: pointer;
  user-select: none;
  padding: 5px 10px;
  border-radius: 9px;
  transition: background 0.15s;
}
.month-nav .month-label::after { content: ' ▾'; font-size: 12px; color: var(--gray-500); }
.month-nav .month-label:hover { background: var(--gray-200); }
.month-picker {
  position: fixed;
  z-index: 250;
  width: 248px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
  border: 1px solid var(--gray-200);
  padding: 10px;
}
.mp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.mp-year { font-weight: 700; font-size: 15px; }
.mp-nav { border: 1px solid var(--gray-300); background: #fff; border-radius: 8px; width: 32px; height: 28px; cursor: pointer; font-size: 15px; }
.mp-nav:hover { background: var(--gray-100); }
.mp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.mp-month {
  border: 1px solid var(--gray-200);
  background: #fff;
  border-radius: 8px;
  padding: 8px 0 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-700);
}
.mp-month:hover { background: var(--green-50); border-color: var(--green-500); }
.mp-month.has-data { color: var(--green-900); }
.mp-month.has-data::after { content: ''; display: block; width: 5px; height: 5px; border-radius: 50%; background: var(--green-500); margin: 3px auto 0; }
.mp-month.active { background: var(--green-600); border-color: var(--green-600); color: #fff; }
.mp-month.active::after { background: #fff; }
.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--gray-300);
  background: var(--white);
  cursor: pointer;
  font-size: 17px;
  line-height: 1;
}
.icon-btn:hover { background: var(--gray-100); }
.toolbar .spacer { flex: 1; }
.toolbar .actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Tables (Excel 1:1) ---------- */
.table-wrap {
  background: var(--white);
  border-radius: 10px;
  box-shadow: var(--shadow);
  overflow: auto;
  max-height: calc(100vh - 175px);
  position: relative;
  border: 1px solid #9a9a9a;
}
table.grid {
  border-collapse: separate;
  border-spacing: 0;
  table-layout: auto;
  font-family: "Segoe UI", Calibri, Arial, sans-serif;
  font-size: 14px;
  background: #fff;
}
table.grid th, table.grid td {
  border-right: 2px solid #8f8f8f;
  border-bottom: 2px solid #8f8f8f;
  border-top: none;
  border-left: none;
  padding: 2px 5px;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
}
table.grid thead tr:nth-child(1) th { border-top: 2px solid #8f8f8f; }
table.grid td.sticky, table.grid th.sticky { border-left: 2px solid #8f8f8f; }
table.grid thead th {
  position: sticky;
  top: 0;
  z-index: 7;
  font-weight: 700;
  color: #1f2933;
  line-height: 1.2;
  white-space: normal;
}
table.grid thead tr:nth-child(2) th { top: var(--head2-top, 34px); z-index: 8; }
table.grid thead tr:nth-child(3) th { top: var(--head3-top, 62px); z-index: 7; }
table.grid thead tr:nth-child(1) th { z-index: 9; }
table.grid thead th.sticky, table.grid thead th.sticky-2, table.grid thead th.sticky-3 { z-index: 10; }
table.grid td.sticky, table.grid th.sticky,
table.grid td.sticky-2, table.grid th.sticky-2,
table.grid td.sticky-3, table.grid th.sticky-3 {
  position: sticky;
  z-index: 6;
  box-shadow: 3px 0 8px -5px rgba(0, 0, 0, 0.35);
}
table.grid td.sticky, table.grid th.sticky { left: 0; }
table.grid td.sticky-2, table.grid th.sticky-2 { left: var(--sticky2-left, 88px); }
table.grid td.sticky-3, table.grid th.sticky-3 { left: 112px; }
table.grid tbody tr.totals-row td {
  position: sticky;
  top: var(--totals-top, 0px);
  z-index: 8;
}
table.grid tbody tr.totals-row td.sticky,
table.grid tbody tr.totals-row td.sticky-2,
table.grid tbody tr.totals-row td.sticky-3 { z-index: 9; }
table.grid .col-luna { width: 96px; min-width: 96px; }
table.grid .col-day { width: 48px; min-width: 48px; }
table.grid .col-age { width: 54px; min-width: 54px; }
table.grid .col-m { width: 66px; min-width: 66px; }
table.grid .col-htotal { width: 74px; min-width: 74px; }
table.grid .col-sum { width: 76px; min-width: 76px; }
table.grid .col-pct { width: 62px; min-width: 62px; }

table.grid .ro { display: block; font-weight: 400; font-size: 12px; color: #333; }
table.grid .ru { display: block; font-weight: 700; font-size: 13px; }
table.grid .ico { display: block; font-size: 16px; line-height: 1.1; }
table.grid .group-sub { display: block; font-weight: 700; font-size: 13px; }
table.grid .hl { font-weight: 700; }

/* exact Excel fills */
.f-luna { background: #ebf1de; }
.f-inc { background: #c3d69b; }
.f-def { background: #e6e0ec; }
.f-floor { background: #fcd5b5; }
.f-htotal { background: #b7dee8; }
.f-sum-main { background: #93cddd; }
.f-sum-inc { background: #92d050; }
.f-sum-nonconf { background: #e6e0ec; }
.f-sum-floor { background: #fcd5b5; }
.f-group { background: #c3d69b; }
.f-group-summary { background: #92d050; }
.f-age-data { background: #fdeada; }
.f-recv { background: #dce6f2; }
.f-sort { background: #d6d4cb; }
.f-stock { background: #fdeada; }
.f-dispatch { background: #fbffe1; }
.f-balance { background: #fdeada; }
.f-stock-data { background: #dce6f2; }
.f-tot-purple { background: #e6e0ec; }
.f-tot-orange { background: #fdeada; }
.f-white { background: #ffffff; }

table.grid tbody tr.month-start td { border-top: 2px solid #666; }
table.grid td.date-cell { font-weight: 700; }
table.grid tbody tr.today-row td.col-day { box-shadow: inset 0 0 0 2px #2b6cb0; }
table.grid .muted { color: var(--gray-500); }
table.grid td .sub-pct { display: block; font-size: 9.5px; font-weight: 400; color: #555; }

table.grid input.cell-input {
  width: 100%;
  border: none;
  background: transparent;
  padding: 3px 2px;
  text-align: center;
  font: inherit;
  font-weight: 600;
  color: #1f2933;
  font-variant-numeric: tabular-nums;
  outline: none;
  -moz-appearance: textfield;
}
table.grid input.cell-input::-webkit-outer-spin-button,
table.grid input.cell-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
table.grid input.cell-input:hover { background: rgba(255, 255, 255, 0.65); }
table.grid input.cell-input:focus { background: #fff; box-shadow: inset 0 0 0 2px #4472c4; }
table.grid input.cell-input.error { background: #fdecea; box-shadow: inset 0 0 0 2px #c0392b; }

.legend {
  margin-top: 10px;
  font-size: 12px;
  color: var(--gray-500);
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.legend b { color: var(--gray-700); }

/* opening balance bar */
.opening-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 8px 14px;
  margin-bottom: 10px;
  font-size: 13px;
}
.opening-bar .ob-title { font-weight: 700; color: var(--green-900); }
.opening-bar .ob-field { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; }
.opening-bar .ob-field input {
  width: 90px;
  border: 1px solid var(--gray-300);
  border-radius: 7px;
  padding: 5px 8px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.opening-bar .ob-field input:focus { outline: none; border-color: var(--green-500); box-shadow: 0 0 0 3px var(--green-100); }
.opening-bar .ob-hint { color: var(--gray-500); font-size: 12px; }


/* ---------- Dashboard ---------- */
.dash-sticky {
  position: sticky;
  top: var(--topbar-h, 56px);
  z-index: 40;
  background: var(--gray-100);
  margin: -16px -16px 12px;
  padding: 12px 16px 0;
  border-bottom: 1px solid var(--gray-200);
  box-shadow: 0 6px 12px -10px rgba(0, 0, 0, 0.35);
}
.dash-sticky .toolbar { margin-bottom: 10px; }
.dash-sticky .kpi-grid { margin-bottom: 12px; }
.period-nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.period-btn.active { background: var(--green-600); border-color: var(--green-600); color: #fff; }
.period-custom { display: inline-flex; align-items: center; gap: 6px; margin-left: 6px; flex-wrap: wrap; max-width: 100%; }
.period-custom input[type="date"] {
  border: 1px solid var(--gray-300);
  border-radius: 8px;
  padding: 5px 8px;
  font-size: 13px;
  background: var(--white);
}
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.kpi-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--white);
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: var(--shadow);
  border-left: 5px solid var(--green-600);
  min-width: 0;
}
.kpi-card.warn { border-left-color: var(--amber-500); }
.kpi-card.bad { border-left-color: var(--red-600); }
.kpi-ico {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--green-100);
  font-size: 22px;
}
.kpi-card.warn .kpi-ico { background: var(--amber-100); }
.kpi-card.bad .kpi-ico { background: var(--red-100); }
.kpi-body { min-width: 0; flex: 1; }
.kpi-value { font-size: 26px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.kpi-label { font-size: 13px; color: var(--gray-500); font-weight: 600; margin-top: 2px; }
.kpi-sub { font-size: 12.5px; color: var(--gray-500); margin-top: 2px; }
.kpi-grid-sm .kpi-ico { width: 36px; height: 36px; flex-basis: 36px; font-size: 18px; }
.kpi-grid-sm .kpi-value { font-size: 19px; }
.dash-row {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 16px;
  align-items: start;
  min-width: 0;
}
.dash-row > * { min-width: 0; }
.hala-cards { display: flex; flex-direction: column; gap: 10px; }
.hala-card {
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  padding: 10px 12px;
  background: var(--white);
}
.hala-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.hala-name { font-weight: 700; font-size: 14px; color: var(--green-900); width: 62px; }
.hala-total { flex: 1; text-align: right; font-weight: 700; font-size: 17px; font-variant-numeric: tabular-nums; }
.hala-badge {
  font-size: 12.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--green-100);
  color: var(--green-700);
  min-width: 52px;
  text-align: center;
}
.hala-badge.warn { background: var(--amber-100); color: #a56a00; }
.hala-badge.bad { background: var(--red-100); color: var(--red-600); }
.hala-bar {
  display: flex;
  height: 12px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--gray-100);
  margin-bottom: 6px;
}
.hala-bar i { height: 100%; display: block; }
.hala-bar .h-inc { background: var(--green-500); }
.hala-bar .h-floor { background: var(--amber-500); }
.hala-bar .h-nonconf { background: var(--red-600); }
.hala-meta { display: flex; gap: 14px; font-size: 12.5px; color: var(--gray-700); flex-wrap: wrap; }
.dash-panel {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 15px 18px;
  margin-bottom: 16px;
  min-width: 0;
  max-width: 100%;
}
.dash-panel h3 { margin: 0 0 12px; font-size: 17px; color: var(--green-900); overflow-wrap: anywhere; }
.dash-empty {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 60px 20px;
  text-align: center;
  color: var(--gray-500);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.dash-empty-ico { font-size: 44px; }
.dash-empty-text { font-size: 15px; }
.line-last { font-weight: 700; color: var(--gray-900); }

/* dashboard v2 */
.panel-head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.panel-head h3 { margin: 0; }
.panel-hint { margin-left: auto; font-size: 12px; color: var(--green-700); font-weight: 600; }
.trend-badge {
  font-size: 13px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--gray-100);
  color: var(--gray-700);
}
.trend-badge.good { background: var(--green-100); color: var(--green-700); }
.trend-badge.bad { background: var(--red-100); color: var(--red-600); }
.trend-badge.flat { background: var(--amber-100); color: #a56a00; }
.kpi-value-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.kpi-delta { font-size: 13px; font-weight: 700; padding: 1px 7px; border-radius: 999px; white-space: nowrap; flex: 0 0 auto; }
.kpi-delta.good { background: var(--green-100); color: var(--green-700); }
.kpi-delta.bad { background: var(--red-100); color: var(--red-600); }
.kpi-delta.flat { background: var(--gray-100); color: var(--gray-500); }

.chart-bars-lg { height: 300px; padding-bottom: 34px; }
.chart-value {
  font-size: 13px;
  font-weight: 700;
  color: var(--gray-700);
  white-space: nowrap;
  margin-bottom: 4px;
  font-variant-numeric: tabular-nums;
}
.chart-bars-lg .chart-stack { height: auto; flex: 1; width: 100%; }
.chart-bars-lg .chart-bar { justify-content: flex-end; flex: 1 0 46px; min-width: 46px; }
.chart-bars-lg .chart-label { font-size: 13.5px; font-weight: 700; }

.donut-wrap { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; min-width: 0; max-width: 100%; }
.donut {
  width: 170px;
  height: 170px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.donut-hole {
  width: 104px;
  height: 104px;
  background: #fff;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.donut-total { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.donut-caption { font-size: 12px; color: var(--gray-500); }
.donut-legend { display: flex; flex-direction: column; gap: 8px; min-width: 210px; }
.donut-row { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.donut-name { color: var(--gray-700); }
.donut-val { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; }

.wd-chart { display: flex; align-items: flex-end; gap: 10px; height: 200px; padding-top: 22px; min-width: 0; }
.wd-bar { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; }
.wd-value { font-size: 14px; font-weight: 700; color: var(--gray-700); margin-bottom: 4px; white-space: normal; line-height: 1.05; text-align: center; overflow-wrap: anywhere; max-width: 100%; }
.wd-track { flex: 1; width: 100%; display: flex; align-items: flex-end; background: var(--gray-100); border-radius: 8px 8px 4px 4px; overflow: hidden; }
.wd-fill { width: 100%; background: linear-gradient(180deg, var(--green-500), var(--green-700)); border-radius: 6px 6px 0 0; }
.wd-label { font-size: 14px; font-weight: 600; color: var(--gray-700); margin-top: 6px; }

.records { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.record { border-radius: 12px; padding: 12px 14px; background: var(--green-50); border: 1px solid var(--green-100); }
.record.weak { background: var(--amber-100); border-color: #f0d9ad; }
.record-label { font-size: 13px; color: var(--gray-500); font-weight: 600; }
.record-value { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; margin: 2px 0; }
.record-date { font-size: 13px; color: var(--gray-700); }

.duo-chart { height: 200px; gap: 2px; padding-bottom: 20px; }
.duo-bar {
  flex: 1 1 0;
  min-width: 0;
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 1px;
  position: relative;
  padding-bottom: 18px;
}
.duo-bar i { display: block; width: 45%; min-height: 1px; }
.duo-bar .duo-rec { background: #4bacc6; }
.duo-bar .duo-dis { background: #e8a33d; }
.duo-bar .chart-label { bottom: 0; }

.hala-cards-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hala-card.clickable { cursor: pointer; transition: box-shadow 0.15s, transform 0.15s; }
.hala-card.clickable:hover { box-shadow: 0 4px 14px rgba(20, 61, 28, 0.18); transform: translateY(-1px); }
.hala-share { font-size: 13px; font-weight: 600; color: var(--gray-700); }

/* chart tooltips + print buttons */
.chart-tip {
  position: fixed;
  z-index: 300;
  background: #1f2933;
  color: #fff;
  padding: 9px 13px;
  border-radius: 9px;
  font-size: 13px;
  line-height: 1.5;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.12s;
  max-width: 300px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
}
.chart-tip.show { opacity: 1; }
.chart-tip b { font-size: 16px; }
.chart-tip .tip-muted { color: #cbd2d9; font-size: 12px; }
.panel-head-spacer { flex: 1; }
.panel-print {
  border: 1px solid var(--gray-300);
  background: #fff;
  border-radius: 8px;
  padding: 4px 11px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-700);
  white-space: nowrap;
}
.panel-print:hover { background: var(--gray-100); }
.panel-print span { margin-left: 2px; }

@page chart { size: A4 landscape; margin: 8mm; }
.print-chart-page { page: chart; }
.print-chart-page .print-chart-box { margin-top: 14px; }
.print-chart-page .chart-bars { height: 360px; overflow: visible; padding-bottom: 30px; }
.print-chart-page .chart-bars-lg .chart-bar { flex: 1 0 30px; min-width: 30px; }
.print-chart-page .chart-value { font-size: 10px; }
.print-chart-page .chart-label { font-size: 11px; }
.print-chart-page .line-wrap { overflow: visible; }
.print-chart-page .line-chart { min-width: 0; width: 100%; }
.print-chart-page .hala-cards-grid { grid-template-columns: 1fr 1fr; }
.print-chart-page .donut-wrap { justify-content: center; }
.print-chart-page .records { grid-template-columns: 1fr 1fr; }
@media print {
  .print-chart-page, .print-chart-page * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
}

@media (max-width: 1200px) {
  .hala-cards-grid { grid-template-columns: 1fr; }
}

@media (max-width: 1100px) {
  .dash-row { grid-template-columns: 1fr; }
}
.chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 190px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0 2px 30px;
  -webkit-overflow-scrolling: touch;
}
.chart-bar {
  flex: 1 0 44px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  position: relative;
}
.chart-bar:hover .seg { filter: brightness(1.15); }
.chart-stack { display: flex; flex-direction: column; justify-content: flex-end; height: calc(100% - 16px); width: 100%; }
.chart-label {
  position: absolute;
  bottom: -26px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-700);
}
.seg { width: 100%; min-height: 1px; }
.seg-inc { background: var(--green-500); }
.seg-floor { background: var(--amber-500); }
.seg-nonconf { background: var(--red-600); }
.chart-legend {
  display: flex;
  gap: 16px;
  font-size: 13.5px;
  color: var(--gray-700);
  margin-top: 6px;
  flex-wrap: wrap;
}
.chart-legend .dot, .dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  margin-right: 5px;
  vertical-align: middle;
}
.hala-row { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; }
.hala-row .name { width: 74px; font-weight: 600; font-size: 13px; color: var(--green-900); }
.hala-row .track {
  flex: 1;
  background: var(--gray-100);
  border-radius: 6px;
  height: 22px;
  overflow: hidden;
  display: flex;
  min-width: 60px;
}
.hala-row .track .seg { height: 100%; }
.hala-row .value { width: 130px; text-align: right; font-size: 13px; font-variant-numeric: tabular-nums; }
.hala-row .value .sub { font-size: 11px; color: var(--gray-500); }
.line-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; min-width: 0; }
.line-grid > * { min-width: 0; }
.line-box { border: 1px solid var(--gray-200); border-radius: 10px; padding: 10px 12px; min-width: 0; max-width: 100%; }
.line-title { font-size: 12.5px; font-weight: 600; color: var(--gray-700); margin-bottom: 6px; }
.line-chart { width: 100%; height: auto; display: block; }
.line-wrap { position: relative; overflow-x: auto; -webkit-overflow-scrolling: touch; min-width: 0; max-width: 100%; }
.line-wrap .line-chart { min-width: 620px; }
.svg-val { font-size: 12px; font-weight: 700; fill: #46525f; font-family: inherit; }
.svg-date { font-size: 12px; font-weight: 600; fill: #7b8794; font-family: inherit; }
.svg-y { font-size: 11px; fill: #7b8794; font-family: inherit; }
.svg-grid { stroke: #e4e7eb; stroke-width: 1; }
.hala-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.hala-detail .kpi-grid { margin-top: 14px; }
.line-scale {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-size: 11px;
  color: var(--gray-500);
  pointer-events: none;
}
.line-dates {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 2px;
}
.line-empty { color: var(--gray-500); font-size: 13px; padding: 40px 0; text-align: center; }

@media (max-width: 900px) {
  .line-grid { grid-template-columns: 1fr; }
  .hala-row .value { width: 90px; }
}

/* ---------- Modal ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 30, 18, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 18px;
}
.modal {
  background: var(--white);
  border-radius: 14px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.4);
  width: 100%;
  max-width: 620px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.modal.modal-wide { max-width: 980px; }
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--gray-200);
  font-weight: 700;
  font-size: 16px;
}
.modal-close { border: none; background: transparent; font-size: 22px; cursor: pointer; color: var(--gray-500); line-height: 1; }
.modal-body { padding: 16px 18px; overflow: auto; }
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 18px;
  border-top: 1px solid var(--gray-200);
  background: var(--gray-100);
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid .full { grid-column: 1 / -1; }
.checkbox-row { display: flex; align-items: center; gap: 8px; margin: 6px 0; }
.checkbox-row input { width: 17px; height: 17px; }
.radio-row { display: flex; gap: 14px; flex-wrap: wrap; }
.radio-row label { display: flex; align-items: center; gap: 6px; font-weight: 500; font-size: 14px; }
.section-title { font-weight: 700; font-size: 14px; margin: 18px 0 8px; color: var(--green-900); }
.section-title:first-child { margin-top: 0; }

/* Upload */
.dropzone {
  border: 2px dashed var(--gray-300);
  border-radius: 12px;
  padding: 26px 16px;
  text-align: center;
  color: var(--gray-500);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.dropzone:hover, .dropzone.dragover { border-color: var(--green-500); background: var(--green-50); color: var(--green-700); }
.dropzone .big { font-size: 30px; display: block; margin-bottom: 6px; }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.thumb { position: relative; width: 92px; height: 92px; border-radius: 8px; overflow: hidden; border: 1px solid var(--gray-300); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .remove {
  position: absolute; top: 2px; right: 2px;
  background: rgba(0, 0, 0, 0.6); color: #fff;
  border: none; border-radius: 50%; width: 20px; height: 20px; cursor: pointer; font-size: 12px; line-height: 1;
}
.recog-card {
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 12px;
}
.recog-card .head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.recog-card .head img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; border: 1px solid var(--gray-300); }
.recog-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.recog-fields .field label { font-size: 11px; }
.recog-fields .field input, .recog-fields .field select { padding: 6px 8px; font-size: 13px; }
.status-pill { border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 600; }
.status-ok { background: var(--green-100); color: var(--green-700); }
.status-err { background: var(--red-100); color: var(--red-600); }
.status-warn { background: var(--amber-100); color: #a56a00; }

/* Recognition progress */
.progress-wrap { margin: 6px 0 14px; }
.progress-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 14px; font-weight: 700; color: var(--green-900); margin-bottom: 7px; }
.progress-count { font-weight: 600; color: var(--gray-700); font-variant-numeric: tabular-nums; }
.progress { height: 14px; background: var(--gray-200); border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; width: 0%; border-radius: 999px; background: linear-gradient(90deg, var(--green-500), var(--green-700)); transition: width 0.35s ease; }
.progress-hint { font-size: 12.5px; color: var(--gray-500); margin-top: 7px; }
.recog-failed-note {
  background: var(--red-100);
  color: var(--red-600);
  border: 1px solid #f0c9c4;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 12px;
}
.recog-card.failed { border-color: #f0c9c4; background: #fff8f7; }
.spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Toast */
#toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--gray-900);
  color: #fff;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 14px;
  opacity: 0;
  transition: transform 0.25s, opacity 0.25s;
  z-index: 200;
  pointer-events: none;
  max-width: 90vw;
}
#toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
#toast.error { background: var(--red-600); }

.settings-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  max-width: 680px;
}
.settings-card .row { display: flex; align-items: flex-end; gap: 10px; margin-bottom: 14px; }
.settings-card .row .field { flex: 1; margin: 0; }

/* ---------- Logout button (visible on dark topbar) ---------- */
#logoutBtn {
  color: #fff;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.18);
  border: 1.5px solid rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  padding: 7px 15px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}
#logoutBtn:hover {
  background: #fff;
  color: var(--green-900);
  border-color: #fff;
}

/* ---------- Forms tab ---------- */
.forms-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  max-width: 680px;
}
.forms-date { max-width: 220px; margin-bottom: 6px; }
.hala-picker { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.hala-pick {
  border: 1px solid var(--gray-300);
  background: #fff;
  color: var(--gray-700);
  border-radius: 8px;
  padding: 8px 16px;
  cursor: pointer;
  font-weight: 600;
}
.hala-pick:hover { background: var(--green-50); border-color: var(--green-500); }
.hala-pick.active { background: var(--green-600); border-color: var(--green-600); color: #fff; }

/* ---------- Photo lightbox (upload review) ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(0, 0, 0, 0.86);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  cursor: zoom-out;
}
.lightbox img {
  max-width: 96vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.6);
  background: #fff;
  cursor: default;
}
.lightbox-close {
  position: fixed;
  top: 18px;
  right: 22px;
  border: none;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
}
.lightbox-close:hover { background: rgba(255, 255, 255, 0.34); }
.lightbox-caption {
  position: fixed;
  bottom: 16px;
  left: 0;
  right: 0;
  text-align: center;
  color: #fff;
  font-size: 13px;
  opacity: 0.85;
  padding: 0 20px;
}
.recog-thumb { position: relative; flex: 0 0 auto; line-height: 0; }
.recog-thumb .thumb-zoom {
  position: absolute;
  left: 3px;
  right: 3px;
  bottom: 3px;
  border: none;
  background: rgba(0, 0, 0, 0.62);
  color: #fff;
  border-radius: 6px;
  padding: 3px 4px;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.recog-thumb .thumb-zoom:hover { background: rgba(0, 0, 0, 0.85); }

/* ---------- Print ---------- */
#print-root { display: none; }

@media print {
  body.printing > *:not(#print-root) { display: none !important; }
  body.printing #print-root { display: block !important; }

  @page { size: A4 portrait; margin: 10mm; }
  @page report { size: A4 landscape; margin: 8mm; }

  .print-page {
    width: 190mm;
    height: 276mm;
    overflow: hidden;
    box-sizing: border-box;
    page-break-after: always;
  }
  .print-page:last-child { page-break-after: auto; }
  .print-page.print-report {
    page: report;
    width: auto;
    height: auto;
    overflow: visible;
  }
}

.print-page { font-family: var(--font); color: #000; }
.print-head { text-align: center; margin-bottom: 12px; }
.print-head .farm { font-size: 15px; font-weight: 600; }
.print-head h1 { font-size: 19px; margin: 8px 0 3px; }
.print-head .sub { font-size: 12px; color: #444; }
.print-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  margin: 12px 0;
  border: 1px solid #000;
  border-radius: 6px;
  padding: 11px 14px;
}
.print-table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.print-table th, .print-table td {
  border: 1px solid #000;
  padding: 14px 10px;
  font-size: 13px;
  text-align: left;
  vertical-align: middle;
}
.print-table th { background: #f0f0f0; text-align: center; }
.print-table td.value-cell { width: 180px; height: 56px; text-align: center; }
.print-table td.num { width: 44px; text-align: center; font-weight: 700; }
.print-note { font-size: 12px; color: #333; margin-top: 10px; }
.print-sign { margin-top: 36px; font-size: 13px; display: flex; justify-content: space-between; }
.print-sign .line { border-bottom: 1px solid #000; width: 220px; display: inline-block; }
.print-qr { float: right; width: 64px; height: 64px; }
.print-report h2 { font-size: 15px; margin: 16px 0 6px; }
.print-report table { width: 100%; border-collapse: collapse; font-size: 9px; }
.print-report th, .print-report td { border: 1px solid #666; padding: 2px 3px; text-align: center; white-space: nowrap; }
.print-report th { background: #eee; }

@media (max-width: 900px) {
  main { padding: 10px; }
  .topbar { flex-wrap: nowrap; height: 56px; padding: 0 12px; gap: 10px; }
  .brand { font-size: 14px; min-width: 0; overflow: hidden; }
  .brand #farmTitle { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tabs { display: none; }
  .topbar-right { margin-left: auto; }
  .user-label { display: none; }
  .lang-select, #logoutBtn { display: none; }
  .mobile-menu-btn { display: inline-flex; }
  .mobile-menu.open {
    display: block;
    position: fixed;
    top: calc(var(--topbar-h, 56px) + 6px);
    right: 8px;
    z-index: 80;
    width: min(300px, calc(100vw - 16px));
    max-height: calc(100vh - var(--topbar-h, 56px) - 20px);
    overflow-y: auto;
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: 14px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.32);
    padding: 8px;
  }
  .toolbar { gap: 8px; }
  .month-nav .month-label { min-width: 110px; font-size: 14px; }
  .dash-sticky { margin: -10px -10px 10px; padding: 8px 10px 0; }
  .dash-sticky .kpi-grid {
    display: flex;
    overflow-x: auto;
    gap: 8px;
    padding-bottom: 8px;
    margin-bottom: 0;
    -webkit-overflow-scrolling: touch;
  }
  .dash-sticky .kpi-card { flex: 0 0 216px; padding: 10px 12px; }
  .dash-sticky .kpi-ico { width: 36px; height: 36px; flex: 0 0 36px; font-size: 18px; }
  .dash-sticky .kpi-value { font-size: 19px; }
  .dash-sticky .kpi-label { font-size: 12px; }
  .dash-sticky .kpi-sub { font-size: 11.5px; }
  .kpi-grid { grid-template-columns: 1fr; }
  .dash-row, .dash-row-2 { grid-template-columns: 1fr; }
  .hala-cards-grid { grid-template-columns: 1fr; }
  .records { grid-template-columns: 1fr; }
  .line-grid { grid-template-columns: 1fr; }
  .table-wrap { max-height: none; }
  .opening-bar { padding: 8px 10px; }
  .opening-bar .ob-field input { width: 72px; }
  .modal { max-height: 94vh; }
  .modal-body { padding: 12px; }
  .chart-bars-lg { height: 260px; }
  .duo-chart { height: 180px; }
  .form-grid { grid-template-columns: 1fr; }
}

/* ---------- History ---------- */
.hist-filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hist-filters input[type="date"] { padding: 6px 8px; border: 1px solid var(--gray-300, #cfd6dc); border-radius: 5px; font-family: var(--font); font-size: 13px; }
.hist-live { font-size: 13px; color: #2e7d32; font-weight: 600; white-space: nowrap; }
.hist-wrap { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); max-height: none; overflow: auto; }
table.hist-table { width: 100%; border-collapse: collapse; font-size: 13px; }
table.hist-table th, table.hist-table td { padding: 8px 10px; border-bottom: 1px solid #eceff1; text-align: left; white-space: nowrap; vertical-align: top; }
table.hist-table thead th { position: sticky; top: 0; background: #f5f7f5; font-weight: 700; z-index: 2; }
table.hist-table tbody tr:hover { background: #f7faf7; }
table.hist-table td.hist-change { font-weight: 600; }
table.hist-table .hist-old { color: #b03a2e; }
table.hist-table .hist-new { color: #1e7a3c; }
.hist-empty { padding: 44px 20px; text-align: center; color: var(--gray-500, #7b8794); font-size: 15px; }

@media (max-width: 600px) {
  .login-card { padding: 24px 18px; }
  .period-nav { gap: 4px; }
  .period-btn { padding: 5px 8px; font-size: 12px; }
  .period-custom input[type="date"] { padding: 4px 6px; font-size: 12px; width: 116px; }
  .btn { padding: 7px 10px; font-size: 13px; }
  .icon-btn { width: 30px; height: 30px; }
  .actions { width: 100%; }
  .actions .btn { flex: 1; justify-content: center; }
  .donut { width: 140px; height: 140px; }
  .donut-hole { width: 86px; height: 86px; }
  .donut-total { font-size: 18px; }
  .record-value { font-size: 20px; }
  .hala-head { flex-wrap: wrap; }
  .hala-name { width: auto; margin-right: auto; }
  .hist-live { white-space: normal; }
}
