:root {
  --brand-red: #cc0000;
  --brand-red-dark: #990000;
  --ink: #171717;
  --ink-soft: #3f3f46;
  --muted: #6b7280;
  --line: #e5e7eb;
  --surface: #ffffff;
  --surface-soft: #f5f5f5;
  --sidebar: #151515;
  --success: #15803d;
  --radius: 18px;
  --shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  color: var(--ink);
  background: var(--surface-soft);
  font-family: Arial, Helvetica, sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

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

.sidebar {
  min-height: 100vh;
  padding: 24px 18px;
  color: white;
  background: var(--sidebar);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
}

.sidebar-brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 0 8px 26px;
  border-bottom: 1px solid rgba(255,255,255,.12);
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--brand-red);
  font-size: 24px;
  font-weight: 900;
  font-style: italic;
}

.sidebar-brand strong,
.sidebar-brand small {
  display: block;
}

.sidebar-brand strong {
  font-size: 15px;
}

.sidebar-brand small {
  margin-top: 4px;
  color: #a1a1aa;
  font-size: 12px;
}

.sidebar-nav {
  display: grid;
  gap: 8px;
  padding-top: 24px;
}

.nav-item {
  min-height: 48px;
  padding: 8px 10px;
  display: flex;
  gap: 11px;
  align-items: center;
  border-radius: 12px;
  color: #d4d4d8;
  font-size: 14px;
  font-weight: 700;
}

.nav-item:hover,
.nav-item.active {
  color: white;
  background: rgba(204, 0, 0, .92);
}

.nav-code {
  min-width: 34px;
  height: 30px;
  padding: 0 5px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 8px;
  font-size: 10px;
  letter-spacing: .04em;
}

.sidebar-note {
  margin-top: auto;
  padding: 16px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  background: rgba(255,255,255,.04);
}

.sidebar-note strong,
.sidebar-note span {
  display: block;
}

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

.sidebar-note span {
  margin-top: 5px;
  color: #a1a1aa;
  font-size: 11px;
}

.main {
  min-width: 0;
}

.topbar {
  min-height: 72px;
  padding: 14px 34px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.topbar strong,
.tenant-label {
  display: block;
}

.tenant-label {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.topbar-status {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(21,128,61,.12);
}

.content {
  width: min(1220px, 100%);
  margin: 0 auto;
  padding: 28px 34px 60px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.breadcrumbs a:hover {
  color: var(--brand-red);
}

.page-header {
  padding: 28px 0 24px;
}

.eyebrow {
  display: block;
  margin-bottom: 8px;
  color: var(--brand-red);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.page-header h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.05;
  letter-spacing: -1.2px;
}

.page-header p {
  max-width: 790px;
  margin: 14px 0 0;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.6;
}

.intro-panel,
.instruction-box,
.workspace-card,
.module-card,
.section-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.intro-panel {
  padding: 20px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}

.intro-panel strong {
  font-size: 15px;
}

.intro-panel p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.pill {
  display: inline-flex;
  width: max-content;
  padding: 7px 11px;
  border-radius: 999px;
  color: #374151;
  background: #f3f4f6;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.pill.red {
  color: var(--brand-red-dark);
  background: #fee2e2;
}

.module-grid {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.module-card {
  min-height: 390px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
}

.module-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.module-icon {
  min-width: 50px;
  height: 50px;
  padding: 0 9px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: white;
  background: var(--brand-red);
  font-size: 13px;
  font-weight: 900;
}

.module-count {
  color: var(--muted);
  font-size: 11px;
}

.module-card h2 {
  margin: 22px 0 9px;
  font-size: 23px;
}

.module-card > p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.55;
}

.section-preview {
  margin: 20px 0 24px;
  padding: 0;
  display: grid;
  gap: 10px;
  list-style: none;
  color: #374151;
  font-size: 13px;
}

.section-preview li {
  display: flex;
  gap: 9px;
  align-items: flex-start;
}

.check {
  color: var(--brand-red);
  font-weight: 900;
}

.primary-button,
.secondary-button {
  min-height: 44px;
  padding: 11px 15px;
  display: inline-flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 800;
}

.primary-button {
  margin-top: auto;
  color: white;
  background: var(--brand-red);
}

.primary-button:hover {
  background: var(--brand-red-dark);
}

.primary-button.compact {
  margin-top: 14px;
}

.secondary-button {
  margin-top: 18px;
  color: var(--brand-red);
  background: white;
  border: 1px solid #fecaca;
}

.instruction-box {
  padding: 18px 20px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  border-left: 4px solid var(--brand-red);
}

.instruction-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  color: white;
  background: var(--brand-red);
  font-weight: 900;
}

.instruction-box strong {
  font-size: 14px;
}

.instruction-box p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.section-grid {
  margin-top: 20px;
  display: grid;
  gap: 16px;
}

.section-card {
  padding: 21px;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.step-number {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: var(--brand-red);
  background: #fee2e2;
  font-size: 15px;
  font-weight: 900;
}

.section-card h2 {
  margin: 0;
  font-size: 19px;
}

.section-card p {
  margin: 7px 0 12px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.55;
}

.section-card a {
  color: var(--brand-red);
  font-size: 13px;
  font-weight: 800;
}

.workspace-card {
  padding: 24px;
  box-shadow: var(--shadow);
}

.workspace-status {
  padding-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  border-bottom: 1px solid var(--line);
}

.workspace-card h2 {
  margin: 24px 0 18px;
  font-size: 20px;
}

.guided-steps {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
  list-style: none;
}

.guided-steps li {
  padding: 15px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fafafa;
}

.guided-steps li > span {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 10px;
  color: white;
  background: var(--brand-red);
  font-size: 12px;
  font-weight: 900;
}

.guided-steps strong {
  font-size: 13px;
}

.guided-steps p {
  margin: 5px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.5;
}

.next-phase {
  margin-top: 22px;
  padding: 17px;
  border-radius: 14px;
  background: #f4f4f5;
}

.next-phase strong {
  font-size: 13px;
}

.next-phase p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.empty-state {
  text-align: center;
}

.empty-state > strong {
  color: var(--brand-red);
  font-size: 24px;
}

.empty-state p {
  color: var(--muted);
}

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

  .module-card {
    min-height: auto;
  }
}

@media (max-width: 780px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    min-height: auto;
    position: static;
    padding: 16px;
  }

  .sidebar-brand {
    padding-bottom: 15px;
  }

  .sidebar-nav {
    padding-top: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sidebar-note {
    display: none;
  }

  .topbar {
    padding: 13px 18px;
  }

  .content {
    padding: 22px 18px 45px;
  }

  .intro-panel,
  .workspace-status {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 500px) {
  .sidebar-nav {
    grid-template-columns: 1fr;
  }

  .topbar-status {
    display: none;
  }

  .page-header {
    padding-top: 22px;
  }

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

/* AUTH_V1_0B */

.auth-page {
  min-height: 100vh;
  background:
    linear-gradient(
      135deg,
      #111111 0%,
      #1f1f1f 54%,
      #990000 100%
    );
}

.auth-shell {
  width: min(1040px, calc(100% - 32px));
  min-height: 620px;
  margin: 40px auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  border-radius: 24px;
  background: #ffffff;
  box-shadow:
    0 28px 80px rgba(0, 0, 0, .32);
}

.auth-brand-panel {
  padding: 58px 50px;
  color: #ffffff;
  background:
    linear-gradient(
      155deg,
      #cc0000 0%,
      #990000 52%,
      #5f0000 100%
    );
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-brand-mark {
  width: 70px;
  height: 70px;
  margin-bottom: 26px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  color: #cc0000;
  background: #ffffff;
  font-size: 38px;
  font-weight: 900;
  font-style: italic;
}

.auth-eyebrow {
  display: block;
  margin-bottom: 10px;
  color: inherit;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.auth-brand-panel h1 {
  margin: 0;
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.05;
}

.auth-brand-panel > p {
  max-width: 420px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, .84);
  font-size: 15px;
  line-height: 1.65;
}

.auth-security-note {
  margin-top: 44px;
  padding: 17px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 15px;
  background: rgba(0, 0, 0, .12);
}

.auth-security-note strong,
.auth-security-note span {
  display: block;
}

.auth-security-note strong {
  font-size: 13px;
}

.auth-security-note span {
  margin-top: 5px;
  color: rgba(255, 255, 255, .76);
  font-size: 12px;
  line-height: 1.5;
}

.auth-form-panel {
  padding: 54px 48px;
  display: flex;
  align-items: center;
  background: #ffffff;
}

.auth-form-card {
  width: 100%;
  max-width: 390px;
  margin: 0 auto;
}

.auth-form-card .auth-eyebrow {
  color: #cc0000;
}

.auth-form-card h2 {
  margin: 0;
  font-size: 31px;
  letter-spacing: -.6px;
}

.auth-description {
  margin: 12px 0 25px;
  color: #6b7280;
  font-size: 14px;
  line-height: 1.6;
}

.auth-error {
  margin-bottom: 18px;
  padding: 13px 14px;
  border: 1px solid #fecaca;
  border-radius: 11px;
  color: #991b1b;
  background: #fef2f2;
  font-size: 13px;
  line-height: 1.45;
}

.auth-form {
  display: grid;
  gap: 18px;
}

.auth-form label {
  display: grid;
  gap: 8px;
}

.auth-form label > span {
  color: #27272a;
  font-size: 12px;
  font-weight: 800;
}

.auth-form input {
  width: 100%;
  min-height: 48px;
  padding: 11px 13px;
  border: 1px solid #d4d4d8;
  border-radius: 11px;
  color: #18181b;
  background: #ffffff;
  font: inherit;
  outline: none;
}

.auth-form input:focus {
  border-color: #cc0000;
  box-shadow:
    0 0 0 4px rgba(204, 0, 0, .10);
}

.auth-submit {
  min-height: 48px;
  border: 0;
  border-radius: 11px;
  color: #ffffff;
  background: #cc0000;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
}

.auth-submit:hover {
  background: #990000;
}

.auth-help {
  margin: 22px 0 0;
  color: #71717a;
  font-size: 11px;
  line-height: 1.55;
}

.password-rules {
  padding: 12px;
  border-radius: 10px;
  color: #52525b;
  background: #f4f4f5;
  font-size: 11px;
  line-height: 1.5;
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 15px;
}

.user-summary {
  text-align: right;
}

.user-summary strong,
.user-summary span {
  display: block;
}

.user-summary strong {
  font-size: 12px;
}

.user-summary span {
  margin-top: 3px;
  color: #71717a;
  font-size: 10px;
}

.logout-button {
  min-height: 37px;
  padding: 8px 12px;
  border: 1px solid #fecaca;
  border-radius: 9px;
  color: #b91c1c;
  background: #ffffff;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.logout-button:hover {
  color: #ffffff;
  background: #cc0000;
}

@media (max-width: 780px) {
  .auth-shell {
    margin: 18px auto;
    grid-template-columns: 1fr;
  }

  .auth-brand-panel {
    padding: 35px 26px;
  }

  .auth-security-note {
    margin-top: 25px;
  }

  .auth-form-panel {
    padding: 38px 25px;
  }

  .user-summary {
    display: none;
  }
}

@media (max-width: 500px) {
  .auth-shell {
    width: min(100% - 18px, 1040px);
    border-radius: 18px;
  }

  .auth-brand-panel {
    padding: 28px 22px;
  }

  .auth-brand-mark {
    width: 56px;
    height: 56px;
    margin-bottom: 18px;
    font-size: 30px;
  }

  .auth-brand-panel h1 {
    font-size: 29px;
  }

  .auth-form-panel {
    padding: 30px 21px;
  }
}

/* SETTINGS_V1_0C */

.nav-divider {
  height: 1px;
  margin: 10px 8px;
  background: rgba(255, 255, 255, .12);
}

.settings-intro {
  margin-bottom: 20px;
  padding: 19px 21px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.settings-intro strong {
  font-size: 14px;
}

.settings-intro p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.settings-message {
  margin-bottom: 18px;
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
}

.settings-message.success {
  color: #166534;
  background: #dcfce7;
  border: 1px solid #bbf7d0;
}

.settings-message.error {
  color: #991b1b;
  background: #fef2f2;
  border: 1px solid #fecaca;
}

.settings-form {
  display: grid;
  gap: 18px;
}

.settings-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.settings-card > header {
  margin-bottom: 22px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.settings-card h2 {
  margin: 0;
  font-size: 19px;
}

.settings-card header p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.settings-number {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 12px;
  color: var(--brand-red);
  background: #fee2e2;
  font-size: 12px;
  font-weight: 900;
}

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

.settings-grid label,
.color-settings label {
  display: grid;
  gap: 8px;
}

.settings-grid label > span,
.color-settings label > span {
  font-size: 12px;
  font-weight: 800;
}

.settings-grid input,
.settings-grid textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid #d4d4d8;
  border-radius: 10px;
  color: var(--ink);
  background: #ffffff;
  font: inherit;
  outline: none;
}

.settings-grid input {
  min-height: 46px;
}

.settings-grid textarea {
  resize: vertical;
  line-height: 1.5;
}

.settings-grid input:focus,
.settings-grid textarea:focus {
  border-color: var(--brand-red);
  box-shadow:
    0 0 0 4px rgba(204, 0, 0, .09);
}

.settings-grid small,
.switch-row small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.full-width {
  grid-column: 1 / -1;
}

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

.color-control {
  min-height: 56px;
  padding: 8px 11px;
  display: flex;
  align-items: center;
  gap: 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fafafa;
}

.color-control input {
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.color-control code {
  font-size: 12px;
  font-weight: 800;
}

.switch-row {
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fafafa;
}

.switch-row span,
.switch-row strong,
.switch-row small {
  display: block;
}

.switch-row strong {
  font-size: 13px;
}

.switch-row small {
  margin-top: 5px;
}

.switch-row input {
  width: 22px;
  height: 22px;
  accent-color: var(--brand-red);
  cursor: pointer;
}

.branch-status {
  margin-top: 16px;
  padding: 16px;
  border-radius: 13px;
}

.branch-status strong {
  font-size: 13px;
}

.branch-status p {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.55;
}

.branch-status.enabled {
  color: #166534;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
}

.branch-status.disabled {
  color: #52525b;
  background: #f4f4f5;
  border: 1px solid #e4e4e7;
}

.branch-list {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.branch-row {
  padding: 13px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 11px;
}

.branch-row strong,
.branch-row span {
  display: block;
}

.branch-row strong {
  font-size: 13px;
}

.branch-row div > span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.settings-protection {
  padding: 17px 19px;
  border: 1px solid #bfdbfe;
  border-radius: 14px;
  color: #1e3a8a;
  background: #eff6ff;
}

.settings-protection strong {
  font-size: 13px;
}

.settings-protection p {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.55;
}

.settings-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
}

.settings-actions .secondary-button {
  margin-top: 0;
}

.settings-save {
  min-height: 44px;
  padding: 11px 18px;
  border: 0;
  border-radius: 11px;
  color: #ffffff;
  background: var(--brand-red);
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.settings-save:hover {
  background: var(--brand-red-dark);
}

@media (max-width: 780px) {
  .settings-grid,
  .color-settings {
    grid-template-columns: 1fr;
  }

  .full-width {
    grid-column: auto;
  }

  .settings-intro,
  .switch-row {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* ACCESS_CONTROL_V1_0C2 */

.admin-toolbar {
  margin-bottom: 20px;
  padding: 19px 21px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.admin-toolbar strong {
  font-size: 14px;
}

.admin-toolbar p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.admin-table-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.admin-table-scroll {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.admin-table th,
.admin-table td {
  padding: 15px 16px;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--line);
}

.admin-table th {
  color: #52525b;
  background: #fafafa;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.admin-table tbody tr:last-child td {
  border-bottom: 0;
}

.admin-table td > strong,
.admin-table td > span {
  display: block;
}

.admin-table td > span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.table-action {
  color: var(--brand-red);
  font-weight: 800;
}

.empty-table {
  padding: 30px !important;
  color: var(--muted);
  text-align: center !important;
}

.role-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.role-tags span {
  padding: 5px 7px;
  border-radius: 999px;
  color: #3f3f46;
  background: #f4f4f5;
  font-size: 10px;
  font-weight: 700;
}

.role-tags .warning {
  color: #92400e;
  background: #fef3c7;
}

.status-badge {
  display: inline-flex;
  width: max-content;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
}

.status-badge.active {
  color: #166534;
  background: #dcfce7;
}

.status-badge.inactive {
  color: #991b1b;
  background: #fee2e2;
}

.settings-grid select {
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  border: 1px solid #d4d4d8;
  border-radius: 10px;
  color: var(--ink);
  background: #ffffff;
  font: inherit;
}

.single-branch-note,
.technical-code {
  padding: 13px 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fafafa;
}

.single-branch-note strong,
.technical-code > span {
  font-size: 12px;
}

.single-branch-note span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
}

.technical-code code {
  margin-top: 6px;
  color: var(--brand-red-dark);
  font-size: 11px;
  font-weight: 800;
}

.option-stack {
  margin-top: 18px;
  display: grid;
  gap: 12px;
}

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

.selection-card {
  min-height: 82px;
  padding: 14px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fafafa;
  cursor: pointer;
}

.selection-card:has(input:checked) {
  border-color: #fca5a5;
  background: #fff7f7;
}

.selection-card input {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  flex: 0 0 auto;
  accent-color: var(--brand-red);
}

.selection-card span,
.selection-card strong,
.selection-card small {
  display: block;
}

.selection-card strong {
  font-size: 12px;
}

.selection-card small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

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

.role-card {
  padding: 19px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.role-card-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.role-type {
  display: block;
  margin-bottom: 7px;
  color: var(--brand-red);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .07em;
}

.role-card h2 {
  margin: 0;
  font-size: 17px;
}

.role-card > p {
  min-height: 54px;
  margin: 12px 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.role-metrics {
  margin: auto 0 14px;
  padding-top: 13px;
  display: flex;
  gap: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
}

.role-metrics strong {
  color: var(--ink);
  font-size: 13px;
}

.role-card .secondary-button {
  margin-top: 0;
}

.permission-groups {
  display: grid;
  gap: 22px;
}

.permission-group h3 {
  margin: 0 0 11px;
  color: #3f3f46;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .05em;
}

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

@media (max-width: 780px) {
  .admin-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .selection-grid,
  .role-list {
    grid-template-columns: 1fr;
  }

  .admin-toolbar .primary-button {
    width: 100%;
  }
}

/* NESTED_ADMIN_V1_0C2 */

.config-hub-grid,
.role-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.config-hub-card,
.role-card {
  padding: 21px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.config-hub-card {
  min-height: 210px;
}

.config-hub-number {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--brand-red);
  background: #fee2e2;
  font-size: 11px;
  font-weight: 900;
}

.config-hub-card h2,
.role-card h2 {
  margin: 18px 0 8px;
  font-size: 18px;
}

.config-hub-card p,
.role-card > p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.config-hub-card a {
  margin-top: auto;
  color: var(--brand-red);
  font-size: 12px;
  font-weight: 900;
}

.admin-toolbar {
  margin-bottom: 18px;
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.admin-toolbar strong {
  font-size: 14px;
}

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

.admin-table-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.admin-table-scroll {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.admin-table th,
.admin-table td {
  padding: 14px 15px;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--line);
}

.admin-table th {
  color: #52525b;
  background: #fafafa;
  font-size: 10px;
  text-transform: uppercase;
}

.admin-table td > strong,
.admin-table td > span {
  display: block;
}

.admin-table td > span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

.table-action {
  color: var(--brand-red);
  font-weight: 900;
}

.empty-table {
  padding: 30px !important;
  color: var(--muted);
  text-align: center !important;
}

.role-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.role-tags span {
  padding: 5px 7px;
  border-radius: 999px;
  background: #f4f4f5;
  font-size: 9px;
  font-weight: 800;
}

.status-badge {
  display: inline-flex;
  width: max-content;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 900;
}

.status-badge.active {
  color: #166534;
  background: #dcfce7;
}

.status-badge.inactive {
  color: #991b1b;
  background: #fee2e2;
}

.settings-grid select {
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  border: 1px solid #d4d4d8;
  border-radius: 10px;
  background: #ffffff;
  font: inherit;
}

.single-branch-note,
.technical-code {
  padding: 13px 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fafafa;
}

.single-branch-note span,
.technical-code code {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
}

.option-stack,
.permission-groups {
  margin-top: 18px;
  display: grid;
  gap: 14px;
}

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

.selection-card {
  min-height: 80px;
  padding: 14px;
  display: flex;
  align-items: flex-start;
  gap: 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fafafa;
  cursor: pointer;
}

.selection-card:has(input:checked) {
  border-color: #fca5a5;
  background: #fff7f7;
}

.selection-card input {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  accent-color: var(--brand-red);
}

.selection-card span,
.selection-card strong,
.selection-card small {
  display: block;
}

.selection-card strong {
  font-size: 11px;
}

.selection-card small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
}

.role-card-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.role-type {
  display: block;
  color: var(--brand-red);
  font-size: 8px;
  font-weight: 900;
  text-transform: uppercase;
}

.role-metrics {
  margin: auto 0 14px;
  padding-top: 13px;
  display: flex;
  gap: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 9px;
}

.role-card .secondary-button {
  margin-top: 0;
}

.permission-group h3 {
  margin: 0 0 11px;
  color: #3f3f46;
  font-size: 11px;
  text-transform: uppercase;
}

@media (max-width: 1050px) {
  .config-hub-grid,
  .role-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 780px) {
  .config-hub-grid,
  .role-list,
  .selection-grid {
    grid-template-columns: 1fr;
  }

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