:root {
  --canvas: #0C0B0A;
  --surface: #141312;
  --elevated: #1C1A18;
  --elevated-hover: #262320;
  --border: #2A2724;
  --border-strong: #3F3B36;
  --text: #F5F2EB;
  --muted: #9B9590;
  --accent: #DA7756;
  --accent-hover: #E49B7E;
  --accent-soft: rgba(218, 119, 86, 0.12);
  --accent-border: rgba(218, 119, 86, 0.28);
  --good: #5CE19A;
  --good-bg: rgba(92, 225, 154, 0.1);
  --good-border: rgba(92, 225, 154, 0.28);
  --bad: #F87171;
  --bad-bg: rgba(248, 113, 113, 0.1);
  --bad-border: rgba(248, 113, 113, 0.28);
  --warn: #FBBF24;
  --warn-bg: rgba(251, 191, 36, 0.1);
  --warn-border: rgba(251, 191, 36, 0.28);
  --sky: #38BDF8;
  --sky-bg: rgba(56, 189, 248, 0.1);
  --sky-border: rgba(56, 189, 248, 0.28);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --font: "Geist", "Manrope", system-ui, sans-serif;
  --serif: "Source Serif 4", Georgia, serif;
  --mono: "Geist Mono", "IBM Plex Mono", monospace;
}

html, body {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
*::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

.ui-surface {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.ui-surface-pad {
  padding: 1.5rem;
}

.ui-empty {
  padding: 3rem 1.5rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.925rem;
  font-weight: 500;
  background-color: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

html {
  height: 100%;
  background: var(--canvas);
  color: var(--text);
  scroll-behavior: smooth;
  font-family: var(--font);
}

body {
  min-height: 100%;
  margin: 0;
  font-family: var(--font);
  background: var(--canvas);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: var(--accent);
  color: #0C0B0A;
}

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

.ui-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--canvas);
  color: var(--text);
  font-family: var(--font);
}

.ui-shell {
  min-height: 100vh;
  display: flex;
  background: var(--canvas);
  color: var(--text);
  font-family: var(--font);
}

.ui-sidebar {
  width: 268px;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface) 0%, var(--canvas) 100%);
  box-shadow: 1px 0 0 rgba(0, 0, 0, 0.15);
  display: none;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 30;
}

@media (min-width: 1024px) {
  .ui-sidebar {
    display: flex;
  }
}

.ui-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.35rem 1.25rem 1.2rem;
  border-bottom: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.15);
}

.ui-sidebar-section {
  padding: 1.1rem 1.1rem 0.35rem;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  opacity: 0.7;
}

.ui-sidebar-section:first-child {
  padding-top: 1.15rem;
}

.ui-mark {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 12px;
  background: linear-gradient(135deg, #DA7756 0%, #C45D3F 100%);
  color: #FFFFFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(218, 119, 86, 0.25);
}

.ui-mark-logo {
  background: transparent;
  box-shadow: none;
  padding: 2px;
}

.ui-mark-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.ui-sidebar-nav {
  padding: 0.6rem 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
}

.ui-sidebar-foot {
  padding: 0.85rem;
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.ui-nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  border: 1px solid transparent;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.ui-nav-link svg {
  width: 1.05rem;
  height: 1.05rem;
  flex-shrink: 0;
  opacity: 0.75;
  transition: opacity 0.18s ease;
}

.ui-nav-link span:first-of-type {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ui-nav-link:hover {
  color: var(--text);
  background: var(--elevated);
}

.ui-nav-link:hover svg {
  opacity: 1;
}

.ui-nav-link.is-active {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: var(--accent-border);
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--accent);
}

.ui-nav-link.is-active svg {
  opacity: 1;
}

.ui-nav-badge {
  margin-left: auto;
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 0.4rem;
  border-radius: 999px;
  background: var(--accent);
  color: #0C0B0A;
  font-size: 0.68rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ui-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

.ui-tabs.justify-center {
  justify-content: center;
}

.ui-tab {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.ui-tab:hover {
  color: var(--text);
  background: var(--elevated);
  border-color: var(--border-strong);
}

.ui-tab.is-active {
  color: var(--text);
  background: var(--accent-soft);
  border-color: var(--accent-border);
}

.ui-main-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.ui-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--border);
  background: var(--canvas);
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
}

@media (min-width: 1024px) {
  .ui-topbar-app {
    display: none;
  }
}

.ui-public-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background: var(--canvas);
}

.ui-public-nav-inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 4.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

@media (min-width: 640px) {
  .ui-public-nav-inner {
    padding: 0 2rem;
  }
}

.ui-public-links {
  display: none;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: nowrap;
}

@media (min-width: 1024px) {
  .ui-public-links {
    display: flex;
  }
}

@media (min-width: 1024px) and (max-width: 1180px) {
  .ui-public-links .ui-nav-link {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
}

.ui-public-actions {
  display: none;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

@media (min-width: 1024px) {
  .ui-public-actions {
    display: flex;
  }
}

.ui-brand-name {
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}

.ui-burger {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-sm);
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  cursor: pointer;
  flex-shrink: 0;
  z-index: 80;
}

.ui-burger:hover {
  background: var(--elevated);
  color: var(--text);
  border-color: var(--border-strong);
}

.ui-burger span {
  display: block;
  width: 1.15rem;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
}

.ui-burger.is-open span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.ui-burger.is-open span:nth-child(2) {
  opacity: 0;
}

.ui-burger.is-open span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

@media (min-width: 1024px) {
  .ui-burger-public {
    display: none;
  }
}

@media (min-width: 1024px) {
  .ui-burger-app {
    display: none;
  }
}

.ui-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.68);
  z-index: 65;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

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

.ui-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(85vw, 320px);
  background: var(--surface);
  border-right: 1px solid var(--border);
  box-shadow: 8px 0 32px rgba(0, 0, 0, 0.35);
  z-index: 70;
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
}

.ui-drawer.ui-drawer-right {
  left: auto;
  right: 0;
  border-right: none;
  border-left: 1px solid var(--border);
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.35);
  transform: translateX(100%);
}

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

.ui-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1.1rem 1.1rem;
  border-bottom: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.15);
}

.ui-drawer-body {
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
}

.ui-drawer-foot {
  padding: 0.75rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.ui-drawer .ui-nav-link {
  font-size: 0.92rem;
  padding: 0.75rem 0.85rem;
}

body.ui-drawer-lock {
  overflow: hidden;
}

@media (min-width: 1024px) {
  .ui-drawer-app,
  .ui-drawer-backdrop-app {
    display: none !important;
  }
}

@media (min-width: 1024px) {
  .ui-drawer-public,
  .ui-drawer-backdrop-public {
    display: none !important;
  }
}

.ui-content {
  flex: 1;
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

@media (min-width: 640px) {
  .ui-content {
    padding: 2.5rem 2rem 4.5rem;
  }
}

.ui-content-wide {
  max-width: 76rem;
}

.ui-footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 3rem 1.5rem;
  color: var(--muted);
  font-size: 0.875rem;
}

.ui-footer-inner {
  max-width: 72rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.ui-footer a:hover {
  color: var(--text);
}

.ui-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.35rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #0C0B0A;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 8px rgba(218, 119, 86, 0.2);
}

.ui-btn:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(218, 119, 86, 0.3);
}

.ui-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.ui-btn-ghost {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
  box-shadow: none;
}

.ui-btn-ghost:hover {
  background: var(--elevated);
  border-color: var(--border-strong);
  color: var(--text);
  box-shadow: none;
}

.ui-btn-danger {
  background: var(--bad-bg);
  border-color: var(--bad-border);
  color: var(--bad);
  box-shadow: none;
}

.ui-btn-danger:hover {
  background: rgba(248, 113, 113, 0.2);
  border-color: var(--bad);
  color: #FFFFFF;
}

.ui-btn-sm {
  padding: 0.45rem 0.95rem;
  font-size: 0.8rem;
}

.ui-btn-block {
  width: 100%;
}

.ui-input,
.ui-select,
.ui-textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 400;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ui-input:focus,
.ui-select:focus,
.ui-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(218, 119, 86, 0.15);
}

.ui-textarea {
  min-height: 7.5rem;
  resize: vertical;
}

.ui-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.ui-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.ui-card:hover {
  border-color: var(--border-strong);
}

.ui-card-bento {
  background: linear-gradient(180deg, var(--surface) 0%, var(--canvas) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

.ui-card-bento:hover {
  border-color: var(--accent-border);
}

.ui-surface {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.ui-surface-pad {
  padding: 1.5rem;
}

.ui-divider {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 0;
}

.ui-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.ui-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.875rem;
}

.ui-table thead {
  background: var(--elevated);
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

.ui-table th,
.ui-table td {
  padding: 0.95rem 1.15rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

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

.ui-table tbody tr:hover {
  background: var(--elevated);
}

.ui-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
}

.ui-badge-good {
  background: var(--good-bg);
  border-color: var(--good-border);
  color: var(--good);
}

.ui-badge-bad {
  background: var(--bad-bg);
  border-color: var(--bad-border);
  color: var(--bad);
}

.ui-badge-warn {
  background: var(--warn-bg);
  border-color: var(--warn-border);
  color: var(--warn);
}

.ui-badge-accent {
  background: var(--accent-soft);
  border-color: var(--accent-border);
  color: var(--accent);
}

.ui-badge-sky {
  background: var(--sky-bg);
  border-color: var(--sky-border);
  color: var(--sky);
}

.ui-flash {
  margin-bottom: 1.5rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  font-size: 0.875rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.ui-flash-ok {
  background: var(--good-bg);
  border-color: var(--good-border);
  color: var(--good);
}

.ui-flash-err {
  background: var(--bad-bg);
  border-color: var(--bad-border);
  color: var(--bad);
}

.ui-mono {
  font-family: var(--mono);
}

.ui-code-block {
  background: #070706;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  font-family: var(--mono);
  font-size: 0.825rem;
  line-height: 1.6;
  overflow-x: auto;
  color: #E6E1D7;
  white-space: pre;
}

.ui-title {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  color: var(--text);
  margin: 0;
  line-height: 1.1;
}

.ui-title i,
.ui-title em {
  font-style: italic;
  color: var(--accent);
  font-weight: 400;
}

.ui-lead {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.6;
}

.ui-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--accent-border);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.ui-grid-stats {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 1024px) {
  .ui-grid-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.ui-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.4rem;
}

.ui-stat-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.ui-stat-value {
  margin-top: 0.45rem;
  font-family: var(--mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
}

.ui-link {
  color: var(--accent);
  font-weight: 600;
  transition: color 0.15s ease;
}

.ui-link:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--good);
  box-shadow: 0 0 10px var(--good);
  display: inline-block;
}

input, select, textarea {
  color-scheme: dark;
}

table, .ui-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.875rem;
  text-align: left;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.table-card-wrap,
.ui-table-wrap,
.ui-table-container {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.table-card-wrap table,
.ui-table-wrap table,
.ui-table-container table {
  border: none;
  border-radius: 0;
}

table thead th,
.ui-table thead th {
  background-color: var(--elevated);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

table tbody tr,
.ui-table tbody tr {
  transition: background-color 0.15s ease;
}

table tbody tr:hover,
.ui-table tbody tr:hover {
  background-color: var(--elevated-hover);
}

table tbody td,
.ui-table tbody td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}

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

/* Toasts */
#ui-toast-region {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: min(380px, calc(100vw - 2rem));
  pointer-events: none;
}

.ui-toast {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.9rem 2.5rem 0.9rem 1rem;
  background: var(--elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transform: translateX(1.5rem) scale(0.97);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: auto;
}

.ui-toast.is-visible {
  opacity: 1;
  transform: translateX(0) scale(1);
}

.ui-toast.is-leaving {
  opacity: 0;
  transform: translateX(1rem) scale(0.97);
}

.ui-toast-icon {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.ui-toast-body {
  flex: 1;
  min-width: 0;
}

.ui-toast-title {
  font-size: 0.825rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.15rem;
}

.ui-toast-message {
  font-size: 0.825rem;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.4;
  word-break: break-word;
}

.ui-toast-close {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  width: 1.5rem;
  height: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.ui-toast-close:hover {
  background: var(--elevated-hover);
  color: var(--text);
}

.ui-toast-close svg {
  width: 0.85rem;
  height: 0.85rem;
}

.ui-toast-bar {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 100%;
  background: currentColor;
  opacity: 0.35;
  transform-origin: left;
  animation: ui-toast-shrink linear forwards;
}

@keyframes ui-toast-shrink {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

.ui-toast-success { color: var(--good); border-color: var(--good-border); }
.ui-toast-success .ui-toast-icon { color: var(--good); }

.ui-toast-error { color: var(--bad); border-color: var(--bad-border); }
.ui-toast-error .ui-toast-icon { color: var(--bad); }

.ui-toast-warning { color: var(--warn); border-color: var(--warn-border); }
.ui-toast-warning .ui-toast-icon { color: var(--warn); }

.ui-toast-info { color: var(--sky); border-color: var(--sky-border); }
.ui-toast-info .ui-toast-icon { color: var(--sky); }

/* Themed confirm dialog */
.ui-confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(6, 5, 5, 0.78);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.ui-confirm-overlay.is-visible {
  opacity: 1;
}

.ui-confirm-dialog {
  width: 100%;
  max-width: 380px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  transform: translateY(0.75rem) scale(0.97);
  transition: transform 0.2s ease;
}

.ui-confirm-overlay.is-visible .ui-confirm-dialog {
  transform: translateY(0) scale(1);
}

.ui-confirm-icon {
  width: 2.75rem;
  height: 2.75rem;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--sky-bg);
  border: 1px solid var(--sky-border);
  color: var(--sky);
}

.ui-confirm-icon svg {
  width: 1.35rem;
  height: 1.35rem;
}

.ui-confirm-dialog.is-danger .ui-confirm-icon {
  background: var(--bad-bg);
  border-color: var(--bad-border);
  color: var(--bad);
}

.ui-confirm-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.4rem;
}

.ui-confirm-message {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

.ui-confirm-actions {
  display: flex;
  gap: 0.75rem;
}

.ui-confirm-btn {
  flex: 1;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.ui-confirm-cancel {
  background: var(--elevated);
  border: 1px solid var(--border);
  color: var(--text);
}

.ui-confirm-cancel:hover {
  background: var(--elevated-hover);
}

.ui-confirm-ok {
  background: var(--accent);
  border: 1px solid var(--accent);
  color: #0C0B0A;
}

.ui-confirm-ok:hover {
  background: var(--accent-hover);
}

.ui-confirm-dialog.is-danger .ui-confirm-ok {
  background: var(--bad);
  border-color: var(--bad);
  color: #0C0B0A;
}

.ui-confirm-dialog.is-danger .ui-confirm-ok:hover {
  opacity: 0.88;
}

@media (max-width: 480px) {
  #ui-toast-region {
    left: 1rem;
    right: 1rem;
    top: 1rem;
    width: auto;
  }
}
