/* ======================================================
   Church Attendance System — Custom Styles v4 "Dandelion"
   Primary: #97723B (brown-gold) · Gold: #A98545 · Coral: #D66845
   Cream/white dominant. Olive green (#2C3E2B family) is used
   ONLY as deliberate chrome accents (sidebar, login, member
   card, kiosk header, admin role badge) — not the main brand
   color — keep those specific literal hex values as-is.
   ====================================================== */

/* ===== BOOKING: Pill tab toggle ===== */
.bk-tabs-pill {
    display: inline-flex;
    background: #f0f2f5;
    border-radius: 12px;
    padding: 3px;
    gap: 2px;
}
.bk-tab-pill {
    display: flex; align-items: center; gap: .35rem;
    padding: .42rem 1rem;
    border: none; border-radius: 9px; cursor: pointer;
    font-size: .83rem; font-weight: 500; color: #64748b;
    background: transparent; transition: all .15s ease;
    font-family: 'Inter', sans-serif;
}
.bk-tab-pill:hover { color: #475569; }
.bk-tab-pill.active {
    background: #fff; color: #97723B; font-weight: 700;
    box-shadow: 0 1px 4px rgba(0,0,0,.1);
}
.bk-tab-pill i { font-size: .78rem; }

/* ===== ROOMS: icon badge ===== */
.room-icon-badge {
    width: 38px; height: 38px; border-radius: 11px; flex-shrink: 0;
    background: rgba(151,114,59,.07);
    display: flex; align-items: center; justify-content: center;
    color: #97723B; font-size: .88rem;
}

:root {
    --primary: #97723B;
    --primary-light: #A98545;
    --primary-dark: #7C5D2F;
    --primary-rgb: 151,114,59;
    --gold: #A98545;
    --gold-light: #C7A667;
    --gold-dark: #97723B;
    --gold-rgb: 169,133,69;
    --coral: #D66845;
    --coral-rgb: 214,104,69;
    --bg: #F7F4EB;
    --card-bg: #FFFFFF;
    --text: #2E2C24;
    --text-muted: #6c757d;
    --border: #E3DDCD;
    --sidebar-width: 260px;
    --topbar-height: 64px;
    --transition: all 0.3s cubic-bezier(.4,0,.2,1);
    --bounce: cubic-bezier(.68,-.55,.27,1.55);
}

* { box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    margin: 0;
}

/* ===== APP WRAPPER ===== */
.app-wrapper { display: flex; min-height: 100vh; }

/* ===== SIDEBAR ===== */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(170deg, #121C11 0%, #1E2A1D 30%, #2C3E2B 60%, #253423 100%);
    position: fixed;
    top: 0; left: 0;
    height: 100vh;
    z-index: 1040;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    overflow-y: auto;
}

.sidebar-header {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: .75rem;
    color: var(--gold);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: .3px;
}

.sidebar-brand i { font-size: 1.4rem; }
.sidebar-brand img { width: 24px; height: 24px; object-fit: contain; flex-shrink: 0; }

.sidebar-close {
    background: none;
    border: none;
    color: rgba(255,255,255,.5);
    font-size: 1.25rem;
    cursor: pointer;
}

.sidebar-nav { flex: 1; padding: 1rem 0; }

.nav-section { padding: .75rem 1.5rem .25rem; }

.nav-section-title {
    font-size: .65rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(255,255,255,.25);
    font-weight: 600;
}

.sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .65rem 1.5rem;
    color: rgba(255,255,255,.55);
    text-decoration: none;
    font-size: .875rem;
    font-weight: 500;
    transition: var(--transition);
    border-left: 3px solid transparent;
    position: relative;
}

.sidebar .nav-link:hover {
    color: rgba(255,255,255,.9);
    background: rgba(255,255,255,.06);
    transform: translateX(3px);
}

.sidebar .nav-link.active {
    color: var(--gold);
    background: rgba(169,133,69,.08);
    border-left-color: var(--gold);
}

.sidebar .nav-link.active::after {
    content: '';
    position: absolute;
    right: 0; top: 50%; transform: translateY(-50%);
    width: 3px; height: 60%;
    background: var(--gold);
    border-radius: 3px 0 0 3px;
}

.sidebar .nav-link i { width: 20px; text-align: center; font-size: .9rem; }

/* Sidebar submenu (Web Content) */
.sidebar .nav-parent { display: flex; align-items: stretch; }
.sidebar .nav-parent .nav-parent-main {
    flex: 1; display: flex; align-items: center; gap: .75rem;
    padding: .65rem 1.5rem; color: rgba(255,255,255,.55);
    text-decoration: none; font-size: .875rem; font-weight: 500;
    border-left: 3px solid transparent; transition: var(--transition);
}
.sidebar .nav-parent .nav-parent-main:hover { color: rgba(255,255,255,.9); background: rgba(255,255,255,.06); }
.sidebar .nav-parent .nav-parent-main.active { color: var(--gold); background: rgba(169,133,69,.08); border-left-color: var(--gold); }
.sidebar .nav-parent .nav-parent-main i { width: 20px; text-align: center; font-size: .9rem; }
.sidebar .nav-caret-btn {
    background: none; border: none; color: rgba(255,255,255,.35);
    padding: 0 1.15rem; cursor: pointer; transition: var(--transition);
}
.sidebar .nav-caret-btn:hover { color: rgba(255,255,255,.8); }
.sidebar .nav-caret { font-size: .7rem; transition: transform .25s ease; }
.sidebar .nav-caret-btn[aria-expanded="true"] .nav-caret { transform: rotate(90deg); }

.sidebar .nav-submenu { background: rgba(0,0,0,.18); }
.sidebar .nav-sublink {
    display: flex; align-items: center; gap: .6rem;
    padding: .55rem 1.5rem .55rem 3rem;
    color: rgba(255,255,255,.5); text-decoration: none;
    font-size: .82rem; font-weight: 500;
    border-left: 3px solid transparent; transition: var(--transition);
}
.sidebar .nav-sublink:hover { color: rgba(255,255,255,.9); background: rgba(255,255,255,.05); transform: translateX(3px); }
.sidebar .nav-sublink.active { color: var(--gold); background: rgba(169,133,69,.1); border-left-color: var(--gold); }
.sidebar .nav-sublink i { width: 16px; text-align: center; font-size: .75rem; opacity: .85; }

.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255,255,255,.08);
}

.user-info { display: flex; align-items: center; gap: .75rem; }

.user-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    font-size: .8rem;
    flex-shrink: 0;
}

.user-details { display: flex; flex-direction: column; }
.user-name { color: #fff; font-size: .85rem; font-weight: 600; }
.user-role {
    color: rgba(255,255,255,.4);
    font-size: .65rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

/* ===== MAIN CONTENT ===== */
.main-content {
    flex: 1;
    min-width: 0;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.topbar {
    height: var(--topbar-height);
    background: #fff;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 1020;
    backdrop-filter: blur(10px);
    background: rgba(255,255,255,.92);
}

.page-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
}

.sidebar-toggle {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--text);
    cursor: pointer;
    margin-right: 1rem;
}

.content-area { flex: 1; padding: 1.5rem; }

/* ===== CARDS ===== */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(0,0,0,.04), 0 4px 12px rgba(0,0,0,.02);
    transition: var(--transition);
}

.card:hover { box-shadow: 0 4px 20px rgba(0,0,0,.06); }

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.25rem;
    font-weight: 600;
}

.card-body { padding: 1.25rem; }

/* ===== DASHBOARD STAT CARDS ===== */
.dash-stat-card {
    display: flex;
    align-items: center;
    gap: .85rem;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.1rem 1rem;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: 0 1px 4px rgba(0,0,0,.04);
    height: 100%;
    position: relative;
    overflow: hidden;
}
.dash-stat-card::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 4px;
    background: var(--accent, var(--primary));
    border-radius: 4px 0 0 4px;
    opacity: 0;
    transition: opacity .2s ease;
}
.dash-stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(0,0,0,.09);
    border-color: rgba(0,0,0,.1);
}
.dash-stat-card:hover::before { opacity: 1; }
.dsc-icon {
    width: 48px; height: 48px; min-width: 48px;
    border-radius: 13px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}
.dsc-body { flex: 1; min-width: 0; }
.dsc-number {
    font-size: 1.7rem;
    font-weight: 700;
    line-height: 1.1;
    color: var(--text);
    letter-spacing: -.03em;
}
.dsc-label {
    font-size: .75rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dsc-sub { margin-top: 5px; }
.dsc-badge {
    display: inline-block;
    font-size: .68rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 20px;
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dsc-arrow {
    color: #d1d5db;
    font-size: .65rem;
    transition: transform .15s ease, color .15s ease;
    flex-shrink: 0;
}
.dash-stat-card:hover .dsc-arrow {
    transform: translateX(3px);
    color: var(--accent, var(--primary));
}
@media (max-width: 575px) {
    .dsc-number { font-size: 1.4rem; }
    .dsc-icon { width: 40px; height: 40px; min-width: 40px; font-size: 1rem; }
    .dash-stat-card { padding: .85rem .75rem; gap: .65rem; }
    .dsc-arrow { display: none; }
}

/* ===== DASHBOARD TREND CHART ===== */
.dash-trend-pill {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    padding: 5px 14px;
    border-radius: 10px;
    gap: 0;
}
.dash-trend-pill-val {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -.02em;
}
.dash-trend-pill-lbl {
    font-size: .67rem;
    color: var(--text-muted);
    font-weight: 500;
    white-space: nowrap;
}
.dash-chart-wrap {
    position: relative;
    height: 200px;
}
.dash-chart-wrap canvas {
    max-height: 200px;
}
@media (max-width: 767px) {
    .dash-chart-wrap { height: 180px; }
    .dash-chart-wrap canvas { max-height: 180px; }
}

/* ===== DASHBOARD CHECK-IN LIST ===== */
.dash-checkin-list { padding: .25rem 0; }
.dash-checkin-item {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .6rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    transition: background .15s;
}
.dash-checkin-item:last-child { border-bottom: none; }
.dash-checkin-item:hover { background: #fafbfc; }
.dash-checkin-av {
    width: 34px; height: 34px; min-width: 34px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: .8rem;
    font-weight: 700;
    flex-shrink: 0;
}
.dash-checkin-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.dash-checkin-info strong {
    font-size: .83rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dash-checkin-info span {
    font-size: .72rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dash-checkin-time {
    font-size: .72rem;
    color: var(--text-muted);
    font-weight: 500;
    flex-shrink: 0;
}

/* ===== DASHBOARD BIRTHDAY LIST ===== */
.dash-bday-list { padding: .25rem 0; }
.dash-bday-item {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .55rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    transition: background .15s;
}
.dash-bday-item:last-child { border-bottom: none; }
.dash-bday-item:hover { background: #fafbfc; }
.dash-bday-today { background: rgba(169,133,69,.04); }
.dash-bday-av {
    width: 34px; height: 34px; min-width: 34px;
    border-radius: 50%;
    background: var(--bg);
    display: flex; align-items: center; justify-content: center;
    font-size: .8rem;
    font-weight: 700;
    color: var(--text-muted);
}
.dash-bday-av-today {
    background: var(--gold);
    color: #fff;
}
.dash-bday-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.dash-bday-info strong {
    font-size: .83rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dash-bday-info span {
    font-size: .71rem;
    color: var(--text-muted);
}
.dash-bday-when { flex-shrink: 0; }
.dash-bday-badge {
    display: inline-block;
    font-size: .68rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 20px;
    background: #f1f5f9;
    color: #64748b;
}
.dash-bday-badge-today {
    background: var(--gold);
    color: #fff;
}
.dash-bday-badge-soon {
    background: rgba(14,165,233,.1);
    color: #0284c7;
}

/* ===== STAT CARDS ===== */
.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.25rem;
    height: 100%;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
    transition: var(--transition);
    animation: fadeInUp .5s ease both;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,.08);
}

.stat-icon {
    width: 50px; height: 50px;
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.stat-icon.bg-primary-subtle { background: rgba(var(--primary-rgb),.08); color: var(--primary); }
.stat-icon.bg-success-subtle { background: rgba(40,167,69,.08); color: #28a745; }
.stat-icon.bg-warning-subtle { background: rgba(255,193,7,.08); color: #e6a800; }
.stat-icon.bg-gold-subtle    { background: rgba(var(--gold-rgb),.08); color: var(--gold); }
.stat-icon.bg-danger-subtle  { background: rgba(220,53,69,.08); color: #dc3545; }

.stat-info h3 { font-size: 1.5rem; font-weight: 700; margin: 0; color: var(--text); }
.stat-info p  { font-size: .78rem; color: var(--text-muted); margin: 0; }

/* ===== BUTTONS ===== */
.btn {
    border-radius: 10px;
    font-weight: 500;
    transition: var(--transition);
}

.btn:active { transform: scale(.97); }

.btn-primary       { background: var(--primary); border-color: var(--primary); }
.btn-primary:hover  { background: var(--primary-light); border-color: var(--primary-light); box-shadow: 0 4px 12px rgba(var(--primary-rgb),.3); }
.btn-primary:active,
.btn-primary:focus  { background: var(--primary-dark) !important; border-color: var(--primary-dark) !important; }

.btn-gold       { background: var(--gold); border-color: var(--gold); color: #fff; }
.btn-gold:hover  { background: var(--gold-dark); border-color: var(--gold-dark); color: #fff; box-shadow: 0 4px 12px rgba(var(--gold-rgb),.3); }

.btn-outline-gold       { border-color: var(--gold); color: var(--gold); }
.btn-outline-gold:hover  { background: var(--gold); color: #fff; }

/* ===== ACTION BUTTONS (Modern icon buttons) ===== */
.action-btns {
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: flex-end;
}

.action-btn {
    width: 34px; height: 34px;
    border-radius: 10px;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .82rem;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    position: relative;
}

.action-btn:hover { transform: translateY(-2px); }
.action-btn:active { transform: scale(.92); }

.action-btn-primary   { background: rgba(var(--primary-rgb),.08); color: var(--primary); }
.action-btn-primary:hover { background: var(--primary); color: #fff; box-shadow: 0 4px 10px rgba(var(--primary-rgb),.25); }

.action-btn-gold   { background: rgba(var(--gold-rgb),.1); color: var(--gold); }
.action-btn-gold:hover { background: var(--gold); color: #fff; box-shadow: 0 4px 10px rgba(var(--gold-rgb),.25); }

.action-btn-info   { background: rgba(59,130,246,.08); color: #3b82f6; }
.action-btn-info:hover { background: #3b82f6; color: #fff; box-shadow: 0 4px 10px rgba(59,130,246,.25); }

.action-btn-success { background: rgba(40,167,69,.08); color: #28a745; }
.action-btn-success:hover { background: #28a745; color: #fff; box-shadow: 0 4px 10px rgba(40,167,69,.25); }

.action-btn-danger  { background: rgba(220,53,69,.06); color: #dc3545; }
.action-btn-danger:hover { background: #dc3545; color: #fff; box-shadow: 0 4px 10px rgba(220,53,69,.25); }

/* ===== TABLES ===== */
.table { margin: 0; }

.table th {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: var(--text-muted);
    font-weight: 600;
    border-bottom: 2px solid var(--border);
    padding: .75rem 1rem;
    white-space: nowrap;
}

.table td {
    padding: .75rem 1rem;
    vertical-align: middle;
    border-color: #f5f5f5;
    font-size: .88rem;
}

.table-hover tbody tr { transition: var(--transition); }
.table-hover tbody tr:hover { background: rgba(var(--primary-rgb),.02); }

.table-row-present { background: rgba(40,167,69,.03) !important; }

.font-monospace { font-family: 'SF Mono', 'Cascadia Code', monospace; font-size: .78rem; }

/* ===== STATUS PILLS ===== */
.status-pill {
    display: inline-flex;
    align-items: center;
    padding: .3em .7em;
    border-radius: 20px;
    font-size: .78rem;
    font-weight: 500;
}

.status-present { background: rgba(40,167,69,.1); color: #1a7a34; }
.status-absent  { background: rgba(108,117,125,.1); color: #6c757d; }

/* ===== FORMS ===== */
.form-control, .form-select {
    border-color: var(--border);
    border-radius: 10px;
    padding: .55rem .85rem;
    transition: var(--transition);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb),.1);
}

.form-label { font-size: .85rem; font-weight: 500; color: var(--text); }

/* Opt-in helper: this app's custom `.form-control, .form-select` rule above
   uses a larger padding (.55rem .85rem) that overrides Bootstrap's own smaller
   `-sm` padding, but that override doesn't reach `.btn-sm` — so a `.btn-sm`
   placed in the same row as a `.form-control-sm`/`.form-select-sm` renders
   ~9-10px shorter than its neighbors. Add this class to that button to match
   (font-size/line-height/border already agree by Bootstrap default, only the
   vertical padding needs reconciling). See repo memory notes for the full story. */
.btn-sm-input-match {
    padding-top: .55rem;
    padding-bottom: .55rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.input-group-text {
    background: var(--bg);
    border-color: var(--border);
    color: var(--text-muted);
    border-radius: 10px;
}

.form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

/* ===== AUTH PAGES (Login / Register / Public) ===== */
.public-page {
    background: linear-gradient(160deg, #141E13 0%, #1E2A1D 25%, #2C3E2B 55%, #384D37 80%, #212E20 100%);
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

.auth-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
    width: 100%;
    position: relative;
    overflow: hidden;
}

/* Floating BG shapes */
.auth-bg-decor { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }

.floating-shape {
    position: absolute;
    border-radius: 50%;
    opacity: .06;
    background: var(--gold);
}

.shape-1 { width: 300px; height: 300px; top: -80px; right: -60px; animation: floatShape 8s ease-in-out infinite; }
.shape-2 { width: 200px; height: 200px; bottom: -40px; left: -40px; animation: floatShape 10s ease-in-out infinite reverse; }
.shape-3 { width: 120px; height: 120px; top: 40%; left: 10%; animation: floatShape 12s ease-in-out infinite 2s; }
.shape-4 { width: 80px; height: 80px; bottom: 20%; right: 15%; animation: floatShape 9s ease-in-out infinite 1s; }

@keyframes floatShape {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(15px, -20px) rotate(5deg); }
    66% { transform: translate(-10px, 15px) rotate(-3deg); }
}

/* Stars / glitter */
.auth-stars {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 0;
}

.auth-star {
    position: absolute;
    width: 2px; height: 2px;
    background: #fff;
    border-radius: 50%;
    animation: twinkle var(--dur, 3s) ease-in-out infinite var(--delay, 0s);
}

.auth-star.gold { background: var(--gold); width: 3px; height: 3px; }

@keyframes twinkle {
    0%, 100% { opacity: 0; transform: scale(.5); }
    50% { opacity: .8; transform: scale(1); }
}

.auth-card {
    background: var(--card-bg);
    border-radius: 20px;
    box-shadow: 0 25px 60px rgba(0,0,0,.25);
    width: 100%;
    max-width: 420px;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.auth-card-wide { max-width: 500px; }

.auth-card-header {
    background: linear-gradient(160deg, #182315 0%, #2C3E2B 60%, #3C523B 100%);
    color: #fff;
    text-align: center;
    padding: 2.5rem 2rem 2.2rem;
    position: relative;
    overflow: hidden;
    border-radius: 20px 20px 0 0;
}

.auth-logo-ring {
    width: 64px; height: 64px;
    border-radius: 50%;
    background: rgba(var(--gold-rgb),.15);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1rem;
    animation: pulse-ring 2s ease-in-out infinite;
}

.auth-logo-ring i { font-size: 1.6rem; color: var(--gold); }

.auth-logo-ring.success-ring { background: rgba(40,167,69,.15); }
.auth-logo-ring.success-ring i { color: #28a745; }

@keyframes pulse-ring {
    0%, 100% { box-shadow: 0 0 0 0 rgba(var(--gold-rgb),.2); }
    50% { box-shadow: 0 0 0 12px rgba(var(--gold-rgb),0); }
}

.auth-card-header h2 { font-size: 1.4rem; font-weight: 700; margin: 0; letter-spacing: .3px; }
.auth-card-header p  { margin: .4rem 0 0; opacity: .6; font-size: .85rem; }

.auth-form { padding: 2rem 2rem 1.5rem; }

.auth-footer {
    text-align: center;
    padding: 0 2rem 1.5rem;
    color: var(--text-muted);
    font-size: .75rem;
}

/* ===== LOGIN — split-panel redesign (login page only) ===== */
.login-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--card-bg);
    border-radius: 24px;
    box-shadow: 0 30px 70px rgba(0,0,0,.3);
    width: 100%;
    max-width: 860px;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.login-brand {
    position: relative;
    background: linear-gradient(160deg, #182315 0%, #2C3E2B 55%, #3C523B 100%);
    color: #fff;
    padding: 3rem 2.5rem;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.login-brand-pattern {
    position: absolute; inset: 0; pointer-events: none;
    background-image:
        radial-gradient(circle at 18% 18%, rgba(169,133,69,.2) 0, transparent 45%),
        radial-gradient(circle at 88% 82%, rgba(169,133,69,.14) 0, transparent 50%);
}

.login-brand-body { position: relative; z-index: 1; }

.login-brand-mark {
    width: 58px; height: 58px;
    border-radius: 16px;
    background: rgba(var(--gold-rgb),.16);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.45rem; color: var(--gold);
    margin-bottom: 1.5rem;
}
.login-brand-mark img { width: 32px; height: 32px; object-fit: contain; }

.login-brand-body h1 { font-size: 1.6rem; font-weight: 800; margin: 0 0 .75rem; letter-spacing: .3px; }
.login-brand-body > p { opacity: .72; font-size: .88rem; line-height: 1.6; margin: 0 0 1.75rem; max-width: 300px; }

.login-brand-points { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .85rem; }
.login-brand-points li { display: flex; align-items: center; gap: .65rem; font-size: .83rem; opacity: .88; }
.login-brand-points i { color: var(--gold); font-size: .88rem; }

.login-form-panel {
    padding: 3rem 2.75rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-form-panel .auth-form { padding: 0; }

.login-form-head h2 { font-size: 1.5rem; font-weight: 700; margin: 0 0 .35rem; color: var(--text); }
.login-form-head p  { color: var(--text-muted); font-size: .87rem; margin: 0 0 1.75rem; }

.login-form-foot {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-muted);
    font-size: .75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    flex-wrap: wrap;
}

.login-back-link {
    color: var(--gold-dark);
    font-size: .78rem;
    font-weight: 600;
    text-decoration: none;
    transition: color .2s ease;
}
.login-back-link:hover { color: var(--gold); }

.login-register-cta {
    text-align: center;
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px dashed var(--border);
    font-size: .85rem;
    color: var(--text-muted);
}
.login-register-cta a {
    color: var(--gold-dark);
    font-weight: 700;
    text-decoration: none;
}
.login-register-cta a:hover { text-decoration: underline; }

@media (max-width: 767.98px) {
    .login-panel { grid-template-columns: 1fr; max-width: 420px; border-radius: 20px; }
    .login-brand { display: none; }
    .login-form-panel { padding: 2.5rem 2rem; }
}

@media (max-width: 575.98px) {
    .login-panel { margin: .5rem; max-width: none; }
    .login-form-panel { padding: 2rem 1.5rem; }
}

/* ===== FLOATING FIELDS ===== */
.floating-field {
    position: relative;
    margin-bottom: 1.25rem;
}

.floating-field .form-control,
.floating-field .form-select {
    height: 52px;
    padding: 1.2rem .85rem .4rem 2.5rem;
    font-size: .9rem;
    border: 2px solid #e8ecf0;
    border-radius: 12px;
    background: #fafbfc;
    transition: var(--transition);
    width: 100%;
}

.floating-field textarea.form-control { height: auto; min-height: 52px; padding-top: 1.5rem; }

.floating-field .form-control:focus,
.floating-field .form-select:focus {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(var(--primary-rgb),.08);
}

.floating-field label {
    position: absolute;
    top: 50%; left: 2.5rem;
    transform: translateY(-50%);
    font-size: .88rem;
    color: #999;
    pointer-events: none;
    transition: var(--transition);
}

.floating-field textarea ~ label { top: 1.2rem; transform: none; }

.floating-field .form-control:focus ~ label,
.floating-field .form-control:not(:placeholder-shown) ~ label,
.floating-field .form-select:focus ~ label,
.floating-field .form-select:not([value=""]):valid ~ label,
.floating-field select ~ label {
    top: 6px; left: 2.5rem;
    font-size: .65rem;
    font-weight: 600;
    color: var(--primary);
    letter-spacing: .5px;
    text-transform: uppercase;
    transform: none;
}

.floating-field .field-icon {
    position: absolute;
    top: 50%; left: .85rem;
    transform: translateY(-50%);
    color: #bbb;
    font-size: .9rem;
    transition: var(--transition);
    z-index: 2;
}

.floating-field .form-control:focus ~ .field-icon,
.floating-field .form-select:focus ~ .field-icon { color: var(--primary); }

/* Reorder icon for CSS — icon uses ~ which needs preceding sibling */
.floating-field { display: flex; flex-direction: column; }
.floating-field .field-icon { order: -1; position: absolute; }
.floating-field .form-control,
.floating-field .form-select { order: 0; }
.floating-field label { order: 1; }

.pwd-toggle {
    position: absolute;
    top: 50%; right: .85rem;
    transform: translateY(-50%);
    background: none; border: none;
    color: #bbb; font-size: .9rem;
    cursor: pointer; z-index: 2;
    transition: var(--transition);
}

.pwd-toggle:hover { color: var(--primary); }

.btn-auth {
    width: 100%;
    padding: .85rem 1.5rem;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    border: none;
    font-size: .95rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn-auth::before {
    content: '';
    position: absolute;
    top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.15), transparent);
    transition: left .5s ease;
}

.btn-auth:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(var(--primary-rgb),.3); color: #fff; }
.btn-auth:hover::before { left: 100%; }
.btn-auth:active { transform: translateY(0); }

/* ===== STAGGER-IN ANIMATION ===== */
.stagger-in { animation: staggerFadeIn .6s ease both; }

@keyframes staggerFadeIn {
    from { opacity: 0; transform: translateY(30px) scale(.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ===== EMPTY STATE ===== */
.empty-state { text-align: center; padding: 1.5rem; color: var(--text-muted); }
.empty-state i { font-size: 2.5rem; opacity: .2; margin-bottom: .5rem; display: block; }
.empty-state p { margin: 0; font-size: .88rem; }

/* ===== SERVICE ITEMS (Dashboard) ===== */
.service-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: .75rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.service-item:last-child { border-bottom: none; }

.service-time { font-size: .85rem; font-weight: 600; color: var(--primary); white-space: nowrap; }

.service-info { flex: 1; }
.service-info h6 { margin: 0; font-size: .9rem; font-weight: 600; }

/* ===== RECENT LIST ===== */
.recent-item {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .5rem 0;
    border-bottom: 1px solid #f8f8f8;
}

.recent-item:last-child { border-bottom: none; }

.recent-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--bg);
    display: flex; align-items: center; justify-content: center;
    color: var(--text-muted);
    font-size: .8rem;
    flex-shrink: 0;
}

.recent-info { flex: 1; }
.recent-info strong { display: block; font-size: .85rem; }
.recent-info small  { color: var(--text-muted); font-size: .75rem; }

/* ===== SERVICE CARD (Checkin services list) ===== */
.service-card { transition: var(--transition); }
.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,.08);
}

/* ===== ATTENDANCE STATS STRIP ===== */
.attendance-stats-strip {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.att-stat {
    flex: 1;
    min-width: 140px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: .75rem;
    animation: fadeInUp .5s ease both;
}

.att-stat:nth-child(2) { animation-delay: .1s; }
.att-stat:nth-child(3) { animation-delay: .2s; }
.att-stat:nth-child(4) { animation-delay: .3s; }

.att-stat-icon {
    width: 42px; height: 42px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.att-stat-num { display: block; font-size: 1.3rem; font-weight: 700; color: var(--text); line-height: 1.2; }
.att-stat-label { font-size: .72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; }

/* ===== CHECK-IN ENTRIES (OLD — kept for compatibility) ===== */
.checkin-entry {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .6rem 0;
    border-bottom: 1px solid #f0f0f0;
    animation: slideInLeft .3s ease;
}

.checkin-entry:last-child { border-bottom: none; }

.checkin-avatar {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: rgba(var(--primary-rgb),.06);
    display: flex; align-items: center; justify-content: center;
    color: var(--primary);
    flex-shrink: 0;
}

.checkin-info { flex: 1; }
.checkin-info strong { display: block; font-size: .9rem; }
.checkin-info small  { color: var(--text-muted); font-size: .75rem; }

/* ===== MEMBER CARD ===== */
.member-card {
    width: 350px;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,.15);
    font-family: 'Inter', sans-serif;
}

.member-card-header {
    background: linear-gradient(160deg, #182315 0%, #2C3E2B 60%, #3C523B 100%);
    color: #fff;
    text-align: center;
    padding: 1.5rem 1rem 2rem;
    position: relative;
}

.member-card-header::after {
    content: '';
    position: absolute;
    bottom: -1px; left: 0;
    width: 100%; height: 20px;
    background: #fff;
    border-radius: 50% 50% 0 0;
}

.member-card-church-icon { font-size: 2rem; color: var(--gold); margin-bottom: .25rem; }

.member-card-header h3 { font-size: 1.2rem; font-weight: 700; margin: 0; letter-spacing: .5px; }
.member-card-header p  { margin: .25rem 0 0; font-size: .75rem; text-transform: uppercase; letter-spacing: 2px; opacity: .7; }

.member-card-body { padding: 1.5rem; text-align: center; }

.member-card-qr {
    display: inline-block;
    padding: 10px;
    background: #fff;
    border: 2px solid #f0f0f0;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.member-card-name { font-size: 1.25rem; font-weight: 700; color: var(--primary); }

.member-card-divider {
    width: 60px; height: 3px;
    background: var(--gold);
    margin: .75rem auto;
    border-radius: 2px;
}

.member-card-details { text-align: left; }

.member-card-detail {
    display: flex;
    justify-content: space-between;
    padding: .4rem 0;
    border-bottom: 1px solid #f8f8f8;
    font-size: .85rem;
}

.member-card-detail:last-child { border-bottom: none; }
.member-card-detail .label { color: var(--text-muted); }
.member-card-detail .value { font-weight: 600; color: var(--text); }

.member-card-footer {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    text-align: center;
    padding: .75rem;
    color: #fff;
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: 600;
}

/* ===== KIOSK ===== */
.kiosk-page { background: var(--bg); min-height: 100vh; }

.kiosk-header {
    background: linear-gradient(135deg, #1E2A1D 0%, #2C3E2B 60%, #3C523B 100%);
    box-shadow: 0 2px 16px rgba(0,0,0,.2);
    position: sticky; top: 0; z-index: 100;
}

.kiosk-header-inner {
    display: flex; align-items: center; justify-content: space-between;
    padding: .95rem 2rem;
}

.kiosk-brand-area { display: flex; align-items: center; gap: .85rem; }

.kiosk-brand-icon {
    width: 46px; height: 46px; border-radius: 14px; flex-shrink: 0;
    background: rgba(169,133,69,.15); border: 1px solid rgba(169,133,69,.3);
    display: flex; align-items: center; justify-content: center;
    color: #A98545; font-size: 1.2rem;
}
.kiosk-brand-icon img { width: 28px; height: 28px; object-fit: contain; }

.kiosk-brand-name { font-size: 1.1rem; font-weight: 700; color: #A98545; line-height: 1.2; }
.kiosk-brand-sub  { font-size: .71rem; color: rgba(255,255,255,.4); margin-top: .1rem; }

.kiosk-user-area  { display: flex; align-items: center; gap: .85rem; }
.kiosk-user-info  { text-align: right; }
.kiosk-user-name  { display: block; font-size: .88rem; font-weight: 600; color: rgba(255,255,255,.85); }
.kiosk-user-role  { display: block; font-size: .68rem; color: rgba(255,255,255,.38); margin-top: .1rem; text-transform: uppercase; letter-spacing: .5px; }

.kiosk-logout-btn {
    width: 38px; height: 38px; border-radius: 50%; text-decoration: none;
    border: 1px solid rgba(255,255,255,.2);
    display: flex; align-items: center; justify-content: center;
    color: rgba(255,255,255,.5); transition: all .2s;
}
.kiosk-logout-btn:hover { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.35); }

/* Legacy - keep for any code that may still use these */
.kiosk-brand { font-size: 1.2rem; font-weight: 700; color: var(--gold); }

.kiosk-content { padding: 1.5rem; }

@media (max-width: 576px) {
    .kiosk-header-inner { padding: .75rem 1rem; }
    .kiosk-brand-sub  { display: none; }
    .kiosk-user-info  { display: none; }
    .kiosk-brand-icon { width: 38px; height: 38px; font-size: 1rem; border-radius: 10px; }
    .kiosk-brand-name { font-size: .95rem; }
    .kiosk-logout-btn { width: 34px; height: 34px; }
}

/* ===== SEARCH RESULTS ===== */
.search-result-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .85rem 1rem;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 12px;
    margin-bottom: .5rem;
    transition: var(--transition);
    background: rgba(255,255,255,.04);
}

.search-result-item:hover { background: rgba(255,255,255,.08); border-color: rgba(var(--gold-rgb),.3); }
.search-result-item.checked-in { background: rgba(40,167,69,.08); border-color: rgba(40,167,69,.2); }

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(15px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-20px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(20px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* NOTE: fill-mode intentionally NOT "both"/"forwards" — a persisted non-"none"
   transform (even translateY(0)/translateX(0) after the animation ends) turns
   this element into a containing block for any `position: fixed` descendant,
   which traps Bootstrap modals inside it (they get sized/positioned against
   this box instead of the viewport, and the modal-backdrop — appended to
   <body>, outside this box — ends up stacking on top, making the modal look
   greyed-out and unclickable). Dropping the fill-mode still looks identical
   (opacity/transform simply revert to their normal defaults of 1/none once
   the animation finishes) but avoids creating that containing block. */
.animate-fade-in { animation: fadeInUp .5s ease; }
.animate-slide-right { animation: slideInRight .4s ease; }

.animate-shake {
    animation: shake .5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-8px); }
    40% { transform: translateX(8px); }
    60% { transform: translateX(-5px); }
    80% { transform: translateX(5px); }
}

/* ===== ALERTS ===== */
.alert { border-radius: 12px; border: none; font-size: .88rem; animation: fadeInUp .4s ease; }

/* ===== BADGES ===== */
.badge { font-weight: 500; font-size: .75rem; padding: .35em .65em; border-radius: 8px; }

/* ===== PROGRESS ===== */
.progress { border-radius: 6px; background: #f0f0f0; }

/* ===== TOAST ===== */
.toast { border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.15); }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d0d0d0; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #999; }

/* ===== QR READER ===== */
#qr-reader { border: none !important; border-radius: 12px; overflow: hidden; }
#qr-reader video { border-radius: 12px; }

/* ===== SIDEBAR OVERLAY (mobile) ===== */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,.5);
    z-index: 1035;
    backdrop-filter: blur(3px);
}

/* ===== MEMBER CARD MODAL ===== */
.modal-card-dialog {
    max-width: 480px;
}

.modal-card-content {
    background: linear-gradient(170deg, #13131d 0%, #1b1c28 60%, #101018 100%);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0,0,0,.6);
    color: #fff;
}

.modal-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,.07);
    background: rgba(0,0,0,.15);
}

.modal-card-title {
    margin: 0;
    font-size: .95rem;
    font-weight: 600;
    color: #A98545;
}

.modal-card-close {
    background: rgba(255,255,255,.07);
    border: none;
    border-radius: 50%;
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    color: rgba(255,255,255,.6);
    cursor: pointer;
    transition: all .2s ease;
    font-size: .85rem;
}

.modal-card-close:hover { background: rgba(255,255,255,.15); color: #fff; }

.modal-card-body {
    padding: 1.5rem;
    display: flex;
    justify-content: center;
}

.modal-card-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: .5rem;
    padding: .75rem 1.25rem;
    border-top: 1px solid rgba(255,255,255,.07);
    background: rgba(0,0,0,.15);
    flex-wrap: wrap;
}

.btn-gold-solid {
    background: linear-gradient(135deg, #A98545, #97723B);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: .5rem 1.1rem;
    font-size: .85rem;
    font-weight: 600;
    transition: all .2s ease;
}

.btn-gold-solid:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(169,133,69,.35); color: #fff; }

.btn-ghost-light {
    background: rgba(255,255,255,.07);
    color: rgba(255,255,255,.7);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 10px;
    padding: .5rem 1.1rem;
    font-size: .85rem;
    font-weight: 500;
    transition: all .2s ease;
}

.btn-ghost-light:hover { background: rgba(255,255,255,.12); color: #fff; }

/* ===== SERVICE AUTO-STATUS ===== */
.status-auto-pill {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .3em .75em;
    border-radius: 20px;
    font-size: .78rem;
    font-weight: 600;
}

.status-auto-pill.upcoming { background: rgba(59,130,246,.1); color: #3b82f6; }
.status-auto-pill.today    { background: rgba(40,167,69,.1); color: #28a745; }
.status-auto-pill.completed { background: rgba(108,117,125,.1); color: #6c757d; }

/* ===== RESPONSIVE ===== */
@media (max-width: 991.98px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.show { transform: translateX(0); }
    .sidebar.show ~ .sidebar-overlay { display: block; }
    .main-content { margin-left: 0; }
}

@media (max-width: 767.98px) {
    /* Content padding reduced */
    .content-area { padding: .875rem; }

    /* Topbar tighter on mobile */
    .topbar { padding: 0 .875rem; height: 56px; }
    .page-title { font-size: .95rem; }

    /* Stat cards: 2 per row, tighter */
    .stat-card { padding: .9rem; gap: .75rem; }
    .stat-icon { width: 42px; height: 42px; font-size: 1rem; }
    .stat-info h3 { font-size: 1.3rem; }
    .stat-info p  { font-size: .72rem; }

    /* Cards: less padding */
    .card-body { padding: 1rem; }
    .card-header { padding: .875rem 1rem; }

    /* Tables: smaller font */
    .table th { font-size: .68rem; padding: .6rem .75rem; }
    .table td { font-size: .82rem; padding: .6rem .75rem; }
    .action-btn { width: 30px; height: 30px; font-size: .78rem; }

    /* Member card smaller on mobile */
    .member-card { width: 285px; }

    /* Action buttons wrap */
    .action-btns { gap: 4px; }

    /* Forms: full width on mobile */
    .attendance-stats-strip { gap: .5rem; }
    .att-stat { min-width: 100px; padding: .75rem; }

    /* Service item: stack on very small screens */
    .service-item { gap: .75rem; }
    .service-item .btn { padding: .3rem .6rem; font-size: .75rem; }
}

@media (max-width: 575.98px) {
    /* Content area minimal padding */
    .content-area { padding: .75rem; }

    /* Auth card full width */
    .auth-card { margin: .5rem; max-width: none; border-radius: 16px; }
    .auth-form  { padding: 1.5rem; }

    /* Stack page headers */
    .page-header { flex-direction: column; align-items: flex-start !important; }
    .page-header .d-flex { width: 100%; }

    /* Stat cards: still 2 per row but minimal padding */
    .stat-card { padding: .75rem; gap: .6rem; }
    .stat-icon { width: 36px; height: 36px; font-size: .9rem; border-radius: 10px; }
    .stat-info h3 { font-size: 1.2rem; }

    /* Topbar: minimal */
    .topbar { padding: 0 .75rem; }

    /* Hide less important columns in tables on very small screens */
    .table-sm-hide { display: none !important; }

    /* Make buttons full width in form footers */
    .btn-form-full { width: 100%; }

    /* Charts height reduction */
    canvas { max-height: 200px; }
}

/* ===== BOTTOM SAFE AREA (iOS) ===== */
@supports (padding: env(safe-area-inset-bottom)) {
    .content-area { padding-bottom: calc(1.5rem + env(safe-area-inset-bottom)); }
    .topbar       { padding-right: calc(1.5rem + env(safe-area-inset-right)); }
}

/* ===== PWA STANDALONE MODE ===== */
@media (display-mode: standalone) {
    .topbar {
        padding-top: env(safe-area-inset-top, 0);
        height: calc(var(--topbar-height) + env(safe-area-inset-top, 0));
    }
}

/* ===== PAGE HEADER UTILITY ===== */
.page-title-main {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0 0 .25rem;
}

@media (max-width: 767.98px) {
    .page-title-main { font-size: 1.1rem; }
}

/* ============================================================
   WEB CONTENT — LIST PAGES (services / events / give / gallery)
   Polished, consistent header + table card to match Konten Umum
   ============================================================ */
.wcl-head {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 1rem;
    background: #fff; border: 1px solid #e9ecf1; border-radius: 16px;
    padding: 1.1rem 1.3rem; margin-bottom: 1.25rem;
}
.wcl-head-left { display: flex; align-items: center; gap: 1rem; }
.wcl-ic {
    width: 50px; height: 50px; min-width: 50px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.25rem; color: #fff;
    background: linear-gradient(135deg, var(--wcl-accent, #97723B), color-mix(in srgb, var(--wcl-accent, #97723B) 70%, #000));
    box-shadow: 0 8px 20px color-mix(in srgb, var(--wcl-accent, #97723B) 30%, transparent);
}
.wcl-crumb { font-size: .72rem; font-weight: 600; color: #9aa0ad; text-decoration: none; letter-spacing: .3px; }
.wcl-crumb:hover { color: var(--wcl-accent, #97723B); }
.wcl-title { font-size: 1.15rem; font-weight: 700; color: #2E2C24; margin: .1rem 0 .05rem; }
.wcl-sub { font-size: .8rem; color: #8a90a0; margin: 0; }
.wcl-add {
    background: var(--wcl-accent, #97723B); border: none; color: #fff;
    border-radius: 50px; padding: .6rem 1.25rem; font-size: .85rem; font-weight: 600;
    display: inline-flex; align-items: center; gap: .45rem; text-decoration: none;
    transition: all .25s ease; box-shadow: 0 8px 20px color-mix(in srgb, var(--wcl-accent, #97723B) 28%, transparent);
}
.wcl-add:hover { transform: translateY(-2px); color: #fff; filter: brightness(1.08); box-shadow: 0 12px 26px color-mix(in srgb, var(--wcl-accent, #97723B) 38%, transparent); }

/* Secondary pill button — same shape/size as .wcl-add (for visual consistency
   when placed right next to it, e.g. a "manage categories" link beside the
   main "add" action) but a fixed neutral color instead of the page's accent,
   so it reads as a secondary action rather than competing with the primary one. */
.wcl-add-secondary {
    background: #64748b; border: none; color: #fff;
    border-radius: 50px; padding: .6rem 1.25rem; font-size: .85rem; font-weight: 600;
    display: inline-flex; align-items: center; gap: .45rem; text-decoration: none;
    transition: all .25s ease; box-shadow: 0 8px 20px rgba(100,116,139,.28);
}
.wcl-add-secondary:hover { transform: translateY(-2px); color: #fff; filter: brightness(1.1); box-shadow: 0 12px 26px rgba(100,116,139,.38); }

.wcl-card { background: #fff; border: 1px solid #e9ecf1; border-radius: 16px; overflow: hidden; box-shadow: 0 4px 20px rgba(151,114,59,.05); }
.wcl-card .table { margin: 0; }
.wcl-card .table thead th {
    background: #f8f9fb; color: #6c7384; font-size: .72rem; font-weight: 700;
    letter-spacing: .5px; text-transform: uppercase; border-bottom: 1px solid #eef0f4; padding: .9rem 1rem;
}
.wcl-card .table tbody td { padding: .9rem 1rem; border-color: #f1f3f6; vertical-align: middle; }
.wcl-card .table tbody tr { transition: background .15s ease; }
.wcl-card .table tbody tr:hover { background: #fbfaf7; }

.wcl-chip { font-size: .68rem; font-weight: 700; letter-spacing: .3px; padding: .25rem .6rem; border-radius: 50px; display: inline-flex; align-items: center; gap: .3rem; }
.wcl-chip-gold { background: rgba(169,133,69,.13); color: #97723B; }
.wcl-chip-on { background: rgba(45,122,79,.13); color: #2d7a4f; }
.wcl-chip-off { background: rgba(108,117,125,.12); color: #6c757d; }
.wcl-chip-feat { background: rgba(169,133,69,.15); color: #97723B; }

.wcl-act { display: inline-flex; gap: .4rem; }
.wcl-act .btn { width: 34px; height: 34px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 9px; }

/* ── Reusable pagination control (views/partials/pagination.php) ────────── */
.pg-nav {
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
    gap: .75rem; padding: 1rem 1.25rem; border-top: 1px solid #eef0f4;
}
.pg-info { font-size: .78rem; color: #6c7384; }
.pg-list { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.pg-btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 32px; height: 32px; padding: 0 8px; border-radius: 8px;
    font-size: .8rem; font-weight: 600; color: #475569; background: #fff;
    border: 1px solid #e2e8f0; text-decoration: none; transition: all .15s ease;
}
.pg-btn:hover { background: #f8fafc; color: #97723B; border-color: #97723B; }
.pg-btn.active { background: #97723B; border-color: #97723B; color: #fff; }
.pg-btn.disabled { opacity: .4; pointer-events: none; }
.pg-ellipsis { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; height: 32px; color: #94a3b8; font-size: .8rem; }


/* Empty state */
.wcl-empty { text-align: center; padding: 3rem 1rem; color: #9aa0ad; }
.wcl-empty i { font-size: 2.4rem; opacity: .35; margin-bottom: .75rem; display: block; }

/* Gallery management grid */
.wcl-gal { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.wcl-gal-item {
    position: relative; border-radius: 16px; overflow: hidden;
    aspect-ratio: 4/3; background: #2A2015 center/cover no-repeat;
    box-shadow: 0 4px 18px rgba(151,114,59,.12); cursor: pointer;
    transition: transform .35s cubic-bezier(.19,1,.22,1), box-shadow .35s ease;
}
.wcl-gal-item:hover { transform: translateY(-5px); box-shadow: 0 18px 40px rgba(151,114,59,.25); }
.wcl-gal-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(6,13,30,.92) 0%, rgba(151,114,59,.45) 55%, transparent 100%);
    opacity: 0; transition: opacity .3s ease;
    display: flex; flex-direction: column; justify-content: flex-end; padding: .85rem;
}
.wcl-gal-item:hover .wcl-gal-overlay { opacity: 1; }
.wcl-gal-cap { color: #fff; font-size: .82rem; font-weight: 600; margin: 0 0 .55rem; line-height: 1.3; text-shadow: 0 1px 6px rgba(0,0,0,.5); }
.wcl-gal-actions { display: flex; gap: .4rem; }
.wcl-gal-act-btn {
    width: 36px; height: 36px; border-radius: 10px; border: none;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: .82rem; cursor: pointer; text-decoration: none;
    transition: transform .15s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,.3);
}
.wcl-gal-act-edit { background: rgba(255,255,255,.95); color: #97723B; }
.wcl-gal-act-del  { background: rgba(220,53,69,.9); color: #fff; }
.wcl-gal-act-btn:hover { transform: scale(1.12); }
.wcl-gal-badge {
    position: absolute; top: 8px; right: 8px;
    background: rgba(6,13,30,.72); backdrop-filter: blur(4px);
    color: #fff; font-size: .65rem; font-weight: 700; padding: .2rem .55rem; border-radius: 50px;
}
.wcl-gal-off {
    position: absolute; top: 8px; left: 8px;
    background: rgba(108,117,125,.88); color: #fff;
    font-size: .62rem; font-weight: 600; padding: .2rem .55rem; border-radius: 50px;
}

@media (max-width: 575.98px) {
    .wcl-head { flex-direction: column; align-items: stretch; }
    .wcl-add { justify-content: center; }
}

/* =====================================================================
   WEB CONTENT — GENERAL SETTINGS EDITOR  (.wc-* components)
   Two-panel layout: sticky left nav pills  |  right tab panes
   ===================================================================== */
.wc-layout {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
}

.wc-nav {
    width: 220px;
    min-width: 220px;
    background: #fff;
    border: 1px solid #e9ecf1;
    border-radius: 16px;
    padding: .6rem .5rem;
    position: sticky;
    top: calc(var(--topbar-height) + 1rem);
    max-height: calc(100vh - var(--topbar-height) - 2rem);
    overflow-y: auto;
    flex-shrink: 0;
}

.wc-nav::-webkit-scrollbar { width: 4px; }
.wc-nav::-webkit-scrollbar-thumb { background: #e0e4e8; border-radius: 2px; }

.wc-pill {
    width: 100%;
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .6rem .7rem;
    border: none;
    border-radius: 10px;
    background: transparent;
    text-align: left;
    cursor: pointer;
    transition: all .18s ease;
    margin-bottom: 2px;
    color: #4a5168;
}

.wc-pill:hover { background: #f5f6f8; color: #2E2C24; }

.wc-pill.active {
    background: rgba(151,114,59,.07);
    color: #97723B;
}

.wc-pill-ic {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 9px;
    background: rgba(151,114,59,.06);
    color: #97723B;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .82rem;
    flex-shrink: 0;
    transition: background .18s ease;
}

.wc-pill.active .wc-pill-ic {
    background: rgba(151,114,59,.14);
}

.wc-pill-tx {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
    overflow: hidden;
}

.wc-pill-title {
    font-size: .8rem;
    font-weight: 600;
    color: inherit;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.wc-pill-count {
    font-size: .67rem;
    color: #9aa0ad;
    line-height: 1;
}

.wc-pill-arrow {
    font-size: .62rem;
    color: #ccc;
    flex-shrink: 0;
    transition: transform .18s ease, color .18s ease;
}

.wc-pill.active .wc-pill-arrow {
    color: #A98545;
    transform: translateX(2px);
}

/* ── right pane area ── */
.wc-panes {
    flex: 1;
    min-width: 0;
}

.wc-pane-head {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding-bottom: 1rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid #f0f2f5;
}

.wc-pane-ic {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 12px;
    background: rgba(151,114,59,.07);
    color: #97723B;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.wc-label {
    display: block;
    font-size: .8rem;
    font-weight: 600;
    color: #6c7384;
    margin-bottom: .35rem;
    letter-spacing: .15px;
}

.wc-img-field {
    display: flex;
    flex-direction: column;
    gap: .6rem;
}

.wc-img-prev {
    width: 100%;
    height: 130px;
    border-radius: 10px;
    background: #f0f2f5 center/cover no-repeat;
    border: 2px dashed #d8dde6;
    transition: border-color .2s ease;
}

.wc-area { resize: vertical; min-height: 80px; }

.wc-hint {
    font-size: .73rem;
    color: #9aa0ad;
    display: flex;
    align-items: flex-start;
    gap: .3rem;
    margin-top: .25rem;
    line-height: 1.45;
}

.wc-hint i { margin-top: .15rem; flex-shrink: 0; }

/* ── wc responsive ── */
@media (max-width: 991.98px) {
    .wc-nav { width: 196px; min-width: 196px; }
    .wc-pill-title { font-size: .78rem; }
}

@media (max-width: 767.98px) {
    .wc-layout { flex-direction: column; }

    .wc-nav {
        width: 100%;
        min-width: unset;
        position: static;
        max-height: none;
        overflow: visible;
        display: flex;
        flex-wrap: wrap;
        padding: .5rem;
        gap: .3rem;
        border-radius: 12px;
    }

    .wc-pill {
        width: auto;
        flex: 0 0 auto;
        padding: .45rem .7rem;
        border-radius: 8px;
        gap: .4rem;
        margin-bottom: 0;
    }

    .wc-pill-tx { flex-direction: row; align-items: center; gap: .35rem; }
    .wc-pill-count,
    .wc-pill-arrow { display: none; }
    .wc-pill-title { font-size: .79rem; }

    .wc-panes { width: 100%; }
    .wc-img-prev { height: 100px; }
}

@media (max-width: 575.98px) {
    .wc-nav { gap: .25rem; padding: .4rem; }
    .wc-pill { padding: .38rem .55rem; }
    .wc-pill-ic { width: 26px; height: 26px; min-width: 26px; font-size: .72rem; border-radius: 7px; }
    .wc-pill-title { font-size: .74rem; }
}

/* =====================================================================
   MY PROGRESS — Jemaat self-service profile page  (.mp-* components)
   ===================================================================== */

/* ── empty (no member linked) ── */
.mp-empty-full {
    text-align: center;
    padding: 5rem 2rem;
    color: var(--text-muted);
}
.mp-empty-ic { font-size: 3.5rem; opacity: .18; margin-bottom: 1.25rem; }
.mp-empty-full h5 { font-weight: 700; font-size: 1.1rem; margin-bottom: .5rem; color: var(--text); }
.mp-empty-full p  { font-size: .9rem; max-width: 360px; margin: 0 auto; }

/* ── hero banner ── */
.mp-hero {
    background: linear-gradient(160deg, #182315 0%, #2C3E2B 55%, #3C523B 100%);
    border-radius: 18px;
    padding: 2rem;
    margin-bottom: 1.25rem;
    position: relative;
    overflow: hidden;
}
.mp-hero-glow {
    position: absolute; inset: 0;
    background: radial-gradient(ellipse at 90% 40%, rgba(169,133,69,.14) 0%, transparent 60%);
    pointer-events: none;
}
.mp-hero-content {
    position: relative; z-index: 1;
    display: flex; align-items: center; gap: 1.5rem;
}
.mp-avatar {
    width: 72px; height: 72px;
    border-radius: 50%;
    background: rgba(169,133,69,.18);
    border: 3px solid rgba(169,133,69,.35);
    display: flex; align-items: center; justify-content: center;
    color: #A98545; font-size: 1.9rem; flex-shrink: 0;
}
.mp-hello { color: rgba(255,255,255,.5); font-size: .78rem; margin-bottom: .2rem; }
.mp-name  {
    color: #fff; font-size: 1.45rem; font-weight: 700;
    margin: 0 0 .55rem;
    font-family: 'Playfair Display', 'Inter', serif;
}
.mp-badges { display: flex; flex-wrap: wrap; gap: .4rem; }
.mp-badge  {
    display: inline-flex; align-items: center; gap: .35rem;
    padding: .25rem .7rem; border-radius: 50px;
    font-size: .72rem; font-weight: 600;
}
.mp-badge-code   { background: rgba(255,255,255,.1); color: rgba(255,255,255,.85); }
.mp-badge-active { background: rgba(40,167,69,.2); color: #6ee297; }
.mp-badge-inactive{ background: rgba(108,117,125,.2); color: #aaa; }
.mp-badge-joined { background: rgba(169,133,69,.18); color: #C7A667; }

/* ── stats row ── */
.mp-stats-row {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 1rem;
    margin-bottom: 1.25rem;
}
.mp-stat {
    border-radius: 14px;
    padding: 1.1rem 1rem;
    display: flex; align-items: center; gap: .9rem;
    border: 1px solid transparent;
    transition: transform .2s ease, box-shadow .2s ease;
}
.mp-stat:hover { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(0,0,0,.08); }
.mp-stat-green { background: rgba(40,167,69,.07); border-color: rgba(40,167,69,.15); }
.mp-stat-navy  { background: rgba(151,114,59,.05);  border-color: rgba(151,114,59,.12); }
.mp-stat-gold  { background: rgba(169,133,69,.07); border-color: rgba(169,133,69,.18); }
.mp-stat-fire  { background: rgba(255,107,53,.06); border-color: rgba(255,107,53,.14); }

.mp-stat-ic {
    width: 44px; height: 44px; border-radius: 13px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.15rem; flex-shrink: 0;
}
.mp-stat-green .mp-stat-ic { background: rgba(40,167,69,.12);  color: #28a745; }
.mp-stat-navy  .mp-stat-ic { background: rgba(151,114,59,.1);   color: #97723B; }
.mp-stat-gold  .mp-stat-ic { background: rgba(169,133,69,.15); color: #A98545; }
.mp-stat-fire  .mp-stat-ic { background: rgba(255,107,53,.14); color: #ff6b35; }

.mp-stat-num { font-size: 1.5rem; font-weight: 700; color: var(--text); line-height: 1.2; }
.mp-stat-lbl { font-size: .7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; }

/* ── main grid ── */
.mp-grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 1.25rem;
    align-items: flex-start;
}
.mp-col-left, .mp-col-right { display: flex; flex-direction: column; gap: 1.25rem; }

/* ── generic card ── */
.mp-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,.04), 0 4px 12px rgba(0,0,0,.02);
}
.mp-card-head {
    padding: .9rem 1.25rem;
    font-size: .88rem; font-weight: 700; color: var(--primary);
    border-bottom: 1px solid var(--border);
    background: #fafbfc;
    display: flex; align-items: center; gap: .5rem;
}

/* ── rate ring card ── */
.mp-rate-card {
    background: linear-gradient(160deg, #1E2A1D 0%, #2C3E2B 55%, #3C523B 100%);
    border: none;
}
.mp-rate-card .mp-card-head {
    background: rgba(0,0,0,.15);
    border-bottom-color: rgba(255,255,255,.08);
    color: rgba(255,255,255,.85);
}
.mp-rate-body {
    display: flex; align-items: center; gap: 2rem;
    padding: 1.5rem 1.25rem;
}
.mp-ring-wrap { position: relative; width: 110px; height: 110px; flex-shrink: 0; }
.mp-ring-svg  { width: 100%; height: 100%; }
.mp-ring-pct  {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.35rem; font-weight: 800; color: #A98545;
}
.mp-rate-legend { display: flex; flex-direction: column; gap: .55rem; }
.mp-rl-item     { display: flex; align-items: center; gap: .6rem; color: rgba(255,255,255,.7); font-size: .83rem; }
.mp-rl-dot      { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.mp-rl-dot.green { background: #4caf6e; }
.mp-rl-dot.gray  { background: rgba(255,255,255,.3); }
.mp-rl-dot.gold  { background: #A98545; }

/* ── timeline ── */
.mp-timeline { padding: .5rem 1.25rem .75rem; }
.mp-tl-item  { display: flex; gap: .85rem; padding: .7rem 0; }
.mp-tl-spine { display: flex; flex-direction: column; align-items: center; flex-shrink: 0; }
.mp-tl-dot   { width: 18px; height: 18px; border-radius: 50%; border: 2px solid; flex-shrink: 0; }
.mp-tl-line  { width: 2px; flex: 1; margin-top: 4px; min-height: 24px; }
.mp-tl-item.present .mp-tl-dot  { background: rgba(40,167,69,.1); border-color: #28a745; }
.mp-tl-item.absent  .mp-tl-dot  { background: rgba(108,117,125,.1); border-color: #9ca3af; }
.mp-tl-item.present .mp-tl-line { background: rgba(40,167,69,.2); }
.mp-tl-item.absent  .mp-tl-line { background: #eef0f4; }
.mp-tl-body { flex: 1; min-width: 0; padding-top: .1rem; }
.mp-tl-top  { display: flex; align-items: flex-start; justify-content: space-between; gap: .5rem; flex-wrap: wrap; margin-bottom: .25rem; }
.mp-tl-name { font-size: .87rem; font-weight: 600; color: var(--text); }
.mp-tl-pill {
    font-size: .67rem; font-weight: 700; padding: .2rem .55rem; border-radius: 50px; flex-shrink: 0;
    display: inline-flex; align-items: center; gap: .25rem;
}
.mp-tl-pill.green { background: rgba(40,167,69,.1); color: #1a7a34; }
.mp-tl-pill.gray  { background: rgba(108,117,125,.1); color: #6c757d; }
.mp-tl-meta { font-size: .74rem; color: var(--text-muted); display: flex; flex-wrap: wrap; gap: .75rem; }
.mp-tl-meta i { margin-right: .25rem; }

/* empty small */
.mp-empty-sm { text-align: center; padding: 2rem 1rem; color: var(--text-muted); }
.mp-empty-sm i { font-size: 2rem; opacity: .2; margin-bottom: .5rem; display: block; }

/* ── member card ── */
.mp-mc-wrap  { display: flex; justify-content: center; padding: 1.25rem 1.25rem .75rem; }
.mp-mc {
    width: 290px;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,.15);
    font-family: 'Inter', sans-serif;
}
.mp-mc-hdr {
    background: linear-gradient(160deg, #182315 0%, #2C3E2B 60%, #3C523B 100%);
    color: #fff; text-align: center; padding: 1.25rem 1rem 1.75rem; position: relative;
}
.mp-mc-hdr::after {
    content: ''; position: absolute; bottom: -1px; left: 0;
    width: 100%; height: 18px; background: #fff; border-radius: 50% 50% 0 0;
}
.mp-mc-cross  { font-size: 1.7rem; color: #A98545; margin-bottom: .15rem; }
.mp-mc-church { font-size: .95rem; font-weight: 700; }
.mp-mc-sub    { font-size: .62rem; letter-spacing: 2.5px; text-transform: uppercase; opacity: .6; margin-top: .1rem; }
.mp-mc-body   { padding: 1rem 1rem .75rem; text-align: center; }
.mp-mc-qr     { display: inline-block; padding: 8px; background: #fff; border: 2px solid #f0f0f0; border-radius: 10px; margin-bottom: .75rem; }
.mp-mc-qr-ph  { width: 110px; height: 110px; display: flex; align-items: center; justify-content: center; font-size: 2.5rem; color: #d0d5dd; background: #f8f9fb; border: 2px dashed #e0e4e8; }
.mp-mc-fullname { font-size: 1.05rem; font-weight: 700; color: #97723B; }
.mp-mc-divider  { width: 48px; height: 3px; background: #A98545; margin: .6rem auto; border-radius: 2px; }
.mp-mc-details  { text-align: left; }
.mp-mc-row {
    display: flex; justify-content: space-between; padding: .3rem 0;
    border-bottom: 1px solid #f5f5f5; font-size: .8rem;
}
.mp-mc-row:last-child { border-bottom: none; }
.mp-mc-row span  { color: #9ca3af; }
.mp-mc-row strong{ color: #2E2C24; }
.mp-mc-ftr {
    background: linear-gradient(135deg, #A98545 0%, #97723B 100%);
    text-align: center; padding: .6rem;
    color: #fff; font-size: .62rem; letter-spacing: 3px; font-weight: 700; text-transform: uppercase;
}
.mp-dl-btn {
    display: flex; align-items: center; justify-content: center; gap: .5rem;
    width: calc(100% - 2.5rem); margin: 0 1.25rem 1.25rem;
    padding: .65rem 1rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff; border: none; border-radius: 10px;
    font-size: .85rem; font-weight: 600; cursor: pointer;
    transition: all .2s ease;
}
.mp-dl-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(151,114,59,.28); }
.mp-dl-btn:disabled { opacity: .65; cursor: wait; transform: none; }
.mp-qr-note {
    font-size: .78rem; color: var(--text-muted);
    text-align: center; padding: 0 1.25rem 1.25rem; margin: 0;
    display: flex; align-items: center; justify-content: center; gap: .35rem;
}

/* ── profile read-only ── */
.mp-readonly {
    padding: .75rem 1.25rem;
    border-bottom: 1px solid var(--border);
    background: #fafbfc;
}
.mp-ro-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: .4rem 0; font-size: .83rem;
    border-bottom: 1px solid #f0f2f5;
}
.mp-ro-row:last-child { border-bottom: none; }
.mp-ro-row span   { color: var(--text-muted); }
.mp-ro-row strong { color: var(--text); }

/* ── form ── */
.mp-form { padding: 1rem 1.25rem 1.25rem; }
.mp-field { margin-bottom: .95rem; }
.mp-field label {
    display: flex; align-items: center; gap: .4rem;
    font-size: .79rem; font-weight: 600; color: #6c7384; margin-bottom: .3rem;
}
.mp-field label i { color: var(--primary); font-size: .73rem; }
.mp-btn {
    display: flex; align-items: center; justify-content: center; gap: .45rem;
    width: 100%; padding: .65rem 1rem;
    border: none; border-radius: 10px; font-size: .88rem; font-weight: 600;
    cursor: pointer; transition: all .2s ease;
}
.mp-btn:hover   { transform: translateY(-2px); }
.mp-btn-navy    { background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: #fff; }
.mp-btn-navy:hover { box-shadow: 0 6px 18px rgba(151,114,59,.28); }
.mp-btn-dark    { background: linear-gradient(135deg, #3a4255, #586070); color: #fff; margin-top: .25rem; }
.mp-btn-dark:hover { box-shadow: 0 6px 18px rgba(58,66,85,.28); }

/* pwd wrapper */
.mp-pwd-wrap { position: relative; }
.mp-pwd-wrap .form-control { padding-right: 2.75rem; }
.mp-eye {
    position: absolute; top: 50%; right: .75rem; transform: translateY(-50%);
    background: none; border: none; color: #bbb; font-size: .9rem; cursor: pointer;
    transition: color .15s ease; z-index: 2; padding: 0;
}
.mp-eye:hover { color: var(--primary); }

/* ===== MP RESPONSIVE ===== */
@media (max-width: 1100px) {
    .mp-grid { grid-template-columns: 1fr 320px; }
}

@media (max-width: 991.98px) {
    .mp-grid { grid-template-columns: 1fr; }
    .mp-col-right { order: -1; }
    .mp-stats-row { grid-template-columns: repeat(2,1fr); }
    /* right column: show as horizontal row on tablet */
    .mp-col-right { display: grid; grid-template-columns: repeat(2,1fr); }
    .mp-col-right > .mp-card:first-child { grid-column: 1 / -1; }
}

@media (max-width: 767.98px) {
    .mp-col-right { display: flex; flex-direction: column; }
}

@media (max-width: 575.98px) {
    .mp-hero { padding: 1.75rem 1.25rem; }
    .mp-hero-content { flex-direction: column; text-align: center; gap: .85rem; }
    .mp-avatar { width: 82px; height: 82px; font-size: 2.1rem; }
    .mp-name  { font-size: 1.35rem; }
    .mp-hello { font-size: .8rem; }
    .mp-badges { justify-content: center; gap: .35rem; }
    .mp-stats-row { gap: .75rem; }
    .mp-stat { padding: .9rem .75rem; gap: .7rem; }
    .mp-stat-ic { width: 40px; height: 40px; font-size: 1rem; border-radius: 11px; }
    .mp-stat-num { font-size: 1.3rem; }
    .mp-rate-body { flex-direction: column; gap: 1rem; align-items: center; }
    .mp-rate-legend { text-align: center; }
    .mp-mc { width: 100%; max-width: 290px; }
    .mp-grid { gap: .875rem; }
}

/* =====================================================================
   REPORTS HUB  (.rpt-*)
   ===================================================================== */
.rpt-hub {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}
.rpt-type-card {
    display: flex; align-items: center; gap: .85rem;
    background: var(--card-bg); border: 2px solid var(--border); border-radius: 16px;
    padding: 1.1rem 1.15rem; text-decoration: none; color: var(--text);
    transition: var(--transition); box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.rpt-type-card:hover { border-color: rgba(151,114,59,.25); transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,.08); color: var(--text); }
.rpt-type-card.active { border-color: var(--primary); background: rgba(151,114,59,.03); }
.rpt-type-ic { width: 48px; height: 48px; min-width: 48px; border-radius: 13px; display: flex; align-items: center; justify-content: center; font-size: 1.15rem; }
.rpt-type-body { flex: 1; min-width: 0; }
.rpt-type-lbl  { font-size: .875rem; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rpt-type-sub  { font-size: .71rem; color: var(--text-muted); margin-top: .1rem; line-height: 1.3; }
.rpt-type-arr  { color: #d1d5db; font-size: .65rem; flex-shrink: 0; transition: transform .15s, color .15s; }
.rpt-type-arr.active, .rpt-type-card:hover .rpt-type-arr { color: var(--primary); transform: translateX(3px); }

.rpt-filter-panel { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 1.1rem 1.4rem; }
.rpt-filter-head  { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .9px; color: var(--primary); margin-bottom: .9rem; }
.rpt-results      { background: #fff; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.04); }
.rpt-results-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem; padding: .85rem 1.25rem; border-bottom: 1px solid var(--border); background: #fafbfc; }
.rpt-results-head h6 { font-size: .88rem; font-weight: 700; margin: 0; }

@media (max-width: 991.98px) { .rpt-hub { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 575.98px)  {
    .rpt-hub { grid-template-columns: 1fr; gap: .6rem; }
    .rpt-type-card { padding: .85rem 1rem; }
    .rpt-type-ic { width: 42px; height: 42px; min-width: 42px; border-radius: 11px; font-size: 1rem; }
    .rpt-type-sub { display: block; font-size: .7rem; }
    .rpt-type-lbl { font-size: .85rem; }
    .rpt-filter-panel { padding: 1rem; }
    .rpt-results-head { padding: .7rem 1rem; gap: .4rem; }
    .rpt-results-head .btn { font-size: .72rem; }
}

/* =====================================================================
   REPORTS — mobile table tweaks
   ===================================================================== */
@media (max-width: 767.98px) {
    /* stat cards inside report results */
    .rpt-results .table thead th { font-size: .72rem; padding: .45rem .5rem; }
    .rpt-results .table tbody td { font-size: .78rem; padding: .45rem .5rem; }
    /* hide lower-priority columns on very small screens */
    .rpt-col-hide-sm { display: none; }
    /* progress bar row more compact */
    .rpt-results .progress { height: 5px; }
}

/* =====================================================================
   PROFILE PAGE LAYOUT  (.pf-*)
   ===================================================================== */
.pf-page { background: var(--bg); min-height: 100vh; }

.pf-topbar {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    padding: .85rem 1.75rem;
    display: flex; align-items: center; justify-content: space-between;
    position: sticky; top: 0; z-index: 100;
    box-shadow: 0 2px 12px rgba(151,114,59,.18);
}
.pf-brand {
    display: flex; align-items: center; gap: .6rem;
    color: rgba(255,255,255,.92); font-weight: 700; font-size: .95rem; letter-spacing: .2px;
}
.pf-brand i { color: var(--gold); font-size: 1.15rem; }
.pf-brand img { width: 20px; height: 20px; object-fit: contain; }
.pf-logout-btn {
    color: rgba(255,255,255,.75); border: 1px solid rgba(255,255,255,.25);
    font-size: .8rem; font-weight: 500;
    transition: all .15s ease;
}
.pf-logout-btn:hover { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.45); }

.pf-body { padding: 1.75rem 1.25rem 3rem; }
.pf-container { max-width: 1100px; margin: 0 auto; }

/* ── action row list ── */
.mp-action-list { display: flex; flex-direction: column; }
.mp-action-row {
    display: flex; align-items: center; gap: .875rem;
    padding: .95rem 1.25rem; background: none; border: none;
    border-top: 1px solid var(--border); width: 100%; text-align: left;
    cursor: pointer; transition: background .15s ease;
}
.mp-action-row:first-child { border-top: none; }
.mp-action-row:hover { background: #f8fafc; }
.mp-action-row-ic {
    width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; font-size: .95rem;
}
.mp-action-row-txt { display: flex; flex-direction: column; gap: .05rem; }
.mp-action-row-title { font-size: .875rem; font-weight: 600; color: var(--text); }
.mp-action-row-sub   { font-size: .73rem; color: var(--text-muted); }

/* =====================================================================
   USER MANAGEMENT PAGE  (.um-* components)
   ===================================================================== */

/* ── role reference cards ── */
.um-roles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: .875rem;
}
.um-role-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.um-role-card-head {
    display: flex; align-items: center; gap: .55rem;
    padding: .7rem 1rem;
    font-size: .82rem; font-weight: 700;
    color: #fff;
}
.um-rc-admin        { background: linear-gradient(135deg,#182315,#2C3E2B); }
.um-rc-usher        { background: linear-gradient(135deg,#1a56c4,#3b82f6); }
.um-rc-room_manager { background: linear-gradient(135deg,#97723B,#A98545); }
.um-rc-web_admin    { background: linear-gradient(135deg,#0e7490,#06b6d4); }
.um-rc-jemaat       { background: linear-gradient(135deg,#166534,#16a34a); }

.um-role-list { list-style: none; padding: .6rem 1rem .85rem; margin: 0; }
.um-role-list li {
    display: flex; align-items: flex-start; gap: .45rem;
    font-size: .76rem; color: var(--text-muted); padding: .2rem 0;
}
.um-role-list li i { color: #28a745; font-size: .65rem; margin-top: .2rem; flex-shrink: 0; }

/* ── user avatar letters ── */
.um-av {
    width: 36px; height: 36px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: .85rem; font-weight: 700; color: #fff; flex-shrink: 0;
    background: linear-gradient(135deg,#64748b,#94a3b8); /* fallback for any custom role without its own color yet */
}
.um-av-admin        { background: linear-gradient(135deg,#182315,#2C3E2B); }
.um-av-usher        { background: linear-gradient(135deg,#1a56c4,#3b82f6); }
.um-av-room_manager { background: linear-gradient(135deg,#97723B,#A98545); }
.um-av-web_admin    { background: linear-gradient(135deg,#0e7490,#06b6d4); }
.um-av-jemaat       { background: linear-gradient(135deg,#166534,#16a34a); }

/* ── role pills in table ── */
.um-role-pill {
    display: inline-flex; align-items: center; gap: .35rem;
    padding: .28rem .65rem; border-radius: 50px;
    font-size: .72rem; font-weight: 700;
    background: rgba(100,116,139,.1); color: #475569; /* fallback for any custom role without its own color yet */
}
.um-role-admin        { background: rgba(44,62,43,.08);  color: #2C3E2B; }
.um-role-usher        { background: rgba(59,130,246,.1); color: #1a56c4; }
.um-role-room         { background: rgba(169,133,69,.12);color: #97723B; }
.um-role-web          { background: rgba(6,182,212,.1);  color: #0e7490; }
.um-role-jemaat       { background: rgba(22,163,74,.1);  color: #166534; }

/* ── PIC (Booking Ruangan) badge — makes PIC jemaat visually distinct at a glance ── */
.um-pic-badge {
    display: inline-flex; align-items: center; gap: 3px;
    background: linear-gradient(135deg,#A98545,#97723B); color: #fff;
    font-size: .6rem; font-weight: 700; padding: .18rem .45rem; border-radius: 50px;
    letter-spacing: .03em; vertical-align: middle;
}
.um-pic-badge i { font-size: .58rem; }

/* ── status pills ── */
.um-status-pill {
    display: inline-flex; align-items: center; gap: .3rem;
    padding: .25rem .6rem; border-radius: 50px;
    font-size: .72rem; font-weight: 600;
}
.um-status-pill.active   { background: rgba(40,167,69,.1); color: #1a7a34; }
.um-status-pill.inactive { background: rgba(108,117,125,.1); color: #6c757d; }

/* ── responsive ── */
@media (max-width: 767.98px) {
    .um-roles-grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 575.98px) {
    .um-roles-grid { grid-template-columns: 1fr; }
}

/* ── PIC badges ── */
.mp-badge-pic {
    background: linear-gradient(135deg, rgba(6,182,212,.25), rgba(6,182,212,.15));
    color: #06b6d4;
    border: 1px solid rgba(6,182,212,.3);
    font-weight: 700;
}

/* ── hero booking button (PIC only) ── */
.mp-hero-booking-btn {
    margin-left: auto; align-self: flex-start; flex-shrink: 0;
    background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.28);
    color: rgba(255,255,255,.88); border-radius: 10px;
    padding: .55rem 1.1rem; font-size: .82rem; font-weight: 600;
    cursor: pointer; display: flex; align-items: center; gap: .45rem;
    transition: background .15s, border-color .15s; white-space: nowrap;
}
.mp-hero-booking-btn:hover { background: rgba(255,255,255,.22); border-color: rgba(255,255,255,.5); color: #fff; }

@media (max-width: 575.98px) {
    .mp-hero-booking-btn {
        margin-left: 0;
        margin-top: .5rem;
        align-self: stretch;
        justify-content: center;
        width: 100%;
        padding: .78rem;
        font-size: .88rem;
        background: rgba(169,133,69,.22);
        border-color: rgba(169,133,69,.5);
        color: #e8c96a;
        border-radius: 12px;
        letter-spacing: .2px;
    }
}

.pic-badge-sm {
    display: inline-flex;
    align-items: center;
    padding: .1rem .4rem;
    border-radius: 50px;
    font-size: .58rem;
    font-weight: 800;
    letter-spacing: .5px;
    background: linear-gradient(135deg, #0e7490, #06b6d4);
    color: #fff;
    text-transform: uppercase;
    line-height: 1.4;
}

/* =====================================================================
   BOOKING CALENDAR  (.bc-* components)  — weekly Google-Calendar style
   ===================================================================== */

.bc-toolbar {
    display: flex; align-items: center; flex-wrap: wrap; gap: .75rem;
    padding: .875rem 1.25rem; border-bottom: 1px solid var(--border); background: #fafbfc;
}
.bc-nav-group { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.bc-nav-btn {
    background: #fff; border: 1px solid var(--border); border-radius: 8px;
    padding: .35rem .75rem; font-size: .82rem; font-weight: 500;
    color: var(--text); cursor: pointer; transition: all .15s ease;
}
.bc-nav-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.bc-week-label { font-size: .88rem; font-weight: 700; color: var(--text); min-width: 185px; text-align: center; }
.bc-room-tabs { display: flex; flex-wrap: wrap; gap: .35rem; }
.bc-room-tab {
    background: #f0f2f5; border: 1px solid var(--border); border-radius: 8px;
    padding: .3rem .8rem; font-size: .78rem; font-weight: 600;
    color: var(--text-muted); cursor: pointer; transition: all .15s ease;
}
.bc-room-tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.bc-room-tab:hover:not(.active) { background: #e8eaf0; color: var(--text); }

.bc-grid-scroll { overflow: auto; max-height: 680px; }

.bc-inner { display: flex; min-width: 720px; border-top: 1px solid var(--border); }

.bc-col-time { flex-shrink: 0; width: 54px; border-right: 1px solid var(--border); }
.bc-time-lbl {
    display: flex; align-items: flex-start; justify-content: flex-end;
    padding: 0 6px; font-size: .68rem; color: #a0aab4; box-sizing: border-box;
}

.bc-col-day { flex: 1; min-width: 80px; border-right: 1px solid #f0f2f5; }
.bc-col-day:last-child { border-right: none; }
.bc-today { background: rgba(151,114,59,.018); }
.bc-col-head {
    height: 46px; display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: .3rem; font-size: .78rem; font-weight: 700; color: var(--primary);
    border-bottom: 2px solid var(--border); position: sticky; top: 0;
    background: #fafbfc; z-index: 10; text-align: center; line-height: 1.3;
}
.bc-today .bc-col-head { border-bottom-color: var(--gold); color: var(--gold); }
.bc-col-head small { font-size: .68rem; color: var(--text-muted); font-weight: 400; }
.bc-col-body { position: relative; }

.bc-gl      { position: absolute; left: 0; right: 0; height: 1px; background: #eef0f4; pointer-events: none; }
.bc-gl-half { background: #f5f6f8; }

.bc-now { position: absolute; left: 0; right: 0; height: 2px; background: var(--gold); z-index: 5; pointer-events: none; }
.bc-now::before {
    content: ''; position: absolute; left: -4px; top: -4px;
    width: 10px; height: 10px; border-radius: 50%; background: var(--gold);
}

.bc-ev {
    position: absolute; left: 3px; right: 3px; border-radius: 7px;
    padding: 3px 5px; font-size: .71rem; overflow: hidden; border-left: 3px solid;
    z-index: 4; cursor: default; box-shadow: 0 1px 4px rgba(0,0,0,.08); transition: box-shadow .15s;
}
.bc-ev:hover { box-shadow: 0 3px 10px rgba(0,0,0,.14); z-index: 6; }
.bc-ev-own   { background: rgba(169,133,69,.13); border-color: #A98545; }
.bc-ev-other { background: rgba(151,114,59,.08);  border-color: #97723B; }
.bc-ev-time  { font-size: .63rem; color: #6c7384; line-height: 1.3; }
.bc-ev-title { font-weight: 700; color: var(--text); line-height: 1.3; }
.bc-ev-who   { font-size: .63rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bc-ev-actions { display: flex; gap: 3px; margin-top: 2px; }
.bc-ev-btn { background: none; border: none; font-size: .75rem; cursor: pointer; padding: 0 2px; line-height: 1; color: var(--text-muted); transition: color .12s; text-decoration: none; }
.bc-ev-cancel:hover { color: #dc3545; }
.bc-ev-edit:hover   { color: var(--primary); }

@media (max-width: 767.98px) {
    .bc-inner { min-width: 560px; }
    .bc-week-label { min-width: 150px; font-size: .8rem; }
    .bc-grid-scroll { max-height: 520px; }
}
@media (max-width: 575.98px) {
    .bc-inner { min-width: 420px; }
    .bc-col-time { width: 42px; }
    .bc-col-day { min-width: 52px; }
    .bc-ev-who, .bc-ev-time { display: none; }
}
