:root {
  --bg: #efefef;
  --bg-alt: #efefef;
  --card: #ffffff;
  --ink: #1f1f1f;
  --muted: #4f4f4f;
  --line: #b7b7b7;
  --primary: #2f5597;
  --primary-dark: #244477;
  --accent: #d97706;
  --danger: #b91c1c;
  --shadow: none;
  --radius: 8px;
  --radius-sm: 4px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: Calibri, "Segoe UI", Tahoma, Arial, sans-serif;
  line-height: 1.35;
  color: var(--ink);
  background: var(--bg);
  overflow-x: auto;
}

.bg-shape {
  display: none;
}

.bg-shape-a {
  display: none;
}

.bg-shape-b {
  display: none;
}

.app-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  width: 100%;
  max-width: none;
  margin: 0 auto;
  display: grid;
  grid-template-columns: clamp(270px, 21vw, 330px) minmax(0, 1fr);
  gap: 14px;
  padding: 12px;
}

.app-shell.is-locked {
  display: none;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-width: 0;
}

.sidebar {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: sticky;
  top: 10px;
  align-self: start;
  max-height: calc(100vh - 20px);
  overflow: auto;
  background: #ffffff;
}

.main {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.toolbar {
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 14px;
  flex-wrap: wrap;
  position: sticky;
  top: 10px;
  z-index: 40;
  background: #ffffff;
}

.toolbar-right {
  display: flex;
  gap: 10px;
  align-items: end;
  flex-wrap: wrap;
}

.report-block {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.section-title {
  margin: 0 0 12px;
  font-family: Calibri, "Segoe UI", Arial, sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #1f1f1f;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: inherit;
}

h1 {
  font-size: 1.72rem;
  line-height: 1.2;
}

h2 {
  font-size: 1.15rem;
}

.eyebrow {
  margin: 0 0 6px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #3e3e3e;
}

.muted {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

#activeRoleInfo {
  margin-top: 4px;
  font-weight: 700;
  color: #203864;
}

label {
  display: block;
  margin: 8px 0 4px;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--muted);
}

input,
textarea,
select,
button {
  font: inherit;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 7px 8px;
  background: #ffffff;
  color: var(--ink);
  line-height: 1.35;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: none;
  border-color: #6f8fc6;
  box-shadow: 0 0 0 2px rgba(60, 120, 216, 0.15);
  background: #ffffff;
}

textarea {
  resize: vertical;
}

.row-inline {
  display: flex;
  gap: 8px;
}

.action-row {
  flex-wrap: wrap;
}

.action-row .btn {
  flex: 1 1 120px;
}

.row-inline input {
  flex: 1;
}

.btn {
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 8px 12px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, opacity 0.2s ease, background 0.2s ease, border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: 0.56;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: #2f5597;
  color: #fff;
  border-color: #234072;
}

.btn-subtle {
  background: #efefef;
  color: #1f1f1f;
  border-color: #b7b7b7;
}

.btn-mode {
  width: 100%;
  text-align: left;
  background: #f5f5f5;
  color: #2a2a2a;
  border-radius: 4px;
  border-color: #b7b7b7;
}

.btn-mode.is-active {
  background: #d9e2f3;
  color: #fff;
  color: #203864;
  border-color: #8faadc;
}

.indicator-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
  padding-right: 4px;
}

.indicator-btn {
  width: 100%;
  text-align: left;
  border-radius: 4px;
  border: 1px solid #b7b7b7;
  background: #ffffff;
  color: #1f1f1f;
  padding: 8px 10px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.indicator-btn:hover {
  border-color: #808080;
  background: #f3f3f3;
  transform: none;
}

.indicator-btn.active {
  background: #d9e2f3;
  border-color: #8faadc;
  box-shadow: inset 3px 0 0 #2f5597;
}

.role-switch-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.role-switch-body label {
  margin: 0;
}

.role-switch-select {
  font-weight: 700;
}

.role-switch-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.role-switch-btn {
  width: 100%;
  border-radius: 4px;
  border: 1px solid #b7b7b7;
  background: #ffffff;
  color: #1f1f1f;
  padding: 8px 10px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.role-switch-btn:hover:not(:disabled) {
  border-color: #808080;
  background: #f3f3f3;
}

.role-switch-btn.is-active {
  background: #d9e2f3;
  border-color: #8faadc;
  box-shadow: inset 3px 0 0 #2f5597;
}

.settings-box {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.master-details {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fafafa;
  padding: 8px 10px;
}

.master-details summary {
  cursor: pointer;
  font-weight: 700;
  color: #295645;
  user-select: none;
}

.master-details-body {
  margin-top: 10px;
}

.mode-switch {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hidden {
  display: none;
}

.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: linear-gradient(145deg, #e7eef8, #d9e3f2);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
}

.auth-card {
  width: min(420px, 100%);
  background: #ffffff;
  border: 1px solid #9aa8be;
  border-radius: 6px;
  padding: 16px;
  box-shadow: 0 16px 34px rgba(27, 46, 78, 0.2);
}

.auth-title {
  margin-bottom: 6px;
  font-size: 1.2rem;
  color: #203864;
}

.auth-desc {
  margin: 0 0 10px;
  color: #42546b;
  font-size: 0.92rem;
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 44px;
}

.password-toggle-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: 1px solid #b7b7b7;
  border-radius: 4px;
  background: #f5f5f5;
  color: #3f3f3f;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
}

.password-toggle-btn.is-active {
  background: #d9e2f3;
  border-color: #8faadc;
  color: #203864;
}

.auth-actions {
  margin-top: 10px;
}

.auth-message {
  min-height: 1.3rem;
  margin: 8px 0 2px;
  font-size: 0.84rem;
  font-weight: 700;
}

.auth-message.is-error {
  color: #b91c1c;
}

.auth-message.is-ok {
  color: #166534;
}

.auth-countdown {
  margin: 0;
  font-size: 0.82rem;
  color: #374151;
}

.status {
  margin: 10px 0 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.status.warn {
  color: var(--danger);
}

.status.ok {
  color: #166534;
}

.table-wrap {
  overflow: auto;
  border-radius: var(--radius-sm);
  border: 1px solid #a6a6a6;
  background: #fff;
  width: 100%;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}

.table-card {
  padding: 12px;
}

.table-card .section-title {
  margin: 0 0 14px;
  padding-left: 2px;
  font-family: Cambria, "Times New Roman", serif;
  font-size: 1.26rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #202020;
}

.table-card .table-wrap {
  border-radius: 4px;
}

.audit-details {
  border: 1px solid #c2c2c2;
  border-radius: 6px;
  background: #fafafa;
  padding: 2px 10px 10px;
}

.audit-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  list-style: none;
  user-select: none;
  padding: 8px 0;
}

.audit-summary::-webkit-details-marker {
  display: none;
}

.audit-summary .section-title {
  margin: 0;
}

.audit-summary::after {
  content: "▾";
  font-size: 1rem;
  color: #4b5563;
  transition: transform 0.16s ease;
}

.audit-details[open] .audit-summary::after {
  transform: rotate(180deg);
}

.audit-panel {
  padding-top: 4px;
}

.audit-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.audit-history-table {
  min-width: 1500px;
  font-size: 0.82rem;
  line-height: 1.25;
}

.audit-history-table th,
.audit-history-table td {
  padding: 7px 6px;
}

.audit-history-table th:nth-child(1),
.audit-history-table td:nth-child(1) {
  min-width: 44px;
}

.audit-history-table th:nth-child(2),
.audit-history-table td:nth-child(2) {
  min-width: 150px;
}

.audit-history-table th:nth-child(3),
.audit-history-table td:nth-child(3) {
  min-width: 130px;
}

.audit-history-table th:nth-child(4),
.audit-history-table td:nth-child(4) {
  min-width: 82px;
}

.audit-history-table th:nth-child(5),
.audit-history-table td:nth-child(5) {
  min-width: 106px;
}

.audit-history-table th:nth-child(11),
.audit-history-table td:nth-child(11) {
  min-width: 118px;
}

.audit-history-table th:nth-child(12),
.audit-history-table td:nth-child(12) {
  min-width: 280px;
}

.pdf-action-matrix-table {
  min-width: 1360px;
  font-size: 0.86rem;
  line-height: 1.25;
}

.pdf-action-matrix-table th,
.pdf-action-matrix-table td {
  padding: 7px 6px;
}

.pdf-action-matrix-table th:first-child {
  min-width: 220px;
}

.pdf-action-cell {
  min-width: 152px;
  vertical-align: top;
}

.pdf-cell-data {
  margin-bottom: 6px;
  padding: 6px 6px;
  border: 1px solid #b8b8b8;
  border-radius: 4px;
  background: #f7f7f7;
}

.pdf-cell-data.is-empty {
  background: #ececec;
}

.pdf-cell-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.pdf-cell-percent {
  font-size: 0.9rem;
  font-weight: 800;
  color: #1f1f1f;
}

.pdf-cell-trend {
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1;
  color: #1f1f1f;
}

.pdf-cell-sub {
  margin-top: 3px;
  font-size: 0.68rem;
  font-weight: 700;
  color: #525252;
  text-align: left;
}

.pdf-status-badge {
  margin-top: 5px;
  border: 1px solid #2d2d2d;
  border-radius: 3px;
  padding: 3px 4px;
  font-size: 0.69rem;
  font-weight: 700;
  text-align: center;
}

.pdf-cell-actions {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.btn-pdf-cell {
  padding: 5px 8px;
  font-size: 0.76rem;
  font-weight: 700;
  border-color: #8f8f8f;
}

.matrix-status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  padding: 2px 7px;
  border: 1px solid #1f1f1f;
  border-radius: 3px;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
}

.pdf-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: rgba(22, 22, 22, 0.62);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.pdf-preview-modal.hidden {
  display: none;
}

.pdf-preview-dialog {
  width: min(1220px, 98vw);
  height: min(92vh, 920px);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.pdf-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid #b7b7b7;
  background: #f3f3f3;
}

.pdf-preview-header .section-title {
  margin: 0;
  font-size: 1.02rem;
}

.pdf-preview-body {
  flex: 1;
  min-height: 0;
  background: #ececec;
}

#pdfPreviewFrame {
  width: 100%;
  height: 100%;
  border: 0;
  background: #efefef;
}

.matrix-detail-modal {
  position: fixed;
  inset: 0;
  z-index: 9997;
  background: rgba(12, 15, 22, 0.58);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
}

.matrix-detail-modal.hidden {
  display: none;
}

.matrix-detail-dialog {
  width: min(1360px, 99vw);
  height: min(94vh, 940px);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.matrix-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid #b7b7b7;
  background: #f3f3f3;
}

.matrix-detail-header .section-title {
  margin: 0;
  font-size: 1.06rem;
}

.matrix-detail-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.matrix-detail-actions .btn {
  white-space: nowrap;
}

.matrix-detail-meta {
  margin: 4px 0 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: #3f3f3f;
}

.matrix-detail-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  background: #ececec;
  padding: 10px;
}

.matrix-detail-wrap {
  border: 1px solid #8e8e8e;
  border-radius: 4px;
  background: #ffffff;
}

.matrix-detail-table {
  min-width: 1260px;
  font-size: 0.85rem;
  border-collapse: collapse;
  border-spacing: 0;
  border: 1.2px solid #9a9a9a;
  background: #ffffff;
}

.matrix-detail-table th,
.matrix-detail-table td {
  padding: 7px 8px;
  border: 1px solid #b7b7b7;
}

.matrix-detail-table th {
  background: #e7e6e6;
  text-align: center;
}

.matrix-detail-table td:first-child {
  font-weight: 700;
}

.matrix-detail-table th:first-child,
.matrix-detail-table td:first-child {
  min-width: 180px;
}

.matrix-detail-table th:last-child,
.matrix-detail-table td:last-child {
  min-width: 250px;
}

.matrix-detail-table thead th {
  border-top: 1.2px solid #9a9a9a;
}

.matrix-detail-table th:first-child,
.matrix-detail-table td:first-child {
  border-left: 1.2px solid #9a9a9a;
}

.matrix-detail-table th:last-child,
.matrix-detail-table td:last-child {
  border-right: 1.2px solid #9a9a9a;
}

.matrix-detail-table tbody tr:last-child td {
  border-bottom: 1.2px solid #9a9a9a;
}

.matrix-detail-legend {
  margin-top: 10px;
  border: 1px solid #a8a8a8;
  border-radius: 4px;
  background: #ffffff;
  padding: 9px 10px;
}

.matrix-detail-legend-title {
  margin: 0 0 7px;
  font-size: 0.9rem;
  font-weight: 800;
  color: #1f1f1f;
}

.matrix-detail-legend-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 6px 10px;
}

.matrix-detail-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.matrix-detail-legend-swatch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 86px;
  padding: 3px 8px;
  border: 1px solid #1f1f1f;
  font-size: 0.74rem;
  font-weight: 700;
}

.matrix-detail-legend-text {
  font-size: 0.77rem;
  font-weight: 700;
  color: #181818;
}

.excel-matrix-card {
  padding-top: 14px;
}

.excel-matrix-wrap {
  background: #d9d9d9;
  border: 1px solid #7f7f7f;
  border-radius: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  line-height: 1.45;
  min-width: 820px;
}

.year-input-table th:first-child,
.year-input-table td:first-child {
  width: 150px;
  min-width: 150px;
  max-width: 150px;
  white-space: normal;
}

th,
td {
  border-bottom: 1px solid #bfbfbf;
  border-right: 1px solid #bfbfbf;
  padding: 9px 10px;
  vertical-align: middle;
}

th:first-child,
td:first-child {
  padding-left: 12px;
}

th:last-child,
td:last-child {
  border-right: 0;
}

th {
  background: #e7e6e6;
  position: sticky;
  top: 0;
  z-index: 1;
  font-weight: 800;
  color: #1f1f1f;
  box-shadow: none;
}

tbody tr:nth-child(even) {
  background: #ffffff;
}

tbody tr.total-row {
  background: #e2efda;
  font-weight: 700;
}

.cell-input {
  display: block;
  margin: 0 auto;
  width: 86px;
  min-width: 74px;
  height: 34px;
  padding: 5px 7px;
  border-radius: 3px;
  border-color: #a6a6a6;
  background: #ffffff;
}

.cell-input:disabled {
  background: #f3f6f9;
  color: #62727e;
}

.excel-matrix-table {
  --matrix-cols: 14;
  --matrix-first-col: 126px;
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  font-size: 0.88rem;
  line-height: 1.2;
  border-top: 1px solid #1f1f1f;
  border-left: 1px solid #1f1f1f;
}

.excel-matrix-table th,
.excel-matrix-table td {
  border-right: 1px solid #1f1f1f;
  border-bottom: 1px solid #1f1f1f;
  background: #dedede;
  padding: 7px 6px;
}

.excel-matrix-table th {
  position: static;
  z-index: auto;
}

.excel-matrix-table th:first-child,
.excel-matrix-table td:first-child {
  width: var(--matrix-first-col);
  max-width: var(--matrix-first-col);
  padding-left: 8px;
  padding-right: 8px;
}

.excel-matrix-table th:not(:first-child),
.excel-matrix-table td:not(:first-child) {
  width: calc((100% - var(--matrix-first-col)) / var(--matrix-cols));
  max-width: calc((100% - var(--matrix-first-col)) / var(--matrix-cols));
}

.excel-matrix-table .row-label {
  min-width: 0;
  background: #dddddd;
  font-weight: 800;
  text-align: left;
  white-space: nowrap;
}

.excel-matrix-table .trend-cell {
  font-size: 1.5rem;
  line-height: 1;
  font-weight: 800;
}

.excel-matrix-table .vertical-title {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  text-align: center;
  white-space: nowrap;
  letter-spacing: 0.1em;
  min-width: 0;
  position: relative;
  overflow: hidden;
}

.excel-matrix-table .vertical-title span {
  display: inline-block;
  line-height: 1.08;
  text-align: center;
}

.excel-matrix-table .vertical-cell {
  width: auto;
  height: var(--matrix-village-row-height, 90px);
  padding: 0;
  position: relative;
  overflow: hidden;
}

.excel-matrix-table .vertical-cell span {
  display: inline-block;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  white-space: nowrap;
  font-weight: 700;
}

/* PDF export: force bottom-to-top rotation for stable html2canvas output */
.pdf-export-mode .excel-matrix-table .vertical-title,
.pdf-export-mode .excel-matrix-table .vertical-cell {
  writing-mode: horizontal-tb;
  transform: none;
}

.pdf-export-mode #pdfSheet {
  border-radius: 0;
}

.pdf-export-mode #pdfSheet .table-wrap {
  overflow: visible !important;
  max-width: none;
}

.pdf-export-mode #pdfSheet table {
  min-width: 0;
}

.pdf-export-mode .excel-matrix-table {
  --matrix-first-col: 102px;
}

.pdf-export-mode .excel-matrix-table .vertical-cell {
  height: max(138px, var(--matrix-village-row-height, 90px));
}

.pdf-export-mode .excel-matrix-table .vertical-title span,
.pdf-export-mode .excel-matrix-table .vertical-cell span {
  position: absolute;
  left: 50%;
  top: 50%;
  writing-mode: horizontal-tb;
  transform: translate(-50%, -50%) rotate(-90deg);
  transform-origin: center center;
  line-height: 1;
  white-space: nowrap;
}

.excel-matrix-table .status-cell {
  height: 114px;
}

.excel-matrix-table .status-cell span {
  font-size: 1.08rem;
}

.excel-matrix-table .keterangan-cell {
  vertical-align: top;
  padding-top: 12px;
}

.excel-matrix-table .legend-cell {
  padding: 10px 10px 12px;
}

.legend-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(230px, 1fr));
  gap: 8px 12px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.legend-empty {
  min-height: 28px;
}

.legend-color {
  width: 76px;
  height: 28px;
  border: 1px solid #222;
  flex: 0 0 auto;
}

.legend-text {
  font-size: 0.83rem;
  font-weight: 700;
  color: #111;
}

.right {
  text-align: right;
}

.center {
  text-align: center;
}

.target-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 4px;
  background: #efe4b6;
  color: #6f2d14;
  border: 1px solid #dbc78e;
  padding: 5px 10px;
  font-size: 0.94rem;
  font-weight: 800;
}

.sheet-card {
  background: #d9d9d9;
  border: 1px solid #000000;
  border-radius: 0;
  box-shadow: none;
  padding: 10px 10px 0;
  width: 100%;
  max-width: none;
  margin: 0 auto;
}

.sheet-title {
  margin: 0 0 6px;
  text-align: center;
  text-transform: uppercase;
  font-family: Cambria, "Times New Roman", serif;
  font-size: clamp(1.24rem, 1.9vw, 1.98rem);
  line-height: 1.04;
  letter-spacing: 0.015em;
  font-weight: 700;
  color: #1f1f1f;
}

.sheet-line {
  display: block;
}

.sheet-title .sheet-line:nth-child(2),
.sheet-title .sheet-line:nth-child(3) {
  font-size: 0.88em;
}

.sheet-chart-wrap {
  height: 552px;
  padding: 0 2px;
}

.sheet-chart-canvas {
  width: 100%;
  height: 100%;
}

.reveal {
  animation: none;
}

.pdf-range {
  min-width: 120px;
}

.year-quick {
  min-width: 110px;
}

.indicator-quick {
  min-width: 240px;
}

*::-webkit-scrollbar {
  height: 10px;
  width: 10px;
}

*::-webkit-scrollbar-track {
  background: #e8e8e8;
  border-radius: 999px;
}

*::-webkit-scrollbar-thumb {
  background: #b7b7b7;
  border-radius: 999px;
}

*::-webkit-scrollbar-thumb:hover {
  background: #979797;
}

@keyframes revealUp {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    max-height: none;
  }

  .toolbar-right {
    width: 100%;
  }

  .audit-actions {
    align-items: flex-start;
  }

  .sheet-chart-wrap {
    height: 470px;
  }

  .legend-grid {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }

  .pdf-preview-dialog {
    width: min(100vw - 18px, 1100px);
    height: min(93vh, 900px);
  }

  .matrix-detail-dialog {
    width: min(100vw - 12px, 1260px);
    height: min(94vh, 900px);
  }

  .matrix-detail-legend-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .app-shell {
    padding: 10px;
    gap: 12px;
  }

  .sidebar,
  .toolbar,
  .card {
    border-radius: 14px;
  }

  .toolbar-right > * {
    flex: 1 1 130px;
  }

  .role-switch-grid {
    grid-template-columns: 1fr;
  }

  .sheet-chart-wrap {
    height: 390px;
  }

  .legend-grid {
    grid-template-columns: 1fr;
  }

  .pdf-preview-modal {
    padding: 8px;
  }

  .pdf-preview-dialog {
    width: 100%;
    height: 94vh;
  }

  .pdf-preview-header {
    padding: 8px 10px;
  }

  .matrix-detail-modal {
    padding: 8px;
  }

  .matrix-detail-dialog {
    width: 100%;
    height: 94vh;
  }

  .matrix-detail-header {
    padding: 8px 10px;
  }

  .matrix-detail-actions {
    width: 100%;
    justify-content: flex-end;
    flex-wrap: wrap;
  }
}
