:root {
  --bg: #f3f1eb;
  --panel: #fffdf8;
  --panel-soft: #f7f4ed;
  --ink: #1d232b;
  --muted: #66727f;
  --line: #d7d1c2;
  --accent: #1a6f63;
  --accent-strong: #0f5a50;
  --accent-soft: #e4f1ee;
  --warn: #9f6a00;
  --warn-soft: #fff4d6;
  --success: #1c6a3f;
  --success-soft: #dff3e7;
  --danger: #8c2d1e;
  --danger-soft: #fde6de;
  --shadow: 0 20px 50px rgba(29, 35, 43, 0.08);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --font-sans: "Segoe UI", "Aptos", "Helvetica Neue", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background:
    radial-gradient(circle at top right, rgba(26, 111, 99, 0.16), transparent 26%),
    linear-gradient(180deg, #f8f7f2 0%, #ede7da 100%);
  min-height: 100vh;
}

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

a {
  color: inherit;
}

.shell {
  min-height: 100vh;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
}

.login-card {
  width: min(980px, 100%);
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  background: rgba(255, 253, 248, 0.92);
  border: 1px solid rgba(215, 209, 194, 0.7);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.login-hero {
  padding: 48px;
  background:
    linear-gradient(145deg, rgba(26, 111, 99, 0.98), rgba(15, 90, 80, 0.92)),
    #1a6f63;
  color: #fbfaf6;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
}

.login-kicker,
.section-kicker {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
  color: var(--muted);
}

.login-hero .login-kicker {
  color: rgba(251, 250, 246, 0.7);
}

.login-hero h1 {
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.05;
  margin: 8px 0 16px;
}

.login-hero p {
  max-width: 36ch;
  line-height: 1.65;
  color: rgba(251, 250, 246, 0.78);
}

.login-features {
  display: grid;
  gap: 14px;
}

.login-feature {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 14px;
}

.login-panel {
  padding: 52px 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.login-app-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
}

.login-form-block {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.login-heading {
  font-size: 28px;
  font-weight: 700;
  margin: 0;
  color: var(--ink);
}

.login-sub {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  max-width: 34ch;
}

.ms-signin-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  color: #1d1d1d;
  border: 1.5px solid #d0cdc6;
  border-radius: 4px;
  padding: 11px 20px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  width: 100%;
  justify-content: center;
}

.ms-signin-btn:hover {
  background: #f5f5f5;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.login-legal {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.logo {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.08em;
}


.button {
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease, opacity 0.15s ease;
}

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

.button-primary {
  background: var(--accent);
  color: white;
  padding: 14px 22px;
  font-weight: 600;
}

.button-secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
  padding: 11px 16px;
}

.button-danger {
  background: var(--danger-soft);
  color: var(--danger);
  padding: 11px 16px;
}

.button-small {
  padding: 9px 13px;
  font-size: 13px;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
}

.sidebar {
  background: rgba(255, 253, 248, 0.9);
  border-right: 1px solid rgba(215, 209, 194, 0.7);
  padding: 24px 18px;
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.sidebar .brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-title {
  font-size: 18px;
  font-weight: 700;
}

.nav {
  display: grid;
  gap: 8px;
}

.nav button {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 16px;
  text-align: left;
  padding: 12px 14px;
  color: var(--muted);
}

.nav button.active {
  color: var(--accent-strong);
  background: var(--accent-soft);
  border-color: rgba(26, 111, 99, 0.15);
}

.sidebar-footer {
  margin-top: auto;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px;
}

.lang-toggle {
  display: flex;
  gap: 4px;
}

.lang-toggle button {
  flex: 1;
  padding: 5px 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.lang-toggle button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.lang-toggle button.lang-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.lang-toggle-login {
  justify-content: flex-end;
  margin-bottom: 12px;
}

.lang-toggle-login button {
  flex: 0 0 auto;
  padding: 4px 12px;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 700;
}

.content {
  padding: 28px;
  display: grid;
  gap: 18px;
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: end;
}

.hero h2 {
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.1;
  margin: 8px 0 10px;
}

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

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

.metric-card,
.panel {
  background: rgba(255, 253, 248, 0.92);
  border: 1px solid rgba(215, 209, 194, 0.7);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.metric-card {
  padding: 20px;
}

.metric-card strong {
  display: block;
  font-size: 34px;
  margin-top: 12px;
}

.metric-card span {
  color: var(--muted);
}

.panel {
  padding: 22px;
}

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

.panel-header h3 {
  margin: 0;
  font-size: 18px;
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 10px;
  border-bottom: 1px solid #ece6d8;
  text-align: left;
  font-size: 14px;
}

th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 600;
}

.badge-pending,
.badge-submitted {
  background: var(--warn-soft);
  color: var(--warn);
}

.badge-approved,
.badge-created,
.badge-pushed {
  background: var(--success-soft);
  color: var(--success);
}

.badge-rejected,
.badge-failed {
  background: var(--danger-soft);
  color: var(--danger);
}

.badge-queued {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

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

.field {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.field label {
  font-size: 13px;
  color: var(--muted);
}

.field input,
.field select,
.field textarea {
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 12px 14px;
  width: 100%;
  min-width: 0;
}

.field textarea {
  min-height: 110px;
  resize: vertical;
}

.section {
  border-top: 1px solid #ece6d8;
  padding-top: 18px;
  margin-top: 18px;
}

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

.line-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  background: var(--panel-soft);
}

.line-grid {
  display: grid;
  grid-template-columns: 2fr 0.8fr 1fr 1fr;
  gap: 12px;
}

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

.stack-tight {
  display: grid;
  gap: 8px;
}

.row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.row-between {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.notice {
  border-radius: 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: var(--panel-soft);
  color: var(--ink);
}

.notice.success {
  background: var(--success-soft);
  border-color: rgba(28, 106, 63, 0.15);
  color: var(--success);
}

.notice.error {
  background: var(--danger-soft);
  border-color: rgba(140, 45, 30, 0.15);
  color: var(--danger);
}

.empty {
  padding: 28px;
  border-radius: 18px;
  background: var(--panel-soft);
  color: var(--muted);
  text-align: center;
}

.muted {
  color: var(--muted);
}

.pill-switch {
  display: inline-flex;
  gap: 8px;
  padding: 6px;
  background: var(--panel-soft);
  border-radius: 999px;
  border: 1px solid var(--line);
}

.pill-switch button {
  border-radius: 999px;
  border: none;
  background: transparent;
  padding: 10px 14px;
  color: var(--muted);
}

.pill-switch button.active {
  background: white;
  color: var(--ink);
  box-shadow: 0 4px 10px rgba(29, 35, 43, 0.06);
}

.footer-note {
  color: var(--muted);
  font-size: 13px;
}

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

.detail-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel-soft);
  padding: 16px;
}

.detail-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.detail-card strong {
  display: block;
  margin-top: 10px;
  font-size: 18px;
  overflow-wrap: anywhere;
}

/* ─── New Request View ───────────────────────────────────────────────────── */

.nrv-shell {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 0;
}

/* Page header */
.nrv-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: rgba(255,253,248,0.95);
  border: 1px solid rgba(215,209,194,0.7);
  border-radius: 22px 22px 0 0;
  padding: 20px 28px;
  border-bottom: none;
}

.nrv-page-header-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nrv-back-btn {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
}

.nrv-back-btn:hover { color: var(--ink); border-color: var(--ink); }

.nrv-kicker {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 2px;
}

.nrv-page-title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
}

.nrv-page-total {
  text-align: right;
}

.nrv-page-total-label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 4px;
}

.nrv-page-total-amount {
  display: block;
  font-size: 28px;
  font-weight: 700;
  color: var(--accent-strong);
}

/* Body */
.nrv-body {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Cards */
.nrv-card {
  background: rgba(255,253,248,0.92);
  border: 1px solid rgba(215,209,194,0.7);
  border-top: none;
}

.nrv-card:last-child {
  border-radius: 0;
}

/* Collapsible cards */
.nrv-card.collapsed .nrv-card-body {
  display: none;
}

.nrv-chevron {
  font-size: 14px;
  color: var(--muted);
  margin-left: 8px;
  transition: transform 0.2s ease;
  display: inline-block;
  line-height: 1;
  flex-shrink: 0;
}

.nrv-card.collapsed .nrv-chevron {
  transform: rotate(-90deg);
}

.nrv-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 28px;
  background: var(--panel-soft);
  border-bottom: 1px solid var(--line);
}

.nrv-step-badge {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.nrv-card-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
}

.nrv-card-body {
  padding: 22px 28px;
}

/* Fields */
.nrv-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.nrv-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nrv-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.nrv-req { color: var(--danger); }
.nrv-opt { color: var(--muted); font-weight: 400; text-transform: none; letter-spacing: 0; }

.nrv-input {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 13px;
  font: inherit;
  font-size: 14px;
  background: #fff;
  width: 100%;
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
  min-width: 0;
  box-sizing: border-box;
}

.nrv-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(26,111,99,0.1);
}

.nrv-hint {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.nrv-input-error {
  border-color: var(--danger) !important;
  background: var(--danger-soft) !important;
}

.nrv-validation-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--danger-soft);
  border: 1px solid rgba(140,45,30,0.25);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 16px;
}

.nrv-validation-banner-body {
  flex: 1;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.nrv-validation-banner-icon {
  color: var(--danger);
  font-size: 16px;
  flex-shrink: 0;
  line-height: 1.5;
}

.nrv-validation-banner-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nrv-validation-banner-list li {
  font-size: 13px;
  color: var(--danger);
  line-height: 1.5;
}

.nrv-validation-banner-list li::before {
  content: "– ";
}

.nrv-validation-banner-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--danger);
  font-size: 16px;
  padding: 0;
  flex-shrink: 0;
  opacity: 0.6;
  line-height: 1;
  margin-top: 2px;
}

.nrv-validation-banner-close:hover {
  opacity: 1;
}

.nrv-error {
  display: block;
  font-size: 12px;
  color: var(--danger);
  margin-top: 4px;
  min-height: 0;
}

/* Segmented control */
.nrv-seg {
  display: inline-flex;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px;
  gap: 2px;
}

.nrv-seg-btn {
  border: none;
  border-radius: 999px;
  background: transparent;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.nrv-seg-btn.active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(29,35,43,0.08);
}

/* Lines table */
.nrv-lines-body {
  padding: 0 !important;
}

.nrv-lines-thead {
  display: grid;
  grid-template-columns: 3fr 90px 120px 110px 150px 190px 40px;
  gap: 0;
  padding: 0 16px;
  background: var(--panel-soft);
  border-bottom: 1px solid var(--line);
}

.nrv-lines-thead > div {
  padding: 10px 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
}

.nrv-line-row {
  display: grid;
  grid-template-columns: 3fr 90px 120px 110px 150px 190px 40px;
  gap: 0;
  min-height: 46px;
  align-items: center;
  padding: 6px 16px;
  border-bottom: 1px solid var(--line);
  transition: background 0.1s;
}

.nrv-line-row:last-of-type {
  border-bottom: none;
}

.nrv-line-row:hover {
  background: rgba(26,111,99,0.02);
}

.nrv-line-item-cell {
  padding: 0 8px 0 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
}

.nrv-item-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.nrv-item-mode-group {
  display: inline-flex;
  flex-shrink: 0;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.nrv-item-mode-chip {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  border: none;
  border-radius: 0;
  padding: 0 10px;
  height: 28px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  background: var(--bg-subtle, #f5f5f5);
  color: var(--text-muted, #888);
  transition: background 0.15s, color 0.15s;
}

.nrv-item-mode-chip + .nrv-item-mode-chip {
  border-left: 1px solid var(--border);
}

.nrv-item-mode-chip.chip-active {
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 700;
}

.nrv-item-mode-chip.chip-new.chip-active {
  background: var(--warn-soft);
  color: var(--warn);
}

.nrv-item-mode-chip:hover:not(.chip-active) {
  background: var(--border);
  color: var(--text, #333);
}

.nrv-item-input {
  flex: 1;
  min-width: 0;
}

/* ── Combobox (searchable select) ─────────────────────────── */
.nrv-combobox {
  position: relative;
  flex: 1;
  min-width: 0;
}
.nrv-combobox-input {
  width: 100%;
}
.nrv-combobox-list {
  display: none;
  position: absolute;
  top: calc(100% - 1px);
  left: 0;
  right: 0;
  max-height: 240px;
  overflow-y: auto;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 0 0 6px 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  z-index: 200;
  box-shadow: 0 4px 12px rgba(0,0,0,.12);
}
.nrv-combobox-list.nrv-combobox-open {
  display: block;
}
.nrv-combobox-item {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
}
.nrv-combobox-item:last-child {
  border-bottom: none;
}
.nrv-combobox-item:hover,
.nrv-combobox-item.selected {
  background: var(--accent-soft, #f0f4ff);
}
.nrv-combobox-code {
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  flex-shrink: 0;
}
.nrv-combobox-name {
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nrv-combobox-empty {
  padding: 10px 12px;
  color: var(--text-muted);
  font-size: 13px;
  font-style: italic;
}

.nrv-line-cell {
  padding: 0 8px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
}

.nrv-line-input {
  padding: 9px 10px !important;
  font-size: 13px !important;
  width: 100%;
}

.nrv-num-input {
  text-align: left;
}

.nrv-amount-cell {
  text-align: left;
}

.nrv-amount-val {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-strong);
}

.nrv-add-line-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px dashed var(--accent);
  border-radius: 999px;
  background: transparent;
  color: var(--accent);
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.nrv-add-line-btn:hover {
  background: var(--accent-soft);
}

.nrv-remove-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 12px;
  transition: all 0.15s;
}

.nrv-remove-btn:hover {
  background: var(--danger-soft);
  border-color: var(--danger);
  color: var(--danger);
}

.nrv-remove-placeholder {
  width: 28px;
  height: 28px;
}

.nrv-lines-total {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 14px;
  padding: 16px 24px;
  border-top: 2px solid var(--line);
  background: var(--panel-soft);
}

.nrv-lines-total-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.nrv-lines-total-amount {
  font-size: 24px;
  font-weight: 700;
  color: var(--ink);
}

/* Delivery option cards */
.nrv-delivery-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.nrv-delivery-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  border: 2px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  cursor: pointer;
  background: #fff;
  text-align: left;
  transition: border-color 0.15s, background 0.15s;
}

.nrv-delivery-card:hover {
  border-color: var(--accent);
}

.nrv-delivery-card.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.nrv-delivery-radio {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--line);
  flex-shrink: 0;
  margin-top: 2px;
  display: grid;
  place-items: center;
  transition: border-color 0.15s;
}

.nrv-delivery-card.selected .nrv-delivery-radio {
  border-color: var(--accent);
}

.nrv-radio-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.nrv-delivery-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
}

.nrv-delivery-card.selected .nrv-delivery-card-title {
  color: var(--accent-strong);
}

.nrv-delivery-card-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.nrv-recent-addr-field {
  margin-top: 20px;
}

.nrv-shipto-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

/* Request details — read-only overrides */
.rdv-ro-field + .rdv-ro-field {
  margin-top: 16px;
}

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

.rdv-grid-2 .rdv-ro-field + .rdv-ro-field {
  margin-top: 0;
}

.rdv-ro-field .rdv-value {
  padding: 9px 12px;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--ink);
  min-height: 38px;
  word-break: break-word;
}

.rdv-note {
  white-space: pre-wrap;
}

.nrv-textarea {
  resize: vertical;
  min-height: 100px;
  font-family: inherit;
  line-height: 1.5;
}

.rdv-field-wide {
  grid-column: span 2;
}

.rdv-field-full {
  grid-column: 1 / -1;
}

.rdv-field-col1 {
  grid-column: 1;
}

.rdv-line-row {
  pointer-events: none;
}

.rdv-line-val {
  font-size: 14px;
  color: var(--ink);
  display: flex;
  align-items: center;
}

.rdv-line-text {
  font-size: 13px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rdv-link {
  font-size: 12px;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  max-width: 180px;
  pointer-events: all;
}
.rdv-link:hover { text-decoration: underline; }

/* Submit bar */
.nrv-submit-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 28px;
  background: rgba(255,253,248,0.92);
  border: 1px solid rgba(215,209,194,0.7);
  border-top: none;
  border-radius: 0 0 22px 22px;
}

.nrv-submit-note {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  max-width: 56ch;
}

.nrv-submit-btn {
  flex-shrink: 0;
  border: none;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  padding: 14px 32px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, transform 0.15s;
}

.nrv-submit-btn:hover {
  background: var(--accent-strong);
  transform: translateY(-1px);
}

/* ─── End New Request View ───────────────────────────────────────────────── */

@media (max-width: 1100px) {
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .login-card {
    grid-template-columns: 1fr;
  }
}

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

  .sidebar {
    border-right: none;
    border-bottom: 1px solid rgba(215, 209, 194, 0.7);
  }

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

  .content {
    padding: 18px;
  }

  .nrv-grid-3 { grid-template-columns: 1fr 1fr; }
  .nrv-delivery-cards { grid-template-columns: 1fr; }
  .nrv-shipto-grid { grid-template-columns: 1fr; }

  .nrv-lines-thead,
  .nrv-line-row {
    grid-template-columns: 1fr;
  }

  .nrv-lines-thead { display: none; }

  .nrv-line-row {
    gap: 8px;
    padding: 14px 16px;
  }

  .nrv-line-cell { padding: 0; }

  .nrv-submit-bar {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    padding: 18px;
  }

  .nrv-submit-btn { width: 100%; }

  .nrv-page-header { border-radius: 16px 16px 0 0; padding: 16px 18px; }
  .nrv-submit-bar  { border-radius: 0 0 16px 16px; }
  .nrv-card-body   { padding: 16px 18px; }
  .nrv-card-header { padding: 12px 18px; }
}
