@import url("https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Sora:wght@600;700;800&display=swap");

:root {
  /* Institutional Pipul palette from brand marks: yellow + black */
  --brand-yellow: #fce300;
  --brand-yellow-deep: #e6cf00;
  --brand-black: #0a0a0a;
  --ink: #1a1c1e;
  --ink-soft: #3d4450;
  --muted: #6b7280;
  --line: #e4e7ec;
  --line-strong: #cdd3dc;
  --surface: #ffffff;
  --surface-2: #f4f6f8;
  --surface-3: #eef1f4;
  --page: #eceff2;
  --orange: var(--brand-yellow);
  --orange-deep: var(--brand-yellow-deep);
  --orange-soft: #fff9cc;
  --green: #1b7f4c;
  --green-soft: #e8f6ef;
  --danger: #c62828;
  --danger-soft: #fdecec;
  --shadow: 0 10px 30px rgba(26, 28, 30, 0.08);
  --shadow-sm: 0 2px 8px rgba(26, 28, 30, 0.06);
  --topbar-bg: rgba(255, 255, 255, 0.94);
  --actionbar-bg: rgba(255, 255, 255, 0.96);
  --card-head-bg: linear-gradient(180deg, #fff, #fafbfc);
  --login-panel-bg: linear-gradient(180deg, #f7f8fa 0%, #eef1f4 100%);
  --input-bg: #ffffff;
  --chip-bg: rgba(255, 255, 255, 0.08);
  --radius: 14px;
  --radius-sm: 10px;
  --font: "DM Sans", sans-serif;
  --display: "Sora", sans-serif;
  --on-brand: #0a0a0a;
  --focus-ring: rgba(252, 227, 0, 0.45);
  color-scheme: light;
}

html[data-theme="dark"] {
  --ink: #e8eaed;
  --ink-soft: #c5cad3;
  --muted: #9aa3b2;
  --line: #2a303a;
  --line-strong: #3a4352;
  --surface: #1b2028;
  --surface-2: #14181f;
  --surface-3: #10141a;
  --page: #0a0c10;
  --orange: #fce300;
  --orange-deep: #ffe44d;
  --orange-soft: #2a2410;
  --green: #3dd68c;
  --green-soft: #12261c;
  --danger: #ff6b6b;
  --danger-soft: #2a1518;
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.35);
  --topbar-bg: rgba(12, 14, 18, 0.94);
  --actionbar-bg: rgba(12, 14, 18, 0.96);
  --card-head-bg: linear-gradient(180deg, #1e2430, #1b2028);
  --login-panel-bg: linear-gradient(180deg, #12161d 0%, #0a0c10 100%);
  --input-bg: #14191f;
  --chip-bg: rgba(255, 255, 255, 0.06);
  --on-brand: #0a0a0a;
  --focus-ring: rgba(252, 227, 0, 0.28);
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  color: var(--ink);
  background: var(--page);
  transition: background 0.2s ease, color 0.2s ease;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

img {
  max-width: 100%;
}

/* ========== LOGIN ========== */

.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
}

.login-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 18%, rgba(252, 227, 0, 0.28), transparent 42%),
    radial-gradient(circle at 85% 75%, rgba(252, 227, 0, 0.08), transparent 35%),
    linear-gradient(155deg, #000000 0%, #141414 52%, #0a0a0a 100%);
  color: #fff;
  padding: 48px 56px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.login-hero__glow {
  position: absolute;
  inset: auto -20% -30% auto;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(252, 227, 0, 0.22), transparent 68%);
  pointer-events: none;
}

.login-hero__mark-bg {
  position: absolute;
  right: -40px;
  bottom: -30px;
  width: min(420px, 55vw);
  opacity: 0.07;
  pointer-events: none;
  transform: rotate(-12deg);
}

.login-hero__mark-bg img {
  width: 100%;
  height: auto;
  filter: invert(1);
}

.login-hero__top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-logo {
  display: block;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
  background: #000;
}

.brand-logo--sm {
  width: 40px;
  height: 40px;
}

.brand-logo--md {
  width: 56px;
  height: 56px;
}

.brand-logo--lg {
  width: 72px;
  height: 72px;
  border: 2px solid rgba(252, 227, 0, 0.55);
}

.brand-lockup {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-badge {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 3px solid var(--brand-yellow);
  background: #111;
  color: var(--brand-yellow);
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 800;
  font-size: 24px;
}

.brand-word {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: 0.12em;
  font-size: 26px;
  color: #fff;
}

.brand-tag {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-yellow);
}

.login-hero__copy {
  position: relative;
  z-index: 1;
}

.login-hero__copy h1 {
  margin: 0 0 14px;
  font-family: var(--display);
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.1;
  max-width: 11ch;
}

.login-hero__copy p {
  margin: 0;
  max-width: 36ch;
  color: rgba(255, 255, 255, 0.72);
  font-size: 16px;
  line-height: 1.55;
}

.login-hero__meta {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(252, 227, 0, 0.22);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.88);
}

.chip img {
  width: 18px;
  height: 18px;
  border-radius: 50%;
}

.login-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 28px;
  background: var(--login-panel-bg);
  position: relative;
}

.theme-toggle {
  appearance: none;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink-soft);
  border-radius: 999px;
  height: 36px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.theme-toggle:hover {
  border-color: var(--orange);
  color: var(--ink);
}

.theme-toggle__icon {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--brand-yellow);
  box-shadow: inset -4px -2px 0 0 var(--surface);
}

html[data-theme="dark"] .theme-toggle__icon {
  box-shadow: none;
  background: radial-gradient(circle at 30% 30%, #fff9c4 0 35%, transparent 36%),
    radial-gradient(circle at 70% 40%, #ffe86a 0 12%, transparent 13%),
    var(--brand-yellow);
}

.login-panel .theme-toggle {
  position: absolute;
  top: 20px;
  right: 20px;
}

.login-card {
  width: min(420px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 32px 28px 28px;
}

.login-card h2 {
  margin: 0 0 6px;
  font-family: var(--display);
  font-size: 26px;
}

.login-card .subtitle {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 16px;
}

.field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
}

.field input,
.field select,
.control {
  height: 44px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: var(--input-bg);
  padding: 0 14px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.field input:focus,
.field select:focus,
.control:focus {
  border-color: var(--brand-yellow);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.role-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 18px;
  padding: 4px;
  background: var(--surface-2);
  border-radius: 12px;
}

.role-tabs label {
  position: relative;
  text-align: center;
  padding: 10px 8px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
}

.role-tabs input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.role-tabs input:checked + span {
  display: block;
  background: var(--input-bg);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  border-radius: 10px;
  padding: 10px 8px;
  border: 1px solid var(--line);
}

.role-tabs span {
  display: block;
  padding: 10px 8px;
}

.btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 11px;
  height: 46px;
  padding: 0 18px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.12s, background 0.15s, border-color 0.15s;
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: var(--brand-yellow);
  color: var(--on-brand);
  width: 100%;
}

.btn--primary:hover {
  background: var(--brand-yellow-deep);
}

.btn--ghost {
  background: var(--surface);
  border-color: var(--line-strong);
  color: var(--ink-soft);
}

.btn--ghost:hover {
  background: var(--surface-2);
}

.btn--danger {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: #f2c7c7;
}

.btn--danger:hover {
  background: #fadada;
}

.btn--solid-dark {
  background: var(--ink);
  color: #fff;
}

.login-card__brand {
  display: flex;
  justify-content: center;
  margin-bottom: 14px;
}

.login-card__brand .brand-logo {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.login-footnote {
  margin-top: 16px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}

.clock-inline {
  margin-top: 18px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}

/* ========== APP SHELL ========== */

.app {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.app--shell {
  grid-template-columns: 248px 1fr;
  grid-template-rows: auto 1fr auto;
}

.sidebar {
  grid-row: 1 / -1;
  grid-column: 1;
  background: #0b0d11;
  color: #d7dbe3;
  border-right: 1px solid rgba(252, 227, 0, 0.12);
  padding: 18px 12px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 100vh;
  position: sticky;
  top: 0;
}

html[data-theme="light"] .sidebar {
  background: #111318;
}

.sidebar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar__brand strong {
  display: block;
  font-family: var(--display);
  font-size: 14px;
  color: #fff;
}

.sidebar__brand span {
  display: block;
  font-size: 11px;
  color: var(--brand-yellow);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.nav-link,
.nav-group__label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  color: #c5cad3;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  border: 0;
  background: transparent;
  width: 100%;
  text-align: left;
}

.nav-link:hover,
.nav-group__label:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.nav-link.is-active {
  background: var(--brand-yellow);
  color: #0a0a0a;
}

.nav-group__label {
  justify-content: space-between;
  cursor: pointer;
}

.nav-group__label span:last-child {
  font-size: 10px;
  color: #8b93a3;
}

.nav-sub {
  display: none;
  flex-direction: column;
  gap: 2px;
  padding: 2px 0 8px 12px;
}

.nav-group.is-open .nav-sub {
  display: flex;
}

.nav-sub a {
  padding: 8px 12px;
  border-radius: 8px;
  color: #9aa3b2;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
}

.nav-sub a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.nav-sub a.is-active {
  color: #0a0a0a;
  background: var(--brand-yellow);
}

.sidebar__foot {
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.app--shell .topbar {
  grid-column: 2;
}

.app--shell .content {
  grid-column: 2;
}

.app--shell .actionbar {
  grid-column: 2;
}

.btn--tiny {
  height: 34px;
  padding: 0 12px;
  font-size: 12px;
  min-width: 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
}

.stat-card span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}

.stat-card strong {
  display: block;
  margin-top: 8px;
  font-family: var(--display);
  font-size: 26px;
}

.table-wrap {
  overflow: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table th,
.data-table td {
  padding: 12px 10px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.data-table th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.placeholder-note {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px dashed var(--line-strong);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 28px;
  background: var(--topbar-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.topbar__brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar__brand .brand-logo {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

html[data-theme="dark"] .topbar__brand .brand-logo {
  border-color: rgba(252, 227, 0, 0.35);
}

.topbar__titles {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.topbar__titles strong {
  font-family: var(--display);
  font-size: 15px;
}

.topbar__titles span {
  font-size: 12px;
  color: var(--muted);
}

.topbar__right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px 6px 6px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--brand-yellow);
  color: var(--on-brand);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 13px;
}

.user-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.user-meta strong {
  font-size: 13px;
}

.user-meta span {
  font-size: 11px;
  color: var(--muted);
  text-transform: capitalize;
}

.content {
  width: min(1180px, calc(100% - 40px));
  margin: 22px auto 40px;
}

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.page-header h1 {
  margin: 0 0 6px;
  font-family: var(--display);
  font-size: 28px;
}

.page-header p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.status-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink-soft);
}

.badge--ok {
  background: var(--green-soft);
  border-color: #b7e0c8;
  color: var(--green);
}

.badge--warn {
  background: var(--orange-soft);
  border-color: #efe28a;
  color: #6b5c00;
}

html[data-theme="dark"] .badge--warn {
  border-color: #5a5018;
  color: var(--brand-yellow);
}

.search-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 18px;
}

.search-card input {
  height: 46px;
  border-radius: 11px;
  border: 1px solid var(--line-strong);
  padding: 0 14px 0 42px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%236b7280' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E")
    14px center / 18px no-repeat,
    var(--surface-2);
}

.search-card input:focus {
  outline: none;
  border-color: var(--brand-yellow);
  box-shadow: 0 0 0 3px var(--focus-ring);
  background-color: var(--input-bg);
}

.layout {
  display: grid;
  grid-template-columns: 1.35fr 0.9fr;
  gap: 16px;
  align-items: start;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--card-head-bg);
}

.card__head h2 {
  margin: 0;
  font-size: 16px;
  font-family: var(--display);
}

.card__head span {
  font-size: 12px;
  color: var(--muted);
}

.card__body {
  padding: 18px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 14px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px 14px;
}

.span-2 {
  grid-column: span 2;
}

.field-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-block label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.field-block input,
.field-block select {
  height: 42px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: var(--input-bg);
  padding: 0 12px;
  color: var(--ink);
}

.field-block input:focus,
.field-block select:focus {
  outline: none;
  border-color: var(--brand-yellow);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px;
  background: var(--surface-2);
  border-radius: 10px;
}

.segmented label {
  cursor: pointer;
}

.segmented input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented span {
  display: block;
  text-align: center;
  padding: 9px 8px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.segmented input:checked + span {
  background: var(--input-bg);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
}

.upload-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.upload-tile {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 12px;
  border: 1px dashed var(--line-strong);
  background: var(--surface-2);
  transition: border-color 0.15s, background 0.15s;
}

.upload-tile.is-filled {
  border-style: solid;
  border-color: #b7e0c8;
  background: var(--green-soft);
}

.upload-thumb {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  background:
    linear-gradient(135deg, transparent 46%, var(--line-strong) 46%, var(--line-strong) 54%, transparent 54%),
    linear-gradient(45deg, transparent 46%, var(--line-strong) 46%, var(--line-strong) 54%, transparent 54%),
    var(--input-bg);
  border: 1px solid var(--line);
  overflow: hidden;
}

.upload-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.upload-copy strong {
  display: block;
  font-size: 14px;
  margin-bottom: 2px;
}

.upload-copy span {
  font-size: 12px;
  color: var(--muted);
}

.upload-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.upload-actions .btn {
  height: 34px;
  min-width: 84px;
  font-size: 12px;
  border-radius: 8px;
  padding: 0 10px;
}

.section-spacer {
  margin-top: 16px;
}

.features {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.feature-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
  cursor: pointer;
}

.feature-chip input {
  accent-color: var(--brand-yellow);
}

.actionbar {
  position: sticky;
  bottom: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 28px;
  background: var(--actionbar-bg);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.12);
}

html[data-theme="dark"] .btn--ghost {
  background: var(--surface-2);
}

html[data-theme="dark"] .btn--solid-dark {
  background: #2b3340;
  color: var(--ink);
}

html[data-theme="dark"] .search-card input {
  background-color: var(--input-bg);
  color: var(--ink);
}

html[data-theme="dark"] .login-hero {
  background:
    radial-gradient(circle at 18% 18%, rgba(252, 227, 0, 0.22), transparent 42%),
    radial-gradient(circle at 85% 75%, rgba(252, 227, 0, 0.06), transparent 35%),
    linear-gradient(155deg, #000000 0%, #121212 55%, #070707 100%);
}

.actionbar__left,
.actionbar__right {
  display: flex;
  gap: 10px;
  align-items: center;
}

.actionbar .btn {
  min-width: 120px;
}

.hint-banner {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--orange-soft);
  border: 1px solid #efe28a;
  color: #6b5c00;
  font-size: 12px;
  line-height: 1.45;
}

html[data-theme="dark"] .hint-banner {
  border-color: #5a5018;
  color: #ffe86a;
}

@media (max-width: 1100px) {
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 960px) {
  .app--shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    min-height: 0;
    grid-row: auto;
  }

  .app--shell .topbar,
  .app--shell .content,
  .app--shell .actionbar {
    grid-column: 1;
  }

  .login-page,
  .layout,
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .span-2 {
    grid-column: auto;
  }

  .login-hero {
    min-height: 280px;
    padding: 32px 24px;
  }

  .content {
    width: calc(100% - 24px);
  }

  .page-header,
  .topbar,
  .actionbar,
  .search-card {
    flex-direction: column;
    align-items: stretch;
  }

  .actionbar {
    padding: 12px 16px;
  }

  .actionbar__left,
  .actionbar__right {
    width: 100%;
  }

  .actionbar .btn {
    flex: 1;
  }
}

/* ========== PIPUL NOTICE BANNER ========== */

.pipul-notice-host {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  width: min(440px, calc(100% - 24px));
  pointer-events: none;
}

.pipul-notice {
  pointer-events: auto;
  display: grid;
  grid-template-columns: 5px 40px 1fr auto;
  gap: 0 12px;
  align-items: start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.22);
  overflow: hidden;
  position: relative;
  animation: pipul-notice-in 0.28s ease;
}

.pipul-notice__accent {
  grid-row: 1 / span 2;
  align-self: stretch;
  background: var(--brand-yellow);
}

.pipul-notice--success .pipul-notice__accent {
  background: var(--green);
}

.pipul-notice--error .pipul-notice__accent {
  background: var(--danger);
}

.pipul-notice__logo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  margin-top: 14px;
  object-fit: cover;
  background: #000;
}

.pipul-notice__body {
  padding: 14px 0 16px;
  min-width: 0;
}

.pipul-notice__title {
  margin: 0 0 3px;
  font-family: var(--display);
  font-size: 14px;
  font-weight: 700;
  color: #8a7a00;
}

.pipul-notice--success .pipul-notice__title {
  color: var(--green);
}

.pipul-notice--error .pipul-notice__title {
  color: var(--danger);
}

html[data-theme="dark"] .pipul-notice__title {
  color: var(--brand-yellow);
}

html[data-theme="dark"] .pipul-notice--success .pipul-notice__title {
  color: var(--green);
}

html[data-theme="dark"] .pipul-notice--error .pipul-notice__title {
  color: var(--danger);
}

.pipul-notice__message {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink);
  white-space: pre-wrap;
}

.pipul-notice__close {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  width: 36px;
  height: 36px;
  margin: 8px 6px 0 0;
  border-radius: 8px;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.pipul-notice__close:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.pipul-notice__progress {
  position: absolute;
  left: 5px;
  right: 0;
  bottom: 0;
  height: 3px;
  background: var(--brand-yellow);
  transform-origin: left center;
  animation: pipul-notice-progress linear forwards;
}

.pipul-notice--success .pipul-notice__progress {
  background: var(--green);
}

.pipul-notice--error .pipul-notice__progress {
  background: var(--danger);
}

.pipul-notice.is-leaving {
  animation: pipul-notice-out 0.22s ease forwards;
}

@keyframes pipul-notice-in {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pipul-notice-out {
  to {
    opacity: 0;
    transform: translateY(-10px);
  }
}

@keyframes pipul-notice-progress {
  from {
    transform: scaleX(1);
  }
  to {
    transform: scaleX(0);
  }
}
