/* PIFAA Admin - Static styles */
:root {
  --background: oklch(0.99 0.005 240);
  --foreground: oklch(0.22 0.04 250);
  --card: #ffffff;
  --muted-foreground: oklch(0.52 0.03 250);
  --border: oklch(0.92 0.015 250);
  --primary: oklch(0.58 0.16 250);
  --primary-foreground: #fff;
  --primary-soft: oklch(0.95 0.03 250);
  --chart-2: oklch(0.7 0.14 200);
  --teal: oklch(0.72 0.12 195);
  --teal-soft: oklch(0.95 0.04 195);
  --mint: oklch(0.78 0.13 160);
  --mint-soft: oklch(0.95 0.04 160);
  --lilac: oklch(0.7 0.13 300);
  --lilac-soft: oklch(0.95 0.035 300);
  --coral: oklch(0.72 0.16 30);
  --coral-soft: oklch(0.95 0.04 30);
  --amber-soft: oklch(0.96 0.05 80);
  --warning-foreground: oklch(0.2 0.05 80);
  --success: oklch(0.7 0.15 160);
  --destructive: oklch(0.62 0.22 25);
  --muted: oklch(0.965 0.01 250);
  --secondary: oklch(0.96 0.015 250);
  --shadow-soft: 0 1px 2px rgba(50,60,120,0.04), 0 2px 8px rgba(50,60,120,0.04);
  --shadow-card: 0 1px 2px rgba(50,60,120,0.05), 0 8px 24px -8px rgba(50,60,120,0.18);
  --radius: 0.75rem;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; overflow-x: hidden; max-width: 100vw; }
body {
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
  background: var(--background);
  color: var(--foreground);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11", "ss01";
}
h1, h2, h3, h4 {
  font-family: "Plus Jakarta Sans", "Inter", sans-serif;
  letter-spacing: -0.02em;
  margin: 0;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input { font-family: inherit; }

/* ===== Layout ===== */
.app { min-height: 100vh; display: flex; overflow-x: hidden; max-width: 100vw; }
.sidebar {
  width: 256px; background: #fff;
  border-right: 1px solid var(--border);
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 40;
  display: flex; flex-direction: column;
  transition: transform .25s ease;
}
.sidebar.closed { transform: translateX(-100%); }
@media (min-width: 1024px) { .sidebar { transform: translateX(0) !important; } }

.sidebar-header {
  height: 64px; padding: 0 20px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--border);
}
.sidebar-header img { height: 32px; }
.close-btn { color: var(--muted-foreground); display: none; }
@media (max-width: 1023px) { .close-btn { display: block; } }

.sidebar-nav { padding: 16px 12px; flex: 1; overflow-y: auto; display: flex; flex-direction: column; }
.nav-section {
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted-foreground); padding: 8px 12px;
}
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 12px; border-radius: 8px;
  font-size: 14px; font-weight: 500; color: #364152;
  transition: all .2s ease; margin-bottom: 2px;
}
.nav-item:hover { background: oklch(0.96 0.02 250); transform: translateX(2px); }
.nav-item.active {
  background: linear-gradient(90deg, var(--primary), var(--chart-2));
  color: #fff;
  box-shadow: 0 4px 12px -2px oklch(0.58 0.16 250 / 0.35);
}
.nav-icon {
  width: 28px; height: 28px; border-radius: 6px;
  display: grid; place-items: center; flex-shrink: 0;
  transition: transform .2s;
}
.nav-item:hover .nav-icon { transform: scale(1.05); }
.nav-item.active .nav-icon { background: rgba(255,255,255,0.2); color: #fff; }

.tint-primary { background: var(--primary-soft); color: var(--primary); }
.tint-teal { background: var(--teal-soft); color: var(--teal); }
.tint-coral { background: var(--coral-soft); color: var(--coral); }
.tint-mint { background: var(--mint-soft); color: var(--mint); }
.tint-lilac { background: var(--lilac-soft); color: var(--lilac); }
.tint-amber { background: var(--amber-soft); color: var(--warning-foreground); }

.help-card {
  margin: 12px; padding: 16px; border-radius: 12px;
  background: linear-gradient(135deg, var(--primary-soft), oklch(0.94 0.04 230));
  border: 1px solid var(--border);
}
.help-card p { margin: 0; font-size: 12px; color: var(--muted-foreground); }
.help-card p:first-child { font-weight: 600; color: oklch(0.32 0.08 250); margin-bottom: 4px; }

/* ===== Main ===== */
.main { flex: 1; margin-left: 0; min-width: 0; padding-top: 64px; }
@media (min-width: 1024px) { .main { margin-left: 256px; } }

.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30;
  height: 64px; display: flex; align-items: center; gap: 12px;
  padding: 0 16px; background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px); border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(50,60,120,0.06);
}
@media (min-width: 1024px) { .topbar { padding: 0 32px; left: 256px; } }
.menu-btn { display: block; }
@media (min-width: 1024px) { .menu-btn { display: none; } }

.search {
  position: relative; flex: 1; max-width: 28rem; display: none;
}
@media (min-width: 768px) { .search { display: block; } }
.search input {
  width: 100%; height: 36px; padding: 0 12px 0 36px;
  background: oklch(0.96 0.015 250 / 0.6); border: 1px solid transparent;
  border-radius: 8px; font-size: 14px; outline: none;
}
.search input:focus { background: #fff; border-color: var(--primary); }
.search-icon {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--muted-foreground);
}

.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn {
  position: relative; width: 36px; height: 36px; border-radius: 8px;
  display: grid; place-items: center; color: #364152;
  transition: background .2s;
}
.icon-btn:hover { background: var(--secondary); }
.dot {
  position: absolute; right: 8px; top: 8px; width: 8px; height: 8px;
  background: var(--destructive); border-radius: 50%;
  box-shadow: 0 0 0 2px #fff;
}

.profile {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 8px 4px 4px; border-radius: 999px;
  transition: background .2s;
}
.profile:hover { background: var(--secondary); }
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--primary); color: #fff;
  font-size: 12px; font-weight: 600;
  display: grid; place-items: center;
}
.profile-info { display: none; text-align: left; }
@media (min-width: 640px) { .profile-info { display: block; } }
.profile-info p { margin: 0; line-height: 1.1; }
.profile-info .name { font-size: 12px; font-weight: 600; }
.profile-info .role { font-size: 10px; color: var(--muted-foreground); }

main.content { padding: 16px; }
@media (min-width: 1024px) { main.content { padding: 32px; } }

/* ===== Page Header ===== */
.page-header {
  margin-bottom: 24px; display: flex; flex-direction: column; gap: 12px;
}
@media (min-width: 640px) {
  .page-header { flex-direction: row; align-items: flex-end; justify-content: space-between; }
}
.page-header h1 { font-size: 30px; font-weight: 700; }
.page-header p { color: var(--muted-foreground); font-size: 14px; margin: 4px 0 0; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 36px; padding: 0 16px; border-radius: 6px;
  font-size: 14px; font-weight: 500;
  transition: all .2s; white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(90deg, var(--primary), var(--chart-2));
  color: #fff;
  box-shadow: 0 4px 10px -2px oklch(0.58 0.16 250 / 0.2);
}
.btn-primary:hover { box-shadow: 0 8px 16px -4px oklch(0.58 0.16 250 / 0.3); }
.btn-outline {
  border: 1px solid var(--border); background: #fff; color: var(--foreground);
}
.btn-outline:hover { background: oklch(0.94 0.04 230); }
.btn-ghost { background: transparent; color: var(--primary); }
.btn-ghost:hover { background: var(--secondary); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 12px; }
.btn-lg { height: 44px; padding: 0 32px; }
.btn-block { width: 100%; }

/* ===== Cards ===== */
.card {
  background: #fff; border: 1px solid var(--border);
  border-radius: 12px; box-shadow: var(--shadow-soft);
  transition: all .3s;
}
.card:hover { box-shadow: var(--shadow-card); transform: translateY(-2px); }
.card-header { padding: 24px 24px 8px; display: flex; flex-direction: column; gap: 4px; }
.card-header.row { flex-direction: row; align-items: center; justify-content: space-between; }
.card-header.row > a, .card-header.row > .actions, .card-header.row > button { align-self: center; flex-shrink: 0; }
.card-header .btn { width: auto; align-self: center; }
.card-title { font-size: 16px; font-weight: 600; }
.card-sub { font-size: 12px; color: var(--muted-foreground); }
.card-body { padding: 24px; }
.card-body.tight { padding: 20px; }
.card-body.flush { padding: 0; }

/* Stats */
.stats { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 640px) { .stats { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1280px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat-label {
  font-size: 11px; font-weight: 500; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--muted-foreground);
}
.stat-value { font-size: 30px; font-weight: 700; margin: 8px 0 0; letter-spacing: -0.02em; }
.stat-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  transition: transform .3s;
}
.stat:hover .stat-icon { transform: scale(1.1) rotate(3deg); }
.stat-row { display: flex; align-items: flex-start; justify-content: space-between; }
.stat-delta { margin-top: 12px; font-size: 12px; display: flex; align-items: center; gap: 4px; }
.delta-pos { color: var(--success); font-weight: 600; display: inline-flex; align-items: center; gap: 2px; }
.delta-neg { color: var(--destructive); font-weight: 600; display: inline-flex; align-items: center; gap: 2px; }

/* Grid */
.grid-2-1 { display: grid; grid-template-columns: 1fr; gap: 16px; margin-top: 24px; }
@media (min-width: 1024px) { .grid-2-1 { grid-template-columns: 2fr 1fr; } }

/* Chart placeholders */
.chart-wrap { height: 280px; padding: 8px 0; }

/* Tables */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
table { width: 100%; border-collapse: collapse; font-size: 14px; }
thead { background: oklch(0.965 0.01 250 / 0.4); }
th {
  text-align: left; font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--muted-foreground);
  font-weight: 500; padding: 12px 24px;
}
td { padding: 12px 24px; border-top: 1px solid var(--border); }
tbody tr { transition: background .2s; }
tbody tr:hover { background: oklch(0.95 0.03 250 / 0.4); }
.member-name { font-weight: 500; }
.member-email { font-size: 12px; color: var(--muted-foreground); }

/* Badges */
.badge {
  display: inline-flex; align-items: center;
  padding: 2px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 500;
  text-transform: capitalize; border: 1px solid;
}
.badge-active, .badge-approved, .badge-published {
  background: oklch(0.7 0.15 160 / 0.15);
  color: var(--success);
  border-color: oklch(0.7 0.15 160 / 0.2);
}
.badge-pending {
  background: oklch(0.78 0.16 75 / 0.15);
  color: var(--warning-foreground);
  border-color: oklch(0.78 0.16 75 / 0.3);
}
.badge-expired, .badge-rejected {
  background: oklch(0.62 0.22 25 / 0.1);
  color: var(--destructive);
  border-color: oklch(0.62 0.22 25 / 0.2);
}

/* Events list */
.event { }
.event + .event { margin-top: 16px; }
.event-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.event-name { font-size: 14px; font-weight: 600; }
.event-meta { font-size: 12px; color: var(--muted-foreground); }
.event-pct {
  background: var(--primary-soft); color: var(--primary);
  padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 500;
  flex-shrink: 0;
}
.progress { margin-top: 8px; height: 6px; background: var(--muted); border-radius: 999px; overflow: hidden; }
.progress-bar { height: 100%; background: var(--primary); border-radius: 999px; }

/* Overlay */
.overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.3);
  backdrop-filter: blur(4px); z-index: 35; display: none;
}
.overlay.show { display: block; }
@media (min-width: 1024px) { .overlay { display: none !important; } }

/* ===== LOGIN ===== */
.login {
  min-height: 100vh; display: flex; background: var(--background);
}
.login-left {
  position: relative; width: 50%; padding: 48px;
  display: none; flex-direction: column; justify-content: space-between;
  color: #fff; overflow: hidden;
  background: linear-gradient(135deg, var(--primary), var(--chart-2), var(--lilac));
}
@media (min-width: 1024px) { .login-left { display: flex; } }
.orb { position: absolute; border-radius: 50%; filter: blur(64px); pointer-events: none; }
.orb-1 { top: -160px; right: -160px; width: 448px; height: 448px; background: rgba(255,255,255,0.1); }
.orb-2 { bottom: -192px; left: -128px; width: 512px; height: 512px; background: oklch(0.58 0.16 250 / 0.25); }
.orb-3 { top: 50%; left: 50%; transform: translate(-50%, -50%); width: 640px; height: 640px; background: oklch(0.72 0.12 195 / 0.2); }
.shape {
  position: absolute; pointer-events: none;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.1); backdrop-filter: blur(4px);
}
.shape-1 { top: 12%; right: 10%; width: 96px; height: 96px; border-radius: 16px; transform: rotate(12deg); }
.shape-2 { top: 35%; left: 8%; width: 64px; height: 64px; border-radius: 50%; background: transparent; border-width: 2px; }
.shape-3 { bottom: 18%; right: 15%; width: 128px; height: 128px; border-radius: 32px; transform: rotate(-6deg); background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent); }
.dot-w { position: absolute; border-radius: 50%; background: rgba(255,255,255,0.4); }
.grid-bg {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 48px 48px;
}

.brand { position: relative; display: flex; align-items: center; gap: 12px; }
.brand-logo {
  width: 44px; height: 44px; border-radius: 12px;
  background: rgba(255,255,255,0.15); backdrop-filter: blur(8px);
  display: grid; place-items: center;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.3);
}
.brand-logo img { width: 28px; height: 28px; object-fit: contain; }
.brand-name { font-family: "Plus Jakarta Sans", sans-serif; font-weight: 700; font-size: 18px; }
.brand-sub { font-size: 11px; opacity: 0.8; margin-top: 4px; }

.hero { position: relative; max-width: 28rem; }
.hero h1 { font-size: 36px; font-weight: 700; line-height: 1.2; }
.hero p { color: rgba(255,255,255,0.85); font-size: 16px; line-height: 1.6; margin-top: 24px; }
.features { margin-top: 24px; display: grid; gap: 12px; }
.feature { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.feature-icon {
  width: 32px; height: 32px; border-radius: 8px;
  background: rgba(255,255,255,0.15);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.2);
  display: grid; place-items: center;
}
.copyright { position: relative; font-size: 12px; color: rgba(255,255,255,0.7); }

.login-right {
  flex: 1; position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background: linear-gradient(135deg, #f0f9ff, #e0f7fa, #f3e8ff);
}
@media (min-width: 640px) { .login-right { padding: 40px; } }

.r-shape { position: absolute; pointer-events: none; }
.r-1 { top: -32px; left: -32px; width: 160px; height: 160px; border-radius: 32px; background: linear-gradient(135deg, rgba(186,230,253,0.6), rgba(165,243,252,0.4)); filter: blur(2px); transform: rotate(12deg); }
.r-2 { top: 33%; left: 8%; width: 64px; height: 64px; border-radius: 50%; border: 4px solid rgba(254,205,211,0.4); }
.r-3 { bottom: -48px; left: 48px; width: 144px; height: 144px; border-radius: 50%; background: linear-gradient(45deg, rgba(254,205,211,0.5), rgba(254,215,170,0.3)); filter: blur(2px); }
.r-4 { top: 64px; right: 10%; width: 80px; height: 80px; border-radius: 50%; border: 4px solid rgba(186,230,253,0.4); }
.r-5 { top: 50%; right: -40px; width: 176px; height: 176px; border-radius: 40px; background: linear-gradient(225deg, rgba(153,246,228,0.5), rgba(167,243,208,0.3)); filter: blur(2px); transform: rotate(-12deg); }
.r-6 { bottom: 48px; right: 20%; width: 48px; height: 48px; border-radius: 50%; border: 4px solid rgba(153,246,228,0.4); }
.r-orb-1 { top: 25%; left: 50%; transform: translateX(-50%); width: 256px; height: 256px; border-radius: 50%; background: rgba(224,242,254,0.4); filter: blur(48px); }
.r-orb-2 { bottom: 25%; right: 25%; width: 192px; height: 192px; border-radius: 50%; background: rgba(243,232,255,0.3); filter: blur(48px); }
.dot-sm { position: absolute; width: 12px; height: 12px; border-radius: 50%; }
.dot-blue { background: rgba(125,211,252,0.6); top: 55%; left: 5%; }
.dot-purple { background: rgba(216,180,254,0.6); bottom: 20%; right: 8%; }

.form-card {
  position: relative; width: 100%; max-width: 28rem;
  background: rgba(255,255,255,0.8); backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.5); border-radius: 16px;
  box-shadow: 0 8px 32px -12px rgba(14,165,233,0.2);
  padding: 32px;
}
@media (min-width: 640px) { .form-card { padding: 40px; } }
.form-card h2 { font-size: 28px; font-weight: 700; }
.form-card .lead { font-size: 14px; color: var(--muted-foreground); margin-top: 8px; }
.form { margin-top: 32px; display: flex; flex-direction: column; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field-label { font-size: 14px; font-weight: 500; }
.field-row { display: flex; align-items: center; justify-content: space-between; }
.input-wrap { position: relative; }
.input-wrap .lead-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted-foreground); }
.input-wrap .trail-btn { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--muted-foreground); }
.input {
  width: 100%; height: 44px; padding: 0 12px 0 36px;
  background: rgba(255,255,255,0.7); border: 1px solid rgba(255,255,255,0.6);
  border-radius: 6px; font-size: 14px; outline: none;
}
.input.has-trail { padding-right: 40px; }
.input:focus { background: #fff; border-color: var(--primary); }
.link { color: var(--primary); font-size: 12px; font-weight: 500; }
.link:hover { text-decoration: underline; }
.remember { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted-foreground); }
.remember input { width: 16px; height: 16px; accent-color: var(--primary); }
.form-foot { margin-top: 32px; text-align: center; font-size: 14px; color: var(--muted-foreground); }

.mobile-brand {
  display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 32px;
}
@media (min-width: 1024px) { .mobile-brand { display: none; } }
.mobile-brand .logo-pill {
  width: 40px; height: 40px; border-radius: 12px;
  background: var(--primary-soft); display: grid; place-items: center;
}
.mobile-brand .logo-pill img { width: 24px; height: 24px; }

/* ===== Tabs ===== */
.tabs-list {
  display: inline-flex; gap: 4px; padding: 4px;
  background: var(--muted); border-radius: 8px; margin-bottom: 16px;
  flex-wrap: wrap;
}
.tab-trigger {
  padding: 6px 14px; font-size: 13px; font-weight: 500;
  color: var(--muted-foreground); border-radius: 6px;
  display: inline-flex; align-items: center; gap: 6px;
  transition: all .2s;
}
.tab-trigger:hover { color: var(--foreground); }
.tab-trigger.active { background: #fff; color: var(--foreground); box-shadow: var(--shadow-soft); }
.tab-panel { display: none; }
.tab-panel.show { display: block; }

/* ===== Switch ===== */
.switch {
  position: relative; display: inline-block; width: 36px; height: 20px;
}
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute; inset: 0; cursor: pointer;
  background: oklch(0.85 0.02 250); border-radius: 999px;
  transition: .2s;
}
.slider::before {
  content: ""; position: absolute; height: 16px; width: 16px;
  left: 2px; top: 2px; background: #fff; border-radius: 50%;
  transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.switch input:checked + .slider { background: var(--primary); }
.switch input:checked + .slider::before { transform: translateX(16px); }

/* ===== Form controls ===== */
.label { font-size: 14px; font-weight: 500; display: block; margin-bottom: 6px; }
.field-input, textarea.field-input, select.field-input, .form-control, .form-select {
  width: 100%; padding: 8px 12px; height: 36px;
  background: #fff; border: 1px solid var(--border); border-radius: 6px;
  font-size: 14px; outline: none; transition: border-color .15s;
  color: #364152;
}
textarea.field-input, textarea.form-control { height: auto; min-height: 80px; resize: vertical; }
select.field-input, select.form-select { height: 36px; }
.field-input:focus, .form-control:focus, .form-select:focus { border-color: var(--primary); }

/* Tier badges */
.tier { font-size: 11px; padding: 2px 10px; border-radius: 999px; font-weight: 600; }
.tier-Platinum { background: oklch(0.94 0.04 230); color: oklch(0.32 0.08 250); }
.tier-Gold { background: oklch(0.78 0.16 75 / 0.2); color: var(--warning-foreground); }
.tier-Silver { background: var(--muted); color: var(--muted-foreground); }
.tier-Bronze { background: var(--secondary); color: oklch(0.32 0.06 250); }

/* Misc */
.muted { color: var(--muted-foreground); }
.divider { border-top: 1px solid var(--border); }
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 768px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.grid-3 { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 640px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.grid-4 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (min-width: 768px) { .grid-4 { grid-template-columns: repeat(4, 1fr); } }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-row { display: flex; align-items: center; gap: 12px; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; }
.mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; } .mb-6 { margin-bottom: 24px; }
.icon-circle {
  width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center; flex-shrink: 0;
}
.partner-logo {
  width: 44px; height: 44px; border-radius: 8px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary), var(--chart-2));
  color: #fff; font-weight: 700;
  display: grid; place-items: center;
}
.video-thumb {
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--primary), var(--chart-2));
  display: grid; place-items: center; color: rgba(255,255,255,0.85);
}
.gallery-tile {
  aspect-ratio: 1;
  background: linear-gradient(135deg, var(--primary-soft), oklch(0.94 0.04 230), var(--secondary));
  border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow-soft);
}
.qr-box {
  display: grid; place-items: center; border: 2px dashed var(--border);
  background: oklch(0.965 0.01 250 / 0.5); border-radius: 16px; padding: 32px;
}
.qr-inner {
  width: 176px; height: 176px; background: #fff;
  border-radius: 16px; display: grid; place-items: center;
  box-shadow: var(--shadow-soft);
}
.toolbar { display: flex; gap: 4px; padding: 8px; border-bottom: 1px solid var(--border); }
.icon-btn-sm { width: 28px; height: 28px; border-radius: 4px; display: grid; place-items: center; color: var(--muted-foreground); }
.icon-btn-sm:hover { background: var(--muted); }
.editor-area { border: 1px solid var(--border); border-radius: 8px; }
.editor-area textarea { border: 0; border-radius: 0; min-height: 160px; }
.editor-area textarea:focus { box-shadow: none; }

.stack > * + * { margin-top: 12px; }
.tile-btn {
  width: 100%; text-align: left;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px; border: 1px solid var(--border); border-radius: 8px;
  transition: background .2s;
}
.tile-btn:hover { background: oklch(0.965 0.01 250 / 0.5); }

/* === Added: stats grid, table wrapper, badge variants, form grid === */
.stats-grid {
  display: grid; grid-template-columns: 1fr; gap: 16px;
}
@media (min-width: 640px) { .stats-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .stats-grid { grid-template-columns: repeat(4, 1fr); } }
.stat-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 14px; padding: 18px;
  box-shadow: var(--shadow-soft);
}
.stat-card .stat-value { font-size: 26px; }

table.table { width: 100%; border-collapse: collapse; font-size: 14px; }
table.table thead { background: oklch(0.965 0.01 250 / 0.5); }
table.table th { text-align: left; font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--muted-foreground);
  font-weight: 600; padding: 12px 18px; }
table.table td { padding: 12px 18px; border-top: 1px solid var(--border); vertical-align: middle; }
table.table tbody tr:hover { background: oklch(0.95 0.03 250 / 0.4); }

.badge.badge-ok   { background: oklch(0.7 0.15 160 / 0.15); color: var(--success); border-color: oklch(0.7 0.15 160 / 0.25); }
.badge.badge-warn { background: oklch(0.78 0.16 75 / 0.15); color: var(--warning-foreground); border-color: oklch(0.78 0.16 75 / 0.35); }
.badge.badge-err  { background: oklch(0.62 0.22 25 / 0.12); color: var(--destructive); border-color: oklch(0.62 0.22 25 / 0.25); }
.badge.badge-info { background: var(--primary-soft); color: var(--primary); border-color: oklch(0.85 0.07 250 / 0.5); }
.badge.badge-muted{ background: var(--muted); color: var(--muted-foreground); border-color: var(--border); }

.form-grid {
  display: grid; grid-template-columns: 1fr; gap: 16px;
}
@media (min-width: 640px) { .form-grid { grid-template-columns: 1fr 1fr; } }

/* extra utilities for detail / form pages */
dl.kv{display:grid;gap:10px;margin:0;}
dl.kv > div{display:flex;justify-content:space-between;gap:16px;padding:8px 0;border-bottom:1px dashed var(--border);}
dl.kv > div:last-child{border-bottom:none;}
dl.kv dt{color:var(--muted-foreground);font-size:13px;}
dl.kv dd{margin:0;font-weight:600;font-size:13px;text-align:right;}
ul.activity{list-style:none;padding:0;margin:0;display:grid;gap:10px;}
ul.activity li{display:flex;align-items:center;gap:10px;padding:8px 10px;background:var(--muted);border-radius:8px;font-size:13px;}
ul.activity .dot-ok,ul.activity .dot-info,ul.activity .dot-warn{width:8px;height:8px;border-radius:50%;flex-shrink:0;}
ul.activity .dot-ok{background:#16a34a;}
ul.activity .dot-info{background:var(--primary);}
ul.activity .dot-warn{background:#f59e0b;}
.upload-box{border:2px dashed var(--border);border-radius:10px;padding:28px;text-align:center;color:var(--muted-foreground);font-size:13px;background:var(--muted);}
.upload-box a{color:var(--primary);font-weight:600;}

/* Styling for Table Column Search Rows */
tr.search-row th {
  padding: 8px 12px !important;
  background: oklch(0.985 0.005 250) !important; /* Soft light background */
  border-bottom: 1px solid var(--border) !important;
}
tr.search-row input, tr.search-row select {
  background-color: #fff !important;
  border: 1px solid var(--border) !important;
  color: var(--foreground) !important;
  border-radius: 6px !important;
  font-size: 13px !important;
  height: 32px !important;
  padding: 4px 8px !important;
  box-shadow: none !important;
  transition: all 0.15s ease-in-out !important;
}
tr.search-row input:focus, tr.search-row select:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px var(--primary-soft) !important;
  outline: none !important;
}
tr.search-row input::placeholder {
  color: var(--muted-foreground) !important;
  opacity: 0.65;
}