:root { --orange: #f15a24; --blue: #073a9b; --ink: #161616; --muted: #909090; --line: #b7b7b7; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-width: 320px; background: #fff; color: var(--ink); font-family: Inter, Arial, sans-serif; }
button, input { font: inherit; }
button { cursor: pointer; }

.app-shell { width: 100%; min-height: 100vh; min-height: 100dvh; margin: auto; background: #fff; }

.is-hidden { display: none !important; }

.point-entry { display: flex; gap: 10px; align-items: stretch; }
.point-entry input { flex: 1; min-width: 0; }
.point-entry button { border: 0; border-radius: 8px; padding: 0 15px; background: #0b5cab; color: #fff; font-weight: 700; cursor: pointer; white-space: nowrap; }
.point-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 14px; }
.point-chip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border-radius: 16px; background: #eaf3ff; color: #084d8d; font-size: 13px; }
.point-chip button { border: 0; background: transparent; color: #084d8d; font-size: 17px; line-height: 1; cursor: pointer; }
@media (max-width: 560px) { .point-entry { flex-direction: column; } .point-entry button { min-height: 42px; } }
.auth-view { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 32px 28px; animation: page-enter .65s cubic-bezier(.2,.8,.2,1); }
.auth-card { width: min(100%, 360px); }
.brand { text-align: center; font-size: clamp(22px, 6vw, 27px); font-weight: 800; font-style: italic; letter-spacing: .2px; line-height: 1; }
.brand-logo { display: block; width: min(230px, 74vw); max-height: 54px; margin: 0 auto; object-fit: contain; }
.brand-orange { color: var(--orange); }.brand-blue { color: var(--blue); }.brand-mark { color: var(--blue); display: inline-block; font-style: normal; transform: rotate(45deg); margin: 0 2px; }
.brand small { display: block; margin-top: 8px; color: #333; font-size: 11px; font-weight: 500; font-style: normal; }
.auth-form { display: grid; gap: 7px; margin-top: 38px; animation: rise-in .55s .12s both cubic-bezier(.2,.8,.2,1); }
.auth-form h1 { margin: 0 0 8px; font-size: 22px; }
label { color: #7c7c7c; font-size: 12px; }
input, select { height: 40px; border: 1.5px solid #999; border-radius: 7px; padding: 0 12px; outline-color: var(--blue); font-size: 12px; }
.primary-button { margin-top: 14px; height: 42px; border: 0; border-radius: 7px; background: var(--blue); color: #fff; font-weight: 700; box-shadow: 0 7px 14px #073a9b30; transition: transform .2s ease, box-shadow .2s ease, background .2s ease; }
.primary-button:hover { background: #052e7d; transform: translateY(-2px); box-shadow: 0 10px 18px #073a9b35; }.primary-button:active { transform: scale(.98); }
.text-button { width: 100%; margin-top: 15px; border: 0; background: transparent; color: var(--blue); font-size: 12px; text-decoration: underline; }
.form-message { min-height: 17px; margin: 3px 0 0; color: #c1272d; font-size: 11px; }

.home-view { min-height: 100vh; min-height: 100dvh; padding: max(42px, env(safe-area-inset-top)) clamp(24px, 5vw, 60px) max(108px, env(safe-area-inset-bottom)); position: relative; animation: page-enter .55s cubic-bezier(.2,.8,.2,1); }
.measurement-view { min-height: 100vh; min-height: 100dvh; padding: max(42px, env(safe-area-inset-top)) clamp(22px, 5vw, 60px) max(118px, env(safe-area-inset-bottom)); position: relative; animation: page-enter .55s cubic-bezier(.2,.8,.2,1); }
.history-view, .report-view, .admin-view { min-height: 100vh; min-height: 100dvh; padding: max(42px, env(safe-area-inset-top)) clamp(22px, 5vw, 60px) max(118px, env(safe-area-inset-bottom)); position: relative; animation: page-enter .55s cubic-bezier(.2,.8,.2,1); }

.page-header { max-width: 100%; margin: 0 auto; }.page-header h1 { margin: 0; font-size: clamp(27px, 5vw, 33px); letter-spacing: -.9px; }
.info-card, .form-card { max-width: 100%; margin: 24px auto 0; border: 1.5px solid #c7c7c7; border-radius: 14px; padding: 20px 21px; background:#fff; }.info-card p { display: flex; justify-content: space-between; gap: 18px; margin: 0 0 16px; color: #858585; font-size: 14px; }.info-card p:last-child { margin-bottom: 0; }.info-card strong { color: #454545; font-size: 12px; text-align: right; }
.measurement-form { max-width: 100%; margin: 0 auto; }.measurement-form .form-card { margin-top: 21px; }.measurement-form label { display: block; margin: 0 0 7px; font-size: 14px; }.measurement-form input, .measurement-form select { width: 100%; height: 39px; margin-bottom: 15px; border: 1.5px solid #888; border-radius: 8px; padding: 0 12px; background: #fff; font-size: 12px; }.measurement-form select { appearance: auto; }.measurement-form label:last-of-type + input, .measurement-form label:last-of-type + select { margin-bottom: 0; }
.measurement-form label::after { content: ' *'; color: #c53030; font-weight: 700; }
.measurement-form label:has(+ .optional-field)::after { content: ''; }
.dynamic-card { padding: 13px 21px 17px; }.dynamic-card fieldset { margin: 0; padding: 0 12px 14px; border: 1.5px solid #777; border-radius: 8px; }.dynamic-card legend { padding: 0 3px; color: #888; font-size: 15px; }.dynamic-card label { margin-top: 8px; font-size: 12px; }.submit-measurement { display: block; min-width: 190px; height: 42px; margin: 23px auto 0; border: 0; border-radius: 8px; background: #08745b; color: #fff; font-weight: 700; box-shadow: 0 6px 13px #08745b32; transition: transform .2s, background .2s; }.submit-measurement:hover { background: #065e49; transform: translateY(-2px); }.submit-measurement:active { transform: scale(.98); }

.history-filter { max-width: 100%; margin: 24px auto 20px; padding: 20px 21px 25px; border: 1.5px solid #c7c7c7; border-radius: 14px; background: #fff; }
.history-filter label, .report-tools label { display: block; margin-bottom: 7px; color: #858585; font-size: 14px; }
.history-filter select, .report-tools select { width: 100%; height: 40px; border: 1.5px solid #888; border-radius: 8px; padding: 0 12px; background: #fff; font-size: 12px; }
.filter-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; width: 100%; }

.report-tools { max-width: 100%; display: flex; align-items: end; justify-content: space-between; gap: 16px; margin: 24px auto 20px; padding: 20px 21px; border: 1.5px solid #c7c7c7; border-radius: 14px; background: #fff; }
.print-button { height: 40px; border: 0; border-radius: 8px; padding: 0 18px; background: #073a9b; color: #fff; font-weight: 700; }
.report-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; max-width: 100%; margin: 0 auto 30px; }
.report-summary article { min-height: 112px; display: grid; align-content: center; gap: 6px; padding: 18px; border: 1.5px solid #d0d0d0; border-radius: 14px; background:#fff; }
.report-summary span { color: #777; font-size: 13px; }
.report-summary strong { font-size: 30px; }
.safe-summary strong { color: #198c42; }
.limit-summary strong { color: #c53030; }
.report-table-section { max-width: 100%; margin: 0 auto; }
.report-table-section h2 { margin: 0 0 14px; font-size: 18px; }
.table-scroll { width: 100%; max-width: 100%; margin: 0 auto; overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
.table-scroll::-webkit-scrollbar { height: 7px; }
.table-scroll::-webkit-scrollbar-thumb { background: #aaa; border-radius: 10px; }
table { width: 100%; border-collapse: collapse; font-size: 11px; }
#history-table, #report-table { min-width: 940px; }
th { padding: 10px 7px; border-bottom: 2px solid #c7c7c7; color: #555; text-align: left; font-weight: 700; background: #f8fafc; }
td { padding: 11px 7px; border-bottom: 1px solid #e5e5e5; color: #505050; vertical-align: middle; }
td:first-child { color: #777; }
.status-safe { color: #198c42; font-weight: 600; }
.status-limit { color: #c53030; font-weight: 700; }
.history-empty { max-width: 100%; margin: 22px auto; color: #808080; font-size: 13px; text-align: center; }

.pagination { display: flex; align-items: center; justify-content: center; gap: 16px; max-width: 100%; margin: 18px auto 0; }
.page-btn { height: 38px; padding: 0 16px; border: 1.5px solid var(--blue); border-radius: 8px; background: #fff; color: var(--blue); font-weight: 700; font-size: 12px; transition: background .2s, color .2s, transform .1s; }
.page-btn:hover:not(:disabled) { background: var(--blue); color: #fff; }
.page-btn:active:not(:disabled) { transform: scale(.96); }
.page-btn:disabled { opacity: .4; cursor: not-allowed; border-color: #c7c7c7; color: #999; }
.page-info { color: #666; font-size: 12px; font-weight: 600; }

@media print { .pagination { display: none !important; } }

.action-cell-btns { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.edit-btn { height: 28px; padding: 0 10px; border: 0; border-radius: 5px; background: #0b5cab; color: #fff; font-size: 10px; font-weight: 700; transition: background .2s, transform .1s; }
.edit-btn:hover { background: #073a9b; }
.edit-btn:active { transform: scale(0.95); }

.delete-btn { height: 28px; padding: 0 10px; border: 0; border-radius: 5px; background: #c53030; color: #fff; font-size: 10px; font-weight: 700; transition: background .2s, transform .1s; }
.delete-btn:hover { background: #9b2c2c; }
.delete-btn:active { transform: scale(0.95); }

.resolve-btn { height: 26px; padding: 0 8px; border: 0; border-radius: 5px; background: #10b981; color: #fff; font-size: 10px; font-weight: bold; }
.resolve-btn:hover { background: #059669; }

.toast { position: fixed; z-index: 9999; top: max(20px, env(safe-area-inset-top)); right: 24px; left: auto; bottom: auto; width: min(calc(100% - 48px), 360px); padding: 14px 18px; border-radius: 12px; background: #08745b; color: #fff; font-size: 13px; font-weight: 600; text-align: left; box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2); opacity: 0; pointer-events: none; transform: translateY(-16px); transition: opacity .25s ease, transform .25s ease; }
.toast.is-visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.date-label { margin: 0 0 5px; color: var(--muted); font-size: 13px; font-weight: 700; }
.home-view h1 { margin: 0; font-size: clamp(21px, 4vw, 27px); letter-spacing: -.7px; }
.brand-line { display: flex; margin-top: 10px; height: 8px; overflow: hidden; border-radius: 10px; }
.brand-line span:first-child { width: 51%; background: var(--orange); }
.brand-line span:last-child { flex: 1; background: var(--blue); }

.role-badge { display: inline-block; padding: 2px 8px; border-radius: 12px; background: #f59e0b; color: #fff; font-size: 11px; font-weight: bold; vertical-align: middle; margin-left: 6px; }

.menu-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 25px; max-width: 100%; }
.menu-card { min-height: 155px; display: grid; place-content: center; gap: 14px; border: 1.5px solid var(--line); border-radius: 17px; background: #fff; color: #252525; text-align: left; transition: transform .25s cubic-bezier(.2,.8,.2,1), border-color .25s, box-shadow .25s; animation: rise-in .5s both cubic-bezier(.2,.8,.2,1); }
.menu-card:nth-child(2) { animation-delay: .08s; }
.menu-card:hover { border-color: var(--blue); box-shadow: 0 10px 25px #073a9b18; transform: translateY(-5px); }
.menu-card:active { transform: scale(.97); }
.menu-card svg { width: 58px; height: 58px; fill: none; stroke: #000; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.menu-card span { font-size: 13px; font-weight: 600; line-height: 1.25; }
.home-message { max-width: 100%; color: #616161; font-size: 13px; }

.bottom-nav { 
  position: fixed; 
  bottom: 24px; 
  left: 50%; 
  transform: translateX(-50%); 
  display: flex; 
  justify-content: center;
  align-items: center;
  width: min(calc(100% - 36px), 540px); 
  padding: 6px 10px; 
  border-radius: 36px; 
  background: rgba(222, 222, 222, 0.95); 
  backdrop-filter: blur(8px);
  box-shadow: 0 10px 28px #00000018; 
  z-index: 1000; 
}
.nav-item { display: grid; place-items: center; gap: 1px; min-height: 45px; min-width: 60px; padding: 0 8px; border: 0; border-radius: 25px; background: transparent; color: #777; font-size: 9px; transition: transform .2s, background .2s, color .2s; }
.nav-item .icon { font-size: 21px; line-height: 18px; }
.nav-item.active { background: linear-gradient(135deg, #2a2a2a, #444); color: white; box-shadow: 0 4px 12px #0003; }
.nav-item:hover { background: #b7b7b7; color: #fff; }
.nav-item:active { transform: scale(.9); }

.modal { border: none; border-radius: 14px; padding: 24px; max-width: 540px; width: 92%; max-height: 88vh; box-shadow: 0 10px 30px rgba(0,0,0,0.2); }
.modal::backdrop { background: rgba(0,0,0,0.5); }
.modal-scroll-area { max-height: calc(88vh - 160px); overflow-y: auto; padding-right: 10px; margin-bottom: 12px; overscroll-behavior: contain; }
.modal-scroll-area::-webkit-scrollbar { width: 6px; }
.modal-scroll-area::-webkit-scrollbar-thumb { background: #bbb; border-radius: 10px; }
.export-form-layout fieldset { margin: 0 0 18px; border: 1.5px solid #ccc; border-radius: 8px; padding: 16px; }
.export-form-layout legend { font-weight: 700; color: #454545; padding: 0 6px; }
.export-form-layout label { display: block; margin-top: 14px; font-size: 13px; }
.export-form-layout label:first-of-type { margin-top: 4px; }
.export-form-layout input, .export-form-layout select { width: 100%; margin-top: 5px; margin-bottom: 0; height: 38px; }

.filter-fields { row-gap: 22px; }
.trend-filter { max-width: 100%; margin: 26px auto 22px; }
.trend-filter select { width: auto; min-width: 190px; height: 42px; border: 1.5px solid #c7c7c7; border-radius: 10px; padding: 0 14px; background: #fff; color: #454545; font-size: 13px; }

#trend-view { min-height: 100vh; min-height: 100dvh; padding: max(42px, env(safe-area-inset-top)) clamp(22px, 5vw, 60px) max(118px, env(safe-area-inset-bottom)); position: relative; animation: page-enter .55s cubic-bezier(.2,.8,.2,1); overflow-x: hidden; max-width: 100%; }

.trend-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; max-width: 100%; margin: 0 auto 18px; }
.trend-summary article { min-height: 100px; display: grid; align-content: center; gap: 6px; padding: 16px; border: 1.5px solid #d0d0d0; border-radius: 14px; background:#fff; }
.trend-summary span { color: #777; font-size: 13px; }
.trend-summary strong { font-size: 26px; }

.trend-map-section { max-width: 100%; margin: 0 auto 24px; padding: 16px; border: 1.5px solid #d0d0d0; border-radius: 14px; box-sizing: border-box; background:#fff; }
.trend-map-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.trend-map-header h3 { margin: 0; font-size: 13px; color: #333; }
.trend-map-legend { display: flex; gap: 14px; }
.trend-map-legend-item { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: #666; }
.trend-map-legend-item .dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.trend-map-legend-item .dot-safe { background: #159447; }
.trend-map-legend-item .dot-over { background: #ce3535; }
.trend-map-legend-item .dot-user { background: #4285f4; }
.trend-map { height: 360px; width: 100%; border-radius: 10px; border: 1px solid #dcdcdc; z-index: 1; }

.autocomplete-suggestions, .autocomplete-box {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 999;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  max-height: 180px;
  overflow-y: auto;
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}
.autocomplete-item {
  padding: 8px 12px;
  font-size: 13px;
  color: #334155;
  cursor: pointer;
  border-bottom: 1px solid #f1f5f9;
}
.autocomplete-item:hover { background: #e2e8f0; color: #0b5cab; }

/* Admin Tabs */
.admin-tabs { display: flex; gap: 8px; margin-top: 20px; border-bottom: 2px solid #e2e8f0; }
.tab-btn { padding: 10px 16px; border: 0; background: transparent; font-weight: 600; font-size: 13px; color: #64748b; border-bottom: 3px solid transparent; margin-bottom: -2px; transition: color .2s, border-color .2s; }
.tab-btn.active { color: var(--blue); border-bottom-color: var(--blue); }
.tab-content { margin-top: 16px; }

.admin-user-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; align-items: end; }
.admin-locations-list { display: flex; flex-direction: column; gap: 14px; margin-top: 14px; }
.admin-location-card { border: 1px solid #cbd5e1; border-radius: 10px; padding: 14px; background: #f8fafc; }
.admin-location-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-weight: bold; color: #1e293b; }

.trend-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-top: 20px; }
.trend-metric-panel { border: 1.5px solid #d0d0d0; border-radius: 14px; padding: 16px; background: #fff; }
.trend-metric-panel h3 { margin: 0 0 12px; font-size: 14px; color: #333; }

.trend-plant-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 12px; }
.trend-plant-label { width: 110px; font-size: 11px; font-weight: 600; color: #555; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trend-plant-bar-track { flex: 1; height: 12px; min-height: 12px; background: #e2e8f0; border-radius: 6px; overflow: hidden; position: relative; }
.trend-plant-bar-fill { display: block; height: 100%; min-height: 12px; border-radius: 6px; transition: width .4s ease; }
.trend-plant-bar-fill.safe { background: #10b981 !important; }
.trend-plant-bar-fill.warning { background: #f59e0b !important; }
.trend-plant-bar-fill.unsafe { background: #ef4444 !important; }
.trend-plant-bar-fill.neutral { background: #cbd5e1 !important; }
.trend-plant-value { width: 65px; font-weight: 700; font-size: 11px; text-align: right; color: #333; }

@keyframes row-pulse {
  0% { background-color: #fde047; box-shadow: inset 0 0 0 2px #eab308; }
  15% { background-color: #fde047; box-shadow: inset 0 0 0 2px #eab308; }
  60% { background-color: #fef08a; box-shadow: inset 0 0 0 2px #facc15; }
  100% { background-color: transparent; box-shadow: none; }
}
.row-highlight {
  animation: row-pulse 5.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dynamic Animations & Buttons */
.primary-button, .submit-measurement, .print-button, .page-btn, .delete-btn, .edit-btn {
  position: relative;
  overflow: hidden;
}
.btn-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,.35);
  width: 10px; height: 10px;
  pointer-events: none;
  transform: scale(0);
  animation: ripple .55s linear;
}

@keyframes page-enter { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes rise-in { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
@keyframes ripple { to { transform: scale(30); opacity: 0; } }

/* REDUCED MOTION */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

@media (min-width: 700px) { 
  .app-shell { min-height: 720px; box-shadow: none; }
  .auth-view { min-height: 720px; }
  .home-view { min-height: 720px; }
  .auth-card { width: 380px; }
  .menu-card { min-height: 180px; } 
}

/* COMPARISON, HRA, RANKINGS */
.trend-comp-badge { display: inline-flex; align-items: center; gap: 2px; font-size: 11px; padding: 2px 6px; border-radius: 6px; font-weight: bold; margin-top: 4px; }
.trend-comp-badge.up { background: #fee2e2; color: #ef4444; }
.trend-comp-badge.down { background: #dcfce7; color: #159447; }
.trend-comp-badge.equal { background: #f3f4f6; color: #6b7280; }

.trend-plant-row-comp { display: flex; flex-direction: column; gap: 5px; padding: 8px; border-radius: 10px; background: rgba(0, 0, 0, 0.02); border: 1px solid rgba(0, 0, 0, 0.04); margin-bottom: 4px; }
.trend-plant-row-comp-bar { display: flex; align-items: center; gap: 8px; font-size: 10px; }
.trend-plant-row-comp-year { font-weight: bold; font-size: 10px; color: #777; width: 42px; flex-shrink: 0; }

.hra-section { margin-top: 24px; }
.hra-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-top: 14px; }
.hra-risk-bar-track { display: flex; height: 18px; border-radius: 9px; background: #e5e7eb; overflow: hidden; margin: 12px 0 6px; }
.hra-risk-bar-fill { height: 100%; transition: width .3s ease; }
.hra-risk-bar-fill.very-low { background: #10b981; }
.hra-risk-bar-fill.low { background: #3b82f6; }
.hra-risk-bar-fill.medium { background: #f59e0b; }
.hra-risk-bar-fill.high { background: #ef4444; }
.hra-legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 11px; margin-top: 8px; color: #555; }
.hra-legend-item { display: flex; align-items: center; gap: 4px; }
.hra-legend-color { width: 10px; height: 10px; border-radius: 50%; }

.rankings-section { margin-top: 28px; }
.rankings-filter { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; }
.rankings-filter label { font-size: 13px; font-weight: bold; color: #555; }
.rankings-filter select { height: 38px; border-radius: 8px; border: 1.5px solid #c7c7c7; padding: 0 12px; background: #fff; font-size: 13px; color: #333; }
.rankings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.rankings-panel { border: 1.5px solid #d0d0d0; border-radius: 14px; padding: 16px; background: #fff; overflow-x: auto; }
.rankings-panel h3 { font-size: 14px; color: #333; margin: 0 0 12px; border-bottom: 1.5px solid #eee; padding-bottom: 8px; display: flex; justify-content: space-between; }
.rankings-table { width: 100%; border-collapse: collapse; font-size: 11px; text-align: left; table-layout: fixed; }
.rankings-table th, .rankings-table td { padding: 6px 6px; border-bottom: 1px solid #e5e7eb; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rankings-table th { background: #f9fafb; font-weight: bold; color: #4b5563; }
.rankings-table tr:hover { background: #f9fafb; }
.rankings-table td span.badge { padding: 2px 5px; border-radius: 4px; font-weight: bold; font-size: 9px; text-transform: uppercase; }
.rankings-table td span.badge.aman { background: #d1fae5; color: #065f46; }
.rankings-table td span.badge.bahaya { background: #fee2e2; color: #991b1b; }

@media (max-width: 820px) {
  .rankings-grid { grid-template-columns: 1fr; }
}

/* Tambah & Hapus Jenis Pengukuran Row Buttons */
.add-type-row-btn {
  white-space: nowrap;
  background: #0d47a1;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0 14px;
  height: 39px;
  min-width: 120px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  transition: background 0.2s;
  flex-shrink: 0;
}
.add-type-row-btn:hover { background: #1565c0; }

.remove-type-row-btn {
  white-space: nowrap;
  background: #e53935;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0 14px;
  height: 39px;
  min-width: 120px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  transition: background 0.2s;
  flex-shrink: 0;
}
.remove-type-row-btn:hover { background: #c62828; }
