* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    min-height: 100vh;
    padding: 20px 10px;
}

.container {
    max-width: 640px;
    margin: 0 auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
    overflow: hidden;
}

.header {
    background: linear-gradient(135deg, #f57c00, #ff9800);
    color: #fff;
    text-align: center;
    padding: 28px 20px;
}

.site-logo {
    width: 84px;
    height: 84px;
    object-fit: contain;
    border-radius: 50%;
    background: #fff;
    padding: 6px;
    margin: 0 auto 12px auto;
    display: block;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.header h1 {
    font-size: 22px;
    margin-bottom: 6px;
}

.header p {
    font-size: 14px;
    opacity: 0.95;
}

.form-body {
    padding: 26px 24px;
}

.field {
    margin-bottom: 18px;
}

label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 6px;
    color: #333;
}

input, select {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 15px;
}

input:focus, select:focus {
    outline: none;
    border-color: #e65100;
}

.fee-box {
    background: #fff3e0;
    border: 1px dashed #e65100;
    border-radius: 8px;
    padding: 14px;
    text-align: center;
    margin-bottom: 20px;
    font-size: 16px;
    font-weight: 600;
    color: #b71c1c;
}

.upi-box {
    background: #fff3e0;
    border: 1px dashed #e65100;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    margin-bottom: 20px;
}

.upi-title {
    font-size: 16px;
    font-weight: 700;
    color: #b71c1c;
    margin-bottom: 12px;
}

.upi-qr {
    width: 180px;
    height: 180px;
    object-fit: contain;
    border-radius: 8px;
    background: #fff;
    padding: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    margin-bottom: 12px;
}

.upi-id {
    font-size: 15px;
    color: #333;
    margin-bottom: 2px;
}

.upi-name {
    font-size: 13px;
    color: #666;
    margin-bottom: 10px;
}

.upi-note {
    font-size: 13px;
    color: #555;
}

button.pay-btn {
    width: 100%;
    background: #b71c1c;
    color: #fff;
    border: none;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

button.pay-btn:hover { background: #8f1717; }
button.pay-btn:disabled { background: #999; cursor: not-allowed; }

.msg {
    padding: 12px 14px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
    display: none;
}

.msg.error { background: #ffebee; color: #b71c1c; border: 1px solid #ef9a9a; }
.msg.success { background: #e8f5e9; color: #1b5e20; border: 1px solid #a5d6a7; }

.success-screen {
    text-align: center;
    padding: 40px 24px;
    display: none;
}

.success-screen .tick {
    font-size: 52px;
    color: #2e7d32;
    margin-bottom: 12px;
}

.success-screen h2 { color: #1b5e20; margin-bottom: 10px; }
.success-screen p { color: #444; margin-bottom: 6px; }

/* ---- Admin panel ---- */
.admin-wrap {
    max-width: 1100px;
    margin: 20px auto;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
    padding: 20px;
}

.admin-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.admin-top h2 { color: #b71c1c; }

.btn {
    display: inline-block;
    padding: 9px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
}

.btn-primary { background: #2e7d32; color: #fff; }
.btn-secondary { background: #b71c1c; color: #fff; }
.btn-outline { background: #fff; color: #b71c1c; border: 1px solid #b71c1c; }

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

th, td {
    padding: 9px 8px;
    border-bottom: 1px solid #eee;
    text-align: left;
    white-space: nowrap;
}

th { background: #fff3e0; color: #b71c1c; }

.search-box {
    padding: 9px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    min-width: 220px;
}

.login-wrap {
    max-width: 380px;
    margin: 60px auto;
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}

.login-wrap h2 { color: #b71c1c; margin-bottom: 20px; text-align: center; }

.table-scroll { overflow-x: auto; }

.pagination { margin-top: 16px; text-align: center; }
.pagination a {
    display: inline-block;
    padding: 6px 12px;
    margin: 0 3px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    font-size: 13px;
}
.pagination a.active { background: #b71c1c; color: #fff; border-color: #b71c1c; }

.admin-nav {
    max-width: 1100px;
    margin: 16px auto 0 auto;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.admin-nav-links a {
    display: inline-block;
    margin-right: 8px;
    padding: 8px 14px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    color: #b71c1c;
    background: #fff3e0;
}

.admin-nav-links a.active {
    background: #b71c1c;
    color: #fff;
}

.admin-nav-user {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #555;
}

.role-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    background: #e8f5e9;
    color: #1b5e20;
}

.role-badge.subadmin {
    background: #fff3e0;
    color: #e65100;
}

/* ---- Public site header / nav / footer ---- */
.site-header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-header-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 10px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.site-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #b71c1c;
    font-weight: 700;
    font-size: 14px;
    line-height: 1.2;
}

.site-brand img {
    width: 42px;
    height: 42px;
    object-fit: contain;
    border-radius: 50%;
}

.site-nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}

.site-nav a {
    text-decoration: none;
    color: #444;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background 0.15s;
}

.site-nav a:hover { background: #fff3e0; color: #b71c1c; }
.site-nav a.active { background: #fff3e0; color: #b71c1c; }

.site-nav a.nav-cta {
    background: #b71c1c;
    color: #fff !important;
}
.site-nav a.nav-cta:hover { background: #8f1717; }
.site-nav a.nav-cta.active { background: #8f1717; color: #fff !important; }

.site-nav a.nav-login {
    border: 1px solid #b71c1c;
    color: #b71c1c;
}

.site-main {
    min-height: 60vh;
}

.site-footer {
    background: #2b0f0f;
    color: #f5e9e9;
    padding: 28px 16px;
    margin-top: 40px;
}

.site-footer-inner {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.site-footer img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    border-radius: 50%;
    background: #fff;
    padding: 4px;
    margin-bottom: 12px;
}

.site-footer p {
    font-size: 13px;
    margin-bottom: 6px;
    opacity: 0.9;
}

.site-footer .footer-copy {
    margin-top: 12px;
    font-size: 12px;
    opacity: 0.7;
}

/* ---- Public content pages (hero, cards, notices, gallery) ---- */
.hero {
    background: linear-gradient(135deg, #f57c00, #ff9800);
    color: #fff;
    text-align: center;
    padding: 50px 20px;
}

.hero img {
    width: 100px;
    height: 100px;
    object-fit: contain;
    border-radius: 50%;
    background: #fff;
    padding: 8px;
    margin-bottom: 16px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.2);
}

.hero h1 { font-size: 26px; margin-bottom: 8px; }
.hero p { font-size: 15px; opacity: 0.95; margin-bottom: 20px; }

.hero .btn {
    font-size: 15px;
    padding: 12px 26px;
}

.content-wrap {
    max-width: 900px;
    margin: 30px auto;
    padding: 0 16px;
}

.content-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 14px rgba(0,0,0,0.08);
    padding: 26px 24px;
    margin-bottom: 24px;
}

.content-card h2 {
    color: #b71c1c;
    font-size: 19px;
    margin-bottom: 14px;
}

.content-card .body-text {
    color: #333;
    font-size: 15px;
    line-height: 1.7;
    white-space: pre-wrap;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.info-grid .info-item {
    background: #fff3e0;
    border-radius: 8px;
    padding: 14px 16px;
}

.info-grid .info-item strong {
    display: block;
    color: #b71c1c;
    font-size: 13px;
    margin-bottom: 4px;
}

.notice-list { list-style: none; }
.notice-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid #eee;
    flex-wrap: wrap;
}
.notice-item:last-child { border-bottom: none; }
.notice-item .notice-title { font-weight: 600; color: #333; font-size: 15px; }
.notice-item .notice-date { font-size: 12px; color: #888; }
.notice-item a.notice-link {
    font-size: 13px;
    color: #b71c1c;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
}

.gallery-grid img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.15s;
}
.gallery-grid img:hover { transform: scale(1.03); }

.empty-state {
    text-align: center;
    color: #888;
    padding: 30px;
    font-size: 14px;
}

/* ---- Footer credit line ---- */
.site-footer .footer-credit {
    margin-top: 4px;
    font-size: 12px;
    opacity: 0.75;
}

/* ---- Breadcrumb (interior page banners) ---- */
.breadcrumb {
    margin-top: 8px;
    font-size: 13px;
    opacity: 0.9;
}
.breadcrumb a { color: #fff; text-decoration: none; opacity: 0.9; }
.breadcrumb a:hover { text-decoration: underline; opacity: 1; }
.breadcrumb i { font-size: 10px; margin: 0 6px; opacity: 0.7; }

/* ---- Content meta (last updated, etc.) ---- */
.content-meta {
    font-size: 12.5px;
    color: #999;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid #f0e4d4;
}

/* ---- Reading / line-spacing adjustment controls ---- */
.reading-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}
.reading-controls > span {
    font-size: 13px;
    color: #777;
    font-weight: 600;
    margin-right: 4px;
}
.spacing-btn {
    border: 1.5px solid #eee;
    background: #fff3e0;
    color: #b71c1c;
    font-size: 12.5px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
}
.spacing-btn:hover { border-color: #e65100; }
.spacing-btn.active { background: #b71c1c; border-color: #b71c1c; color: #fff; }
.font-btn {
    border: 1.5px solid #eee;
    background: #fff3e0;
    color: #b71c1c;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.2s;
}
.font-btn:hover { border-color: #e65100; }

.content-card .body-text.spacing-compact { line-height: 1.4; }
.content-card .body-text.spacing-comfortable { line-height: 1.7; }
.content-card .body-text.spacing-relaxed { line-height: 2.2; }

.cms-editor textarea {
    width: 100%;
    min-height: 220px;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
}
