/* Dashboard */
.hero { background: var(--red) url("../images/gopuram.svg") right 24px bottom / auto 118% no-repeat; border-radius: 14px; padding: 20px 22px; color: #ffeccc; margin-bottom: 18px; border-bottom: 3px solid var(--gold); }
.hero h2 { color: #fff !important; font-size: 20px; margin: 0 0 4px; }
.hero p { margin: 0 0 12px; font-size: 13px; }
.hero .chips span { display: inline-block; border: 1px solid rgba(237,168,28,.55); border-radius: 20px; padding: 2px 12px; font-size: 12px; margin: 0 6px 6px 0; background: rgba(140,60,0,.7); }
.quick-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 18px; }
.quick { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--red); font-size: 12.5px; }
.quick i { font-size: 22px; color: var(--saffron); }
.quick:hover { background: var(--red); color: #fff; }
@media (max-width: 575px) { .hero { background-image: none; } }

/* Counter booking (POS) */
.pos { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 14px; align-items: start; }
.pos-cats { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 8px; }
.pos-cats button { border: 1px solid var(--line); background: var(--card); border-radius: 20px; padding: 6px 14px; font-weight: 700; font-size: 12.5px; color: var(--red); white-space: nowrap; }
.pos-cats button.active { background: var(--red); color: #fff; border-color: var(--red); }
.pos-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.pos-item { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 11px; text-align: left; position: relative; min-height: 112px; display: flex; flex-direction: column; justify-content: space-between; gap: 6px; }
.pos-item:hover { border-color: var(--gold); box-shadow: 0 6px 14px rgba(140,60,0,.09); }
.pos-item:active { transform: scale(.98); }
.pos-item .ico { width: 32px; height: 32px; border-radius: 8px; background: var(--gold-soft); color: #8a6d0e; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.pos-item b { font-size: 13px; color: var(--red); line-height: 1.25; display: block; }
.pos-item small { color: var(--muted); font-size: 11px; }
.pos-item .price { font-weight: 800; color: var(--saffron); }
.pos-item .in-cart { position: absolute; top: 8px; right: 8px; background: var(--red); color: #fff; border-radius: 20px; font-size: 11px; padding: 0 8px; font-weight: 700; }
.pos-cart { position: sticky; top: calc(var(--head-h) + 12px); }
.cart-lines { max-height: 280px; overflow-y: auto; }
.cart-line { display: grid; grid-template-columns: minmax(0,1fr) auto auto 28px; gap: 8px; align-items: center; padding: 8px 14px; border-bottom: 1px solid #f6e3b6; }
.cart-line b { font-size: 12.5px; display: block; }
.cart-line small { color: var(--muted); }
.cart-line .amt { font-weight: 700; min-width: 70px; text-align: right; }
.qty { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.qty button { width: 30px; border: 0; background: #fdeac0; font-weight: 800; color: var(--red); }
.qty input { width: 40px; border: 0; text-align: center; font-weight: 700; font-size: 13px; -moz-appearance: textfield; appearance: textfield; }
.cart-x { border: 0; background: none; color: var(--bad); font-size: 17px; padding: 0; }
.totals { padding: 10px 14px; background: #fff5da; border-top: 1px solid var(--line); }
.totals > div { display: flex; justify-content: space-between; align-items: center; padding: 3px 0; }
.totals .grand { font-size: 21px; font-weight: 800; color: var(--red); border-top: 1px dashed #e3bd6c; margin-top: 4px; padding-top: 6px; }
.totals input { width: 110px; text-align: right; min-height: 32px !important; padding: 2px 8px; }
.pay-modes { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.pay-modes button { border: 1px solid var(--line); background: var(--card); border-radius: 9px; padding: 7px 2px; font-size: 11.5px; font-weight: 700; color: var(--red); display: flex; flex-direction: column; align-items: center; gap: 2px; }
.pay-modes button i { font-size: 18px; }
.pay-modes button.active { background: var(--red); color: #fff; border-color: var(--red); }
.devotee-box { background: var(--gold-soft); border-radius: 10px; padding: 9px 12px; display: flex; gap: 10px; align-items: center; margin-top: 8px; }
.pos-mobile-bar { display: none; }
@media (max-width: 1199px) { .pos { grid-template-columns: minmax(0,1fr) 360px; } }
@media (max-width: 859px) {
  .pos { grid-template-columns: minmax(0,1fr); }
  .pos-cart { position: static; }
  .pos-mobile-bar { display: flex; position: sticky; bottom: 0; z-index: 20; background: var(--red); color: #fff; padding: 10px 14px; border-radius: 12px 12px 0 0; justify-content: space-between; align-items: center; margin-top: 10px; }
}

/* Registration type selector / choice cards */
.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.choice { border: 2px solid var(--line); border-radius: 12px; padding: 14px; background: var(--card); text-align: left; display: flex; gap: 12px; align-items: center; }
.choice i { font-size: 26px; color: var(--gold); }
.choice b { display: block; color: var(--red); }
.choice small { color: var(--muted); }
.choice.active { border-color: var(--red); background: #fdefd0; box-shadow: inset 0 0 0 1px var(--red); }
.profile-head { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }

/* Hundi */
.denom-row { display: grid; grid-template-columns: 90px 20px minmax(90px, 140px) 20px minmax(90px, 1fr); gap: 8px; align-items: center; padding: 5px 16px; border-bottom: 1px solid #f6e3b6; }
.note-chip { border-radius: 6px; padding: 5px 0; text-align: center; font-weight: 800; border: 1.5px solid #bcae8a; background: #f8f3e4; color: #5b4a14; }
.note-chip.coin { border-radius: 20px; background: #eef0f4; border-color: #b8bfcc; color: #3c4658; }
.denom-total { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.grand-box { background: var(--red); color: #fff; padding: 14px 16px; display: flex; justify-content: space-between; align-items: center; border-radius: 0 0 12px 12px; }
.grand-box b { font-size: 24px; color: var(--gold); }
.steps { display: flex; gap: 0; margin-bottom: 4px; }
.steps div { flex: 1; text-align: center; font-size: 11.5px; font-weight: 700; color: var(--muted); border-top: 4px solid var(--line); padding-top: 6px; }
.steps div.done { border-color: var(--gold); color: var(--red); }

/* Festival calendar */
.cal-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.cal .dow { background: #fdeac0; font-size: 11px; font-weight: 800; text-align: center; padding: 6px 0; color: var(--red); text-transform: uppercase; }
.cal .day { min-height: 92px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 4px; }
.cal .day.other { background: #fdf4dc; color: #b8b5ad; }
.cal .day.today .dnum { background: var(--saffron); color: #fff; }
.dnum { display: inline-flex; width: 22px; height: 22px; border-radius: 50%; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
.ev { display: block; width: 100%; border: 0; text-align: left; border-radius: 5px; background: var(--red); color: #fff; font-size: 10.5px; padding: 2px 5px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.ev.major { background: var(--saffron); } .ev.pooja { background: var(--gold-soft); color: #6e5608; }
.fest-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.fest-card { background: var(--card); border: 1px solid var(--line); border-top: 4px solid var(--gold); border-radius: 12px; padding: 14px; cursor: pointer; }
.fest-card:hover { box-shadow: 0 8px 18px rgba(140,60,0,.1); }
.fest-card h3 { font-size: 15px; margin: 0 0 4px; }
.timeline { border-left: 2px solid var(--gold); margin-left: 8px; padding-left: 18px; }
.timeline > div { position: relative; padding-bottom: 14px; }
.timeline > div::before { content: ""; position: absolute; left: -25px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--red); border: 2px solid #fff; }
@media (max-width: 767px) {
  .cal .day { min-height: 54px; padding: 2px; }
  .ev { font-size: 0; height: 6px; padding: 0; }
}

/* Reports centre */
.report-layout { display: grid; grid-template-columns: 260px minmax(0,1fr); gap: 16px; align-items: start; }
.report-menu .grp { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; font-weight: 800; color: var(--muted); padding: 12px 14px 4px; }
.report-menu button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 6px 14px; font-size: 13px; color: var(--ink); border-left: 3px solid transparent; }
.report-menu button:hover { background: var(--gold-soft); }
.report-menu button.active { border-left-color: var(--gold); background: var(--gold-soft); font-weight: 700; color: var(--red); }
.report-menu { max-height: calc(100vh - 150px); overflow: auto; position: sticky; top: calc(var(--head-h) + 12px); }
.report-paper { background: #e9e6df; padding: 18px; overflow: auto; border-radius: 0 0 12px 12px; }
.report-paper .doc { min-width: 640px; box-shadow: 0 4px 18px rgba(0,0,0,.12); }
@media (max-width: 991px) { .report-layout { grid-template-columns: minmax(0,1fr); } .report-menu { position: static; max-height: 260px; } }

/* Accounts */
.acc-layout { display: grid; grid-template-columns: 220px minmax(0,1fr); gap: 16px; align-items: start; }
@media (max-width: 991px) { .acc-layout { grid-template-columns: minmax(0,1fr); } .acc-layout .report-menu { position: static; max-height: 220px; } }
.balance-flag { border-radius: 8px; padding: 8px 12px; font-weight: 700; }
.balance-flag.ok { background: #e2f2ea; color: var(--ok); }
.balance-flag.bad { background: #fae6e4; color: var(--bad); }
body.erp table.voucher-grid td { min-width: 110px; }
body.erp table.voucher-grid td:first-child { min-width: 230px; }

/* Permissions */
body.erp table.perm td, body.erp table.perm th { text-align: center; }
body.erp table.perm td:first-child, body.erp table.perm th:first-child { text-align: left; }
.role-btn { display: flex; justify-content: space-between; width: 100%; border: 1px solid var(--line); background: var(--card); border-radius: 9px; padding: 9px 12px; margin-bottom: 8px; font-weight: 700; color: var(--red); }
.role-btn.active { background: var(--red); color: #fff; border-color: var(--red); }

/* Eight dashboard cards sit as two even rows */
@media (min-width: 1200px) { .dash-stats .stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* HR & Payroll */
body.erp table.att-grid .att-status { min-width: 120px; }
body.erp table.att-grid input[type=time] { min-width: 112px; }

/* Chart of accounts tree */
.depth-1 { padding-left: 18px; } .depth-2 { padding-left: 36px; }
.coa-row { display: flex; justify-content: space-between; gap: 12px; padding: 7px 16px; border-bottom: 1px solid #f6e3b6; }
.coa-row > span:last-child { white-space: nowrap; font-variant-numeric: tabular-nums; }
.coa-row.head { background: #fdeac0; color: var(--red); font-size: 11.5px; font-weight: 700; text-transform: uppercase; }
.coa-row.depth-0 { font-weight: 800; color: var(--red); background: #fdf0cf; padding-left: 16px; }
.coa-row.depth-1 { font-weight: 700; padding-left: 34px; }
.coa-row.depth-2 { padding-left: 62px; }
.coa-row small { color: var(--muted); margin: 0 4px; }
.coa-toggle { border: 0; background: none; padding: 0; color: var(--red); }

.section-body { min-width: 0; }
body.erp .erp-tabs { overflow-y: hidden; }
