:root {
  --brand: #f97316;
  --brand-strong: #ea580c;
  --brand-soft: #fff7ed;
  --brand-outline: rgba(249, 115, 22, 0.18);
  --ink: #0f172a;
  --ink-soft: #1e293b;
  --ink-muted: #475569;
  --surface: rgba(255, 255, 255, 0.88);
  --surface-strong: rgba(255, 255, 255, 0.96);
  --surface-soft: #f8fafc;
  --line: rgba(148, 163, 184, 0.24);
  --line-strong: rgba(148, 163, 184, 0.42);
  --shadow-lg: 0 24px 55px -35px rgba(15, 23, 42, 0.48), 0 18px 24px -22px rgba(15, 23, 42, 0.32);
  --shadow-md: 0 16px 35px -28px rgba(15, 23, 42, 0.35);
  --shadow-sm: 0 10px 20px -20px rgba(15, 23, 42, 0.35);
  --radius-xl: 28px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(249, 115, 22, 0.18), transparent 32%),
    radial-gradient(circle at 80% 10%, rgba(99, 102, 241, 0.12), transparent 28%),
    linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  color: var(--ink);
}

body::before,
body::after {
  content: "";
  position: fixed;
  z-index: 0;
  pointer-events: none;
  border-radius: 999px;
  filter: blur(80px);
}

body::before {
  inset: auto auto 6rem -4rem;
  width: 15rem;
  height: 15rem;
  background: rgba(249, 115, 22, 0.15);
}

body::after {
  inset: 7rem -4rem auto auto;
  width: 16rem;
  height: 16rem;
  background: rgba(99, 102, 241, 0.12);
}

::selection {
  background: rgba(249, 115, 22, 0.24);
  color: #7c2d12;
}

a {
  color: inherit;
  transition: color 0.2s ease, text-decoration-color 0.2s ease, opacity 0.2s ease;
  text-decoration-color: rgba(249, 115, 22, 0.28);
}

a:hover {
  color: var(--brand-strong);
  text-decoration-color: rgba(249, 115, 22, 0.72);
}

img {
  display: block;
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
}

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

code,
pre,
.font-mono {
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
}

.shell-wrap {
  position: relative;
  z-index: 1;
}

.app-sidebar {
  width: 20rem;
  flex-shrink: 0;
}

.sidebar-card,
.topbar-card,
.footer-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255, 255, 255, 0.75);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.82));
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-lg);
}

.sidebar-card::before,
.topbar-card::before,
.footer-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, rgba(249, 115, 22, 0.95), rgba(251, 146, 60, 0.9), rgba(99, 102, 241, 0.75));
}

.sidebar-card {
  position: sticky;
  top: 1rem;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 2rem);
  padding: 1.5rem;
}

.sidebar-card__body {
  min-height: 0;
  overflow-y: auto;
  padding-right: 0.35rem;
}

.sidebar-card__body::-webkit-scrollbar {
  width: 8px;
}

.sidebar-card__body::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.35);
  border-radius: 999px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 3.35rem;
  height: 3.35rem;
  border-radius: 1.15rem;
  color: #fff;
  background: linear-gradient(135deg, #f97316, #ea580c 55%, #fb923c);
  box-shadow: 0 16px 32px -18px rgba(249, 115, 22, 0.85);
  font-weight: 800;
  letter-spacing: -0.04em;
  font-size: 1.1rem;
}

.brand-kicker {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(71, 85, 105, 0.82);
}

.brand-name {
  display: block;
  margin-top: 0.2rem;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--ink);
}

.sidebar-search,
.toolbar-search {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-radius: 1.15rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(248, 250, 252, 0.92);
  padding: 0.78rem 0.95rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.sidebar-search {
  margin-top: 1.35rem;
}

.toolbar-search {
  min-width: min(32rem, 100%);
}

.sidebar-search i,
.toolbar-search i {
  color: rgba(249, 115, 22, 0.85);
}

.sidebar-search input,
.toolbar-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  padding: 0;
}

.sidebar-search input::placeholder,
.toolbar-search input::placeholder {
  color: rgba(71, 85, 105, 0.74);
}

.sidebar-search button,
.toolbar-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 0.85rem;
  border: 0;
  background: linear-gradient(135deg, #f97316, #ea580c);
  color: #fff;
  box-shadow: 0 12px 18px -12px rgba(249, 115, 22, 0.7);
}

.nav-stack {
  margin-top: 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.nav-group-label {
  margin: 1.2rem 0 0.55rem;
  padding: 0 0.2rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(71, 85, 105, 0.72);
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.9rem 0.95rem;
  border-radius: 1rem;
  border: 1px solid transparent;
  text-decoration: none;
  font-weight: 600;
  color: rgba(51, 65, 85, 0.95);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.nav-link i {
  width: 1.1rem;
  text-align: center;
  color: rgba(249, 115, 22, 0.88);
}

.nav-link:hover {
  transform: translateY(-1px);
  border-color: var(--brand-outline);
  background: rgba(249, 115, 22, 0.08);
  box-shadow: var(--shadow-sm);
  color: #9a3412;
}

.nav-link--active {
  background: linear-gradient(135deg, rgba(255, 247, 237, 1), rgba(255, 237, 213, 0.92));
  border-color: var(--brand-outline);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 14px 24px -22px rgba(249, 115, 22, 0.85);
  color: #9a3412;
}

.nav-link--active i {
  color: #c2410c;
}

.sidebar-account {
  margin-top: 1.2rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
}

.account-card {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.95rem 1rem;
  border-radius: 1.05rem;
  background: rgba(248, 250, 252, 0.86);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.account-avatar {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.2), rgba(234, 88, 12, 0.28));
  color: #9a3412;
  font-weight: 800;
}

.account-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(71, 85, 105, 0.72);
}

.account-name {
  margin-top: 0.15rem;
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--ink);
}

.account-actions {
  margin-top: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.app-action,
.app-action-secondary,
.app-inline-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  text-decoration: none;
  font-weight: 700;
  border-radius: 1rem;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.app-action {
  padding: 0.78rem 1rem;
  color: #fff;
  background: linear-gradient(135deg, #f97316, #ea580c);
  box-shadow: 0 16px 30px -22px rgba(249, 115, 22, 0.92);
}

.app-action:hover {
  transform: translateY(-1px);
  color: #fff;
  opacity: 0.98;
}

.app-action-secondary,
.app-inline-action {
  padding: 0.76rem 1rem;
  color: var(--ink-soft);
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow-sm);
}

.app-action-secondary:hover,
.app-inline-action:hover {
  transform: translateY(-1px);
  color: #9a3412;
  border-color: rgba(249, 115, 22, 0.22);
  background: rgba(255, 247, 237, 0.88);
}

.topbar-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.4rem;
  padding: 1.2rem 1.45rem;
}

.topbar-meta {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.mobile-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink-soft);
  box-shadow: var(--shadow-sm);
}

.mobile-toggle:hover {
  color: #9a3412;
  border-color: rgba(249, 115, 22, 0.2);
}

.page-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(71, 85, 105, 0.74);
}

.page-title {
  margin-top: 0.28rem;
  font-size: clamp(1.12rem, 1.2vw + 0.92rem, 1.42rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.05;
  color: var(--ink);
}

.page-description {
  max-width: 46rem;
  margin-top: 0.3rem;
  font-size: 0.94rem;
  line-height: 1.55;
  color: rgba(71, 85, 105, 0.9);
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(248, 250, 252, 0.85);
  box-shadow: var(--shadow-sm);
}

.user-chip strong {
  font-weight: 700;
}

.app-main {
  position: relative;
}

.app-main > * + * {
  margin-top: 0;
}

.flash-stack {
  max-width: 74rem;
  margin-inline: auto;
  margin-bottom: 1.25rem;
}

.flash-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(148, 163, 184, 0.18);
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow-sm);
}

.flash-banner--success {
  color: #166534;
  background: linear-gradient(180deg, rgba(240, 253, 244, 0.98), rgba(220, 252, 231, 0.95));
  border-color: rgba(34, 197, 94, 0.18);
}

.flash-banner--error {
  color: #991b1b;
  background: linear-gradient(180deg, rgba(254, 242, 242, 0.98), rgba(254, 226, 226, 0.95));
  border-color: rgba(239, 68, 68, 0.18);
}

.flash-banner--info {
  color: #1d4ed8;
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.98), rgba(219, 234, 254, 0.95));
  border-color: rgba(59, 130, 246, 0.18);
}

.footer-card {
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
}

.footer-card__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  color: rgba(71, 85, 105, 0.9);
}

.footer-card strong {
  color: var(--ink);
}

.mobile-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.mobile-backdrop.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.ui-page {
  max-width: 88rem;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.ui-page--wide {
  max-width: 100%;
}

.ui-page--narrow {
  max-width: 72rem;
}

.ui-page--compact {
  max-width: 52rem;
}

.ui-card,
.ui-hero,
.ui-empty,
.ui-panel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(226, 232, 240, 0.92);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.95));
  box-shadow: var(--shadow-md);
}

.ui-card,
.ui-panel {
  padding: 1.5rem;
}

.ui-card::before,
.ui-hero::before,
.ui-panel::before,
.ui-empty::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-from, #f97316), var(--accent-to, #fb923c));
}

.ui-card--primary,
.ui-hero {
  --accent-from: #f97316;
  --accent-to: #fb923c;
}

.ui-card--indigo {
  --accent-from: #6366f1;
  --accent-to: #818cf8;
}

.ui-card--emerald {
  --accent-from: #10b981;
  --accent-to: #34d399;
}

.ui-card--sky {
  --accent-from: #0ea5e9;
  --accent-to: #38bdf8;
}

.ui-card--rose {
  --accent-from: #f43f5e;
  --accent-to: #fb7185;
}

.ui-card--amber {
  --accent-from: #f59e0b;
  --accent-to: #fbbf24;
}

.ui-card--violet {
  --accent-from: #8b5cf6;
  --accent-to: #a78bfa;
}

.ui-hero {
  padding: 1.65rem;
  background:
    radial-gradient(circle at top right, rgba(249, 115, 22, 0.12), transparent 24%),
    radial-gradient(circle at 0% 100%, rgba(99, 102, 241, 0.07), transparent 26%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(255, 255, 255, 0.96));
}

.ui-kicker,
.ui-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.69rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(71, 85, 105, 0.72);
}

.ui-hero-title,
main h1 {
  font-size: clamp(2rem, 3vw + 1.1rem, 3.05rem);
  line-height: 1.02;
  letter-spacing: -0.055em;
  font-weight: 800;
  color: var(--ink);
}

.ui-card h1,
.ui-panel h1,
.ui-card h2,
.ui-panel h2,
main .bg-white.rounded-xl.shadow-md h1,
main .bg-white.rounded-xl.shadow-md h2,
main .bg-white.rounded-2xl.shadow-md h1,
main .bg-white.rounded-2xl.shadow-md h2,
main .bg-white.shadow.border-l-4 h1,
main .bg-white.shadow.border-l-4 h2,
main h2 {
  color: var(--ink);
  letter-spacing: -0.04em;
}

.ui-card h1,
.ui-panel h1,
main .bg-white.rounded-xl.shadow-md h1,
main .bg-white.rounded-2xl.shadow-md h1,
main .bg-white.shadow.border-l-4 h1 {
  font-size: clamp(1.55rem, 1.6vw + 1rem, 2.15rem);
  line-height: 1.08;
  font-weight: 800;
}

.ui-card h2,
.ui-panel h2,
main .bg-white.rounded-xl.shadow-md h2,
main .bg-white.rounded-2xl.shadow-md h2,
main .bg-white.shadow.border-l-4 h2,
main h2 {
  font-size: clamp(1.08rem, 0.7vw + 0.95rem, 1.45rem);
  line-height: 1.18;
  font-weight: 750;
}

.ui-hero-copy,
.ui-lead,
main p,
main li {
  line-height: 1.7;
  color: rgba(71, 85, 105, 0.92);
}

.ui-hero-copy,
.ui-lead {
  max-width: 50rem;
  font-size: 1rem;
}

.ui-card strong,
.ui-panel strong,
main strong,
main b {
  color: var(--ink);
}

.ui-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.15rem;
}

.ui-section-head + * {
  margin-top: 0;
}

.ui-pill,
.ui-badge,
.ui-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(248, 250, 252, 0.92);
  color: rgba(51, 65, 85, 0.94);
  padding: 0.45rem 0.72rem;
  font-size: 0.8rem;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

.ui-pill--primary,
.ui-badge--primary {
  background: rgba(255, 247, 237, 0.96);
  border-color: rgba(249, 115, 22, 0.18);
  color: #9a3412;
}

.ui-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 0.9rem;
}

.ui-metric,
.ui-stat {
  border-radius: 1.15rem;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(248, 250, 252, 0.86);
  padding: 1rem 1rem 0.95rem;
  box-shadow: var(--shadow-sm);
}

.ui-metric-label,
.ui-stat-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(71, 85, 105, 0.7);
}

.ui-metric-value,
.ui-stat-value {
  margin-top: 0.28rem;
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--ink);
  word-break: break-word;
}

.ui-facts-grid,
.ui-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 0.9rem;
}

.ui-fact {
  padding: 1rem 1rem 0.95rem;
  border-radius: 1.1rem;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(248, 250, 252, 0.82);
  box-shadow: var(--shadow-sm);
}

.ui-fact dt {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(71, 85, 105, 0.72);
}

.ui-fact dd {
  margin-top: 0.35rem;
  color: var(--ink);
  font-weight: 650;
  line-height: 1.5;
}

.ui-link,
.text-primary,
main a[class*="underline"] {
  color: var(--brand-strong);
  font-weight: 650;
}

.ui-link:hover,
.text-primary:hover,
main a[class*="underline"]:hover {
  color: #9a3412;
}

.ui-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 1rem;
}

.ui-form-grid--3 {
  grid-template-columns: 1.5fr 0.7fr 0.9fr;
}

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

.ui-input,
.ui-select,
.ui-textarea,
.form-control,
.form-select,
main input[type="text"],
main input[type="email"],
main input[type="password"],
main textarea,
main select {
  width: 100%;
  border-radius: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(248, 250, 252, 0.9);
  color: var(--ink);
  padding: 0.85rem 1rem;
  outline: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.ui-textarea,
main textarea {
  min-height: 7rem;
  resize: vertical;
}

.ui-input::placeholder,
.ui-textarea::placeholder,
main input::placeholder,
main textarea::placeholder {
  color: rgba(71, 85, 105, 0.74);
}

.ui-input:focus,
.ui-select:focus,
.ui-textarea:focus,
.form-control:focus,
.form-select:focus,
main input[type="text"]:focus,
main input[type="email"]:focus,
main input[type="password"]:focus,
main textarea:focus,
main select:focus {
  border-color: rgba(249, 115, 22, 0.42);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.ui-button,
.ui-btn,
.btn,
main input[type="submit"],
main button[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  border: 0;
  border-radius: 1rem;
  background: linear-gradient(135deg, #f97316, #ea580c);
  color: #fff;
  font-weight: 700;
  padding: 0.85rem 1.05rem;
  box-shadow: 0 18px 28px -18px rgba(249, 115, 22, 0.95);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.ui-button:hover,
.ui-btn:hover,
.btn:hover,
main input[type="submit"]:hover,
main button[type="submit"]:hover {
  transform: translateY(-1px);
  filter: saturate(1.02);
  color: #fff;
}

.ui-button--secondary,
.btn-white {
  background: rgba(255, 255, 255, 0.95);
  color: var(--ink-soft);
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: var(--shadow-sm);
}

.ui-button--secondary:hover,
.btn-white:hover {
  color: #9a3412;
}

.ui-empty,
.alert {
  padding: 1rem 1.1rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(250, 204, 21, 0.22);
  background: linear-gradient(180deg, rgba(254, 249, 195, 0.55), rgba(255, 251, 235, 0.95));
  color: #854d0e;
  box-shadow: var(--shadow-sm);
}

.ui-empty--muted {
  border-color: rgba(148, 163, 184, 0.18);
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.96), rgba(241, 245, 249, 0.94));
  color: rgba(71, 85, 105, 0.94);
}

.ui-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.ui-divider {
  height: 1px;
  background: linear-gradient(90deg, rgba(148, 163, 184, 0), rgba(148, 163, 184, 0.36), rgba(148, 163, 184, 0));
}

.ui-table-wrap,
main .overflow-x-auto {
  overflow-x: auto;
  border-radius: 1.25rem;
}

.ui-table,
main table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(226, 232, 240, 0.98);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

main table th,
main table td,
.ui-table th,
.ui-table td {
  vertical-align: top;
}

main table thead th,
.ui-table thead th {
  background: rgba(248, 250, 252, 0.98);
  color: rgba(71, 85, 105, 0.96);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.95rem 1rem;
  border-bottom: 1px solid rgba(226, 232, 240, 0.96);
}

main table tbody td,
.ui-table tbody td {
  padding: 0.95rem 1rem;
  border-bottom: 1px solid rgba(241, 245, 249, 0.98);
  color: var(--ink);
  line-height: 1.55;
}

main table tbody tr:nth-child(even) td,
.ui-table tbody tr:nth-child(even) td {
  background: rgba(252, 253, 255, 0.96);
}

main table tbody tr:hover td,
.ui-table tbody tr:hover td {
  background: rgba(255, 247, 237, 0.96);
}

main table tbody tr:last-child td,
.ui-table tbody tr:last-child td {
  border-bottom: 0;
}

main table td p + p,
.ui-table td p + p {
  margin-top: 0.45rem;
}

main pre,
.ui-code {
  margin: 0;
  overflow: auto;
  border-radius: 1.1rem;
  border: 1px solid rgba(15, 23, 42, 0.88);
  background: linear-gradient(180deg, #111827, #0f172a);
  color: #e2e8f0;
  padding: 1rem 1.1rem;
  line-height: 1.65;
  box-shadow: var(--shadow-md);
}

main code:not(pre code),
.ui-inline-code {
  border-radius: 0.55rem;
  background: rgba(241, 245, 249, 0.95);
  color: var(--ink);
  padding: 0.15rem 0.4rem;
  font-size: 0.88em;
}

.flag-icon {
  display: inline-block;
  width: 1rem;
  height: 0.75rem;
  margin-left: 0.4rem;
  vertical-align: -0.05em;
  background-size: cover;
  background-position: center;
  border-radius: 0.24rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
}

main > .bg-white.rounded-xl.shadow-md.border-l-4,
main > .bg-white.rounded-2xl.shadow-md.border,
main > .bg-white.shadow.border-l-4.rounded-md,
main .bg-white.rounded-xl.shadow-md.border-l-4,
main .bg-white.rounded-2xl.shadow-md.border,
main .bg-white.shadow.border-l-4.rounded-md {
  position: relative;
  overflow: hidden;
  border-left-width: 0 !important;
  border-radius: var(--radius-lg) !important;
  border: 1px solid rgba(226, 232, 240, 0.96) !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.95)) !important;
  box-shadow: var(--shadow-md) !important;
}

main > .bg-white.rounded-xl.shadow-md.border-l-4::before,
main > .bg-white.rounded-2xl.shadow-md.border::before,
main > .bg-white.shadow.border-l-4.rounded-md::before,
main .bg-white.rounded-xl.shadow-md.border-l-4::before,
main .bg-white.rounded-2xl.shadow-md.border::before,
main .bg-white.shadow.border-l-4.rounded-md::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-from, #f97316), var(--accent-to, #fb923c));
}

main .border-primary {
  --accent-from: #f97316;
  --accent-to: #fb923c;
}

main .border-indigo-500 {
  --accent-from: #6366f1;
  --accent-to: #818cf8;
}

main .border-green-500 {
  --accent-from: #10b981;
  --accent-to: #34d399;
}

main .border-blue-500 {
  --accent-from: #0ea5e9;
  --accent-to: #38bdf8;
}

main .border-yellow-500 {
  --accent-from: #f59e0b;
  --accent-to: #fbbf24;
}

main .border-red-500 {
  --accent-from: #ef4444;
  --accent-to: #fb7185;
}

main .border-purple-500 {
  --accent-from: #8b5cf6;
  --accent-to: #a78bfa;
}

main .rounded-lg.border.border-gray-300.bg-gray-50.shadow-sm,
main .rounded-lg.border.border-gray-200.bg-gray-50,
main .rounded-xl.border.border-gray-200.bg-gray-50 {
  border-radius: 1.15rem !important;
  border-color: rgba(226, 232, 240, 0.92) !important;
  background: rgba(248, 250, 252, 0.9) !important;
  box-shadow: var(--shadow-sm) !important;
}

main .grid.grid-cols-1.md\:grid-cols-2.gap-6.text-sm.text-gray-800 > div {
  padding: 1rem 1rem 0.95rem;
  border-radius: 1.05rem;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(248, 250, 252, 0.82);
  box-shadow: var(--shadow-sm);
}

main .grid.grid-cols-1.md\:grid-cols-2.gap-6.text-sm.text-gray-800 > div p:first-child {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(71, 85, 105, 0.72);
}

main .grid.grid-cols-1.md\:grid-cols-2.gap-6.text-sm.text-gray-800 > div p:last-child {
  margin-top: 0.35rem;
  color: var(--ink);
  font-weight: 650;
}

@media (max-width: 1279px) {
  .toolbar-search {
    min-width: 100%;
  }
}

@media (max-width: 1023px) {
  .app-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 50;
    width: min(24rem, calc(100vw - 1rem));
    padding: 0.5rem 0 0.5rem 0.5rem;
    transform: translateX(-115%);
    transition: transform 0.22s ease;
  }

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

  .sidebar-card {
    height: calc(100vh - 1rem);
  }

  .topbar-card {
    padding: 1rem 1.05rem;
  }

  .topbar-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 767px) {
  body::before,
  body::after {
    display: none;
  }

  .ui-card,
  .ui-panel,
  .ui-hero,
  .ui-empty,
  main > .bg-white.rounded-xl.shadow-md.border-l-4,
  main > .bg-white.rounded-2xl.shadow-md.border,
  main > .bg-white.shadow.border-l-4.rounded-md,
  main .bg-white.rounded-xl.shadow-md.border-l-4,
  main .bg-white.rounded-2xl.shadow-md.border,
  main .bg-white.shadow.border-l-4.rounded-md {
    padding: 1.1rem;
    border-radius: 1.15rem !important;
  }

  .ui-page {
    gap: 1.25rem;
  }

  .ui-hero-title,
  main h1 {
    font-size: 1.85rem;
  }

  .ui-section-head {
    flex-direction: column;
  }

  .ui-form-grid--3,
  .ui-form-grid--2 {
    grid-template-columns: 1fr;
  }

  main table thead th,
  .ui-table thead th,
  main table tbody td,
  .ui-table tbody td {
    padding: 0.8rem 0.75rem;
  }
}
