/* =====================================================
   Sri Angulimala Maha Se Viharaya
   Sunday School Management System — Styles
   ===================================================== */

:root {
    --temple-gold:    #c8972a;
    --temple-dark:    #2c1a5e;
    --temple-maroon:  #7b1f3a;
    --temple-light:   #f7f3ec;
    --card-shadow:    0 2px 12px rgba(44,26,94,.10);
}

/* ---------- Base ---------- */
body {
    background: #f0ede8;
    font-family: 'Segoe UI', sans-serif;
    color: #2d2d2d;
}

/* ---------- Navbar ---------- */
.temple-navbar {
    background: linear-gradient(135deg, var(--temple-dark) 0%, var(--temple-maroon) 100%);
    box-shadow: 0 2px 10px rgba(0,0,0,.30);
    padding: .6rem 1rem;
}
.temple-navbar .nav-link { color: rgba(255,255,255,.88) !important; }
.temple-navbar .nav-link.active,
.temple-navbar .nav-link:hover { color: var(--temple-gold) !important; }
.temple-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid rgba(255, 255, 255, .6);
}

/* ---------- Layout ---------- */
.main-content { padding: 1.5rem 0 2rem; }

/* ---------- Cards ---------- */
.card {
    border: none;
    border-radius: .8rem;
    box-shadow: var(--card-shadow);
}
.card-header {
    border-radius: .8rem .8rem 0 0 !important;
    font-weight: 600;
}
.card-header.temple-header {
    background: linear-gradient(90deg, var(--temple-dark), var(--temple-maroon));
    color: #fff;
}
.card-header.section-header {
    background: var(--temple-light);
    color: var(--temple-dark);
    border-bottom: 2px solid var(--temple-gold) !important;
    font-size: .95rem;
}

/* ---------- Stats Cards ---------- */
.stat-card {
    border-radius: .8rem;
    padding: 1.2rem 1.5rem;
    color: #fff;
    box-shadow: var(--card-shadow);
}
.stat-card .stat-number { font-size: 2rem; font-weight: 700; }
.stat-card .stat-label  { font-size: .82rem; opacity: .88; }
.stat-card.bg-total   { background: linear-gradient(135deg, #2c1a5e, #5a3e9e); }
.stat-card.bg-girls   { background: linear-gradient(135deg, #b5266e, #e8558e); }
.stat-card.bg-boys    { background: linear-gradient(135deg, #1a5276, #2e86c1); }
.stat-card.bg-sunday  { background: linear-gradient(135deg, #1e6b45, #27ae60); }
.stat-card.bg-poya    { background: linear-gradient(135deg, #784212, #ca6f1e); }

/* ---------- Table ---------- */
.table thead th {
    background: var(--temple-dark);
    color: #fff;
    font-size: .82rem;
    font-weight: 600;
    white-space: nowrap;
    border: none;
}
.table tbody tr:hover { background: #f0edff; }
.table td { vertical-align: middle; font-size: .88rem; }

/* ---------- Badge ---------- */
.badge-female { background: #f8d7e8; color: #9c1650; font-weight: 600; }
.badge-male   { background: #d6eaf8; color: #1a5276; font-weight: 600; }
.badge-prog   { background: #e8f8f5; color: #1e6b45; font-weight: 600; }

/* ---------- Forms ---------- */
.form-label { font-weight: 600; font-size: .88rem; color: #444; margin-bottom: .3rem; }
.form-control, .form-select {
    border-radius: .45rem;
    border: 1.5px solid #d0cfe8;
    font-size: .9rem;
}
.form-control:focus, .form-select:focus {
    border-color: var(--temple-dark);
    box-shadow: 0 0 0 .2rem rgba(44,26,94,.15);
}
.section-divider {
    border-top: 2px solid var(--temple-gold);
    margin: 1.5rem 0 1rem;
}

/* ---------- Buttons ---------- */
.btn-temple {
    background: linear-gradient(90deg, var(--temple-dark), var(--temple-maroon));
    color: #fff;
    border: none;
    font-weight: 600;
}
.btn-temple:hover { opacity: .9; color: #fff; }

/* ---------- Detail View ---------- */
.detail-label {
    font-size: .78rem;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.detail-value { font-size: .95rem; color: #222; }

/* ---------- Footer ---------- */
.temple-footer {
    border-top: 1px solid #ddd;
    font-size: .82rem;
}

/* ---------- Pagination ---------- */
.page-link { color: var(--temple-dark); }
.page-item.active .page-link {
    background: var(--temple-dark);
    border-color: var(--temple-dark);
}

/* ---------- Role badges ---------- */
.role-badge {
    display: inline-block;
    font-size: .72rem;
    font-weight: 700;
    padding: .15em .55em;
    border-radius: 2rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    vertical-align: middle;
}
.role-administrator { background: #e8e0ff; color: #4a1fa8; }
.role-moderator      { background: #fff3cd; color: #856404; }
.role-student        { background: #d1e7dd; color: #0a5c36; }

/* ---------- Login page ---------- */
.login-page {
    background: linear-gradient(135deg, var(--temple-dark) 0%, var(--temple-maroon) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.login-wrapper {
    width: 100%;
    max-width: 420px;
    padding: 1rem;
}
.login-card {
    border: none;
    border-radius: 1rem;
    overflow: hidden;
}
.login-header {
    background: linear-gradient(135deg, var(--temple-dark), var(--temple-maroon));
    color: #fff;
    padding: 2rem 1.5rem 1.5rem;
}
.login-icon {
    width: 120px;
    height: 120px;
    border-radius: 25%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, .6);
}

/* ---------- Responsive tweaks ---------- */
@media (max-width: 576px) {
    .stat-card .stat-number { font-size: 1.5rem; }
    .table td, .table th { font-size: .8rem; }
}
