/* Ganesha Festival — design system on top of Bootstrap 5 */
:root {
  --gf-saffron: #E8740C;
  --gf-saffron-600: #C45F05;
  --gf-saffron-100: #FDE3CB;
  --gf-saffron-50: #FFF5EB;
  --gf-maroon: #7A1C2C;
  --gf-maroon-600: #5C1220;
  --gf-maroon-50: #F9ECEE;
  --gf-gold: #F5C04A;
  --gf-bg: #FAF7F3;
  --gf-surface: #FFFFFF;
  --gf-border: #ECE4DB;
  --gf-text: #1E1A17;
  --gf-muted: #6B625A;
  --gf-success: #1E7F46;
  --gf-warning: #9A6412;
  --gf-danger: #C0262D;
  --gf-info: #1F68A8;
  --gf-radius: 16px;
  --gf-radius-sm: 10px;
  --gf-shadow: 0 1px 2px rgba(30, 26, 23, .04), 0 4px 16px rgba(30, 26, 23, .05);
  --gf-header-h: 60px;
  --gf-bottom-h: 64px;

  --bs-body-bg: var(--gf-bg);
  --bs-body-color: var(--gf-text);
  --bs-body-font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Telugu", "Helvetica Neue", Arial, sans-serif;
  --bs-primary: var(--gf-saffron);
  --bs-primary-rgb: 232, 116, 12;
  --bs-link-color: var(--gf-maroon);
  --bs-link-color-rgb: 122, 28, 44;
  --bs-link-hover-color: var(--gf-maroon-600);
  --bs-border-color: var(--gf-border);
  --bs-secondary-color: var(--gf-muted);
  --bs-success: var(--gf-success);
  --bs-danger: var(--gf-danger);
  --bs-warning: var(--gf-warning);
  --bs-info: var(--gf-info);
}

html { scroll-padding-top: calc(var(--gf-header-h) + 12px); }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden; }
img { max-width: 100%; }
a { text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
.text-muted { color: var(--gf-muted) !important; }
.text-saffron { color: var(--gf-saffron-600) !important; }
.text-maroon { color: var(--gf-maroon) !important; }
.fw-semi { font-weight: 600; }
.tabular { font-variant-numeric: tabular-nums; }

:focus-visible { outline: 3px solid rgba(232, 116, 12, .55); outline-offset: 2px; border-radius: 6px; }
.skip-link { position: absolute; left: 12px; top: 8px; z-index: 2000; background: #fff; padding: 8px 14px; border-radius: 8px; box-shadow: var(--gf-shadow); }

/* ---------- Buttons ---------- */
.btn { border-radius: 999px; font-weight: 600; min-height: 44px; padding-inline: 1.1rem; display: inline-flex; align-items: center; justify-content: center; gap: .4rem; }
.btn-sm { min-height: 36px; padding-inline: .85rem; font-size: .875rem; }
.btn-lg { min-height: 52px; }
.btn-primary {
  --bs-btn-bg: var(--gf-saffron); --bs-btn-border-color: var(--gf-saffron);
  --bs-btn-hover-bg: var(--gf-saffron-600); --bs-btn-hover-border-color: var(--gf-saffron-600);
  --bs-btn-active-bg: var(--gf-saffron-600); --bs-btn-active-border-color: var(--gf-saffron-600);
  --bs-btn-disabled-bg: #F0A868; --bs-btn-disabled-border-color: #F0A868;
  --bs-btn-color: #fff; --bs-btn-hover-color: #fff; --bs-btn-active-color: #fff;
  --bs-btn-focus-shadow-rgb: 232, 116, 12;
}
.btn-maroon {
  --bs-btn-bg: var(--gf-maroon); --bs-btn-border-color: var(--gf-maroon); --bs-btn-color: #fff;
  --bs-btn-hover-bg: var(--gf-maroon-600); --bs-btn-hover-border-color: var(--gf-maroon-600); --bs-btn-hover-color: #fff;
  --bs-btn-active-bg: var(--gf-maroon-600); --bs-btn-active-color: #fff;
}
.btn-outline-maroon {
  --bs-btn-color: var(--gf-maroon); --bs-btn-border-color: rgba(122, 28, 44, .35);
  --bs-btn-hover-bg: var(--gf-maroon-50); --bs-btn-hover-color: var(--gf-maroon); --bs-btn-hover-border-color: var(--gf-maroon);
  --bs-btn-active-bg: var(--gf-maroon-50); --bs-btn-active-color: var(--gf-maroon);
}
.btn-soft { background: var(--gf-saffron-50); color: var(--gf-saffron-600); border: 1px solid var(--gf-saffron-100); }
.btn-soft:hover { background: var(--gf-saffron-100); color: var(--gf-saffron-600); }
.btn-ghost { background: transparent; border: 1px solid var(--gf-border); color: var(--gf-text); }
.btn-ghost:hover { background: #fff; }
.btn.is-loading { position: relative; color: transparent !important; pointer-events: none; }
.btn.is-loading::after { content: ""; position: absolute; width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.6); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.btn-ghost.is-loading::after, .btn-soft.is-loading::after, .btn-outline-maroon.is-loading::after { border-color: rgba(0,0,0,.15); border-top-color: var(--gf-saffron); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Forms ---------- */
.form-control, .form-select { border-radius: var(--gf-radius-sm); min-height: 46px; border-color: var(--gf-border); background-color: #fff; }
.form-control:focus, .form-select:focus { border-color: var(--gf-saffron); box-shadow: 0 0 0 .2rem rgba(232, 116, 12, .15); }
textarea.form-control { min-height: 96px; }
.form-label { font-weight: 600; font-size: .92rem; margin-bottom: .35rem; }
.form-check-input:checked { background-color: var(--gf-saffron); border-color: var(--gf-saffron); }
.form-check-input:focus { box-shadow: 0 0 0 .2rem rgba(232, 116, 12, .2); border-color: var(--gf-saffron); }
.form-switch .form-check-input { width: 2.6em; height: 1.4em; margin-top: .1em; }
.form-switch .form-check-label { padding-left: .35rem; padding-top: .1rem; }

/* ---------- Header ---------- */
.app-header { position: sticky; top: 0; z-index: 1030; background: rgba(255, 255, 255, .92); backdrop-filter: saturate(160%) blur(12px); -webkit-backdrop-filter: saturate(160%) blur(12px); border-bottom: 1px solid var(--gf-border); }
.header-inner { height: var(--gf-header-h); display: flex; align-items: center; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .5rem; color: var(--gf-text); font-weight: 700; letter-spacing: -.01em; white-space: nowrap; min-width: 0; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: linear-gradient(135deg, var(--gf-saffron-50), var(--gf-saffron-100)); font-size: 1.1rem; flex: none; }
.brand-text { overflow: hidden; text-overflow: ellipsis; font-size: 1.02rem; }
.brand-year { color: var(--gf-saffron-600); }
.nav-links { gap: .15rem; align-items: center; }
.nav-links a { color: var(--gf-muted); font-weight: 600; font-size: .94rem; padding: .5rem .75rem; border-radius: 999px; }
.nav-links a:hover { color: var(--gf-text); background: var(--gf-bg); text-decoration: none; }
.nav-links a.active { color: var(--gf-maroon); background: var(--gf-maroon-50); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: .5rem; }
.year-switch .form-select { min-height: 38px; border-radius: 999px; font-weight: 700; padding-left: .9rem; padding-right: 2rem; background-color: var(--gf-saffron-50); border-color: var(--gf-saffron-100); color: var(--gf-maroon); width: auto; }
.avatar-btn { border: 0; background: none; padding: 0; border-radius: 50%; }
.notify-btn { position: relative; display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; color: var(--gf-maroon); background: var(--gf-maroon-50); flex: none; }
.notify-btn:hover { color: var(--gf-maroon); filter: brightness(.96); }
.notify-count { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #c0392b; color: #fff; font-size: .7rem; font-weight: 700; line-height: 18px; text-align: center; }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: inline-grid; place-items: center; font-weight: 700; font-size: .85rem; color: var(--gf-maroon); background: var(--gf-maroon-50); border: 1px solid rgba(122, 28, 44, .12); flex: none; }
.avatar-lg { width: 64px; height: 64px; font-size: 1.3rem; }

/* ---------- Layout ---------- */
.app-main { min-height: calc(100vh - var(--gf-header-h)); padding-top: 1rem; padding-bottom: calc(var(--gf-bottom-h) + 32px + env(safe-area-inset-bottom)); }
.app-main:focus { outline: none; }
.flash-stack .alert { border-radius: var(--gf-radius-sm); border: 0; box-shadow: var(--gf-shadow); }
.app-footer { border-top: 1px solid var(--gf-border); color: var(--gf-muted); font-size: .9rem; padding: 1.25rem 0 calc(var(--gf-bottom-h) + 1.25rem + env(safe-area-inset-bottom)); background: #fff; }
.app-footer a { color: var(--gf-muted); }
@media (min-width: 992px) {
  .app-main { padding-top: 1.5rem; padding-bottom: 3rem; }
  .app-footer { padding-bottom: 1.25rem; }
}

.bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030; display: grid; grid-template-columns: repeat(5, 1fr); height: calc(var(--gf-bottom-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: rgba(255, 255, 255, .96); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--gf-border); }
.bottom-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--gf-muted); font-size: .7rem; font-weight: 600; min-height: 44px; }
.bottom-nav a:hover { text-decoration: none; }
.bottom-nav a.active { color: var(--gf-saffron-600); }
.bottom-nav a.active .icon { stroke-width: 2.4; }

.page-header { margin: .25rem 0 1.25rem; display: grid; gap: .25rem; }
.page-kicker { color: var(--gf-saffron-600); font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; }
.page-title { font-size: clamp(1.45rem, 4vw, 2rem); font-weight: 800; letter-spacing: -.02em; margin: 0; }
.page-subtitle { color: var(--gf-muted); margin: 0; }
.page-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .5rem; }

.section { margin-top: 2rem; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: .85rem; }
.section-title { font-size: 1.15rem; font-weight: 750; margin: 0; letter-spacing: -.01em; }
.section-link { font-weight: 600; font-size: .9rem; white-space: nowrap; }

.card-soft { background: var(--gf-surface); border: 1px solid var(--gf-border); border-radius: var(--gf-radius); box-shadow: var(--gf-shadow); }
.card-pad { padding: 1.1rem; }
@media (min-width: 768px) { .card-pad { padding: 1.4rem; } }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; border-radius: 22px; color: #fff; padding: 1.5rem 1.25rem; background: radial-gradient(120% 140% at 0% 0%, #F59A3C 0%, var(--gf-saffron) 35%, #B8431A 70%, var(--gf-maroon) 100%); box-shadow: 0 10px 30px rgba(122, 28, 44, .18); }
.hero::after { content: ""; position: absolute; right: -80px; top: -80px; width: 320px; height: 320px; opacity: .16; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cg fill='none' stroke='%23fff' stroke-width='1.2'%3E%3Ccircle cx='100' cy='100' r='96'/%3E%3Ccircle cx='100' cy='100' r='78'/%3E%3Ccircle cx='100' cy='100' r='40'/%3E%3Ccircle cx='100' cy='100' r='18'/%3E%3Cg id='p'%3E%3Cpath d='M100 22c10 14 10 30 0 44c-10-14-10-30 0-44z'/%3E%3Cpath d='M100 60c6 8 6 16 0 22c-6-6-6-14 0-22z'/%3E%3C/g%3E%3Cuse href='%23p' transform='rotate(30 100 100)'/%3E%3Cuse href='%23p' transform='rotate(60 100 100)'/%3E%3Cuse href='%23p' transform='rotate(90 100 100)'/%3E%3Cuse href='%23p' transform='rotate(120 100 100)'/%3E%3Cuse href='%23p' transform='rotate(150 100 100)'/%3E%3Cuse href='%23p' transform='rotate(180 100 100)'/%3E%3Cuse href='%23p' transform='rotate(210 100 100)'/%3E%3Cuse href='%23p' transform='rotate(240 100 100)'/%3E%3Cuse href='%23p' transform='rotate(270 100 100)'/%3E%3Cuse href='%23p' transform='rotate(300 100 100)'/%3E%3Cuse href='%23p' transform='rotate(330 100 100)'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat; }
.hero > * { position: relative; z-index: 1; }
.hero-kicker { display: inline-flex; align-items: center; gap: .4rem; font-weight: 700; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; background: rgba(255, 255, 255, .16); padding: .3rem .7rem; border-radius: 999px; }
.hero-title { font-size: clamp(1.6rem, 6vw, 2.6rem); font-weight: 800; letter-spacing: -.02em; margin: .6rem 0 .25rem; line-height: 1.1; }
.hero-meta { opacity: .92; display: flex; flex-wrap: wrap; gap: .25rem 1rem; font-weight: 500; }
.hero-desc { opacity: .9; max-width: 60ch; margin: .75rem 0 0; }
.hero .btn-light { color: var(--gf-maroon); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.1rem; }
.hero .btn-outline-light { --bs-btn-hover-color: var(--gf-maroon); }
@media (min-width: 768px) { .hero { padding: 2.25rem 2rem; } }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #7CFFB2; box-shadow: 0 0 0 0 rgba(124, 255, 178, .7); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(124,255,178,.6);} 70% { box-shadow: 0 0 0 8px rgba(124,255,178,0);} 100% { box-shadow: 0 0 0 0 rgba(124,255,178,0);} }

/* ---------- Stats ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
@media (min-width: 768px) { .stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .stat-grid.six { grid-template-columns: repeat(6, minmax(0, 1fr)); } .stat-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat-card { background: #fff; border: 1px solid var(--gf-border); border-radius: var(--gf-radius); padding: .9rem 1rem; box-shadow: var(--gf-shadow); min-width: 0; }
.stat-icon { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; margin-bottom: .55rem; }
.stat-label { color: var(--gf-muted); font-size: .8rem; font-weight: 600; }
.stat-value { font-size: clamp(1.15rem, 4.2vw, 1.5rem); font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stat-hint { color: var(--gf-muted); font-size: .75rem; margin-top: .1rem; }
.tone-saffron .stat-icon { background: var(--gf-saffron-50); color: var(--gf-saffron-600); }
.tone-maroon .stat-icon { background: var(--gf-maroon-50); color: var(--gf-maroon); }
.tone-success .stat-icon { background: #E6F4EC; color: var(--gf-success); }
.tone-danger .stat-icon { background: #FBEAEA; color: var(--gf-danger); }
.tone-info .stat-icon { background: #E8F1FA; color: var(--gf-info); }
.tone-warning .stat-icon { background: #FBF1E0; color: var(--gf-warning); }
.stat-card.highlight { background: linear-gradient(135deg, #fff, var(--gf-saffron-50)); border-color: var(--gf-saffron-100); }

/* ---------- Badges ---------- */
.badge { font-weight: 650; border-radius: 999px; padding: .38em .7em; letter-spacing: .01em; }
.badge-soft-success { background: #E3F3E9; color: #17663A; }
.badge-soft-warning { background: #FBEFD9; color: #8A560B; }
.badge-soft-danger { background: #FBE6E7; color: #A61E25; }
.badge-soft-info { background: #E4EFF9; color: #1B5B93; }
.badge-soft-secondary { background: #EFEBE7; color: #5B534C; }
.badge-soft-dark { background: #E6E1DC; color: #3A332E; }
.badge-soft-maroon { background: var(--gf-maroon-50); color: var(--gf-maroon); }
.badge-soft-saffron { background: var(--gf-saffron-50); color: var(--gf-saffron-600); }

/* ---------- Chips / filters ---------- */
.chip-row { display: flex; gap: .5rem; overflow-x: auto; padding: .15rem .05rem .5rem; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.chip-row::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: .35rem; min-height: 38px; padding: .4rem .9rem; border-radius: 999px; border: 1px solid var(--gf-border); background: #fff; color: var(--gf-text); font-weight: 600; font-size: .88rem; white-space: nowrap; }
.chip:hover { text-decoration: none; border-color: var(--gf-saffron-100); background: var(--gf-saffron-50); }
.chip.active { background: var(--gf-text); color: #fff; border-color: var(--gf-text); }
.search-box { position: relative; }
.search-box .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--gf-muted); pointer-events: none; }
.search-box .form-control { padding-left: 42px; border-radius: 999px; }

/* ---------- Gallery ---------- */
.media-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px; }
@media (min-width: 768px) { .media-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; } }
@media (min-width: 1200px) { .media-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; } }
.media-grid.mini { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (min-width: 992px) { .media-grid.mini { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.media-bleed { margin-inline: calc(var(--bs-gutter-x, 1.5rem) * -.5); }
@media (min-width: 768px) { .media-bleed { margin-inline: 0; } }
.media-tile { position: relative; display: block; aspect-ratio: 1 / 1; overflow: hidden; background: #EFE7DE; border-radius: 2px; }
@media (min-width: 768px) { .media-tile { border-radius: 12px; } }
.media-tile img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease, opacity .3s; }
.media-tile:hover img { transform: scale(1.03); }
.media-tile:focus-visible { outline-offset: -3px; }
.tile-badge { position: absolute; right: 6px; top: 6px; display: inline-flex; align-items: center; gap: 4px; background: rgba(0, 0, 0, .55); color: #fff; font-size: .72rem; font-weight: 700; padding: 3px 7px; border-radius: 999px; }
.tile-badge .icon { fill: currentColor; }
.tile-status { position: absolute; left: 6px; bottom: 6px; }
.skeleton { background: linear-gradient(90deg, #EFE7DE 0%, #F7F1EA 50%, #EFE7DE 100%); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 8px; }
.media-grid .skeleton { aspect-ratio: 1/1; border-radius: 2px; }
@media (min-width: 768px) { .media-grid .skeleton { border-radius: 12px; } }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.load-sentinel { height: 1px; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 1080; background: rgba(12, 8, 6, .97); color: #fff; display: none; flex-direction: column; }
.lightbox.open { display: flex; }
.lb-top { display: flex; justify-content: space-between; align-items: center; padding: .6rem .75rem; padding-top: calc(.6rem + env(safe-area-inset-top)); gap: .5rem; }
.lb-counter { font-size: .85rem; opacity: .75; }
.lb-btn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .1); color: #fff; display: grid; place-items: center; flex: none; }
.lb-btn:hover { background: rgba(255, 255, 255, .2); }
.lb-stage { flex: 1; position: relative; display: flex; align-items: center; justify-content: center; min-height: 0; touch-action: pan-y; user-select: none; }
.lb-stage img, .lb-stage video { max-width: 100%; max-height: 100%; object-fit: contain; }
.lb-stage video { width: 100%; background: #000; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); }
.lb-prev { left: .75rem; } .lb-next { right: .75rem; }
@media (max-width: 767.98px) { .lb-nav { display: none; } }
.lb-caption { padding: .9rem 1rem calc(1rem + env(safe-area-inset-bottom)); background: linear-gradient(to top, rgba(0,0,0,.6), transparent); max-width: 900px; width: 100%; margin: 0 auto; }
.lb-caption .lb-title { font-weight: 650; margin-bottom: .2rem; }
.lb-caption .lb-meta { font-size: .82rem; opacity: .78; display: flex; flex-wrap: wrap; gap: .25rem .9rem; }
.lb-caption a { color: var(--gf-gold); }
.lb-spinner { position: absolute; width: 36px; height: 36px; border: 3px solid rgba(255,255,255,.2); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; }
body.lb-open { overflow: hidden; }

/* Detail */
.detail-media { background: #120C09; border-radius: var(--gf-radius); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.detail-media img, .detail-media video { max-width: 100%; max-height: 78vh; display: block; }

/* ---------- Upload ---------- */
.dropzone { border: 2px dashed #E3C9AE; border-radius: var(--gf-radius); background: var(--gf-saffron-50); padding: 1.75rem 1rem; text-align: center; cursor: pointer; transition: background .2s, border-color .2s; position: relative; }
.dropzone:hover, .dropzone.drag { border-color: var(--gf-saffron); background: #FFEEDD; }
.dropzone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone .dz-icon { width: 56px; height: 56px; border-radius: 16px; margin: 0 auto .6rem; display: grid; place-items: center; background: #fff; color: var(--gf-saffron-600); box-shadow: var(--gf-shadow); }
.upload-list { display: grid; gap: .6rem; margin-top: 1rem; }
.upload-item { display: grid; grid-template-columns: 56px 1fr auto; gap: .75rem; align-items: center; background: #fff; border: 1px solid var(--gf-border); border-radius: 12px; padding: .5rem; }
.upload-item .thumb { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; background: #EFE7DE; display: grid; place-items: center; color: var(--gf-muted); overflow: hidden; }
.upload-item .thumb img, .upload-item .thumb video { width: 100%; height: 100%; object-fit: cover; }
.upload-item .name { font-weight: 600; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-item .meta { font-size: .78rem; color: var(--gf-muted); }
.progress { height: 6px; border-radius: 999px; background: #F1E8DF; }
.progress-bar { background: var(--gf-saffron); }
.upload-item.done .progress-bar { background: var(--gf-success); }
.upload-item.failed .progress-bar { background: var(--gf-danger); }

/* ---------- Records (accounts) ---------- */
.tabs-pill { display: flex; gap: .35rem; background: #fff; border: 1px solid var(--gf-border); border-radius: 999px; padding: .3rem; overflow-x: auto; scrollbar-width: none; }
.tabs-pill a { flex: 1; text-align: center; white-space: nowrap; padding: .5rem .9rem; border-radius: 999px; color: var(--gf-muted); font-weight: 650; font-size: .92rem; min-height: 40px; display: flex; align-items: center; justify-content: center; }
.tabs-pill a:hover { text-decoration: none; color: var(--gf-text); }
.tabs-pill a.active { background: var(--gf-maroon); color: #fff; }
.record-list { display: grid; gap: .6rem; }
.record-card { background: #fff; border: 1px solid var(--gf-border); border-radius: 14px; padding: .85rem 1rem; display: grid; grid-template-columns: 1fr auto; gap: .15rem .75rem; align-items: start; }
.record-card .r-title { font-weight: 650; overflow-wrap: anywhere; }
.record-card .r-amount { font-weight: 800; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.record-card .r-meta { grid-column: 1 / -1; color: var(--gf-muted); font-size: .84rem; display: flex; flex-wrap: wrap; gap: .15rem .85rem; }
.record-card .r-actions { grid-column: 1 / -1; display: flex; gap: .4rem; margin-top: .45rem; flex-wrap: wrap; }
.amount-in { color: var(--gf-success); }
.amount-out { color: var(--gf-danger); }
.table-clean { --bs-table-bg: transparent; margin: 0; }
.table-clean thead th { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--gf-muted); font-weight: 700; border-bottom: 1px solid var(--gf-border); padding: .75rem 1rem; white-space: nowrap; }
.table-clean td { padding: .8rem 1rem; border-color: var(--gf-border); vertical-align: middle; }
.table-clean tbody tr:hover { background: #FCFAF7; }
.table-wrap { background: #fff; border: 1px solid var(--gf-border); border-radius: var(--gf-radius); overflow: hidden; box-shadow: var(--gf-shadow); }
.table-wrap .table-responsive { margin: 0; }
.balance-bar { height: 10px; border-radius: 999px; background: #F3E7E9; overflow: hidden; display: flex; }
.balance-bar span { background: var(--gf-saffron); }

/* ---------- Auction ---------- */
.auction-card { display: block; position: relative; overflow: hidden; border-radius: var(--gf-radius); padding: 1.1rem 1.15rem; color: var(--gf-text); background: linear-gradient(135deg, #FFF8EF 0%, #FFFFFF 60%); border: 1px solid var(--gf-saffron-100); box-shadow: var(--gf-shadow); }
.auction-card:hover { text-decoration: none; border-color: #F6C79C; }
.auction-card.is-empty { display: flex; align-items: center; gap: .9rem; background: #fff; border-color: var(--gf-border); }
.auction-emoji { font-size: 2rem; }
.festive-icon { display: inline-block; vertical-align: -0.2em; flex: none; }
.auction-title { font-weight: 700; }
.auction-kicker { font-weight: 800; font-size: .82rem; text-transform: uppercase; letter-spacing: .07em; color: var(--gf-saffron-600); margin-bottom: .6rem; }
.auction-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem 1rem; }
.auction-grid span { display: block; font-size: .76rem; color: var(--gf-muted); font-weight: 600; }
.auction-grid strong { font-size: 1.15rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.auction-card.is-winner { background: radial-gradient(120% 140% at 100% 0%, #A5303F 0%, var(--gf-maroon) 50%, #3E0B15 100%); color: #fff; border: 0; }
.auction-card.is-winner .auction-kicker { color: var(--gf-gold); }
.auction-card.is-winner .auction-grid span { color: rgba(255,255,255,.7); }
.auction-winner { font-size: 1.6rem; font-weight: 800; letter-spacing: -.01em; margin-bottom: .75rem; }
.bid-row { display: grid; grid-template-columns: 36px 1fr auto; gap: .75rem; align-items: center; padding: .7rem 0; border-bottom: 1px solid var(--gf-border); }
.bid-row:last-child { border-bottom: 0; }
.bid-rank { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--gf-saffron-50); color: var(--gf-saffron-600); font-size: .85rem; }
.bid-row.top .bid-rank { background: var(--gf-saffron); color: #fff; }
.bid-row.void { opacity: .5; text-decoration: line-through; }
.bid-amount { font-weight: 800; font-variant-numeric: tabular-nums; }

/* ---------- Events timeline ---------- */
.day-block { margin-bottom: 1.75rem; }
.day-label { display: flex; align-items: center; gap: .6rem; font-weight: 800; margin-bottom: .75rem; }
.day-label .day-num { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--gf-maroon); color: #fff; line-height: 1; text-align: center; font-size: 1.1rem; }
.day-label .day-num small { display: block; font-size: .6rem; font-weight: 700; text-transform: uppercase; opacity: .8; }
.event-card { background: #fff; border: 1px solid var(--gf-border); border-radius: 14px; padding: 1rem; margin-left: 1.4rem; position: relative; margin-bottom: .6rem; }
.event-card::before { content: ""; position: absolute; left: -1.05rem; top: 1.25rem; width: 10px; height: 10px; border-radius: 50%; background: var(--gf-saffron); box-shadow: 0 0 0 4px var(--gf-saffron-50); }
.event-card .e-name { font-weight: 700; font-size: 1.02rem; }
.event-card .e-meta { color: var(--gf-muted); font-size: .86rem; display: flex; flex-wrap: wrap; gap: .2rem 1rem; margin-top: .25rem; }
.event-card .e-meta span { display: inline-flex; align-items: center; gap: .3rem; }
.event-card.is-today { border-color: var(--gf-saffron); box-shadow: 0 0 0 3px var(--gf-saffron-50); }
.event-mini { display: flex; gap: .8rem; align-items: center; padding: .7rem 0; border-bottom: 1px solid var(--gf-border); color: var(--gf-text); }
.event-mini:last-child { border-bottom: 0; }
.event-mini:hover { text-decoration: none; }
.event-mini .d { width: 46px; flex: none; text-align: center; border-radius: 12px; background: var(--gf-saffron-50); color: var(--gf-saffron-600); padding: .35rem 0; line-height: 1.1; font-weight: 800; }
.event-mini .d small { display: block; font-size: .62rem; text-transform: uppercase; }

/* ---------- Activity ---------- */
.activity-item { display: flex; gap: .75rem; align-items: center; padding: .6rem 0; border-bottom: 1px solid var(--gf-border); color: var(--gf-text); }
.activity-item:last-child { border-bottom: 0; }
.activity-item:hover { text-decoration: none; }
.activity-icon { width: 36px; height: 36px; border-radius: 12px; background: var(--gf-saffron-50); color: var(--gf-saffron-600); display: grid; place-items: center; flex: none; }
.activity-text { flex: 1; min-width: 0; font-size: .92rem; }
.activity-when { color: var(--gf-muted); font-size: .78rem; white-space: nowrap; }

/* ---------- Idol ---------- */
.idol-card { display: grid; grid-template-columns: 88px 1fr; gap: 1rem; align-items: center; color: var(--gf-text); }
.idol-card:hover { text-decoration: none; }
.idol-photo { width: 88px; height: 88px; border-radius: 18px; object-fit: cover; background: linear-gradient(135deg, var(--gf-saffron-50), var(--gf-saffron-100)); display: grid; place-items: center; font-size: 2.4rem; overflow: hidden; }
.idol-photo img { width: 100%; height: 100%; object-fit: cover; }
.kv { display: grid; grid-template-columns: minmax(110px, 40%) 1fr; gap: .5rem 1rem; margin: 0; }
.kv dt { color: var(--gf-muted); font-weight: 600; font-size: .9rem; }
.kv dd { margin: 0; font-weight: 650; overflow-wrap: anywhere; }

/* ---------- Archive ---------- */
.archive-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 768px) { .archive-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1200px) { .archive-grid { grid-template-columns: repeat(3, 1fr); } }
.archive-card { display: block; border-radius: 20px; overflow: hidden; background: #fff; border: 1px solid var(--gf-border); box-shadow: var(--gf-shadow); color: var(--gf-text); transition: transform .2s, box-shadow .2s; }
.archive-card:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 12px 30px rgba(30,26,23,.1); }
.archive-cover { aspect-ratio: 16 / 9; position: relative; background: radial-gradient(120% 140% at 0% 0%, #F59A3C 0%, var(--gf-saffron) 40%, var(--gf-maroon) 100%); display: flex; align-items: flex-end; padding: 1rem; color: #fff; }
.archive-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.archive-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.55), transparent 60%); }
.archive-cover > * { position: relative; z-index: 1; }
.archive-year { font-size: 2.4rem; font-weight: 900; letter-spacing: -.03em; line-height: 1; }
.archive-body { padding: 1rem 1.1rem 1.2rem; }
.archive-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin: .75rem 0 1rem; }
.archive-stats div { background: var(--gf-bg); border-radius: 10px; padding: .5rem .6rem; }
.archive-stats span { display: block; font-size: .7rem; color: var(--gf-muted); font-weight: 600; }
.archive-stats strong { font-size: .95rem; font-variant-numeric: tabular-nums; }

/* ---------- Empty / misc ---------- */
.empty-state { text-align: center; padding: 2.5rem 1rem; background: #fff; border: 1px dashed #E3D6C8; border-radius: var(--gf-radius); }
.empty-emoji { font-size: 2.6rem; margin-bottom: .5rem; }
.pagination-pill .page-link { border-radius: 999px !important; margin: 0 .15rem; border: 1px solid var(--gf-border); color: var(--gf-text); min-width: 40px; min-height: 40px; display: grid; place-items: center; }
.pagination-pill .active .page-link { background: var(--gf-maroon); border-color: var(--gf-maroon); color: #fff; }
.quick-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
@media (min-width: 768px) { .quick-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .quick-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.quick-action { display: flex; align-items: center; gap: .7rem; padding: .85rem 1rem; background: #fff; border: 1px solid var(--gf-border); border-radius: 14px; color: var(--gf-text); font-weight: 650; min-height: 56px; }
.quick-action:hover { text-decoration: none; border-color: var(--gf-saffron-100); background: var(--gf-saffron-50); }
.quick-action .qa-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--gf-saffron-50); color: var(--gf-saffron-600); flex: none; }
.quick-action .qa-count { margin-left: auto; }
.menu-list { display: grid; }
.menu-list a, .menu-list button { display: flex; align-items: center; gap: .8rem; padding: .9rem 1rem; color: var(--gf-text); font-weight: 600; border: 0; border-bottom: 1px solid var(--gf-border); background: none; width: 100%; text-align: left; min-height: 52px; }
.menu-list > :last-child, .menu-list form:last-child button { border-bottom: 0; }
.menu-list a:hover, .menu-list button:hover { background: var(--gf-bg); text-decoration: none; }
.menu-list .icon { color: var(--gf-muted); }
.menu-list .chev { margin-left: auto; color: #C9BDB1; }
.chart-box { position: relative; min-height: 260px; }
.chart-box canvas { max-width: 100%; }
.chart-box .skeleton { position: absolute; inset: 0; }
.chart-box.ready .skeleton { display: none; }
.min-w-0 { min-width: 0; }
.audit-diff { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .76rem; color: var(--gf-muted); overflow-wrap: anywhere; }
.auth-card { max-width: 440px; margin: 1rem auto; }
.auth-hero { text-align: center; margin-bottom: 1.25rem; }
.auth-hero .brand-mark { width: 56px; height: 56px; font-size: 1.6rem; margin: 0 auto .6rem; border-radius: 16px; }
.setup-steps { display: flex; gap: .5rem; list-style: none; padding: 0; counter-reset: step; }
.setup-steps li { flex: 1; text-align: center; padding: .45rem .25rem; border-radius: 999px; background: var(--gf-border); color: var(--gf-muted); counter-increment: step; }
.setup-steps li::before { content: counter(step) ". "; }
.setup-steps li.active { background: var(--gf-saffron-600); color: #fff; font-weight: 600; }
.setup-steps li.done { background: #e7f4ea; color: #1e6b34; }
.setup-steps li.done::before { content: "✓ "; }
.hero-locality { font-weight: 600; opacity: .92; }
.brand-locality { color: var(--gf-muted); font-weight: 500; }
.divider-text { display: flex; align-items: center; gap: .75rem; color: var(--gf-muted); font-size: .85rem; }
.divider-text::before, .divider-text::after { content: ""; flex: 1; height: 1px; background: var(--gf-border); }
.sticky-actions { position: sticky; bottom: calc(var(--gf-bottom-h) + 8px + env(safe-area-inset-bottom)); z-index: 5; background: linear-gradient(to top, var(--gf-bg) 70%, transparent); padding-top: .75rem; }
@media (min-width: 992px) { .sticky-actions { bottom: 0; } }
.fab { position: fixed; right: 16px; bottom: calc(var(--gf-bottom-h) + 16px + env(safe-area-inset-bottom)); z-index: 1020; width: 56px; height: 56px; border-radius: 50%; background: var(--gf-saffron); color: #fff; display: grid; place-items: center; box-shadow: 0 8px 20px rgba(232, 116, 12, .4); }
.fab:hover { background: var(--gf-saffron-600); color: #fff; }
@media (min-width: 992px) { .fab { display: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
@media print {
  .app-header, .bottom-nav, .app-footer, .page-actions, .btn, .fab { display: none !important; }
  .app-main { padding: 0; }
  .card-soft, .stat-card, .table-wrap { box-shadow: none; }
}
