/* Adal Commodities · СРМ — стили
   Перенесено из дизайн-компонента «Adal CRM.dc.html»:
   инлайновые style-атрибуты вынесены в классы, style-hover — в :hover. */

:root {
  --ink: #15261c;
  --ink-2: #1e3a28;
  --ink-3: #0f1a13;
  --border-dark: #223c2c;

  --cream: #faf8f1;
  --app-bg: #f7f4ec;
  --panel: #ffffff;
  --border: #e6e1d3;
  --rule: #f1eee1;
  --thead: #f4f1e6;
  --track: #f0ecdd;
  --track-2: #eee9d8;

  --text: #1c2b22;
  --muted: #8a8570;
  --muted-2: #6b6a5d;

  --gold: #e3c07a;
  --amber: #c9973d;
  --teal: #2f6f5e;
  --green: #3f7d4a;
  --red: #b3492f;
  --grey: #9a958a;

  --sage: #cdd8cf;
  --sage-2: #a9c2ac;
  --sage-3: #7f9585;
  --sage-4: #8a9c8f;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Manrope', 'Segoe UI', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  color: var(--text);
}

a { color: var(--teal); }
a:hover { color: #1f4d40; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #d8d2bd; border-radius: 4px; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ================= ВХОД ================= */

.login {
  min-height: 100vh;
  background: radial-gradient(circle at 15% 10%, var(--ink-2) 0%, var(--ink) 55%, var(--ink-3) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.login-card {
  width: 100%;
  max-width: 920px;
  background: var(--cream);
  border-radius: 18px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1.3fr;
}

.login-aside {
  background: var(--ink);
  padding: 48px 36px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
}

.brand-name { font-size: 30px; font-weight: 800; color: var(--gold); letter-spacing: 0.5px; }
.brand-sub { font-size: 12px; font-weight: 600; letter-spacing: 3px; color: var(--sage-2); margin-top: 2px; }
.brand-rule { width: 36px; height: 3px; background: var(--amber); margin-top: 16px; border-radius: 2px; }

.login-lede { color: var(--sage); font-size: 13px; line-height: 1.7; }
.login-copy { color: var(--sage-3); font-size: 11px; }

.login-main { padding: 44px 40px; background: var(--cream); }
.login-title { font-size: 20px; font-weight: 700; margin: 0; }
.login-hint { font-size: 13px; color: #847f6e; margin: 4px 0 22px; }

.role-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.role-card {
  cursor: pointer;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  text-align: left;
  font: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.role-card:hover { border-color: var(--amber); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06); }
.role-card b { display: block; font-size: 13.5px; font-weight: 700; color: var(--text); }
.role-card span { display: block; font-size: 11.5px; color: var(--muted); margin-top: 3px; }

/* ================= КАРКАС ================= */

.app {
  min-height: 100vh;
  background: var(--app-bg);
  display: grid;
  grid-template-columns: 230px 1fr;
}

.sidebar {
  background: var(--ink);
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-brand {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 0 6px 18px;
  border-bottom: 1px solid var(--border-dark);
  margin-bottom: 14px;
}
.sidebar-brand .n { font-size: 20px; font-weight: 800; color: var(--gold); }
.sidebar-brand .s { font-size: 9px; font-weight: 600; letter-spacing: 2px; color: var(--sage-3); }

.nav-item {
  cursor: pointer;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 9px;
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--sage);
  background: none;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-item:hover { background: var(--ink-2); }
.nav-item.is-active { background: var(--ink-2); color: var(--gold); }
.nav-dot { width: 6px; height: 6px; border-radius: 50%; flex: none; background: var(--sage-3); }
.nav-item.is-active .nav-dot { background: var(--amber); }

.sidebar-spacer { flex: 1; }
.sidebar-foot { padding: 12px; border-top: 1px solid var(--border-dark); margin-top: 10px; }
.sidebar-role { font-size: 12.5px; font-weight: 700; color: var(--gold); }
.sidebar-dept { font-size: 11px; color: var(--sage-4); margin-top: 2px; }

.logout {
  margin-top: 10px;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--amber);
  cursor: pointer;
}

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

.topbar {
  height: 60px;
  flex: none;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 26px;
}
.topbar h1 { margin: 0; font-size: 16px; font-weight: 700; }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.topbar-date { font-size: 12px; color: var(--muted); }
.topbar-sep { width: 1px; height: 20px; background: var(--border); }
.topbar-user { display: flex; align-items: center; gap: 8px; }
.topbar-user span { font-size: 12.5px; font-weight: 600; }

.avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--amber);
  color: var(--ink);
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.content { flex: 1; overflow: auto; padding: 26px; }

/* ================= ОБЩИЕ БЛОКИ ================= */

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.card-pad { padding: 20px; }
.card-title { font-size: 14px; font-weight: 700; margin: 0 0 12px; }

.pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: var(--panel);
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
}

.table-wrap {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.table-scroll { overflow-x: auto; }

.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th {
  background: var(--thead);
  text-align: left;
  padding: 12px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}
.table td { padding: 12px; }
.table th:first-child, .table td:first-child { padding-left: 16px; }
.table th:last-child, .table td:last-child { padding-right: 16px; }
.table tbody tr { border-top: 1px solid var(--rule); }
.table .num { text-align: right; }
.table .strong { font-weight: 700; }
.table .semi { font-weight: 600; }
.table .dim { color: var(--muted-2); }
.table .sub { font-size: 11px; color: var(--muted); }
.table tr.is-clickable { cursor: pointer; }
.table tr.is-clickable:hover { background: #fbf9f2; }

.empty { padding: 40px; text-align: center; color: var(--muted); font-size: 13px; }

.tabs { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.tab {
  cursor: pointer;
  padding: 8px 14px;
  border: 0;
  border-radius: 20px;
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  background: var(--panel);
  color: var(--muted-2);
}
.tab.is-active { background: var(--ink); color: var(--gold); }

/* Горизонтальные полосы (остатки, задолженность) */
.bar-row { margin-bottom: 10px; }
.bar-head { display: flex; justify-content: space-between; font-size: 11.5px; margin-bottom: 4px; }
.bar-track { height: 6px; background: var(--border-dark); border-radius: 3px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 3px; background: var(--amber); }

.bar-row--lg { margin-bottom: 12px; }
.bar-row--lg .bar-head { font-size: 12px; }
.bar-row--lg .bar-head .v { font-weight: 700; }
.bar-row--lg .bar-track { height: 9px; background: var(--track); border-radius: 4px; }
.bar-row--lg .bar-fill { border-radius: 4px; }

.panel-dark { background: var(--ink); border-radius: 12px; padding: 20px; color: #f2f0e6; }
.panel-dark .card-title { color: var(--gold); margin-bottom: 10px; }
.panel-dark .bar-head .v { color: var(--gold); }

/* ================= ДАШБОРД ================= */

.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.kpi { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 18px; }
.kpi-label { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.kpi-value { font-size: 24px; font-weight: 800; margin-top: 6px; }
.kpi-hint { font-size: 11px; font-weight: 600; margin-top: 4px; }

.dash-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; }

.doc-line {
  cursor: pointer;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 4px;
  border: 0;
  border-bottom: 1px solid var(--rule);
  background: none;
  font: inherit;
  text-align: left;
}
.doc-line:hover { background: #fbf9f2; }
.doc-line-title { display: block; font-size: 13px; font-weight: 600; }
.doc-line-sub { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }

/* ================= ЖУРНАЛЫ ================= */

.progress { display: flex; align-items: center; gap: 8px; }
.progress-track { width: 70px; height: 6px; background: var(--track-2); border-radius: 3px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 3px; background: var(--teal); }
.progress span { font-size: 11.5px; color: var(--muted-2); }

/* ================= ВИЗУАЛЬНЫЕ ОТЧЁТЫ ================= */

.report-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 18px; }
.report-kpi-value { font-size: 26px; font-weight: 800; margin-top: 6px; white-space: nowrap; }

.charts-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }

.donut-card { display: flex; flex-direction: column; align-items: center; }
.donut-card .card-title { align-self: flex-start; margin-bottom: 14px; }
.donut {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.donut-hole {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--panel);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.donut-pct { font-size: 20px; font-weight: 800; }
.donut-cap { font-size: 10px; color: var(--muted); }

.legend { display: flex; gap: 14px; margin-top: 16px; font-size: 11.5px; flex-wrap: wrap; justify-content: center; }
.legend span { display: flex; align-items: center; gap: 5px; }
.legend i { width: 8px; height: 8px; border-radius: 50%; }

/* ================= ФО И ЗАДОЛЖЕННОСТЬ ================= */

.notice {
  background: #fbf3e2;
  border: 1px solid #e9d6a8;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 12.5px;
  color: #7a5a1f;
  margin-bottom: 16px;
}

.dropzone { border: 2px dashed #d8d2bd; border-radius: 10px; padding: 30px; text-align: center; }
.dropzone p { margin: 0 0 12px; font-size: 13px; color: var(--muted-2); }

.btn-dark {
  background: var(--ink);
  color: var(--gold);
  font: inherit;
  font-weight: 700;
  font-size: 13px;
  padding: 10px 22px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}

.uploaded {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #f2f7ee;
  border: 1px solid #d4e6c8;
  border-radius: 10px;
  padding: 14px 16px;
}
.uploaded-name { font-size: 13px; color: var(--teal); font-weight: 600; }

.link-muted {
  font: inherit;
  font-size: 12px;
  color: var(--muted);
  background: none;
  border: 0;
  cursor: pointer;
}

.fo-upload { padding: 22px; margin-bottom: 18px; }
.fo-debt { margin-bottom: 16px; }

.fo-forms { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.fo-card { padding: 18px; }
.fo-card .card-title { font-size: 13.5px; margin-bottom: 10px; }
.fo-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 12.5px;
}
.fo-row span:first-child { color: var(--muted-2); }
.fo-row span:last-child { font-weight: 700; white-space: nowrap; }

/* ================= КАРТОЧКА ДОКУМЕНТА ================= */

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 20, 15, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
  z-index: 50;
  animation: fadeIn .15s ease-out;
}

.modal {
  background: var(--panel);
  border-radius: 16px;
  max-width: 680px;
  width: 100%;
  max-height: 85vh;
  overflow: auto;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
}

.modal-head {
  position: sticky;
  top: 0;
  background: var(--panel);
  padding: 22px 26px;
  border-bottom: 1px solid var(--track-2);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}
.modal-kicker { font-size: 11.5px; color: var(--muted); font-weight: 700; }
.modal-title { font-size: 18px; font-weight: 800; margin-top: 2px; }
.modal-close {
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  color: var(--muted);
  background: none;
  border: 0;
  padding: 0;
}
.modal-body { padding: 22px 26px; }

.steps { display: flex; gap: 6px; margin-bottom: 20px; flex-wrap: wrap; }
.step { font-size: 11px; font-weight: 700; padding: 5px 10px; border-radius: 20px; }

.fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  background: var(--rule);
  border: 1px solid var(--track-2);
  border-radius: 10px;
  overflow: hidden;
}
.field { background: var(--panel); padding: 10px 14px; }
.field-label { font-size: 10.5px; color: var(--muted); font-weight: 600; }
.field-value { font-size: 13px; font-weight: 600; margin-top: 2px; }

.wagons { margin-top: 18px; }
.wagons h3 { margin: 0 0 8px; font-size: 12.5px; font-weight: 700; }

.table--sm { font-size: 12px; }
.table--sm th { padding: 8px; font-size: 10.5px; font-weight: 600; }
.table--sm td { padding: 8px; }
.table--sm th:first-child, .table--sm td:first-child { padding-left: 10px; }
.table--sm th:last-child, .table--sm td:last-child { padding-right: 10px; }

.modal-actions { display: flex; gap: 10px; margin-top: 22px; justify-content: flex-end; flex-wrap: wrap; }
.btn {
  padding: 10px 18px;
  border: 0;
  border-radius: 8px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.btn-ghost { color: var(--muted-2); background: var(--thead); }
.btn-danger { color: var(--red); background: #fbeee7; }
.btn-primary { padding: 10px 20px; font-weight: 700; color: var(--panel); background: var(--teal); }

/* ================= СОЗДАНИЕ ДОКУМЕНТОВ ================= */

.create-wrap { position: relative; }

.btn-create {
  background: var(--ink);
  color: var(--gold);
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  padding: 8px 16px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
}
.btn-create:hover { background: var(--ink-2); }

.create-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 280px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
  padding: 6px;
  z-index: 40;
}
.create-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 9px 12px;
  border: 0;
  border-radius: 7px;
  background: none;
  font: inherit;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
}
.create-item:hover { background: var(--thead); }

.modal--wide { max-width: 860px; }
.modal-route { font-size: 11.5px; color: var(--muted); margin-top: 6px; max-width: 60ch; }

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 18px;
}

.fld { display: flex; flex-direction: column; gap: 5px; }
.fld--wide { grid-column: 1 / -1; }
.fld-label { font-size: 11.5px; font-weight: 600; color: var(--muted-2); }
.fld-label i { color: var(--red); font-style: normal; }
.fld-hint { font-size: 11px; color: var(--muted); line-height: 1.4; }
.fld-hint--lock { color: var(--amber); font-weight: 600; }
.fld--locked .fld-label { color: var(--muted); }

.inp {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  font: inherit;
  font-size: 13px;
  color: var(--text);
}
.inp:focus { outline: 2px solid rgba(47, 111, 94, .35); outline-offset: -1px; border-color: var(--teal); }
.inp:disabled { background: var(--thead); color: var(--muted); cursor: not-allowed; }
.inp--sm { padding: 6px 9px; font-size: 12.5px; }
textarea.inp { resize: vertical; }

/* ================= СУММЫ И ВАЛЮТА ================= */

.money-box {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  background: var(--rule);
  border: 1px solid var(--track-2);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 16px;
}
.money-box > div { background: var(--panel); padding: 12px 14px; }
.money-label { display: block; font-size: 10.5px; color: var(--muted); font-weight: 600; }
.money-main { display: block; font-size: 16px; font-weight: 800; margin-top: 3px; }
.money-val { display: block; font-size: 13px; font-weight: 700; margin-top: 3px; }
.money-val em { font-style: normal; font-weight: 500; color: var(--muted); font-size: 11px; }

/* ================= ПОЛЯ КАРТОЧКИ ================= */

.field--action { display: flex; flex-direction: column; gap: 6px; }
.field-owner {
  display: inline-block;
  margin-left: 8px;
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--amber);
}
.field-value--empty { color: var(--muted); }

.doc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
  font-size: 11.5px;
  color: var(--muted);
}
.doc-meta b { color: var(--text); font-weight: 700; }

/* ================= ПЕЧАТНАЯ ФОРМА ДОГОВОРА ================= */

.print-form {
  margin-top: 20px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--cream);
}
.print-form h3 { margin: 0 0 12px; font-size: 13px; font-weight: 700; }

.print-state {
  font-size: 12px;
  color: var(--muted-2);
  padding: 9px 12px;
  border-radius: 8px;
  background: var(--thead);
  margin-bottom: 10px;
}
.print-state--ok { background: #f2f7ee; color: var(--teal); font-weight: 600; }

.print-src { font-size: 11.5px; color: var(--muted); margin-bottom: 10px; }
.print-src--warn { color: var(--red); font-weight: 600; }

.print-preview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  background: var(--rule);
  border: 1px solid var(--track-2);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 12px;
}
.print-preview > div { background: var(--panel); padding: 9px 12px; }
.print-preview--wide { grid-column: 1 / -1; }
.print-preview span { display: block; font-size: 10.5px; color: var(--muted); font-weight: 600; }
.print-preview b { display: block; font-size: 12.5px; font-weight: 700; margin-top: 2px; }

.print-missing {
  font-size: 11.5px;
  line-height: 1.5;
  color: #7a5a1f;
  background: #fbf3e2;
  border: 1px solid #e9d6a8;
  border-radius: 8px;
  padding: 10px 12px;
}
.print-missing b { color: #6a4d18; }

/* ================= ПРОЧЕЕ ================= */

.screen-note { font-size: 12px; color: var(--muted); margin: 0 0 14px; }
.panel-note { font-size: 10.5px; color: var(--sage-3); margin-top: 12px; }

.notice--ok { background: #f2f7ee; border-color: #d4e6c8; color: #2f6f5e; }
.notice--warn { background: #fbeee7; border-color: #f0cdbe; color: #8a3a24; }
.notice code { font-size: 11.5px; background: rgba(0, 0, 0, .05); padding: 1px 5px; border-radius: 4px; }

.rate-toolbar {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.rate-toolbar .fld { min-width: 170px; }
.rate-src { font-size: 11.5px; color: var(--muted); margin-left: auto; }

.total-row td { border-top: 2px solid var(--border) !important; background: var(--thead); }

.btn:disabled, .btn-create:disabled { opacity: .45; cursor: not-allowed; }

/* ================= БЮДЖЕТ ================= */

.budget-toolbar { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.budget-toolbar .fld { min-width: 120px; }
.budget-cur-toggle { display: flex; gap: 6px; }
.budget-section { margin-bottom: 16px; }
.budget-table th.budget-art, .budget-table td:first-child { min-width: 220px; }
.budget-cell { min-width: 92px; }
.budget-plan { font-size: 12.5px; }
.budget-fact { font-size: 11px; color: var(--muted-2); margin-top: 2px; }
.budget-cell--total { background: var(--thead); }
.budget-row td { vertical-align: top; }
.budget-profit { display: flex; flex-direction: column; gap: 8px; }

/* ================= АДАПТИВ ================= */

@media (max-width: 1180px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-grid, .charts-2, .fo-forms { grid-template-columns: 1fr; }
  .report-kpis { grid-template-columns: 1fr; }
  .money-box { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; }
  .sidebar-brand { border-bottom: 0; margin: 0; padding: 0 6px; width: 100%; }
  .nav-item { width: auto; }
  .sidebar-spacer { display: none; }
  .sidebar-foot { border-top: 0; margin: 0; padding: 0 6px; }
  .login-card { grid-template-columns: 1fr; }
  .role-grid { grid-template-columns: 1fr; }
  .content { padding: 16px; }
  .kpi-grid { grid-template-columns: 1fr; }
  .fields { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .money-box { grid-template-columns: 1fr; }
  .topbar { height: auto; padding: 10px 16px; flex-wrap: wrap; gap: 10px; }
  .create-menu { right: auto; left: 0; }
  .rate-src { margin-left: 0; }
}
