:root {
  --sidebar-width: 340px;
  --bg: #f2f4f7;
  --surface: #ffffff;
  --surface-strong: #eef1f5;
  --ink: #202936;
  --muted: #667282;
  --line: #d7dde6;
  --accent: #315f86;
  --accent-strong: #244a6b;
  --nav-active: #24384d;
  --red: #8f453e;
  --red-bg: #f8efee;
  --yellow: #715d2a;
  --yellow-bg: #f5f1e7;
  --green: #315f86;
  --green-bg: #edf3f7;
  --blue-bg: #edf3f7;
  --blue: #315f86;
  --shadow: none;
  --radius: 0;
  font-family: Inter, "Apple SD Gothic Neo", "Noto Sans KR", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
}

.auth-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 28px;
  background: var(--bg);
}

.auth-panel {
  width: min(100%, 420px);
  border: 1px solid var(--line);
  padding: 32px;
  background: var(--surface);
}

.auth-logo {
  display: block;
  width: min(100%, 240px);
  height: auto;
  margin: 0 0 26px;
}

.auth-panel h1 {
  margin-bottom: 8px;
  font-size: 24px;
}

.auth-panel > p:not(.section-label) {
  color: var(--muted);
  font-size: 14px;
}

.auth-form {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.auth-form .button {
  width: 100%;
  min-height: 44px;
}

.auth-message {
  margin-top: 18px;
}

.check-field {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  padding: 9px 11px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
}

.check-field input {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.conflict-alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.conflict-alert > div {
  display: grid;
  gap: 3px;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.app-shell {
  display: block;
  height: 100vh;
  min-height: 100vh;
  overflow: hidden;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  width: var(--sidebar-width);
  height: 100vh;
  overflow-y: auto;
  padding: 0 0 22px;
  border-right: 1px solid #c8d0da;
  background: #ffffff;
  color: var(--ink);
}

.brand {
  display: grid;
  gap: 7px;
  align-items: center;
  justify-items: center;
  min-height: 104px;
  padding: 14px 24px 12px;
  border-bottom: 1px solid #d8dde5;
  background: #ffffff;
}

.brand-logo {
  display: block;
  width: 100%;
  max-width: 225px;
  height: auto;
  max-height: 66px;
  object-fit: contain;
  object-position: center;
}

.brand span {
  display: block;
  width: 100%;
  border-top: 1px solid #e4e4e4;
  padding-top: 7px;
  color: #273444;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.nav-list {
  display: grid;
  gap: 10px;
  padding: 0;
  border-top: 1px solid #e5e9ef;
}

.nav-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 54px;
  border: 0;
  border-bottom: 1px solid #dde3eb;
  border-left: 5px solid transparent;
  border-radius: 0;
  padding: 0 20px;
  background: #f5f7fa;
  color: #273444;
  text-align: left;
  font-size: 15px;
  font-weight: 700;
}

.nav-button:hover {
  background: #edf1f5;
}

.nav-button[aria-current="page"] {
  border-left-color: var(--accent);
  background: var(--nav-active);
  color: #ffffff;
}

.sidebar-note {
  margin: auto 20px 0;
  border-top: 1px solid #e1e6ed;
  padding-top: 18px;
  color: var(--muted);
  font-size: 13px;
}

.main-panel {
  min-width: 0;
  margin-left: var(--sidebar-width);
  height: 100vh;
  overflow-y: auto;
  background: #ffffff;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 88px;
  border-bottom: 1px solid #d6dde6;
  padding: 22px 32px;
  background: #ffffff;
}

.section-label {
  margin: 0 0 2px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.topbar h1 {
  margin-bottom: 0;
  font-size: 26px;
  line-height: 1.15;
  word-break: keep-all;
}

.topbar p:not(.section-label) {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.topbar-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.save-note {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.view {
  padding: 28px 32px 52px;
  background: #ffffff;
}

.grid {
  display: grid;
  gap: 16px;
}

.kpis {
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  margin-bottom: 16px;
}

.main-grid {
  grid-template-columns: minmax(0, 1.28fr) minmax(380px, 0.72fr);
  align-items: start;
  margin-top: 16px;
}

.one-column {
  grid-template-columns: 1fr;
}

.card,
.kpi,
.rule-item,
.check-group,
.alert,
.stage-row {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: var(--surface);
}

.card {
  min-width: 0;
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #e4e4e4;
  padding: 16px 18px 13px;
  background: #ffffff;
}

.card-header h3 {
  margin-bottom: 0;
  font-size: 15px;
  line-height: 1.2;
}

.card-header p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.card-body {
  padding: 18px;
}

.kpi {
  display: grid;
  align-content: start;
  min-width: 0;
  min-height: 132px;
  border-left: 5px solid var(--line);
  padding: 18px;
}

.kpi span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.kpi strong {
  display: block;
  margin-top: 8px;
  font-size: 26px;
  line-height: 1.08;
  overflow-wrap: normal;
  word-break: keep-all;
}

.kpi small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.kpi:nth-child(1) {
  border-left-color: var(--accent);
}

.kpi:nth-child(2) {
  border-left-color: #8199ac;
}

.kpi:nth-child(3) {
  border-left-color: #9aa8b6;
}

.kpi:nth-child(4) {
  border-left-color: #b8c0ca;
}

.select,
.field input {
  min-height: 38px;
  border: 1px solid #bfbfbf;
  border-radius: 0;
  background: #ffffff;
  color: var(--ink);
  padding: 0 12px;
}

.select.full {
  width: 100%;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-width: 90px;
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 3px;
  padding: 0 13px;
  background: var(--accent);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  word-break: keep-all;
}

.button:hover {
  background: var(--accent-strong);
}

.button.secondary {
  border-color: var(--line);
  background: #f5f7fa;
  color: var(--ink);
}

.button.ghost {
  border-color: #c9b9b7;
  background: #ffffff;
  color: var(--red);
}

.button.danger {
  border-color: var(--red);
  background: var(--red);
  color: #ffffff;
}

.button:disabled,
.select:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

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

.form-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid.compact {
  grid-template-columns: minmax(180px, 1.2fr) minmax(140px, 0.8fr) minmax(120px, 0.7fr);
}

.form-grid.expense-form {
  grid-template-columns: minmax(0, 1fr);
}

.full-row {
  grid-column: 1 / -1;
}

.monthly-target-editor {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  border: 1px solid var(--line);
  padding: 14px;
  background: #fbfcfd;
}

.monthly-target-editor > b {
  font-size: 14px;
}

.monthly-target-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.field label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.field input {
  width: 100%;
}

.form-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
}

.loading-shell {
  min-height: 100vh;
  background: #ffffff;
}

.loading-panel {
  margin-left: 0;
}

.rule-box {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.rule-box.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.rule-box.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.rule-item {
  min-width: 0;
  padding: 14px;
}

.rule-item b,
.rule-item span {
  display: block;
}

.rule-item b {
  color: var(--ink);
  font-size: 14px;
}

.rule-item span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 700px;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 14px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 10px 8px;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  background: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

td {
  color: var(--ink);
  overflow-wrap: anywhere;
  word-break: normal;
}

.empty-cell {
  color: var(--muted);
  text-align: center;
}

.selected-row td {
  background: #f0f4f8;
}

.link-button {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 0 9px;
  background: var(--surface-strong);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.status.ok {
  background: var(--green-bg);
  color: var(--green);
}

.status.warn {
  background: var(--yellow-bg);
  color: var(--yellow);
}

.status.bad {
  background: var(--red-bg);
  color: var(--red);
}

.ok-text {
  color: var(--green);
}

.warn-text {
  color: var(--yellow);
}

.bad-text {
  color: var(--red);
}

.checklist {
  display: grid;
  gap: 10px;
}

.check-group {
  overflow: hidden;
}

.check-group summary {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  border-bottom: 1px solid #eeeeee;
  padding: 11px 13px;
  background: #f8f8f8;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.check-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 12px 13px 13px;
  list-style: none;
}

.check-list.standalone {
  border: 1px solid var(--line);
}

.check-list li {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.check-list input {
  margin-top: 3px;
}

.compact-list {
  border: 1px solid var(--line);
  margin-top: 9px;
  padding: 10px 12px;
}

.alerts {
  display: grid;
  gap: 10px;
}

.alert {
  border-left: 5px solid var(--line);
  padding: 12px 13px;
}

.alert.ok {
  border-left-color: #8da8bb;
  background: var(--green-bg);
}

.alert.warn {
  border-left-color: #c4b680;
  background: var(--yellow-bg);
}

.alert.bad {
  border-left-color: #c9a19d;
  background: var(--red-bg);
}

.alert b {
  display: block;
  margin-bottom: 5px;
}

.alert span {
  color: var(--muted);
  font-size: 13px;
}

.stage-list {
  display: grid;
  gap: 10px;
}

.stage-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 54px;
  border-left: 5px solid var(--line);
  padding: 10px 12px;
  color: var(--ink);
  text-align: left;
}

.stage-row.current {
  border-left-color: var(--accent);
  background: #f0f4f8;
}

.stage-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.stage-row b {
  font-size: 14px;
}

.stage-row small {
  color: var(--muted);
  font-size: 12px;
}

.company-summary {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--accent);
  padding: 12px;
}

.company-summary b,
.company-summary small {
  display: block;
}

.company-summary small,
.footer-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.operating-alert,
.block-control,
.support-list {
  margin-top: 14px;
}

.support-list {
  display: grid;
  gap: 12px;
}

.support-item {
  border: 1px solid var(--line);
  border-left: 5px solid var(--accent);
  padding: 13px;
  background: #ffffff;
}

.support-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.support-head b,
.support-head span,
.doc-progress {
  display: block;
}

.support-head span,
.doc-progress {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.doc-progress {
  margin-top: 8px;
  font-weight: 800;
}

.print-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}

.backup-manager {
  margin-bottom: 14px;
}

.excel-import-card {
  margin-bottom: 14px;
}

.import-controls {
  display: grid;
  grid-template-columns: minmax(180px, 260px) minmax(180px, 260px);
  gap: 12px;
  max-width: 540px;
  margin-bottom: 12px;
}

.import-controls .field > span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.excel-drop-zone {
  display: grid;
  gap: 7px;
  place-items: center;
  min-height: 132px;
  border: 2px dashed #aeb8c4;
  background: #f8fafc;
  padding: 22px;
  text-align: center;
  cursor: pointer;
}

.excel-drop-zone.drag-over {
  border-color: var(--accent);
  background: #edf3f7;
}

.excel-drop-zone input {
  display: none;
}

.excel-drop-zone b,
.excel-drop-zone span {
  display: block;
}

.excel-drop-zone b {
  font-size: 15px;
}

.excel-drop-zone span,
.import-result {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.import-result {
  margin-top: 10px;
  border-left: 5px solid var(--line);
  padding: 10px 12px;
  background: #f8f8f8;
}

.import-result.is-visible {
  border-left-color: var(--accent);
  background: var(--green-bg);
  color: var(--accent);
  font-weight: 800;
}

.backup-actions {
  margin-top: 0;
}

.backup-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.backup-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--accent);
  padding: 12px;
  background: #ffffff;
}

.backup-item b,
.backup-item span {
  display: block;
}

.backup-item span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.briefing-print {
  width: 100%;
  max-width: 210mm;
  margin: 0 auto;
  padding: 0;
}

.briefing-title {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 2px solid var(--ink);
  padding: 22px 24px 18px;
}

.briefing-title h2 {
  margin-bottom: 6px;
  font-size: 24px;
  line-height: 1.2;
}

.briefing-title p:not(.section-label) {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.briefing-stamp {
  display: grid;
  place-items: center;
  min-width: 112px;
  min-height: 74px;
  border: 1px solid var(--line);
  text-align: center;
}

.briefing-stamp span,
.briefing-stamp b {
  display: block;
}

.briefing-stamp span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.briefing-stamp b {
  font-size: 14px;
}

.briefing-section {
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
}

.briefing-section h3 {
  margin-bottom: 10px;
  font-size: 15px;
}

.briefing-metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.briefing-metrics div,
.briefing-step,
.briefing-doc-line,
.briefing-sign div {
  border: 1px solid var(--line);
  background: #ffffff;
}

.briefing-metrics div {
  min-height: 82px;
  padding: 13px;
}

.briefing-metrics b,
.briefing-metrics span {
  display: block;
}

.briefing-metrics b {
  font-size: 18px;
  line-height: 1.15;
}

.briefing-metrics span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.briefing-workflow {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.briefing-step {
  display: grid;
  gap: 6px;
  min-height: 112px;
  padding: 12px;
}

.briefing-step span {
  width: 24px;
  height: 24px;
  border: 1px solid var(--line);
  background: #f7f7f7;
  text-align: center;
  font-size: 12px;
  font-weight: 800;
  line-height: 22px;
}

.briefing-step b {
  font-size: 13px;
}

.briefing-step em,
.briefing-step small {
  display: block;
  font-style: normal;
  font-size: 12px;
}

.briefing-step small {
  color: var(--muted);
  line-height: 1.35;
}

.two-column-print {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
}

.briefing-alerts {
  display: grid;
  gap: 8px;
}

.briefing-doc-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
}

.briefing-table {
  min-width: 0;
  font-size: 12px;
}

.briefing-table th,
.briefing-table td {
  padding: 8px 7px;
}

.briefing-table tbody th {
  width: 160px;
}

.briefing-sign {
  display: grid;
  grid-template-columns: 1fr 1fr 2fr;
  gap: 10px;
  padding: 18px 24px 22px;
}

.briefing-sign div {
  min-height: 58px;
  padding: 8px 10px;
}

.briefing-sign span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.flow-rail {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.flow-rail.compact-flow {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 14px;
}

.flow-step {
  min-width: 0;
  border: 1px solid var(--line);
  border-left: 5px solid var(--accent);
  padding: 12px;
  background: #ffffff;
}

.flow-step span,
.flow-step b,
.flow-step small {
  display: block;
}

.flow-step span {
  width: 26px;
  height: 26px;
  border: 1px solid var(--line);
  background: #f7f7f7;
  color: var(--ink);
  text-align: center;
  font-size: 12px;
  font-weight: 800;
  line-height: 24px;
}

.flow-step b {
  margin-top: 8px;
  font-size: 13px;
}

.flow-step small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.summary-row td {
  border-top: 2px solid var(--ink);
  background: #f8f8f8;
}

.month-performance {
  display: grid;
  gap: 9px;
  margin-top: 14px;
}

.month-row {
  display: grid;
  grid-template-columns: 44px minmax(120px, 1fr) minmax(210px, 1.2fr);
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  padding: 9px 10px;
}

.month-row b {
  font-size: 13px;
}

.month-row span {
  color: var(--muted);
  font-size: 12px;
}

.month-bars {
  position: relative;
  height: 16px;
  border: 1px solid #cfcfcf;
  background: #f4f4f4;
}

.target-progress,
.actual-progress {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
}

.target-progress::-webkit-progress-bar {
  background: #f4f4f4;
}

.target-progress::-webkit-progress-value {
  background: #e2e2e2;
}

.actual-progress::-webkit-progress-bar {
  background: transparent;
}

.actual-progress::-webkit-progress-value {
  background: var(--accent);
}

.briefing-page {
  margin-top: 16px;
}

@media (max-width: 1120px) {
  body {
    overflow: auto;
  }

  .app-shell {
    display: block;
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .sidebar {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    padding: 14px;
  }

  .brand {
    justify-items: start;
  }

  .brand-logo {
    width: min(100%, 260px);
    max-height: 88px;
  }

  .nav-list {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .nav-button {
    min-width: max-content;
  }

  .sidebar-note {
    display: none;
  }

  .main-panel {
    margin-left: 0;
    height: auto;
    overflow: visible;
  }

  .kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .main-grid,
  .rule-box.four,
  .briefing-metrics,
  .briefing-workflow,
  .two-column-print,
  .flow-rail,
  .flow-rail.compact-flow {
    grid-template-columns: 1fr;
  }

  .monthly-target-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    min-height: auto;
    padding: 18px;
  }

  .topbar-meta {
    width: 100%;
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .view {
    padding: 18px;
  }

  .kpis,
  .form-grid,
  .form-grid.two,
  .form-grid.compact,
  .form-grid.expense-form,
  .rule-box,
  .rule-box.three,
  .rule-box.four,
  .briefing-metrics,
  .briefing-workflow,
  .two-column-print,
  .monthly-target-grid {
    grid-template-columns: 1fr;
  }

  .stage-row {
    grid-template-columns: 1fr;
  }

  .topbar h1 {
    font-size: 24px;
    line-height: 1.24;
  }

  .month-row {
    grid-template-columns: 1fr;
  }

  .briefing-title {
    flex-direction: column;
  }

  .briefing-stamp {
    width: 100%;
  }

  .briefing-sign {
    grid-template-columns: 1fr;
  }

  .backup-item {
    align-items: stretch;
    flex-direction: column;
  }

  .import-controls {
    grid-template-columns: 1fr;
    max-width: none;
  }
}

@media print {
  @page {
    size: A4 portrait;
    margin: 12mm;
  }

  * {
    box-shadow: none !important;
  }

  body {
    overflow: visible;
    background: #ffffff;
    color: #111111;
  }

  .sidebar,
  .topbar,
  .kpis,
  .print-actions,
  .excel-import-card,
  .backup-manager {
    display: none !important;
  }

  .app-shell,
  .main-panel {
    display: block;
    height: auto;
    min-height: 0;
    margin: 0;
    overflow: visible;
    background: #ffffff;
  }

  .view {
    padding: 0;
    background: #ffffff;
  }

  .briefing-page {
    margin: 0 !important;
  }

  .briefing-page,
  .briefing-print {
    width: 186mm;
    max-width: 186mm;
  }

  .card,
  .briefing-print {
    border: 0;
  }

  .briefing-title,
  .briefing-section,
  .briefing-sign {
    padding-left: 0;
    padding-right: 0;
  }

  .briefing-title {
    padding-top: 0;
  }

  .briefing-section,
  .briefing-metrics div,
  .briefing-step,
  .briefing-alerts .alert,
  .briefing-sign div {
    break-inside: avoid;
  }

  .briefing-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .briefing-workflow {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .two-column-print {
    grid-template-columns: 1fr 1fr;
  }

  .briefing-table {
    width: 100%;
    table-layout: fixed;
    font-size: 10.5px;
  }

  .briefing-table thead th {
    width: auto;
  }

  .briefing-table tbody th {
    width: 30mm;
  }

  .briefing-table th,
  .briefing-table td {
    overflow-wrap: anywhere;
  }

  .table-wrap {
    overflow: visible;
  }
}

@media (max-width: 640px) {
  .auth-shell {
    padding: 16px;
  }

  .auth-panel {
    padding: 24px;
  }

  .conflict-alert {
    align-items: stretch;
    flex-direction: column;
  }
}
