:root {
  --bg: #f3f1ec;
  --surface: #ffffff;
  --surface-alt: #f7f7fb;
  --ink: #151a22;
  --muted: #5b6575;
  --border: #e1e6ef;
  --brand: #0b4f9e;
  --brand-dark: #081f3d;
  --accent: #14a58d;
  --amber: #f2a93b;
  --danger: #d95c5c;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-1: 0 18px 40px rgba(12, 27, 54, 0.16);
  --shadow-2: 0 12px 28px rgba(20, 32, 57, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", "Sora", sans-serif;
  color: var(--ink);
  background: var(--bg);
  overflow: hidden;
}

body.auth-locked .shell {
  display: none;
}

body.auth-ready .auth-screen {
  display: none;
}

h1,
h2,
h3 {
  font-family: "Sora", "Manrope", sans-serif;
  margin: 0;
}

p {
  margin: 0;
}

button,
input {
  font: inherit;
}

.ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}

.auth-screen {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(245, 243, 238, 0.9);
  z-index: 10;
  backdrop-filter: blur(6px);
}

.auth-card {
  width: min(420px, 92vw);
  background: var(--surface);
  border-radius: 22px;
  padding: 28px;
  box-shadow: var(--shadow-1);
  display: grid;
  gap: 16px;
  text-align: left;
}

.auth-card h1 {
  font-size: 1.5rem;
}

.auth-card p {
  color: var(--muted);
  margin-top: -8px;
}

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

.auth-card label {
  display: grid;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--muted);
}

.auth-card input {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-alt);
}

.auth-error {
  min-height: 20px;
  color: var(--danger);
  font-size: 0.85rem;
}

.auth-logo {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  border: 1px solid var(--border);
  padding: 8px;
  background: #fff;
  box-shadow: var(--shadow-2);
}

.orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(0px);
  opacity: 0.8;
  animation: float 12s ease-in-out infinite;
}

.orb-a {
  width: 420px;
  height: 420px;
  background: radial-gradient(circle at 30% 30%, #c8e2ff, transparent 70%);
  top: -120px;
  left: -120px;
}

.orb-b {
  width: 520px;
  height: 520px;
  background: radial-gradient(circle at 30% 30%, #fde4c7, transparent 70%);
  bottom: -200px;
  right: -160px;
  animation-delay: -3s;
}

.orb-c {
  width: 360px;
  height: 360px;
  background: radial-gradient(circle at 30% 30%, #bfe8e4, transparent 70%);
  top: 40%;
  right: 10%;
  animation-delay: -6s;
}

.shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 28px;
  padding: 28px;
  height: 100vh;
  overflow: hidden;
  align-items: stretch;
}

.sidebar {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-1);
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  overflow-y: auto;
}

.sidebar::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, rgba(11, 79, 158, 0.08), transparent 60%);
  pointer-events: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  position: relative;
  z-index: 1;
}

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-2);
  padding: 6px;
  overflow: hidden;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 10px;
  display: block;
}

.brand-text span {
  font-weight: 700;
  display: block;
}

.brand-text small {
  color: var(--muted);
  font-size: 0.8rem;
}

.nav {
  margin-top: 8px;
  display: grid;
  gap: 16px;
  position: relative;
  z-index: 1;
}

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

.nav-title {
  font-size: 0.72rem;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--muted);
}

.nav-item {
  border: 1px solid transparent;
  background: transparent;
  text-align: left;
  padding: 10px 12px;
  border-radius: 12px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-item:hover {
  border-color: var(--border);
  background: var(--surface-alt);
}

.nav-item.active {
  background: linear-gradient(120deg, rgba(11, 79, 158, 0.12), transparent 70%);
  border-color: rgba(11, 79, 158, 0.25);
  color: var(--brand-dark);
}

.sidebar-footer {
  margin-top: auto;
  display: grid;
  gap: 12px;
  position: relative;
  z-index: 1;
}

.user-card {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: var(--radius-md);
  background: var(--surface-alt);
}

.user-card strong {
  display: block;
}

.user-card span {
  font-size: 0.82rem;
  color: var(--muted);
}

.user-avatar {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: var(--brand-dark);
  color: #fff;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.main {
  display: grid;
  gap: 24px;
  min-height: 0;
  height: 100%;
  overflow-y: auto;
  padding-right: 6px;
  min-width: 0;
}

.view {
  display: none;
  gap: 24px;
  min-width: 0;
  align-content: start;
}

.view.is-active {
  display: grid;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.title-block h1 {
  font-size: 2.2rem;
  max-width: 520px;
  line-height: 1.15;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.72rem;
  color: var(--brand);
  font-weight: 700;
  margin-bottom: 10px;
}

.subtitle {
  color: var(--muted);
  margin-top: 10px;
}

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

.search {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.72rem;
  color: var(--muted);
}

.search input {
  width: 240px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
}

.filter-select {
  width: 180px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
}

.chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.chip {
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 8px 12px;
  font-weight: 600;
  cursor: pointer;
}

.chip.active {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.btn {
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 10px 16px;
  font-weight: 600;
  cursor: pointer;
  background: var(--surface);
}

.btn.primary {
  background: var(--brand);
  color: #fff;
}

.btn.ghost {
  background: var(--surface-alt);
  border-color: var(--border);
}

.btn.small {
  padding: 6px 12px;
  border-radius: 999px;
}

.btn.full {
  width: 100%;
}

.link {
  border: none;
  background: none;
  color: var(--brand);
  font-weight: 600;
  cursor: pointer;
}

.btn[disabled],
.link[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

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

.kpi-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-2);
  display: grid;
  gap: 12px;
  opacity: 0;
  transform: translateY(12px);
  animation: rise 0.7s ease forwards;
  animation-delay: var(--delay, 0s);
}

.kpi-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.kpi-value {
  font-size: 1.8rem;
  font-weight: 700;
}

.kpi-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.85rem;
}

.kpi-card svg {
  width: 70px;
  height: 26px;
  stroke: var(--brand);
  stroke-width: 2;
  fill: none;
}

.label {
  color: var(--muted);
  font-size: 0.85rem;
}

.trend {
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.trend.up {
  background: rgba(20, 165, 141, 0.15);
  color: var(--accent);
}

.trend.down {
  background: rgba(217, 92, 92, 0.15);
  color: var(--danger);
}

.trend.neutral {
  background: rgba(11, 79, 158, 0.12);
  color: var(--brand);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 18px;
}

.panel {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-2);
  display: grid;
  gap: 16px;
  opacity: 0;
  transform: translateY(12px);
  animation: rise 0.7s ease forwards;
  animation-delay: var(--delay, 0s);
}

.panel h2 {
  font-size: 1.2rem;
}

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

.panel-head p {
  color: var(--muted);
  margin-top: 6px;
}

.banner-content {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 16px;
}

.banner-preview {
  display: grid;
  gap: 12px;
}

.banner-frame {
  border-radius: var(--radius-lg);
  padding: 18px;
  background: linear-gradient(135deg, #0b4f9e, #0bb3a3);
  color: #fff;
  display: grid;
  gap: 10px;
  min-height: 160px;
}

.banner-frame h3 {
  font-size: 1.3rem;
}

.banner-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.85rem;
}

.badge {
  background: rgba(255, 255, 255, 0.22);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  width: fit-content;
}

.banner-controls {
  display: grid;
  gap: 12px;
}

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

.tag-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--surface-alt);
  font-size: 0.75rem;
  border: 1px solid var(--border);
}

.progress {
  width: 100%;
  height: 8px;
  background: var(--surface-alt);
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--brand), var(--accent));
}

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

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.empty-row td {
  padding: 16px;
  text-align: center;
  color: var(--muted);
}

table th,
table td {
  text-align: left;
  padding: 10px 6px;
  border-bottom: 1px solid var(--border);
}

table th {
  color: var(--muted);
  font-weight: 600;
}

.table-select {
  width: 36px;
}

table th.table-select,
table td.table-select {
  text-align: center;
}

.table-select input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--brand);
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bulk-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.85rem;
}

.table-footer {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.pager {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.85rem;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.badge {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--ink);
}

.badge.good {
  background: rgba(28, 171, 103, 0.12);
  color: #146c43;
  border-color: rgba(28, 171, 103, 0.25);
}

.badge.warn {
  background: rgba(245, 179, 52, 0.12);
  color: #915a0b;
  border-color: rgba(245, 179, 52, 0.3);
}

.badge.bad {
  background: rgba(219, 69, 69, 0.12);
  color: #8d2f2f;
  border-color: rgba(219, 69, 69, 0.25);
}

.badge.neutral {
  background: rgba(91, 101, 117, 0.12);
  color: var(--muted);
  border-color: rgba(91, 101, 117, 0.2);
}

.status {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.status.live {
  background: rgba(20, 165, 141, 0.15);
  color: var(--accent);
}

.status.scheduled {
  background: rgba(242, 169, 59, 0.2);
  color: #b66a00;
}

.status.bad {
  background: rgba(217, 92, 92, 0.18);
  color: var(--danger);
}

.status.draft {
  background: rgba(91, 101, 117, 0.15);
  color: var(--muted);
}

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

.queue-list,
.activity-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

.queue-list li,
.activity-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.queue-list li:last-child,
.activity-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.queue-list strong,
.activity-list strong {
  display: block;
}

.queue-list span,
.activity-list span {
  color: var(--muted);
  font-size: 0.85rem;
}

.queue-list .queue-meta {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
}

.queue-empty {
  color: var(--muted);
  font-size: 0.9rem;
}

.activity-list .queue-empty {
  justify-content: flex-start;
}

.queue-list li {
  align-items: flex-start;
}

.queue-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(14, 20, 32, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 20;
}

.drawer-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: min(520px, 92vw);
  background: var(--surface);
  box-shadow: var(--shadow-2);
  transform: translateX(105%);
  transition: transform 0.25s ease;
  z-index: 21;
  display: flex;
  flex-direction: column;
}

.drawer.is-open {
  transform: translateX(0);
}

body.drawer-open {
  overflow: hidden;
}

.drawer-content {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.drawer-head {
  padding: 20px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--border);
}

.drawer-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.drawer-head p {
  color: var(--muted);
  margin-top: 6px;
}

.drawer-body {
  padding: 20px;
  overflow-y: auto;
  display: grid;
  gap: 16px;
}

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

.detail-grid strong {
  display: block;
  font-size: 0.95rem;
}

.detail-section {
  background: var(--surface-alt);
  border-radius: var(--radius-md);
  padding: 14px;
  border: 1px solid var(--border);
  display: grid;
  gap: 10px;
}

.detail-section h3 {
  font-size: 0.95rem;
}

.detail-section .form-actions {
  flex-wrap: wrap;
}

#kyc-artifacts-grid img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
}

#order-detail-status .status {
  display: inline-flex;
  align-items: center;
}

#order-action-status {
  margin-left: auto;
}

#order-shipping-form .form-actions {
  justify-content: flex-start;
}

.detail-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.detail-list .empty-row {
  color: var(--muted);
  font-size: 0.85rem;
}

.detail-list li {
  display: grid;
  gap: 4px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.detail-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.history-list .history-time {
  color: var(--muted);
  font-size: 0.8rem;
}

.detail-list.item-list li {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.item-list .item-title {
  font-weight: 600;
}

.item-list .item-meta {
  color: var(--muted);
  font-size: 0.8rem;
}

.item-list .item-amount {
  font-weight: 600;
  white-space: nowrap;
}

.item-list .item-summary {
  border-top: 1px dashed var(--border);
  padding-top: 8px;
}

.detail-list.timeline-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.timeline-label {
  font-weight: 600;
}

.timeline-list .timeline-time {
  color: var(--muted);
  font-size: 0.8rem;
  white-space: nowrap;
}

.drawer input,
.drawer select,
.drawer textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
}

.drawer textarea {
  resize: vertical;
}

.form-grid {
  display: grid;
  gap: 12px;
}

.form-grid label {
  display: grid;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--muted);
}

.panel .form-grid input,
.panel .form-grid select,
.panel .form-grid textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
}

.panel .form-grid textarea {
  resize: vertical;
}

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

.form-row .checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 24px;
  color: var(--muted);
  font-size: 0.85rem;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}

.inline-actions .muted {
  font-size: 0.8rem;
}

.form-status {
  color: var(--muted);
  font-size: 0.85rem;
}

.muted {
  color: var(--muted);
  font-size: 0.85rem;
}

.contact-link {
  color: var(--brand);
  text-decoration: none;
}

.contact-link:hover {
  text-decoration: underline;
}

.btn.danger {
  background: #f8e1e1;
  border-color: rgba(219, 69, 69, 0.25);
  color: #8d2f2f;
}

.btn.danger:hover {
  background: #f3c9c9;
  color: #7a2626;
}

.pill {
  background: var(--brand-dark);
  color: #fff;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.status-pill {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: capitalize;
  border: 1px solid rgba(225, 230, 239, 0.9);
  background: #fff;
  color: var(--ink);
}

.status-pill.active {
  background: rgba(28, 171, 103, 0.12);
  color: #146c43;
  border-color: rgba(28, 171, 103, 0.25);
}

.status-pill.suspended {
  background: rgba(245, 179, 52, 0.12);
  color: #915a0b;
  border-color: rgba(245, 179, 52, 0.3);
}

.status-pill.revoked {
  background: rgba(219, 69, 69, 0.12);
  color: #8d2f2f;
  border-color: rgba(219, 69, 69, 0.3);
}

.admin-actions {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(225, 230, 239, 0.6);
  display: grid;
  gap: 12px;
}

.admin-actions-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.admin-actions-head h3 {
  margin: 0;
  font-size: 0.95rem;
}

.admin-actions-head p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.85rem;
}

.admin-actions-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.role-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(225, 230, 239, 0.9);
  background: #fff;
  box-shadow: 0 8px 18px rgba(15, 24, 45, 0.06);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.role-row:last-child {
  margin-bottom: 0;
}

.role-row:hover {
  transform: translateY(-1px);
  border-color: rgba(11, 79, 158, 0.25);
  box-shadow: 0 12px 24px rgba(15, 24, 45, 0.1);
}

.roles-layout {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
  align-items: start;
  margin-top: 16px;
}

.roles-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
}

.roles-tabs {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border-radius: 999px;
  border: 1px solid rgba(225, 230, 239, 0.9);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 20px rgba(15, 24, 45, 0.08);
}

.roles-tab {
  border: none;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.roles-tab.active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 8px 16px rgba(15, 24, 45, 0.12);
  transform: translateY(-1px);
}

.report-tabs {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border-radius: 999px;
  border: 1px solid rgba(225, 230, 239, 0.9);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 20px rgba(15, 24, 45, 0.08);
  flex-wrap: wrap;
}

.report-tab {
  border: none;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.report-tab.active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 8px 16px rgba(15, 24, 45, 0.12);
  transform: translateY(-1px);
}

.report-panels {
  display: grid;
  gap: 16px;
}

.roles-column {
  display: grid;
  gap: 20px;
  align-content: start;
}

.roles-layout .panel {
  gap: 14px;
}

.roles-layout .panel-head {
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(225, 230, 239, 0.6);
}

 

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

.role-desc {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.3;
}

.role-meta {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--muted);
}

.field-label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.85rem;
  color: var(--muted);
}

.roles-layout input,
.roles-layout textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: inset 0 1px 2px rgba(10, 20, 35, 0.05);
}

.roles-layout textarea {
  resize: vertical;
}

.permissions-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
}

.permissions-grid.compact {
  grid-template-columns: 1fr;
}

.permission-group {
  background: rgba(247, 247, 251, 0.7);
  border: 1px solid rgba(225, 230, 239, 0.7);
  border-radius: var(--radius-md);
  padding: 12px;
  display: grid;
  gap: 6px;
}

.permission-group h3 {
  margin: 0;
  font-size: 0.85rem;
  color: var(--ink);
}

.permission-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--muted);
}

.permission-item input {
  width: 16px;
  height: 16px;
}

.role-checklist {
  display: grid;
  gap: 10px;
}

.role-checklist label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--muted);
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(225, 230, 239, 0.8);
  background: #fff;
}

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

.roles-layout table th,
.roles-layout table td {
  padding: 10px 8px;
  font-size: 0.85rem;
}

.credentials-box {
  margin-top: 12px;
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface-alt);
  display: grid;
  gap: 8px;
}

.credentials-title {
  font-weight: 600;
}

.credentials-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--muted);
}

.credentials-row code {
  padding: 4px 8px;
  border-radius: 8px;
  border: 1px dashed var(--border);
  background: #fff;
  color: var(--text);
}

@media (max-width: 1100px) {
  .roles-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .roles-toolbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .roles-tabs {
    width: 100%;
    flex-wrap: wrap;
  }

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

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

.ops-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-md);
  background: var(--surface-alt);
}

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

.dispute-metrics {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

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

.risk-metrics {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

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

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

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

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

.ops-metrics strong {
  display: block;
  font-size: 1.2rem;
  margin-top: 6px;
}

.activity-list li {
  align-items: flex-start;
}

.activity-list li > span {
  min-width: 52px;
}

input:focus-visible,
button:focus-visible {
  outline: 2px solid rgba(11, 79, 158, 0.4);
  outline-offset: 2px;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(18px);
  }
}

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

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

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

  .fulfillment-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .kyc-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .audit-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .access-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .marketing-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  body {
    overflow: auto;
  }

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

  .sidebar {
    height: auto;
    overflow: visible;
  }

  .main {
    height: auto;
    overflow: visible;
    padding-right: 0;
  }

  .topbar {
    flex-direction: column;
  }

  .banner-content {
    grid-template-columns: 1fr;
  }

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

  .role-row {
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .shell {
    padding: 18px;
  }

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

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

  .search input {
    width: 100%;
  }

  .top-actions {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
