:root {
  color-scheme: light;
  --bg: #f5f6f8;
  --surface: #fff;
  --surface2: #f9fafb;
  --ink: #172033;
  --muted: #687184;
  --line: #e4e7ec;
  --accent: #3157d5;
  --accent2: #2544ae;
  --soft: #eef1ff;
  --green: #168560;
  --amber: #a96509;
  --red: #c53f46;
  --shadow: 0 14px 36px rgba(16, 24, 40, 0.07);
  --sidebar: #111827;
  --sidebar-muted: #99a3b7;
}
html.dark {
  color-scheme: dark;
  --bg: #0d1119;
  --surface: #151b26;
  --surface2: #1b2230;
  --ink: #f3f5f8;
  --muted: #99a3b7;
  --line: #293242;
  --soft: #1d294a;
  --shadow: 0 14px 36px rgba(0, 0, 0, 0.24);
  --sidebar: #090d14;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
html,
body {
  margin: 0;
  min-height: 100%;
  font-family:
    Inter,
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
}
button,
input,
textarea,
select {
  font: inherit;
}
button {
  color: inherit;
}
a {
  color: inherit;
}
.auth-view {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  background: var(--surface);
}
.auth-art {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(
      circle at 15% 15%,
      rgba(87, 117, 229, 0.24),
      transparent 35%
    ),
    linear-gradient(145deg, #11182b, #19284d);
  color: #fff;
  padding: clamp(36px, 6vw, 88px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.auth-art:after {
  content: "";
  position: absolute;
  width: 460px;
  height: 460px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  right: -160px;
  bottom: -180px;
  box-shadow:
    0 0 0 70px rgba(255, 255, 255, 0.025),
    0 0 0 140px rgba(255, 255, 255, 0.018);
}
.auth-logo,
.brand-square {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: #fff;
  color: #182454;
  font-weight: 900;
  letter-spacing: -0.08em;
}
.auth-art > div:nth-child(2) {
  max-width: 580px;
  position: relative;
  z-index: 1;
}
.auth-art span,
.eyebrow {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 800;
  color: #9cb3ff;
}
.auth-art h1 {
  font-size: clamp(42px, 5vw, 74px);
  letter-spacing: -0.06em;
  line-height: 1;
  margin: 18px 0;
}
.auth-art p {
  font-size: 18px;
  line-height: 1.6;
  color: #c4cae0;
  max-width: 520px;
}
.auth-proof {
  display: grid;
  gap: 4px;
  color: #fff;
}
.auth-proof span {
  color: #9da8c3;
  letter-spacing: 0;
  text-transform: none;
}
.auth-panel {
  display: grid;
  place-items: center;
  padding: 34px;
}
.auth-box {
  width: min(420px, 100%);
}
.mobile-logo {
  display: none;
  font-size: 22px;
  font-weight: 900;
}
.mobile-logo span {
  font-weight: 650;
}
.auth-box h2 {
  font-size: 30px;
  letter-spacing: -0.04em;
  margin: 9px 0;
}
.auth-box > div > p {
  color: var(--muted);
  margin: 0 0 26px;
}
.stack {
  display: grid;
  gap: 16px;
}
label {
  display: grid;
  gap: 7px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 10px 12px;
  background: var(--surface);
  color: var(--ink);
  outline: none;
}
input:focus,
textarea:focus,
select:focus {
  border-color: #748ce5;
  box-shadow: 0 0 0 3px rgba(49, 87, 213, 0.12);
}
textarea {
  resize: vertical;
}
.button {
  border: 0;
  border-radius: 9px;
  padding: 10px 14px;
  font-weight: 750;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
.button.primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 7px 16px rgba(49, 87, 213, 0.18);
}
.button.primary:hover {
  background: var(--accent2);
}
.button.secondary {
  background: var(--surface2);
  border: 1px solid var(--line);
}
.button.danger {
  background: #fff0f0;
  color: var(--red);
}
.form-error {
  color: var(--red);
  min-height: 22px;
  margin-top: 12px;
  font-weight: 650;
}
.setup-view {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    radial-gradient(circle at 20% 0%, #e9edff, transparent 34%), var(--bg);
}
.setup-card {
  width: min(880px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.setup-progress {
  display: flex;
  gap: 13px;
  align-items: center;
  padding: 20px 25px;
  border-bottom: 1px solid var(--line);
}
.setup-progress .brand-square {
  background: var(--accent);
  color: #fff;
}
.setup-progress div {
  display: grid;
  gap: 3px;
}
.setup-progress small {
  color: var(--muted);
}
.setup-content {
  padding: clamp(28px, 5vw, 58px);
  max-width: 760px;
  margin: auto;
}
.setup-content h1 {
  font-size: 36px;
  letter-spacing: -0.05em;
  margin: 8px 0;
}
.setup-content > p {
  color: var(--muted);
  margin-bottom: 30px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-grid .wide {
  grid-column: 1/-1;
}
.switch-row {
  display: flex;
  align-items: center;
  gap: 9px;
}
.switch-row input {
  width: 18px;
  height: 18px;
}
.app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 248px 1fr;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 248px;
  background: var(--sidebar);
  color: #fff;
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  z-index: 30;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 7px 17px;
}
.brand > span {
  display: grid;
  place-items: center;
  width: 37px;
  height: 37px;
  border-radius: 10px;
  background: #fff;
  color: #172050;
  font-weight: 900;
}
.brand > div {
  display: grid;
}
.brand b {
  font-size: 16px;
}
.brand small {
  font-size: 10px;
  color: var(--sidebar-muted);
}
.business-switch {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.045);
  border-radius: 10px;
  color: #fff;
  padding: 9px;
  text-align: left;
  cursor: pointer;
}
.business-switch > span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: #33488f;
  font-weight: 800;
}
.business-switch div {
  display: grid;
  min-width: 0;
  flex: 1;
}
.business-switch b {
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.business-switch small {
  font-size: 10px;
  color: var(--sidebar-muted);
}
.business-switch i {
  font-style: normal;
  color: #7f8ba3;
}
.business-menu {
  position: absolute;
  top: 110px;
  left: 14px;
  right: 14px;
  background: #202938;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 10px;
  padding: 6px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  z-index: 2;
}
.business-menu button {
  width: 100%;
  border: 0;
  background: transparent;
  color: #fff;
  padding: 9px;
  border-radius: 7px;
  text-align: left;
  cursor: pointer;
}
.business-menu button:hover {
  background: rgba(255, 255, 255, 0.08);
}
.new-invoice {
  margin: 15px 0 10px;
  background: #fff;
  color: #172033;
}
.sidebar nav {
  display: grid;
  gap: 2px;
  overflow: auto;
}
.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #a8b1c2;
  padding: 9px 11px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 650;
}
.sidebar nav a i {
  font-style: normal;
  width: 18px;
  text-align: center;
  color: #7f8ca3;
}
.sidebar nav a:hover,
.sidebar nav a.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.075);
}
.sidebar nav a.active {
  box-shadow: inset 2px 0 #7f9cff;
}
.sidebar-user {
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  padding: 14px 6px 2px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.sidebar-user > span {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border-radius: 50%;
  background: #2e3c58;
  font-size: 11px;
  font-weight: 800;
}
.sidebar-user > div {
  display: grid;
  min-width: 0;
  flex: 1;
}
.sidebar-user b {
  font-size: 11px;
}
.sidebar-user small {
  font-size: 9px;
  color: var(--sidebar-muted);
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-user button {
  border: 0;
  background: none;
  color: #8592a8;
  cursor: pointer;
}
.main-shell {
  grid-column: 2;
  min-width: 0;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 66px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  padding: 0 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.search {
  position: relative;
  width: min(460px, 55vw);
  display: flex;
  align-items: center;
}
.search > span {
  position: absolute;
  left: 11px;
  color: var(--muted);
  font-size: 18px;
}
.search input {
  height: 38px;
  padding-left: 36px;
  padding-right: 48px;
  background: var(--surface2);
}
.search kbd {
  position: absolute;
  right: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 5px;
  padding: 3px 6px;
  color: var(--muted);
  font-size: 10px;
}
.search-results {
  position: absolute;
  left: 0;
  right: 0;
  top: 44px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: 10px;
  padding: 7px;
}
.search-results button {
  width: 100%;
  text-align: left;
  border: 0;
  background: none;
  padding: 9px;
  border-radius: 7px;
}
.search-results button:hover {
  background: var(--surface2);
}
.top-actions {
  display: flex;
  gap: 8px;
}
.icon-button {
  width: 37px;
  height: 37px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 9px;
  cursor: pointer;
  position: relative;
}
.notification-button span {
  position: absolute;
  right: -4px;
  top: -4px;
  min-width: 17px;
  height: 17px;
  border-radius: 9px;
  background: var(--red);
  color: #fff;
  font-size: 9px;
  display: grid;
  place-items: center;
}
.mobile-menu {
  display: none;
  border: 0;
  background: none;
  font-size: 20px;
}
.content {
  padding: 28px 30px 50px;
  max-width: 1500px;
  margin: auto;
}
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 24px;
}
.page-head h1 {
  font-size: 29px;
  letter-spacing: -0.045em;
  margin: 3px 0;
}
.page-head p {
  margin: 0;
  color: var(--muted);
}
.page-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}
.metric,
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 13px;
  box-shadow: var(--shadow);
}
.metric {
  padding: 16px;
}
.metric span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.metric strong {
  display: block;
  font-size: 21px;
  margin: 9px 0 4px;
  letter-spacing: -0.03em;
}
.metric small {
  font-size: 10px;
  color: var(--muted);
}
.dashboard-grid {
  display: grid;
  grid-template-columns: 1.45fr 0.85fr;
  gap: 16px;
  margin-top: 16px;
}
.card {
  padding: 19px;
}
.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}
.card-head h2 {
  font-size: 16px;
  margin: 3px 0;
}
.card-head > div > span,
.section-label {
  font-size: 9px;
  text-transform: uppercase;
  color: var(--accent);
  letter-spacing: 0.1em;
  font-weight: 800;
}
.chart {
  height: 250px;
  display: flex;
  align-items: end;
  gap: 12px;
  padding: 20px 8px 5px;
  border-bottom: 1px solid var(--line);
}
.chart-col {
  flex: 1;
  display: flex;
  align-items: end;
  gap: 3px;
  height: 100%;
  position: relative;
}
.bar {
  flex: 1;
  min-height: 2px;
  background: var(--accent);
  border-radius: 4px 4px 0 0;
  opacity: 0.9;
}
.bar.expense {
  background: #d9a152;
}
.chart-col small {
  position: absolute;
  bottom: -23px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 9px;
  color: var(--muted);
}
.chart-legend {
  display: flex;
  gap: 14px;
  margin-top: 27px;
  color: var(--muted);
  font-size: 10px;
}
.chart-legend span:before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--accent);
  margin-right: 5px;
}
.chart-legend span:last-child:before {
  background: #d9a152;
}
.activity-list,
.upcoming-list {
  display: grid;
}
.activity-row,
.upcoming-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.activity-row:first-child,
.upcoming-row:first-child {
  border-top: 0;
}
.activity-icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--soft);
  color: var(--accent);
  display: grid;
  place-items: center;
}
.activity-row div,
.upcoming-row div {
  display: grid;
}
.activity-row b,
.upcoming-row b {
  font-size: 11px;
}
.activity-row small,
.upcoming-row small {
  font-size: 9px;
  color: var(--muted);
}
.activity-row time {
  font-size: 9px;
  color: var(--muted);
}
.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 16px;
}
.quick-action {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 11px;
  padding: 15px;
  text-align: left;
  cursor: pointer;
}
.quick-action span {
  display: block;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  margin-bottom: 12px;
}
.quick-action b {
  display: block;
  font-size: 12px;
}
.quick-action small {
  color: var(--muted);
  font-size: 10px;
}
.table-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 13px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.table-toolbar {
  padding: 14px 16px;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.filter-input {
  max-width: 300px;
}
.table-wrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
th {
  text-align: left;
  color: var(--muted);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--surface2);
}
th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
td:first-child {
  font-weight: 700;
}
tr:last-child td {
  border-bottom: 0;
}
.table-actions {
  display: flex;
  gap: 5px;
}
.table-actions button {
  border: 0;
  background: var(--surface2);
  border-radius: 6px;
  padding: 6px 8px;
  cursor: pointer;
  font-size: 10px;
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 7px;
  border-radius: 99px;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  background: #eef1f5;
  color: #596275;
}
.status.paid,
.status.accepted {
  background: #e7f5ef;
  color: var(--green);
}
.status.sent,
.status.viewed {
  background: #e9efff;
  color: #3658b8;
}
.status.partially_paid,
.status.overdue,
.status.expired {
  background: #fff1da;
  color: var(--amber);
}
.status.void,
.status.declined {
  background: #fdebec;
  color: var(--red);
}
.empty {
  padding: 52px 20px;
  text-align: center;
  color: var(--muted);
}
.empty span {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--soft);
  color: var(--accent);
  font-size: 22px;
  margin: 0 auto 14px;
}
.empty h3 {
  color: var(--ink);
  margin: 0 0 6px;
}
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.detail-tile {
  background: var(--surface2);
  border-radius: 9px;
  padding: 13px;
}
.detail-tile span {
  display: block;
  font-size: 9px;
  color: var(--muted);
  text-transform: uppercase;
}
.detail-tile strong {
  display: block;
  margin-top: 5px;
}
.settings-layout {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 18px;
}
.settings-nav {
  display: grid;
  align-content: start;
  gap: 3px;
}
.settings-nav button {
  border: 0;
  background: none;
  text-align: left;
  padding: 9px;
  border-radius: 7px;
  color: var(--muted);
  cursor: pointer;
}
.settings-nav button.active {
  background: var(--soft);
  color: var(--accent);
  font-weight: 700;
}
.settings-panel {
  max-width: 820px;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(11, 16, 28, 0.55);
  backdrop-filter: blur(3px);
  display: grid;
  place-items: center;
  padding: 18px;
}
.modal-backdrop[hidden] {
  display: none;
}
.modal-card {
  position: relative;
  width: min(860px, 100%);
  max-height: 92vh;
  overflow: auto;
  background: var(--surface);
  border-radius: 16px;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.3);
  padding: 25px;
}
.modal-card.wide {
  width: min(1180px, 100%);
}
.modal-close {
  position: absolute;
  right: 15px;
  top: 13px;
  border: 0;
  background: var(--surface2);
  border-radius: 8px;
  width: 32px;
  height: 32px;
  font-size: 20px;
  cursor: pointer;
}
.modal-head {
  padding-right: 40px;
  margin-bottom: 22px;
}
.modal-head h2 {
  font-size: 23px;
  letter-spacing: -0.035em;
  margin: 5px 0;
}
.modal-head p {
  margin: 0;
  color: var(--muted);
}
.invoice-form-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  gap: 22px;
}
.invoice-form-main {
  display: grid;
  gap: 16px;
  min-width: 0;
}
.form-section {
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 16px;
  min-width: 0;
  overflow: hidden;
}
.form-section h3 {
  font-size: 13px;
  margin: 0 0 14px;
}
.line-editor {
  display: grid;
  gap: 8px;
  overflow-x: auto;
}
.line-row {
  display: grid;
  grid-template-columns: 110px minmax(160px, 1fr) 50px 65px 55px 55px 65px 70px;
  gap: 7px;
  align-items: center;
  min-width: 760px;
}
.line-row button {
  border: 0;
  background: none;
  color: var(--red);
  cursor: pointer;
}
.line-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
.line-controls button {
  padding: 5px;
  color: var(--muted);
}
.line-controls button:last-child {
  color: var(--red);
}
.line-head {
  font-size: 9px;
  text-transform: uppercase;
  color: var(--muted);
}
.summary-panel {
  position: sticky;
  top: 0;
  background: var(--surface2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 17px;
  height: max-content;
}
.summary-panel h3 {
  margin: 0 0 14px;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}
.summary-row.total {
  font-size: 17px;
  font-weight: 800;
  border-top: 2px solid var(--ink);
}
.summary-panel .button {
  width: 100%;
  margin-top: 12px;
}
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
}
.toast {
  position: fixed;
  z-index: 80;
  right: 24px;
  bottom: 24px;
  background: #172033;
  color: #fff;
  padding: 12px 16px;
  border-radius: 9px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
  font-weight: 650;
}
.toast.error {
  background: #8e2f35;
}
.portal-body {
  background: #eef1f5;
}
.portal-shell {
  max-width: 980px;
  margin: 0 auto;
  padding: 40px 20px 70px;
}
.portal-loading {
  min-height: 70vh;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  color: var(--muted);
}
.portal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.portal-brand {
  display: flex;
  align-items: center;
  gap: 11px;
}
.portal-brand img {
  max-width: 150px;
  max-height: 52px;
}
.portal-brand .brand-square {
  background: var(--accent);
  color: white;
}
.portal-card {
  background: #fff;
  color: #172033;
  border-radius: 16px;
  box-shadow: 0 18px 55px rgba(29, 39, 58, 0.12);
  padding: clamp(24px, 6vw, 62px);
}
.portal-title {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}
.portal-title h1 {
  font-size: 33px;
  margin: 0;
}
.portal-title strong {
  font-size: 28px;
  color: var(--accent);
}
.portal-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 30px 0;
}
.portal-meta div {
  padding: 12px;
  background: #f6f7f9;
  border-radius: 8px;
}
.portal-meta span {
  display: block;
  font-size: 9px;
  color: #70798b;
  text-transform: uppercase;
}
.portal-table {
  width: 100%;
}
.portal-summary {
  margin-left: auto;
  width: min(300px, 100%);
  margin-top: 25px;
}
.portal-actions {
  display: flex;
  gap: 9px;
  justify-content: flex-end;
  margin-top: 18px;
}
.response-box {
  margin-top: 25px;
  border-top: 1px solid #e4e7ec;
  padding-top: 20px;
}
.print-only {
  display: none;
}
.portal-brand > div {
  display: grid;
  gap: 3px;
}
.portal-brand small {
  color: #687184;
}
.portal-addresses {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin: 10px 0 30px;
}
.portal-addresses span,
.portal-note > span {
  display: block;
  margin-bottom: 7px;
  color: #70798b;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.portal-addresses p,
.portal-note p {
  margin: 5px 0;
  color: #515b6d;
  line-height: 1.55;
}
.portal-table td small {
  display: block;
  color: #7b8494;
  margin-top: 3px;
  font-weight: 500;
}
.portal-balance {
  margin-top: 5px;
  border: 0 !important;
  border-radius: 7px;
  background: #eef1ff;
  padding: 11px !important;
}
.portal-note {
  max-width: 680px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid #e4e7ec;
}
.payment-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 30px;
}
.payment-details > span {
  grid-column: 1/-1;
}
.portal-footer {
  margin: 38px 0 0;
  padding-top: 18px;
  border-top: 1px solid #e4e7ec;
  color: #717a8b;
  font-size: 10px;
  line-height: 1.6;
}
.portal-error {
  min-height: 70vh;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  text-align: center;
}
.portal-error h1 {
  margin: 10px 0 0;
}
.portal-error p {
  color: var(--muted);
  max-width: 480px;
}
.response-box h3 {
  margin: 0 0 6px;
}
.response-box p {
  color: #687184;
}
.portal-actions a {
  text-decoration: none;
}
@media (max-width: 1200px) {
  .metrics {
    grid-template-columns: repeat(3, 1fr);
  }
  .invoice-form-layout {
    grid-template-columns: 1fr;
  }
  .summary-panel {
    position: static;
  }
  .line-editor,
  .line-head {
    overflow-x: auto;
  }
}
@media (max-width: 900px) {
  .app {
    grid-template-columns: 1fr;
  }
  .sidebar {
    transform: translateX(-100%);
    transition: 0.2s;
  }
  .app.menu-open .sidebar {
    transform: none;
  }
  .main-shell {
    grid-column: 1;
  }
  .mobile-menu {
    display: block;
  }
  .topbar {
    padding: 0 16px;
    gap: 10px;
  }
  .content {
    padding: 22px 16px;
  }
  .dashboard-grid,
  .split {
    grid-template-columns: 1fr;
  }
  .quick-grid {
    grid-template-columns: 1fr 1fr;
  }
  .auth-view {
    grid-template-columns: 1fr;
  }
  .auth-art {
    display: none;
  }
  .mobile-logo {
    display: block;
    margin-bottom: 45px;
  }
  .settings-layout {
    grid-template-columns: 1fr;
  }
  .settings-nav {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 600px) {
  .metrics {
    grid-template-columns: 1fr 1fr;
  }
  .form-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }
  .form-grid .wide {
    grid-column: 1;
  }
  .page-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .quick-grid {
    grid-template-columns: 1fr;
  }
  .search kbd {
    display: none;
  }
  .portal-title {
    display: grid;
  }
  .portal-meta,
  .portal-addresses,
  .payment-details {
    grid-template-columns: 1fr;
  }
  .modal-card {
    padding: 20px 14px;
  }
  .line-head {
    display: none;
  }
}
@media print {
  body {
    background: #fff;
  }
  .portal-header,
  .portal-actions,
  .response-box {
    display: none !important;
  }
  .portal-shell {
    padding: 0;
  }
  .portal-card {
    box-shadow: none;
    border-radius: 0;
    padding: 15mm;
  }
  .print-only {
    display: block;
  }
}
