/* ROLL2CASH Admin panel — static offline build
   Design tokens mirrored from the original app. */

:root {
  --radius: 0.75rem;
  --background: oklch(98.3% 0.006 265);
  --foreground: oklch(26% 0.09 268);
  --card: oklch(100% 0 0);
  --primary: oklch(34% 0.14 267);
  --primary-foreground: oklch(99% 0.005 265);
  --primary-glow: oklch(50% 0.19 275);
  --secondary: oklch(95% 0.02 268);
  --secondary-foreground: oklch(32% 0.12 267);
  --muted: oklch(95.5% 0.012 268);
  --muted-foreground: oklch(52% 0.05 268);
  --accent: oklch(60% 0.24 340);
  --border: oklch(90% 0.02 268);
  --sidebar-foreground: oklch(95% 0.01 265);
  --sidebar-accent: oklch(31% 0.12 270);
  --sidebar-border: oklch(100% 0 0 / 0.12);
  --gradient-brand: linear-gradient(135deg, var(--primary), var(--accent));
  --gradient-spectrum: linear-gradient(
    90deg,
    oklch(45% 0.2 300),
    oklch(60% 0.24 340),
    oklch(65% 0.2 40),
    oklch(78% 0.16 95),
    oklch(68% 0.16 150),
    oklch(55% 0.17 240)
  );
  --gradient-sidebar: linear-gradient(180deg, oklch(26% 0.11 268), oklch(19% 0.08 270));
  --shadow-panel: 0 12px 32px -18px oklch(26% 0.09 268 / 0.35);
  --sidebar-width: 18rem;
}

* {
  box-sizing: border-box;
  border-color: var(--border);
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  background-color: var(--background);
  color: var(--foreground);
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial,
    sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

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

.icon {
  width: 1.125rem;
  height: 1.125rem;
  flex: 0 0 auto;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Layout ---------- */

.layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  position: relative;
  width: var(--sidebar-width);
  flex: 0 0 var(--sidebar-width);
  background: var(--gradient-sidebar);
  color: var(--sidebar-foreground);
  padding: 0 0 2rem;
}

.sidebar::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: var(--gradient-spectrum);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 1.25rem 1.25rem 1.5rem;
}

.brand__logo {
    width: 5rem;
    /* height: 3rem; */
    /* border-radius: 999px; */
    /* object-fit: cover; */
    background: #fff;
    padding: 2px;
    border-radius: 3px;
}

.brand__name {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand__sub {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.62);
  margin-top: 2px;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  padding: 0 0.875rem;
}

.nav__link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.875rem;
  border-radius: var(--radius);
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.82);
  transition:
    background-color 0.18s ease,
    color 0.18s ease;
}

.nav__link:hover {
  background-color: rgba(255, 255, 255, 0.07);
  color: #fff;
}

.nav__link.is-active {
  background-color: var(--sidebar-accent);
  color: #fff;
  font-weight: 600;
}

.main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  background-color: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 1.125rem 2rem;
}

.topbar__title {
  font-size: 1.125rem;
  font-weight: 700;
}

.topbar__meta {
  margin-top: 0.25rem;
  font-size: 0.8125rem;
  color: var(--muted-foreground);
}

.content {
  padding: 2rem;
}

/* ---------- Stat cards ---------- */

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

.stat {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow-panel);
  padding: 1.5rem;
}

.stat__icon {
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius);
  background: var(--gradient-brand);
  color: #fff;
  display: grid;
  place-items: center;
}

.stat__icon .icon {
  width: 1.375rem;
  height: 1.375rem;
}

.stat__label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}

.stat__value {
  margin-top: 0.375rem;
  font-size: 1.5rem;
  font-weight: 700;
}

/* ---------- Panels ---------- */

.panel {
  margin-top: 1.75rem;
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow-panel);
  padding: 1.5rem;
}

.panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.panel__title {
  font-size: 1.0625rem;
  font-weight: 700;
}

.search {
  position: relative;
  width: 20rem;
  max-width: 100%;
}

.search .icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1rem;
  height: 1rem;
  color: var(--muted-foreground);
}

.search input {
  width: 100%;
  padding: 0.625rem 0.875rem 0.625rem 2.375rem;
  font: inherit;
  font-size: 0.875rem;
  color: var(--foreground);
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  outline: none;
}

.search input::placeholder {
  color: var(--muted-foreground);
}

.search input:focus {
  border-color: var(--primary-glow);
  box-shadow: 0 0 0 3px oklch(50% 0.19 275 / 0.16);
}

/* ---------- Table ---------- */

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

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

thead th {
  text-align: left;
  font-weight: 500;
  color: var(--muted-foreground);
  padding: 0 0.75rem 0.875rem;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

tbody td {
  padding: 0.875rem 0.75rem;
  border-bottom: 1px solid var(--border);
}

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

tbody tr:hover {
  background-color: oklch(96.5% 0.01 268 / 0.7);
}

.cell--name {
  font-weight: 600;
}

.cell--muted {
  color: var(--muted-foreground);
}

.num {
  text-align: right;
  white-space: nowrap;
}

.empty {
  padding: 2rem 0.75rem;
  text-align: center;
  color: var(--muted-foreground);
}

.code {
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
  background-color: var(--secondary);
  color: var(--secondary-foreground);
  padding: 0.25rem 0.5rem;
  border-radius: 0.5rem;
  white-space: nowrap;
}

/* ---------- Tabs ---------- */

.tabs {
  display: inline-flex;
  gap: 0.25rem;
  background-color: var(--muted);
  padding: 0.3125rem;
  border-radius: var(--radius);
}

.tab {
  padding: 0.5rem 1rem;
  border-radius: calc(var(--radius) - 3px);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted-foreground);
  transition:
    background-color 0.18s ease,
    color 0.18s ease;
}

.tab:hover {
  color: var(--foreground);
}

.tab.is-active {
  background-color: var(--card);
  color: var(--foreground);
  font-weight: 600;
  box-shadow: 0 1px 3px oklch(26% 0.09 268 / 0.14);
}

.panel--tabbed {
  max-width: 58rem;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6875rem 1.125rem;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  background-color: var(--primary);
  color: var(--primary-foreground);
  transition:
    filter 0.18s ease,
    transform 0.18s ease;
}

.btn:hover {
  filter: brightness(1.12);
}

.btn:active {
  transform: translateY(1px);
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 0.5rem;
  background: transparent;
  color: var(--foreground);
  cursor: pointer;
  transition: background-color 0.18s ease;
}

.icon-btn:hover {
  background-color: var(--muted);
}

/* ---------- About ---------- */

.content__actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1.5rem;
}

.sections {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  max-width: 60rem;
}

.section-card {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow-panel);
  padding: 1.5rem;
}

.section-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.section-card__title {
  font-size: 1.0625rem;
  font-weight: 700;
}

.section-card__actions {
  display: flex;
  gap: 0.25rem;
}

.section-card__body {
  margin-top: 1.5rem;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--muted-foreground);
}

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
  .stats {
    grid-template-columns: 1fr;
  }
  .sections {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .layout {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    flex: 0 0 auto;
    padding-bottom: 1.25rem;
  }
  .nav {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .content,
  .topbar {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }
  .search {
    width: 100%;
  }
}

/* ---------- Auth pages ---------- */

.auth-body {
  background: var(--gradient-sidebar);
}

.auth {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2.5rem 1.25rem;
}

.auth-card {
  position: relative;
  width: 100%;
  max-width: 26rem;
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 8px);
  box-shadow: 0 30px 60px -30px oklch(19% 0.08 270 / 0.75);
  padding: 2rem;
  overflow: hidden;
}

.auth-card--wide {
  max-width: 34rem;
}

.auth-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: var(--gradient-spectrum);
}

.auth-card__brand {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  margin-bottom: 1.75rem;
}

.auth-card__name {
  color: var(--foreground);
}

.auth-card__sub {
  font-size: 0.8125rem;
  color: var(--muted-foreground);
  margin-top: 2px;
}

.auth-card__title {
  font-size: 1.375rem;
  font-weight: 700;
}

.auth-card__lead {
  margin-top: 0.375rem;
  font-size: 0.9375rem;
  color: var(--muted-foreground);
}

.auth-card__foot {
  margin-top: 1.5rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
  text-align: center;
}

.link {
  color: var(--primary-glow);
  font-weight: 600;
}

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

/* ---------- Forms ---------- */

.form {
  margin-top: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.125rem;
}

.form--tight {
  margin-top: 1.25rem;
}

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

.form__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.875rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4375rem;
}

.field__label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}

.input {
  width: 100%;
  padding: 0.6875rem 0.875rem;
  font: inherit;
  font-size: 0.9375rem;
  color: var(--foreground);
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  outline: none;
  resize: vertical;
}

.input::placeholder {
  color: var(--muted-foreground);
}

.input:focus {
  border-color: var(--primary-glow);
  box-shadow: 0 0 0 3px oklch(50% 0.19 275 / 0.16);
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
  cursor: pointer;
}

.check input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--primary-glow);
}

.btn--block {
  width: 100%;
  justify-content: center;
  background: var(--gradient-brand);
}

.btn--ghost {
  background: transparent;
  color: var(--foreground);
  border: 1px solid var(--border);
}

.btn--ghost:hover {
  background-color: var(--muted);
  filter: none;
}

/* ---------- Topbar user menu ---------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.usermenu {
  position: relative;
  flex: 0 0 auto;
}

.usermenu__trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.375rem 0.75rem 0.375rem 0.375rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background-color: var(--card);
  color: var(--foreground);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.18s ease;
}

.usermenu__trigger:hover {
  background-color: var(--muted);
}

.usermenu__name {
  white-space: nowrap;
}

.usermenu__panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
  min-width: 12rem;
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 18px 36px -20px oklch(26% 0.09 268 / 0.5);
  padding: 0.375rem;
  z-index: 20;
}

.usermenu__panel[hidden] {
  display: none;
}

.usermenu__item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5625rem 0.6875rem;
  border-radius: calc(var(--radius) - 4px);
  font-size: 0.875rem;
  font-weight: 500;
}

.usermenu__item:hover {
  background-color: var(--muted);
}

.usermenu__item--danger {
  color: oklch(55% 0.2 25);
}

.avatar {
  display: inline-grid;
  place-items: center;
  width: 4rem;
  height: 4rem;
  border-radius: 999px;
  background: var(--gradient-brand);
  color: #fff;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.avatar--sm {
  width: 2rem;
  height: 2rem;
  font-size: 0.75rem;
}

/* ---------- Profile ---------- */

.profile {
  display: grid;
  grid-template-columns: minmax(0, 20rem) minmax(0, 1fr);
  gap: 1.5rem;
  max-width: 62rem;
  align-items: start;
}

.profile__head {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.profile__role {
  margin-top: 0.25rem;
  font-size: 0.8125rem;
  color: var(--muted-foreground);
}

.profile__list {
  margin: 1.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.profile__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.875rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.profile__row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.profile__row dt {
  color: var(--muted-foreground);
}

.profile__row dd {
  margin: 0;
  font-weight: 600;
}

.field__error {
    color: #dc2626;
    font-size: 13px;
    margin-top: 6px;
}


.input--error {
    border-color: #dc2626;
}


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

@media (max-width: 640px) {
  .usermenu__name {
    display: none;
  }
}




