:root {
  --brand-red: #cf0302;
  --brand-red-dark: #a30202;
  --brand-red-deep: #6d0101;
  --brand-red-rgb: 207, 3, 2;
  --brand-red-deep-rgb: 109, 1, 1;
  --charcoal: #1A1A1A;
  --ink: #1A1A1A;
  --paper: #F7F5F3;
  --panel: #fff;
  --muted: #6B6B6B;
  --line: rgba(26, 26, 26, .11);
  --white: #FFFFFF;
  --green: #18a773;
  --amber: #c45a00;
  --blue: #3d8abf;
  --shadow: 0 18px 55px rgba(var(--brand-red-deep-rgb), .14);
}

[hidden] { display: none !important; }

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Rajdhani, system-ui, sans-serif;
  font-weight: 600;
}

button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }

/* Prototype badge */
.prototype-note {
  position: fixed;
  z-index: 100;
  right: 20px;
  bottom: 18px;
  display: flex;
  gap: 8px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(var(--brand-red-deep-rgb), .94);
  color: var(--white);
  box-shadow: var(--shadow);
  font-size: 10px;
  letter-spacing: .06em;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
}

.prototype-note span { color: var(--white); opacity: .85; }
.prototype-note strong { font-weight: 600; opacity: .55; }

.eyebrow {
  color: rgba(255, 255, 255, .78);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
}

/* Login layout */
.login-view {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(0, 1.12fr) minmax(430px, .88fr);
}

.login-brand {
  position: relative;
  display: flex;
  overflow: hidden;
  flex-direction: column;
  justify-content: space-between;
  padding: 44px clamp(42px, 7vw, 100px) 50px;
  background: linear-gradient(180deg, var(--brand-red-deep) 0%, var(--brand-red) 38%, var(--brand-red) 100%);
  color: var(--white);
}

.login-brand::after {
  position: absolute;
  width: 560px;
  height: 560px;
  right: -250px;
  top: -220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .14), transparent 68%);
  content: "";
}

.brand-logo {
  position: relative;
  z-index: 1;
  width: auto;
  max-width: min(100%, 420px);
  height: auto;
  align-self: flex-start;
  object-fit: contain;
  object-position: left center;
  border: none;
  background: transparent;
}

.login-brand > div {
  position: relative;
  z-index: 1;
}

.login-brand h1 {
  margin: 18px 0 22px;
  font-size: clamp(54px, 6vw, 82px);
  letter-spacing: -.04em;
  line-height: .92;
}

.login-brand p {
  max-width: 570px;
  margin: 0;
  color: rgba(255, 255, 255, .72);
  font-size: 19px;
  line-height: 1.55;
}

.module-strip {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 38px;
  border-top: 1px solid rgba(255, 255, 255, .22);
  padding-top: 28px;
}

.module-strip span {
  display: flex;
  gap: 9px;
  align-items: center;
  font-size: 14px;
}

.module-strip b {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .45);
  border-radius: 7px;
  color: var(--white);
  background: rgba(255, 255, 255, .1);
}

.login-form-side {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 40px clamp(35px, 5vw, 78px);
  background:
    radial-gradient(circle at 90% 5%, rgba(207, 3, 2, .08), transparent 28%),
    var(--paper);
}

.login-card {
  width: min(100%, 440px);
}

.secure-label {
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--brand-red-dark);
  font-size: 11px;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.system-label {
  display: inline-flex;
  align-items: center;
  margin-bottom: 14px;
  border: 1px solid rgba(207, 3, 2, .28);
  border-radius: 999px;
  padding: 6px 14px;
  background: rgba(207, 3, 2, .08);
  color: var(--brand-red-dark);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.secure-label i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 5px rgba(52, 211, 153, .13);
}

.login-card h2 {
  margin: 10px 0 5px;
  font-size: 54px;
  line-height: 1;
}

.login-card > p {
  margin: 0 0 30px;
  color: var(--muted);
}

.login-card label {
  display: grid;
  gap: 7px;
  color: #353b42;
  font-size: 13px;
}

.label-line {
  display: flex;
  justify-content: space-between;
  margin-top: 22px;
}

.label-line a {
  color: var(--brand-red);
  font-size: 12px;
  text-decoration: none;
}

.label-line a:hover {
  color: var(--brand-red-dark);
}

.field {
  display: flex;
  min-height: 54px;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 0 15px;
  background: rgba(255, 255, 255, .84);
  transition: .18s ease;
}

.field:focus-within {
  border-color: var(--brand-red);
  box-shadow: 0 0 0 4px rgba(207, 3, 2, .1);
}

.field > span {
  color: #828991;
  font-size: 12px;
}

.field input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.field button {
  border: 0;
  background: transparent;
  color: var(--brand-red-dark);
  font-size: 12px;
}

.checkbox {
  display: flex !important;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 9px !important;
  margin: 18px 0 24px;
  cursor: pointer;
}

.checkbox input {
  width: 17px;
  height: 17px;
  accent-color: var(--brand-red);
}

.login-card small {
  display: block;
  margin-top: 18px;
  color: var(--muted);
  text-align: center;
}

.primary-button {
  display: inline-flex;
  width: 100%;
  min-height: 56px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 0;
  border-radius: 8px;
  padding: 0 20px;
  background: var(--brand-red);
  color: var(--white);
  box-shadow: 0 12px 28px rgba(207, 3, 2, .28);
  font-weight: 700;
  transition: background .18s ease, box-shadow .18s ease;
}

.primary-button:hover {
  background: var(--brand-red-dark);
  box-shadow: 0 14px 32px rgba(163, 2, 2, .32);
}

.primary-button span {
  color: rgba(255, 255, 255, .75);
  font-size: 20px;
}

.primary-button.compact {
  width: auto;
  min-height: 40px;
  padding: 0 16px;
  font-size: 13px;
  justify-content: center;
  gap: 8px;
}

.primary-button.compact span {
  font-size: 16px;
}

.primary-button.inline-btn,
.screen-toolbar .toolbar-btn {
  width: auto;
  min-height: 40px;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 8px 20px rgba(207, 3, 2, .22);
}

.secondary-button.compact {
  width: auto;
  min-height: 38px;
  padding: 0 14px;
  font-size: 12px;
}

.secondary-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 17px;
  background: var(--white);
  color: var(--ink);
  font-weight: 700;
}

.section-label {
  color: var(--brand-red);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.eyebrow-light {
  color: rgba(255, 255, 255, .75);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
}

/* App shell */
.app-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 238px 1fr;
}

.sidebar {
  position: sticky;
  z-index: 30;
  top: 0;
  display: flex;
  height: 100vh;
  flex-direction: column;
  background: linear-gradient(180deg, var(--brand-red-deep), var(--brand-red-dark));
  color: var(--white);
}

.sidebar-brand {
  display: flex;
  min-height: 76px;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, .15);
  padding: 10px 12px;
}

.sidebar-logo-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
}

.sidebar-logo {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: 56px;
  object-fit: contain;
  object-position: left center;
  border: none;
  background: transparent;
}

.close-nav {
  display: none;
  border: 0;
  background: transparent;
  color: var(--white);
  font-size: 24px;
}

.sidebar nav {
  flex: 1;
  padding: 20px 12px;
}

.sidebar nav p {
  margin: 20px 12px 8px;
  color: rgba(255, 255, 255, .35);
  font-size: 9px;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.sidebar nav a {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 12px;
  border-radius: 7px;
  padding: 0 13px;
  color: rgba(255, 255, 255, .65);
  font-size: 14px;
  text-decoration: none;
  transition: .15s ease;
}

.sidebar nav a span {
  width: 20px;
  text-align: center;
}

.sidebar nav a:hover {
  color: var(--white);
  background: rgba(255, 255, 255, .08);
}

.sidebar nav a.active {
  background: rgba(255, 255, 255, .18);
  color: var(--white);
}

.nav-badge {
  margin-left: auto;
  border-radius: 999px;
  padding: 2px 7px;
  background: var(--white);
  color: var(--brand-red);
  font-size: 10px;
}

.sidebar-footer {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  gap: 10px;
  border-top: 1px solid rgba(255, 255, 255, .15);
  padding: 17px;
}

.avatar {
  display: grid;
  width: 37px;
  height: 37px;
  place-items: center;
  border-radius: 8px;
  background: var(--white);
  color: var(--brand-red);
  font-size: 13px;
  font-weight: 700;
}

.sidebar-footer strong {
  font-size: 12px;
}

.sidebar-footer small {
  color: rgba(255, 255, 255, .45);
  font-size: 10px;
}

.sidebar-footer button {
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, .5);
  font-size: 18px;
}

.workspace {
  min-width: 0;
}

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding: 12px clamp(20px, 3vw, 42px);
  background: rgba(247, 245, 243, .94);
  backdrop-filter: blur(14px);
}

.topbar h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1;
}

.topbar p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 13px;
}

.business-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  border-left: 1px solid var(--line);
  padding-left: 14px;
}

.business-chip > span {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 8px;
  background: var(--brand-red);
  color: var(--white);
  font-size: 12px;
  font-weight: 700;
}

.business-chip div {
  display: grid;
}

.business-chip strong {
  font-size: 12px;
}

.business-chip small {
  color: var(--muted);
  font-size: 10px;
}

.menu-button {
  display: none;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .72);
  color: var(--muted);
}

.screen {
  display: none;
  padding: 34px clamp(20px, 3vw, 42px) 60px;
}

.screen.active {
  display: block;
  animation: rise .22s ease;
}

@keyframes rise {
  from { transform: translateY(5px); opacity: 0; }
}

/* Dashboard */
.hero-card {
  display: flex;
  min-height: 160px;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  overflow: hidden;
  border-radius: 14px;
  padding: 35px 40px;
  background: linear-gradient(180deg, var(--brand-red-deep) 0%, var(--brand-red) 100%);
  color: var(--white);
  box-shadow: var(--shadow);
}

.hero-card h2 {
  margin: 10px 0 4px;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -.03em;
  line-height: 1.05;
}

.hero-card p {
  margin: 0;
  color: rgba(255, 255, 255, .7);
  font-size: 14px;
}

.hero-card .primary-button {
  width: auto;
  min-width: 180px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px;
  margin: 18px 0;
}

.metrics article {
  position: relative;
  display: grid;
  min-height: 130px;
  align-content: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 22px;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 8px 30px rgba(16, 19, 23, .035);
}

.metrics article > small {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.metrics article > strong {
  margin: 3px 0 5px;
  font-size: 28px;
}

em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.positive { color: var(--green) !important; }
.negative { color: var(--brand-red) !important; }

.metric-icon {
  position: absolute;
  right: 17px;
  top: 17px;
  display: grid;
  width: 37px;
  height: 37px;
  place-items: center;
  border-radius: 9px;
  font-weight: 700;
}

.metric-icon.red { background: rgba(207, 3, 2, .1); color: var(--brand-red); }
.metric-icon.green { background: rgba(24, 167, 115, .13); color: var(--green); }
.metric-icon.amber { background: rgba(196, 90, 0, .12); color: var(--amber); }
.metric-icon.blue { background: rgba(61, 138, 191, .12); color: var(--blue); }

.panel {
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 22px;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 8px 30px rgba(16, 19, 23, .035);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.panel-head h3 {
  margin: 3px 0 0;
  font-size: 21px;
}

.text-button {
  border: 0;
  background: transparent;
  color: var(--brand-red);
  font-size: 12px;
  font-weight: 700;
}

.review-btn {
  display: inline-flex;
  min-width: 88px;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(207, 3, 2, .35);
  border-radius: 7px;
  padding: 0 16px;
  background: rgba(207, 3, 2, .08);
  color: var(--brand-red-dark);
  font-size: 12px;
  font-weight: 700;
  transition: background .15s ease, border-color .15s ease;
}

.review-btn:hover {
  border-color: var(--brand-red);
  background: var(--brand-red);
  color: var(--white);
}

td .review-btn {
  min-width: 92px;
  min-height: 38px;
}

.badge {
  display: inline-flex;
  min-width: 58px;
  justify-content: center;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 9px;
  font-weight: 700;
}

.badge.pending { background: rgba(196, 90, 0, .14); color: var(--amber); }
.badge.paid { background: rgba(24, 167, 115, .12); color: var(--green); }
.badge.overdue { background: rgba(207, 3, 2, .12); color: var(--brand-red); }

.approval-list {
  display: grid;
  gap: 8px;
}

.approval-row {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 14px 16px;
  background: #faf9f7;
  text-align: left;
  transition: border-color .15s ease;
}

.approval-row:hover {
  border-color: rgba(207, 3, 2, .35);
}

.approval-row.urgent {
  border-color: rgba(207, 3, 2, .25);
  background: rgba(207, 3, 2, .04);
}

.approval-id {
  color: var(--muted);
  font-size: 11px;
}

.approval-info {
  display: grid;
}

.approval-info strong {
  font-size: 14px;
}

.approval-info small {
  color: var(--muted);
  font-size: 11px;
}

/* Inbox */
.screen-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 25px;
}

.screen-toolbar h2 {
  margin: 10px 0 4px;
  font-size: clamp(34px, 4vw, 48px);
  letter-spacing: -.03em;
  line-height: 1;
}

.screen-toolbar p {
  margin: 0;
  color: var(--muted);
}

.inbox-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.inbox-tabs button {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 16px;
  background: var(--white);
  color: var(--ink);
  font-weight: 700;
}

.inbox-tabs button.active {
  border-color: var(--brand-red);
  background: rgba(207, 3, 2, .08);
  color: var(--brand-red-dark);
}

.inbox-tabs button b {
  border-radius: 999px;
  padding: 2px 7px;
  background: var(--brand-red);
  color: var(--white);
  font-size: 10px;
}

.filter-row {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.search {
  display: flex;
  min-height: 40px;
  min-width: 270px;
  flex: 1;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 12px;
  background: var(--white);
}

.search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
}

select {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 12px;
  background: var(--white);
  color: var(--ink);
  outline: 0;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
}

th {
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: .08em;
  text-align: left;
  text-transform: uppercase;
}

td {
  border-bottom: 1px solid rgba(17, 20, 24, .065);
  padding: 14px 12px;
  color: #4d555e;
  font-size: 12px;
  vertical-align: middle;
}

td strong {
  color: var(--ink);
}

/* Attachments */
.attachments-section {
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.attachments-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.attachments-head small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.attachment-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.attachments-empty {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.attachment-card {
  display: grid;
  grid-template-columns: 40px 1fr auto auto;
  align-items: center;
  gap: 10px;
  min-width: 220px;
  max-width: 280px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: var(--white);
  box-shadow: 0 4px 14px rgba(16, 19, 23, .04);
}

.attachment-icon {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
}

.attachment-icon.pdf {
  background: rgba(207, 3, 2, .1);
  color: var(--brand-red);
}

.attachment-icon.img {
  background: rgba(61, 138, 191, .12);
  color: var(--blue);
}

.attachment-icon.xls {
  background: rgba(24, 167, 115, .12);
  color: var(--green);
}

.attachment-icon.file {
  background: rgba(107, 107, 107, .12);
  color: var(--muted);
}

.attachment-meta {
  display: grid;
  min-width: 0;
}

.attachment-meta strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-meta small {
  color: var(--muted);
  font-size: 10px;
}

.attachment-action,
.attachment-remove {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #faf9f7;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.attachment-action:hover {
  border-color: var(--brand-red);
  color: var(--brand-red);
}

.attachment-remove {
  border-color: rgba(207, 3, 2, .2);
  color: var(--brand-red);
  font-size: 18px;
}

.attachment-remove:hover {
  background: rgba(207, 3, 2, .08);
}

.attachments-panel .attachment-cards {
  gap: 12px;
}

/* Modal */
.modal-backdrop {
  position: fixed;
  z-index: 90;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(5, 7, 9, .6);
  backdrop-filter: blur(5px);
}

.modal {
  width: min(100%, 480px);
  border-radius: 13px;
  padding: 24px;
  background: var(--paper);
  box-shadow: 0 35px 100px rgba(0, 0, 0, .35);
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.modal-head h2 {
  margin: 4px 0 0;
  font-size: 28px;
  line-height: 1.1;
}

.modal-close {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 26px;
  line-height: 1;
}

.modal-note {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 12px;
}

.modal-label {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
  color: #353b42;
  font-size: 13px;
}

.modal-label input[type="file"],
.modal-label input[type="text"] {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--white);
  color: var(--ink);
}

.modal-label input:focus {
  border-color: var(--brand-red);
  box-shadow: 0 0 0 3px rgba(207, 3, 2, .1);
  outline: 0;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
}

.approver-search-results {
  display: grid;
  gap: 8px;
  max-height: 280px;
  margin-bottom: 8px;
  overflow-y: auto;
}

.approver-search-result {
  display: grid;
  gap: 2px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--white);
  text-align: left;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}

.approver-search-result:hover:not(:disabled) {
  border-color: var(--brand-red);
  background: rgba(207, 3, 2, .04);
}

.approver-search-result:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.approver-search-result strong {
  font-size: 13px;
}

.approver-search-result small {
  color: var(--muted);
  font-size: 11px;
}

.approver-search-empty {
  margin: 0;
  padding: 18px 12px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

/* New request layout */
.request-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(0, 1.35fr);
  gap: 18px;
  align-items: start;
}

.request-fields {
  display: flex;
  flex-direction: column;
}

.request-form-grid {
  grid-template-columns: 1fr;
}

.request-form-grid .full {
  grid-column: 1;
}

.approvers-preview {
  margin-top: 20px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.approvers-preview-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.approvers-preview-head small {
  color: var(--muted);
  font-size: 10px;
}

.approver-preview-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.approver-preview-list li {
  display: grid;
  grid-template-columns: 32px 1fr;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #faf9f7;
}

.approver-preview-list.editable li {
  grid-template-columns: 32px minmax(0, 1fr) auto;
}

.approver-step-card {
  display: grid;
  gap: 2px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  background: var(--white);
  text-align: left;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.approver-step-card:hover {
  border-color: rgba(207, 3, 2, .35);
  box-shadow: 0 0 0 3px rgba(207, 3, 2, .08);
}

.approver-step-card strong {
  font-size: 12px;
  color: var(--ink);
}

.approver-step-card small {
  color: var(--muted);
  font-size: 10px;
}

.approver-step-select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  background: var(--white);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}

.approver-step-actions {
  display: flex;
  gap: 4px;
}

.approver-step-actions button {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.approver-step-actions button:hover:not(:disabled) {
  border-color: var(--brand-red);
  color: var(--brand-red);
}

.approver-step-actions button:disabled {
  opacity: .35;
  cursor: not-allowed;
}

.add-approver-flow {
  width: 100%;
  margin-top: 10px;
  border: 1px dashed rgba(207, 3, 2, .4);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(207, 3, 2, .05);
  color: var(--brand-red);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.approvers-hint {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 10px;
}

.approver-preview-list li > span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: var(--brand-red);
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
}

.approver-preview-list strong {
  font-size: 13px;
}

.approver-preview-list small {
  display: block;
  color: var(--muted);
  font-size: 10px;
}

.request-editor {
  min-height: 520px;
  display: flex;
  flex-direction: column;
}

.request-editor .rich-editor {
  min-height: 320px;
}

.editor-panel-head h3 {
  margin: 4px 0 2px;
  font-size: 22px;
}

.editor-panel-head p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.rich-editor {
  display: flex;
  flex: 1;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  min-height: 420px;
}

.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  padding: 8px 10px;
  background: #faf9f7;
}

.editor-tool {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.editor-tool:hover {
  border-color: var(--line);
  background: var(--white);
}

.editor-tool:active {
  background: rgba(207, 3, 2, .08);
  color: var(--brand-red);
}

.editor-divider {
  width: 1px;
  height: 22px;
  margin: 0 4px;
  background: var(--line);
}

.editor-content {
  flex: 1;
  min-height: 360px;
  padding: 20px 22px;
  outline: 0;
  font-size: 15px;
  line-height: 1.65;
  font-weight: 500;
}

.editor-content:focus {
  box-shadow: inset 0 0 0 2px rgba(207, 3, 2, .08);
}

.editor-content p {
  margin: 0 0 12px;
}

.editor-content ul,
.editor-content ol {
  margin: 0 0 12px;
  padding-left: 22px;
}

.editor-content h3 {
  margin: 0 0 10px;
  font-size: 17px;
}

/* Forms */
.form-panel {
  max-width: 720px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 17px;
}

.form-grid label {
  display: grid;
  gap: 7px;
  color: #353b42;
  font-size: 13px;
}

.form-grid .full {
  grid-column: 1 / 3;
}

.form-grid input,
.form-grid select,
.form-grid textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px 12px;
  background: var(--white);
  color: var(--ink);
  outline: 0;
}

.form-grid textarea {
  min-height: 90px;
  resize: vertical;
}

.form-grid textarea:focus,
.form-grid input:focus,
.form-grid select:focus {
  border-color: var(--brand-red);
  box-shadow: 0 0 0 3px rgba(207, 3, 2, .1);
}

.upload-hint {
  min-height: 52px;
  display: flex;
  align-items: center;
  border: 1px dashed rgba(207, 3, 2, .35);
  border-radius: 7px;
  padding: 12px;
  background: rgba(207, 3, 2, .04);
  color: var(--muted);
  font-size: 12px;
}

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 24px;
}

.request-form-actions {
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.form-actions .primary-button {
  width: auto;
  min-height: 48px;
}

.form-note {
  display: block;
  margin-top: 16px;
  color: var(--muted);
  font-size: 11px;
}

/* Setup */
.setup-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 18px;
  align-items: start;
}

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

.flow-list article {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 14px;
  background: #faf9f7;
}

.flow-icon {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 8px;
  font-weight: 700;
}

.flow-icon.purchase { background: rgba(207, 3, 2, .1); color: var(--brand-red); }
.flow-icon.hr { background: rgba(61, 138, 191, .12); color: var(--blue); }
.flow-icon.policy { background: rgba(24, 167, 115, .12); color: var(--green); }

.flow-list strong {
  font-size: 13px;
}

.flow-list small {
  display: block;
  color: var(--muted);
  font-size: 10px;
}

.flow-list em {
  display: block;
  margin-top: 2px;
  font-size: 9px;
}

.approver-chain {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #faf9f7;
}

.approver-chain span {
  display: block;
  padding: 8px 12px;
  border-radius: 6px;
  background: var(--white);
  font-size: 13px;
}

.add-approver {
  border: 1px dashed rgba(207, 3, 2, .4);
  border-radius: 6px;
  padding: 8px 12px;
  background: rgba(207, 3, 2, .05);
  color: var(--brand-red);
  font-size: 12px;
  font-weight: 700;
}

/* Detail */
.back-link {
  display: block;
  border: 0;
  margin-bottom: 20px;
  padding: 0;
  background: transparent;
  color: var(--brand-red);
  font-size: 12px;
  font-weight: 700;
}

.detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.detail-header h2 {
  margin: 8px 0 6px;
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: -.02em;
  line-height: 1.05;
}

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

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, .8fr);
  gap: 18px;
}

.detail-grid {
  align-items: start;
}

.detail-grid:has(#detail-action-panel[hidden]) {
  grid-template-columns: 1fr;
  max-width: 900px;
}

.detail-main {
  display: grid;
  gap: 18px;
}

.detail-dl {
  display: grid;
  gap: 12px;
}

.detail-dl div {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.detail-dl dt {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.detail-dl dd {
  margin: 0;
  font-size: 13px;
}

.detail-dl dd {
  margin: 0;
  font-size: 13px;
}

.description-panel {
  border-left: 3px solid rgba(207, 3, 2, .35);
}

.description-view {
  min-height: 200px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 22px 24px;
  background: #faf9f7;
  font-size: 15px;
  line-height: 1.65;
  font-weight: 500;
}

.description-view p {
  margin: 0 0 12px;
}

.description-view ul,
.description-view ol {
  margin: 0 0 12px;
  padding-left: 22px;
}

.description-view h3 {
  margin: 0 0 10px;
  font-size: 17px;
}

.description-view strong {
  font-weight: 700;
}

.description-view em {
  font-style: italic;
}

.approval-stepper {
  display: grid;
  gap: 0;
}

.step {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 14px;
  align-items: start;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.step:last-child {
  border-bottom: 0;
}

.step > span {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  border: 2px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.step.done > span {
  border-color: var(--green);
  background: rgba(24, 167, 115, .12);
  color: var(--green);
}

.step.active > span {
  border-color: var(--brand-red);
  background: rgba(207, 3, 2, .1);
  color: var(--brand-red);
}

.step.rejected > span {
  border-color: var(--brand-red);
  background: rgba(207, 3, 2, .12);
  color: var(--brand-red);
}

.step strong {
  font-size: 13px;
}

.step small {
  color: var(--muted);
  font-size: 11px;
}

.action-panel {
  position: sticky;
  top: 94px;
}

.action-panel h3 {
  margin: 6px 0 16px;
  font-size: 20px;
}

.action-panel label {
  display: block;
  margin-bottom: 6px;
  color: #353b42;
  font-size: 13px;
}

.action-panel textarea {
  width: 100%;
  min-height: 80px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--white);
  resize: vertical;
  outline: 0;
}

.action-panel textarea:focus {
  border-color: var(--brand-red);
  box-shadow: 0 0 0 3px rgba(207, 3, 2, .1);
}

.action-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 18px;
}

.approve-btn,
.reject-btn {
  min-height: 52px;
  border: 0;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
}

.approve-btn {
  background: var(--green);
  color: var(--white);
}

.reject-btn {
  background: rgba(207, 3, 2, .1);
  color: var(--brand-red);
  border: 1px solid rgba(207, 3, 2, .3);
}

.action-extra {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.action-extra button {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 12px;
  background: var(--white);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.action-extra button:hover {
  border-color: var(--brand-red);
  color: var(--brand-red);
}

/* Toast */
.toast {
  position: fixed;
  z-index: 120;
  right: 22px;
  bottom: 65px;
  transform: translateY(20px);
  border-left: 4px solid var(--brand-red);
  border-radius: 7px;
  padding: 13px 18px;
  background: var(--charcoal);
  color: var(--white);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: .22s ease;
}

.toast.show {
  transform: none;
  opacity: 1;
}

/* Responsive */
@media (max-width: 1050px) {
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .setup-layout { grid-template-columns: 1fr; }
  .content-grid { grid-template-columns: 1fr; }
  .action-panel { position: static; }
  .request-layout { grid-template-columns: 1fr; }
  .request-editor { min-height: 400px; }
}

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

  .login-brand {
    display: none;
  }

  .login-form-side {
    min-height: 100vh;
    padding: 28px 20px;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 250px;
    transform: translateX(-100%);
    transition: transform .22s ease;
    will-change: transform;
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: 25px 0 80px rgba(0, 0, 0, .25);
  }

  .close-nav,
  .menu-button {
    display: grid;
  }

  .app-shell {
    grid-template-columns: 1fr;
    overflow-x: hidden;
  }

  .topbar {
    justify-content: flex-start;
  }

  .top-actions {
    margin-left: auto;
  }

  .business-chip div {
    display: none;
  }

  .hero-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 27px 24px;
  }

  .screen-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }

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

  .form-grid .full {
    grid-column: 1;
  }

  .approval-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .approval-row .badge {
    justify-self: start;
  }
}

@media (max-width: 600px) {
  .prototype-note {
    right: 10px;
    bottom: 10px;
  }

  .prototype-note strong {
    display: none;
  }

  .login-card h2 {
    font-size: 42px;
  }

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

  .top-actions .primary-button.compact {
    display: none;
  }

  .screen {
    padding: 24px 15px 70px;
  }

  .action-buttons {
    grid-template-columns: 1fr;
  }

  .detail-dl div {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

@media (max-width: 410px) {
  .metrics article {
    min-height: 110px;
    padding: 16px 14px;
  }

  .metrics article > strong {
    font-size: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
