:root {
  --ink: #0b1736;
  --muted: #61708d;
  --line: #dde7f4;
  --panel: #ffffff;
  --soft: #f6f9fd;
  --canvas: #eef4fb;
  --navy: #06163a;
  --blue: #1166e8;
  --blue-soft: #eaf2ff;
  --green: #22a45d;
  --green-soft: #eaf8f0;
  --purple: #6d43cf;
  --purple-soft: #f1edff;
  --orange: #f08a22;
  --orange-soft: #fff3e6;
  --red: #e25555;
  --red-soft: #ffeded;
  --shadow: 0 16px 38px rgba(14, 31, 64, 0.08);
  --shadow-soft: 0 8px 22px rgba(14, 31, 64, 0.06);
  --radius: 8px;
  --role: var(--blue);
  --role-soft: var(--blue-soft);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(90deg, rgba(17, 102, 232, 0.04) 1px, transparent 1px),
    linear-gradient(180deg, rgba(34, 164, 93, 0.035) 1px, transparent 1px),
    var(--canvas);
  background-size: 42px 42px;
  color: var(--ink);
}

body.app-booting #auth-screen,
body.app-booting #app-shell {
  display: none !important;
}

body.app-booting::before {
  content: "UniPrint";
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: var(--canvas);
  color: var(--navy);
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0;
  z-index: 9999;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

[hidden],
.hidden {
  display: none !important;
}

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

h1 {
  font-size: 34px;
  line-height: 1.05;
}

h2 {
  font-size: 17px;
  line-height: 1.2;
}

h3 {
  font-size: 14px;
  line-height: 1.25;
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

td {
  color: var(--ink);
  font-size: 13px;
  font-weight: 760;
}

.symbol-sprite {
  display: none;
}

.auth-screen {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 22px;
  background:
    radial-gradient(circle at 14% 16%, rgba(17, 102, 232, 0.18), transparent 24%),
    radial-gradient(circle at 86% 12%, rgba(34, 164, 93, 0.14), transparent 25%),
    linear-gradient(135deg, #f8fbff 0%, #edf4fb 58%, #ffffff 100%);
}

.auth-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 420px);
  gap: 20px;
  width: min(1080px, 100%);
  padding: 22px;
  border: 1px solid rgba(191, 207, 228, 0.9);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 28px 80px rgba(9, 31, 71, 0.14);
}

.auth-brand,
.brand-button {
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-brand {
  grid-column: 1 / -1;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.auth-showcase {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-row: 2 / span 4;
  align-items: center;
  align-content: center;
  gap: 18px;
  min-height: 440px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(17, 102, 232, 0.08), transparent 42%),
    linear-gradient(180deg, #ffffff, #f6faff);
}

.auth-showcase p {
  max-width: 520px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 740;
  line-height: 1.55;
}

.auth-feature-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.auth-feature-row article {
  display: grid;
  gap: 8px;
  justify-items: center;
  min-height: 90px;
  padding: 14px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  text-align: center;
  box-shadow: var(--shadow-soft);
}

.auth-feature-row svg {
  width: 30px;
  height: 30px;
  padding: 6px;
  border-radius: 7px;
  background: var(--blue-soft);
  color: var(--blue);
}

.auth-feature-row span {
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}

.setup-panel,
.auth-tabs,
.auth-form,
.auth-note,
.auth-policy-links {
  grid-column: 2;
}

.brand-button {
  border: 0;
  background: transparent;
  color: var(--ink);
  min-width: 0;
  text-align: left;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--blue), #0b2f78);
  color: #ffffff;
  box-shadow: 0 12px 26px rgba(17, 102, 232, 0.22);
}

.brand-mark svg {
  width: 24px;
  height: 24px;
}

.auth-brand strong,
.brand-button strong {
  display: block;
  overflow: hidden;
  color: var(--navy);
  font-size: 26px;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-brand strong span,
.brand-button strong span {
  color: var(--blue);
}

.auth-brand small,
.brand-button small {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 820;
  text-overflow: ellipsis;
  white-space: normal;
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  align-self: end;
  margin: 0;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--soft);
}

.setup-panel {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.setup-copy {
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
  line-height: 1.5;
}

.auth-tabs button,
.role-nav button {
  min-height: 38px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
}

.auth-tabs button.active,
.role-nav button.active {
  background: var(--blue);
  color: #ffffff;
}

.auth-form {
  display: none;
  gap: 14px;
  align-self: start;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.auth-form.active {
  display: grid;
}

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

.auth-note {
  min-height: 22px;
  color: var(--red);
  font-size: 13px;
  font-weight: 820;
}

.auth-policy-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 820;
}

.auth-policy-links a {
  color: var(--blue);
  text-decoration: none;
}

.auth-policy-links a:hover {
  text-decoration: underline;
}

.policy-page {
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(237, 244, 253, 0.92), rgba(248, 251, 255, 0.98)),
    var(--soft);
}

.policy-header {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px clamp(16px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
}

.policy-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--ink);
  text-decoration: none;
}

.policy-brand strong {
  display: block;
  color: var(--navy);
  font-size: 22px;
  font-weight: 950;
}

.policy-brand strong span {
  color: var(--blue);
}

.policy-brand small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 820;
}

.policy-main {
  display: grid;
  gap: 24px;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 56px;
}

.policy-hero {
  display: grid;
  gap: 12px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 18px 48px rgba(14, 31, 64, 0.08);
}

.policy-hero h1 {
  max-width: 760px;
  color: var(--navy);
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.02;
}

.policy-hero p {
  max-width: 760px;
  color: var(--muted);
  font-size: 16px;
  font-weight: 760;
  line-height: 1.6;
}

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

.policy-card {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 14px 36px rgba(14, 31, 64, 0.06);
}

.policy-card h2 {
  color: var(--navy);
  font-size: 22px;
}

.policy-card p {
  margin: 0;
  color: var(--muted);
  font-weight: 750;
  line-height: 1.65;
}

.policy-card dl {
  display: grid;
  gap: 10px;
  margin: 0;
}

.policy-card dl div {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.policy-card dl div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.policy-card dt {
  color: var(--ink);
  font-weight: 900;
}

.policy-card dd {
  margin: 0;
  color: var(--muted);
  font-weight: 760;
}

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

.app-shell[data-role="vendor"] {
  --role: var(--green);
  --role-soft: var(--green-soft);
}

.app-shell[data-role="admin"] {
  --role: var(--purple);
  --role-soft: var(--purple-soft);
}

.app-shell[data-role="vendor"] .topbar,
.app-shell[data-role="admin"] .topbar {
  grid-template-columns: minmax(210px, 290px) minmax(0, 1fr);
}

.app-shell[data-role="vendor"] .workflow-strip,
.app-shell[data-role="admin"] .workflow-strip {
  display: none;
}

.app-shell[data-role="vendor"] .top-actions,
.app-shell[data-role="admin"] .top-actions {
  grid-column: 2;
  justify-self: end;
}

.app-shell[data-role="student"] {
  grid-template-columns: minmax(0, 1fr);
}

.app-shell[data-role="student"] .topbar,
.app-shell[data-role="student"] .portal-rail {
  display: none;
}

.app-shell[data-role="student"] main {
  grid-column: 1;
  padding: 14px;
}

.app-shell[data-role="student"] .student-shell {
  min-height: calc(100vh - 28px);
}

.portal-rail {
  position: sticky;
  top: 0;
  z-index: 45;
  display: grid;
  grid-row: 1 / span 2;
  height: 100vh;
  place-items: center;
  background: var(--role);
  box-shadow: 8px 0 24px rgba(14, 31, 64, 0.1);
}

.portal-rail span {
  color: #ffffff;
  font-size: 15px;
  font-weight: 950;
  text-transform: uppercase;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 35;
  display: grid;
  grid-column: 2;
  grid-template-columns: minmax(210px, 290px) minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-width: 0;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 16px 36px rgba(14, 31, 64, 0.08);
  backdrop-filter: blur(16px);
}

.workflow-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(136px, 1fr));
  gap: 10px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.workflow-strip article {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 62px;
  min-width: 0;
  overflow: hidden;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(14, 31, 64, 0.045);
}

.workflow-strip strong {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workflow-strip small {
  display: block;
  overflow: hidden;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workflow-icon {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 10px;
}

.workflow-icon svg {
  width: 19px;
  height: 19px;
}

.workflow-icon.blue {
  background: var(--blue-soft);
  color: var(--blue);
}

.workflow-icon.purple {
  background: var(--purple-soft);
  color: var(--purple);
}

.workflow-icon.orange {
  background: var(--orange-soft);
  color: var(--orange);
}

.workflow-icon.green {
  background: var(--green-soft);
  color: var(--green);
}

.workflow-icon.red {
  background: var(--red-soft);
  color: var(--red);
}

.top-actions {
  display: flex;
  justify-content: end;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  white-space: nowrap;
}

.top-actions > * {
  flex: 0 0 auto;
}

.active-role-chip {
  display: inline-flex;
  align-items: center;
  max-width: 190px;
  min-height: 36px;
  padding: 0 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--role-soft);
  color: var(--role);
  font-size: 12px;
  font-weight: 900;
  text-overflow: ellipsis;
}

.role-nav {
  display: flex;
  grid-column: 1 / -1;
  gap: 6px;
  min-width: 0;
  overflow-x: auto;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--soft);
}

.role-nav button {
  min-width: 108px;
}

.role-nav button.active {
  background: var(--role);
}

.primary-action,
.secondary-action,
.ghost-action,
.table-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  border-radius: 7px;
  font-weight: 900;
}

.primary-action {
  width: 100%;
  min-height: 44px;
  border: 0;
  background: var(--role);
  color: #ffffff;
  box-shadow: 0 14px 28px rgba(17, 102, 232, 0.17);
}

.secondary-action {
  padding: 0 13px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--blue);
}

.ghost-action {
  padding: 0 12px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
}

.secondary-action svg,
.ghost-action svg {
  width: 18px;
  height: 18px;
}

main {
  grid-column: 2;
  min-width: 0;
  overflow-x: hidden;
  padding: 18px;
}

.message-bar {
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--role) 24%, white);
  border-radius: var(--radius);
  background: var(--role-soft);
  color: var(--role);
  font-weight: 860;
}

.view {
  display: none;
  counter-reset: panel;
}

.view.active {
  display: block;
}

.page-header {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.2fr);
  gap: 16px;
  align-items: stretch;
  margin-bottom: 16px;
}

.page-header > div:first-child {
  display: grid;
  align-content: center;
  min-height: 118px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background:
    linear-gradient(135deg, var(--role-soft), transparent 56%),
    #ffffff;
  box-shadow: var(--shadow-soft);
}

.eyebrow {
  display: block;
  margin-bottom: 6px;
  color: var(--role);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.header-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(112px, 1fr));
  gap: 10px;
  min-width: 0;
}

.header-kpis article {
  min-height: 118px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.header-kpis span,
.card-meta,
.summary-list dt,
.shop-card span,
.order-card p,
.admin-card p {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.header-kpis strong {
  display: block;
  margin-top: 12px;
  color: var(--role);
  font-size: 24px;
  line-height: 1;
}

.panel {
  position: relative;
  min-width: 0;
  overflow: hidden;
  counter-increment: panel;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow);
}

.panel::before {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 12px 0 10px 0;
  background: var(--role);
  color: #ffffff;
  content: counter(panel);
  font-size: 12px;
  font-weight: 950;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 76px;
  padding: 16px 18px 16px 50px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff, #fbfdff);
}

.shop-panel-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.shop-saved-summary {
  display: grid;
  gap: 6px;
  margin: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fbff;
  color: var(--muted);
  font-size: 13px;
  font-weight: 780;
}

.shop-summary-logo {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
}

.shop-saved-summary strong {
  color: var(--ink);
  font-size: 15px;
}

.shop-saved-summary small {
  overflow-wrap: anywhere;
}

.student-grid {
  display: grid;
  grid-template-columns: minmax(330px, 0.82fr) minmax(360px, 0.9fr) minmax(360px, 1fr);
  gap: 16px;
  align-items: start;
}

.vendor-grid {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(360px, 0.95fr) minmax(360px, 1.05fr);
  gap: 16px;
  align-items: start;
}

.admin-vendors-panel {
  grid-row: span 2;
}

.admin-students-panel,
.admin-shops-panel {
  min-height: 0;
}

.admin-orders-panel {
  grid-column: 1 / -1;
}

.form-body {
  display: grid;
  gap: 14px;
  padding: 18px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 820;
}

input,
select {
  width: 100%;
  min-height: 40px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
  color: var(--ink);
  font-weight: 780;
}

input:focus,
select:focus {
  border-color: color-mix(in srgb, var(--role) 56%, var(--line));
  outline: 3px solid color-mix(in srgb, var(--role) 14%, transparent);
}

input[readonly] {
  background: #f3f7fb;
  cursor: default;
}

.password-control {
  position: relative;
  display: block;
  min-width: 0;
}

.password-control input {
  padding-right: 48px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  display: grid;
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  place-items: center;
  transform: translateY(-50%);
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.password-toggle:hover,
.password-toggle:focus-visible {
  background: var(--blue-soft);
  color: var(--blue);
  outline: none;
}

.password-toggle svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

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

.drop-zone {
  display: grid;
  gap: 8px;
  justify-items: center;
  margin: 18px;
  padding: 26px 14px;
  border: 1px dashed color-mix(in srgb, var(--role) 42%, var(--line));
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff, var(--role-soft));
  color: var(--muted);
  text-align: center;
  cursor: pointer;
}

.drop-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.drop-zone svg {
  width: 46px;
  height: 46px;
  padding: 9px;
  border-radius: 12px;
  background: var(--role);
  color: #ffffff;
}

.drop-zone strong {
  max-width: 100%;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 16px;
}

.soft-badge,
.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.soft-badge {
  background: var(--role-soft);
  color: var(--role);
}

.status-pill.received {
  background: var(--blue-soft);
  color: var(--blue);
}

.status-pill.processing {
  background: var(--orange-soft);
  color: var(--orange);
}

.status-pill.printing {
  background: var(--purple-soft);
  color: var(--purple);
}

.status-pill.ready,
.status-pill.open,
.status-pill.approved,
.status-pill.active,
.status-pill.paid,
.status-pill.refunded,
.status-pill.collected {
  background: var(--green-soft);
  color: var(--green);
}

.status-pill.cancelled,
.status-pill.suspended,
.status-pill.closed,
.status-pill.inactive {
  background: var(--red-soft);
  color: var(--red);
}

.status-pill.pending,
.status-pill.awaiting_payment,
.status-pill.refund_pending,
.status-pill.paused {
  background: var(--orange-soft);
  color: var(--orange);
}

.status-pill.failed {
  background: var(--red-soft);
  color: var(--red);
}

.shop-list,
.order-list,
.admin-list {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.shop-card,
.order-card,
.admin-card {
  display: grid;
  gap: 9px;
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 6px 16px rgba(14, 31, 64, 0.04);
}

.shop-card {
  cursor: pointer;
}

.shop-card.selected {
  border-color: color-mix(in srgb, var(--role) 52%, var(--line));
  background: var(--role-soft);
  box-shadow: inset 4px 0 0 var(--role), 0 8px 18px rgba(14, 31, 64, 0.05);
}

.shop-card header,
.order-card header,
.admin-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.shop-card header > div,
.order-card header > div,
.admin-card header > div {
  min-width: 0;
}

.shop-card h3,
.order-card h3,
.admin-card h3,
.shop-card p,
.order-card p,
.admin-card p {
  overflow-wrap: anywhere;
}

.shop-card dl,
.order-card dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.shop-card dt,
.order-card dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.shop-card dd,
.order-card dd {
  margin: 3px 0 0;
  color: var(--ink);
  font-weight: 900;
}

.auth-showcase-copy {
  display: grid;
  gap: 14px;
  align-content: center;
  min-width: 0;
}

.auth-showcase-copy .eyebrow {
  color: var(--navy);
  text-transform: none;
}

.auth-showcase-copy h1 {
  max-width: 430px;
  font-size: 42px;
}

.auth-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.auth-cta-row .primary-action,
.auth-cta-row .secondary-action {
  width: auto;
  min-width: 132px;
  padding-inline: 16px;
}

.auth-feature-row {
  grid-column: 1 / -1;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.auth-form-title {
  display: grid;
  gap: 5px;
  justify-items: center;
  margin-bottom: 8px;
  text-align: center;
}

.auth-form-title h2 {
  font-size: 24px;
}

.auth-form-title p,
.auth-switch-copy {
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
}

.auth-helper-row,
.auth-switch-copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.auth-switch-copy {
  justify-content: center;
}

.checkbox-line {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.checkbox-line input {
  width: 17px;
  min-height: 17px;
  accent-color: var(--blue);
}

.link-button {
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--blue);
  font-weight: 900;
}

.register-layout {
  position: relative;
  min-width: 0;
}

.register-fields {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.student-shell {
  display: grid;
  grid-template-columns: 172px minmax(0, 1fr);
  min-height: calc(100vh - 132px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.student-sidebar {
  display: grid;
  align-content: start;
  gap: 4px;
  min-width: 0;
  padding: 18px 0;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff, #f7fbff);
}

.student-sidebar strong {
  padding: 0 16px 16px;
  color: var(--navy);
  font-size: 13px;
  font-weight: 950;
}

.student-sidebar button {
  min-height: 42px;
  padding: 0 16px;
  border: 0;
  border-left: 4px solid transparent;
  background: transparent;
  color: var(--muted);
  text-align: left;
  font-size: 13px;
  font-weight: 900;
}

.student-sidebar button.active {
  border-left-color: var(--blue);
  background: var(--blue-soft);
  color: var(--navy);
}

.student-workspace {
  min-width: 0;
  padding: 28px;
  background: #fbfdff;
}

.student-screen {
  display: none;
  min-width: 0;
}

.student-screen.active {
  display: grid;
  gap: 18px;
}

.student-page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
}

.student-page-head h1 {
  font-size: 28px;
}

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

.green-action {
  background: #18b9a6;
  box-shadow: 0 14px 28px rgba(24, 185, 166, 0.18);
}

.student-kpi-grid {
  grid-template-columns: repeat(4, minmax(120px, 1fr));
}

.student-table-card,
.student-flow-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.student-table-card {
  overflow: hidden;
}

.student-card-heading {
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.student-table tbody tr {
  cursor: pointer;
}

.student-flow-card {
  display: grid;
  gap: 22px;
  width: min(520px, 100%);
  justify-self: center;
  padding: 28px;
}

#student-shops-screen .student-flow-card {
  width: min(780px, 100%);
}

.flow-title {
  display: grid;
  gap: 7px;
  justify-items: center;
  text-align: center;
}

.flow-title h1 {
  font-size: 24px;
}

.flow-title p {
  color: var(--muted);
  font-size: 13px;
  font-weight: 820;
}

.student-drop-zone {
  display: grid;
  gap: 10px;
  justify-items: center;
  min-height: 210px;
  padding: 32px 16px;
  border: 2px dashed #d8e6f7;
  border-radius: 14px;
  background: #ffffff;
  color: var(--muted);
  text-align: center;
  cursor: pointer;
}

.student-drop-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.student-drop-zone svg {
  width: 54px;
  height: 54px;
  padding: 13px;
  border-radius: 16px;
  background: #f1f6fd;
  color: var(--navy);
}

.student-drop-zone strong {
  color: var(--ink);
}

.student-drop-zone span {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 24px;
  border-radius: 7px;
  background: var(--blue);
  color: #ffffff;
  font-weight: 900;
  box-shadow: 0 14px 28px rgba(17, 102, 232, 0.17);
}

.selected-file-card {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
}

.selected-file-card svg {
  width: 42px;
  height: 42px;
  padding: 10px;
  border-radius: 10px;
  background: var(--red-soft);
  color: var(--red);
}

.selected-file-card h3,
.selected-file-card p {
  overflow-wrap: anywhere;
}

.selected-file-card p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 780;
}

.file-check {
  color: var(--green);
  font-size: 24px;
  font-weight: 950;
}

.student-options {
  display: grid;
  gap: 12px;
}

.student-shop-list {
  gap: 14px;
  padding: 0;
}

.student-shop-card {
  grid-template-columns: 64px minmax(0, 1fr) 120px;
  align-items: center;
  padding: 18px;
  border-radius: 12px;
}

.shop-avatar {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 12px;
  background: #eff6ff;
  color: var(--blue);
}

.shop-avatar svg {
  width: 30px;
  height: 30px;
}

.shop-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.student-shop-info {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.shop-live-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.queue-chip {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  background: #e9f8ef;
  color: #0b8a3d;
  font-size: 12px;
  font-weight: 950;
}

.queue-chip.live {
  background: #eef6ff;
  color: var(--blue);
}

.queue-chip.busy {
  background: #fff4e6;
  color: #b35b00;
}

.student-shop-info p,
.student-shop-info small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 780;
}

.student-shop-info p strong {
  color: var(--ink);
}

.student-shop-info small {
  overflow-wrap: anywhere;
}

.shop-quote-button {
  min-height: 42px;
  padding: 0 12px;
  font-size: 12px;
}

.quote-flow,
.tracking-flow {
  width: min(430px, 100%);
}

.quote-title {
  justify-items: start;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.quote-summary-list {
  display: grid;
  gap: 18px;
  margin: 0;
}

.quote-summary-list div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
}

.quote-summary-list dt {
  color: var(--ink);
  font-weight: 900;
}

.quote-summary-list dd {
  margin: 0;
  color: var(--muted);
  font-weight: 850;
  text-align: right;
}

.quote-price-card {
  display: grid;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(14, 31, 64, 0.05);
}

.quote-price-card p {
  color: var(--ink);
  font-weight: 850;
}

.quote-price-card div,
.quote-actions {
  display: grid;
  grid-template-columns: 0.8fr 1.4fr;
  gap: 16px;
  align-items: center;
}

.quote-price-card div {
  grid-template-columns: 1fr auto;
}

.quote-price-card strong:last-child {
  font-size: 22px;
}

.payment-assurance,
.payment-waiting-card {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid rgba(34, 164, 93, 0.24);
  border-radius: 16px;
  background: #f6fff9;
}

.payment-assurance strong,
.payment-waiting-card h2 {
  color: var(--ink);
  font-weight: 900;
}

.payment-assurance p,
.payment-waiting-card p {
  margin: 0;
  color: var(--muted);
  font-weight: 750;
}

.payment-waiting-card {
  border-color: rgba(240, 138, 34, 0.32);
  background: #fffaf2;
}

.tracking-title {
  gap: 4px;
}

.tracking-timeline {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tracking-timeline li {
  position: relative;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 12px;
  min-height: 76px;
}

.tracking-timeline li::before {
  position: absolute;
  top: 20px;
  bottom: -8px;
  left: 10px;
  width: 2px;
  background: #dbe5f1;
  content: "";
}

.tracking-timeline li:last-child::before {
  display: none;
}

.tracking-timeline li > span {
  z-index: 1;
  width: 22px;
  height: 22px;
  margin-top: 2px;
  border: 3px solid #c8d4e4;
  border-radius: 50%;
  background: #ffffff;
}

.tracking-timeline li.complete > span {
  border-color: var(--green);
  background: var(--green);
  box-shadow: inset 0 0 0 5px #ffffff;
}

.tracking-timeline li.active > span {
  border-color: var(--blue);
  background: var(--blue);
  box-shadow: inset 0 0 0 5px #ffffff;
}

.tracking-timeline li.active strong {
  color: var(--blue);
}

.tracking-timeline strong {
  display: block;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.1;
}

.tracking-timeline p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 780;
}

.tracking-estimate {
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
}

.tracking-estimate span {
  color: var(--muted);
  font-weight: 850;
}

.tracking-estimate strong {
  font-size: 20px;
}

.settings-list {
  display: grid;
  gap: 14px;
}

.order-actions,
.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.table-wrap {
  max-width: 100%;
  overflow-x: auto;
}

.table-action {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--blue);
  font-size: 12px;
}

.table-action.primary {
  border-color: var(--blue);
  background: var(--blue);
  color: #ffffff;
}

.table-action.danger {
  border-color: rgba(226, 85, 85, 0.28);
  background: #ffffff;
  color: var(--red);
}

.toast-region {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 60;
  display: grid;
  gap: 8px;
  width: min(360px, calc(100vw - 36px));
  pointer-events: none;
}

.toast {
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--role) 24%, var(--line));
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--ink);
  box-shadow: var(--shadow);
  font-size: 13px;
  font-weight: 820;
}

@media (max-width: 1440px) {
  .workflow-strip {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }

  .workflow-strip article:nth-child(n + 4) {
    display: none;
  }
}

@media (max-width: 1260px) {
  .topbar {
    grid-template-columns: 1fr auto;
  }

  .workflow-strip {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .role-nav {
    grid-row: 3;
  }

  .student-grid,
  .vendor-grid {
    grid-template-columns: 1fr 1fr;
  }

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

  .admin-vendors-panel {
    grid-row: auto;
  }

  .orders-panel,
  .vendor-orders-panel,
  .admin-orders-panel {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  .auth-card {
    grid-template-columns: 1fr;
  }

  .auth-brand,
  .auth-showcase,
  .setup-panel,
  .auth-tabs,
  .auth-form,
  .auth-note,
  .auth-policy-links {
    grid-column: 1;
  }

  .auth-showcase {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 22px;
  }

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

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

  .portal-rail {
    position: static;
    grid-column: 1;
    grid-row: auto;
    height: 40px;
  }

  .portal-rail span {
    writing-mode: horizontal-tb;
    transform: none;
  }

  .topbar,
  main {
    grid-column: 1;
  }

  .topbar {
    position: static;
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .workflow-strip {
    grid-column: 1;
    display: flex;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 3px;
    scroll-snap-type: x proximity;
  }

  .workflow-strip article {
    flex: 0 0 210px;
    scroll-snap-align: start;
  }

  .workflow-strip article:nth-child(n + 4) {
    display: flex;
  }

  .top-actions {
    display: flex;
    justify-content: start;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 2px;
  }

  main {
    padding: 12px;
  }

  .page-header {
    grid-template-columns: 1fr;
  }

  .header-kpis,
  .student-grid,
  .vendor-grid,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .orders-panel,
  .vendor-orders-panel,
  .admin-orders-panel {
    grid-column: auto;
  }

  .student-shell {
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .student-sidebar {
    position: sticky;
    top: 0;
    z-index: 8;
    display: flex;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    min-width: 0;
    padding: 10px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .student-sidebar strong {
    display: none;
  }

  .student-sidebar button {
    flex: 0 0 auto;
    min-height: 38px;
    padding: 0 12px;
    border-left: 0;
    border-radius: 7px;
    text-align: center;
    white-space: nowrap;
  }

  .student-workspace {
    padding: 18px;
  }

  .student-actions,
  .student-kpi-grid {
    grid-template-columns: 1fr;
  }

  .student-shop-card {
    grid-template-columns: 54px minmax(0, 1fr);
  }

  .shop-quote-button {
    grid-column: 1 / -1;
    width: 100%;
  }
}

@media (max-width: 560px) {
  .auth-screen {
    align-items: start;
    min-height: 100svh;
    padding: 0;
    background: #ffffff;
  }

  .auth-card {
    width: 100%;
    min-height: 100svh;
    align-content: start;
    gap: 14px;
    padding: 16px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .auth-showcase {
    display: none;
  }

  .setup-panel,
  .auth-tabs,
  .auth-form,
  .auth-note {
    grid-column: 1;
  }

  .auth-form,
  .setup-panel {
    padding: 16px;
    border-radius: 12px;
    box-shadow: none;
  }

  .auth-helper-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .auth-switch-copy {
    flex-wrap: wrap;
    text-align: center;
  }

  .auth-brand strong,
  .brand-button strong {
    font-size: 22px;
  }

  .auth-showcase-copy h1 {
    font-size: 32px;
  }

  .auth-cta-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .auth-cta-row .primary-action,
  .auth-cta-row .secondary-action {
    width: 100%;
    min-width: 0;
    padding-inline: 8px;
  }

  .brand-button {
    width: 100%;
  }

  .top-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    white-space: normal;
  }

  .active-role-chip {
    grid-column: 1 / -1;
    max-width: none;
    justify-content: center;
  }

  .secondary-action,
  .ghost-action {
    min-width: 0;
    padding-inline: 8px;
  }

  .workflow-strip article {
    flex-basis: auto;
  }

  .workflow-strip {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
  }

  .workflow-strip article {
    min-height: 78px;
    padding: 10px;
  }

  .workflow-strip article:last-child {
    grid-column: 1 / -1;
  }

  h1 {
    font-size: 27px;
  }

  .field-grid,
  .shop-card dl,
  .order-card dl {
    grid-template-columns: 1fr;
  }

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

  table {
    min-width: 620px;
  }

  .admin-actions,
  .order-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .table-action {
    width: 100%;
  }

  .panel-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .student-workspace {
    padding: 12px;
  }

  .student-flow-card {
    gap: 18px;
    padding: 18px;
  }

  .student-page-head h1,
  .flow-title h1 {
    font-size: 22px;
  }

  .student-drop-zone {
    min-height: 180px;
    padding: 24px 12px;
  }

  .selected-file-card {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .file-check {
    grid-column: 1 / -1;
    justify-self: end;
  }

  .quote-actions {
    grid-template-columns: 1fr;
  }

  .quote-summary-list div {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .quote-summary-list dd {
    text-align: left;
  }

  .student-table {
    min-width: 520px;
  }
}

/* Student experience refresh */
.app-shell[data-role="student"] {
  background:
    linear-gradient(120deg, rgba(17, 102, 232, 0.07), transparent 36%),
    linear-gradient(180deg, #f8fbff, #eef5fc);
}

.app-shell[data-role="student"] main {
  padding: 0;
}

.app-shell[data-role="student"] .message-bar {
  margin: 14px;
}

.app-shell[data-role="student"] .student-shell {
  grid-template-columns: 238px minmax(0, 1fr);
  min-height: 100vh;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.app-shell[data-role="student"] .student-sidebar {
  position: sticky;
  top: 0;
  z-index: 14;
  height: 100vh;
  padding: 22px 14px;
  overflow-y: auto;
  border-right: 1px solid rgba(211, 224, 241, 0.95);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 251, 255, 0.98)),
    #ffffff;
  box-shadow: 18px 0 46px rgba(14, 31, 64, 0.06);
}

.student-sidebar strong {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 10px 18px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--line);
  color: var(--navy);
  font-size: 17px;
  line-height: 1;
}

.sidebar-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--blue), #0b2f78);
  color: #ffffff;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0;
  box-shadow: 0 12px 26px rgba(17, 102, 232, 0.22);
}

.student-sidebar button {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #61708d;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.student-sidebar button svg {
  width: 19px;
  height: 19px;
}

.student-sidebar button:hover,
.student-sidebar button:focus-visible {
  background: #f1f6fe;
  color: var(--blue);
  outline: 0;
  transform: translateX(2px);
}

.student-sidebar button.active {
  border-color: rgba(17, 102, 232, 0.18);
  background: var(--blue-soft);
  color: var(--blue);
  box-shadow: inset 3px 0 0 var(--blue);
}

.student-sidebar button[data-student-logout] {
  margin-top: 18px;
  color: var(--red);
}

.student-workspace {
  display: block;
  min-height: 100vh;
  padding: 30px clamp(18px, 3vw, 44px);
  background:
    radial-gradient(circle at 82% 10%, rgba(34, 164, 93, 0.08), transparent 24%),
    transparent;
}

.student-screen.active {
  gap: 22px;
  max-width: 1180px;
  margin: 0 auto;
}

.student-dashboard-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  min-height: 178px;
  padding: 28px;
  overflow: hidden;
  border: 1px solid rgba(194, 212, 235, 0.92);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(17, 102, 232, 0.12), transparent 46%),
    linear-gradient(180deg, #ffffff, #f8fbff);
  box-shadow: 0 22px 58px rgba(14, 31, 64, 0.08);
}

.student-dashboard-hero h1 {
  margin-top: 6px;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: 0;
}

.student-dashboard-hero p {
  max-width: 600px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 760;
  line-height: 1.55;
}

.student-dashboard-hero .primary-action {
  width: auto;
  min-width: 156px;
  padding-inline: 18px;
}

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

.student-action-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 10px 14px;
  align-items: center;
  min-height: 118px;
  padding: 18px;
  border: 1px solid rgba(213, 226, 242, 0.96);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--ink);
  text-align: left;
  box-shadow: var(--shadow-soft);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.student-action-card:hover,
.student-action-card:focus-visible {
  border-color: rgba(17, 102, 232, 0.28);
  outline: 0;
  box-shadow: 0 18px 40px rgba(14, 31, 64, 0.1);
  transform: translateY(-2px);
}

.student-action-card strong,
.student-action-card small {
  grid-column: 2;
}

.student-action-card strong {
  font-size: 15px;
  font-weight: 950;
}

.student-action-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.action-icon {
  display: grid;
  grid-row: 1 / span 2;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 14px;
}

.action-icon svg {
  width: 24px;
  height: 24px;
}

.action-icon.blue {
  background: var(--blue-soft);
  color: var(--blue);
}

.action-icon.green {
  background: var(--green-soft);
  color: var(--green);
}

.action-icon.purple {
  background: var(--purple-soft);
  color: var(--purple);
}

.student-kpi-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.student-kpi-grid article {
  min-height: 112px;
  border-radius: 16px;
  background:
    linear-gradient(180deg, #ffffff, #fbfdff);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.student-kpi-grid article:hover {
  box-shadow: 0 18px 40px rgba(14, 31, 64, 0.08);
  transform: translateY(-1px);
}

.student-table-card,
.student-flow-card {
  border-color: rgba(211, 224, 241, 0.95);
  border-radius: 18px;
  box-shadow: 0 18px 46px rgba(14, 31, 64, 0.07);
}

.student-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding: 20px 22px;
  background: linear-gradient(180deg, #ffffff, #fbfdff);
}

.student-table th,
.student-table td {
  padding: 14px 18px;
}

.student-table tbody tr {
  transition: background 140ms ease;
}

.student-table tbody tr:hover {
  background: #f6faff;
}

.student-flow-card {
  width: min(760px, 100%);
  padding: 30px;
}

.upload-flow {
  grid-template-columns: minmax(0, 1.1fr) minmax(290px, 0.9fr);
  gap: 18px 22px;
  width: min(1000px, 100%);
  align-items: start;
}

.upload-flow .flow-title,
.upload-flow .student-flow-steps {
  grid-column: 1 / -1;
}

.upload-flow .student-drop-zone {
  grid-column: 1;
  grid-row: 3 / span 3;
  min-height: 390px;
}

.upload-flow .selected-file-card,
.upload-flow .student-options,
.upload-flow #find-shops-button {
  grid-column: 2;
}

.flow-title {
  justify-items: start;
  text-align: left;
}

.flow-title h1 {
  font-size: clamp(24px, 3vw, 32px);
}

.student-flow-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.student-flow-steps span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.student-flow-steps span.active {
  border-color: rgba(17, 102, 232, 0.22);
  background: var(--blue);
  color: #ffffff;
}

.student-flow-steps span.complete {
  border-color: rgba(34, 164, 93, 0.24);
  background: var(--green-soft);
  color: var(--green);
}

.student-drop-zone {
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(17, 102, 232, 0.04), transparent),
    #ffffff;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.student-drop-zone:hover,
.student-drop-zone.dragging {
  border-color: rgba(17, 102, 232, 0.58);
  background: #f8fbff;
  transform: translateY(-1px);
}

.student-drop-zone.is-detecting {
  border-color: rgba(240, 138, 34, 0.48);
  background: #fffaf3;
}

.student-drop-zone strong {
  font-size: 16px;
}

.selected-file-card {
  border-radius: 16px;
}

.selected-file-card.is-ready {
  border-color: rgba(34, 164, 93, 0.24);
  background: linear-gradient(180deg, #ffffff, #f6fff9);
}

.file-check {
  display: grid;
  min-width: 36px;
  min-height: 28px;
  place-items: center;
  border-radius: 999px;
  background: #edf3fb;
  color: var(--muted);
  font-size: 0;
}

.file-check::before {
  content: "Waiting";
  font-size: 11px;
  font-weight: 950;
}

.selected-file-card.is-ready .file-check {
  background: var(--green-soft);
  color: var(--green);
}

.selected-file-card.is-ready .file-check::before {
  content: "Ready";
}

.student-options {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f9fbfe;
}

.shop-discovery-flow,
#student-shops-screen .student-flow-card {
  width: min(940px, 100%);
}

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

.student-shop-card {
  grid-template-columns: 62px minmax(0, 1fr) 132px;
  gap: 16px;
  border-radius: 16px;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.student-shop-card:hover,
.student-shop-card.selected {
  border-color: rgba(17, 102, 232, 0.26);
  box-shadow: 0 18px 42px rgba(14, 31, 64, 0.08);
  transform: translateY(-1px);
}

.shop-avatar {
  border-radius: 16px;
}

.student-shop-info h3 {
  font-size: 16px;
}

.student-shop-info p {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.shop-quote-button {
  width: 100%;
  border-radius: 10px;
}

.quote-flow,
.tracking-flow {
  width: min(720px, 100%);
}

.quote-title {
  padding: 0 0 18px;
}

.quote-summary-list {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f9fbfe;
}

.quote-price-card {
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(17, 102, 232, 0.08), transparent 45%),
    #ffffff;
}

.quote-actions .secondary-action,
.quote-actions .primary-action {
  min-height: 48px;
}

.tracking-flow #student-tracking-panel {
  display: grid;
  gap: 18px;
}

.tracking-timeline {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f9fbfe;
}

.tracking-estimate {
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(34, 164, 93, 0.09), transparent 48%),
    #ffffff;
}

@media (max-width: 900px) {
  .policy-grid {
    grid-template-columns: 1fr;
  }

  .app-shell[data-role="student"] .student-shell {
    grid-template-columns: 74px minmax(0, 1fr);
    min-height: 100vh;
  }

  .app-shell[data-role="student"] .student-sidebar {
    display: grid;
    gap: 8px;
    height: 100vh;
    padding: 12px 8px;
    overflow-x: hidden;
    border-right: 1px solid rgba(211, 224, 241, 0.95);
    border-bottom: 0;
  }

  .student-sidebar strong {
    justify-content: center;
    padding: 0 0 12px;
  }

  .student-sidebar strong > span:last-child,
  .student-sidebar button span {
    display: none;
  }

  .sidebar-mark {
    width: 42px;
    height: 42px;
  }

  .student-sidebar button {
    grid-template-columns: 1fr;
    justify-items: center;
    min-height: 46px;
    padding: 0;
    border-radius: 14px;
  }

  .student-sidebar button:hover,
  .student-sidebar button:focus-visible {
    transform: none;
  }

  .student-sidebar button.active {
    box-shadow: inset 0 0 0 2px rgba(17, 102, 232, 0.15);
  }

  .student-workspace {
    padding: 14px;
  }

  .student-dashboard-hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 20px;
  }

  .student-dashboard-hero .primary-action {
    width: 100%;
  }

  .student-actions,
  .student-kpi-grid {
    grid-template-columns: 1fr;
  }

  .upload-flow {
    grid-template-columns: 1fr;
    width: min(680px, 100%);
  }

  .upload-flow .flow-title,
  .upload-flow .student-flow-steps,
  .upload-flow .student-drop-zone,
  .upload-flow .selected-file-card,
  .upload-flow .student-options,
  .upload-flow #find-shops-button {
    grid-column: 1;
    grid-row: auto;
  }

  .upload-flow .student-drop-zone {
    min-height: 250px;
  }

  .student-shop-card {
    grid-template-columns: 54px minmax(0, 1fr);
  }

  .shop-quote-button {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .policy-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .policy-main {
    width: min(100% - 20px, 1120px);
    padding-top: 18px;
  }

  .policy-hero,
  .policy-card {
    padding: 18px;
    border-radius: 14px;
  }

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

  .app-shell[data-role="student"] .student-shell {
    grid-template-columns: 66px minmax(0, 1fr);
  }

  .student-workspace {
    padding: 10px;
  }

  .student-dashboard-hero,
  .student-flow-card,
  .student-table-card {
    border-radius: 14px;
  }

  .student-flow-card {
    padding: 16px;
  }

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

  .student-action-card {
    min-height: 100px;
    padding: 14px;
  }

  .selected-file-card {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .file-check {
    grid-column: 1 / -1;
    justify-self: start;
  }
}

