/* =================================================
   Print Portal - Main Stylesheet
   ================================================= */

:root {
    --primary: #4f46e5;
    --secondary: #6366f1;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #06b6d4;
    --purple: #8b5cf6;
    --orange: #f97316;
    --pink: #ec4899;
    --teal: #14b8a6;
    --sidebar-bg: #ffffff;
    --sidebar-shadow: 0 2px 10px rgba(0,0,0,.08);
}

body { font-family: 'Segoe UI', system-ui, -apple-system, sans-serif; background: #f4f7fb; }

/* ===== Brand ===== */
.brand { text-decoration: none; display: inline-flex; align-items: center; gap: .5rem; color: inherit; font-weight: 700; }
.brand-badge {
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: white; padding: 4px 10px; border-radius: 6px; font-weight: 800;
    font-size: 12px; letter-spacing: 1px;
}
.brand-text { font-size: 1.1rem; }

/* ===== HOME PAGE ===== */
.home-navbar {
    background: linear-gradient(135deg, #1e40af 0%, #4f46e5 100%);
    padding: 1rem 0;
}
.home-navbar .nav-link { font-weight: 500; }
.hero-section {
    background: linear-gradient(135deg, #1e3a8a 0%, #4f46e5 50%, #7c3aed 100%);
    padding: 5rem 0; min-height: 70vh;
}
.hero-section h1 { line-height: 1.2; }
.hero-stats { display: flex; gap: 2rem; }
.hero-stats h3 { color: #fbbf24; font-size: 2rem; margin: 0; }
.hero-stats small { color: rgba(255,255,255,.7); }
.hero-illustration { font-size: 12rem; color: rgba(255,255,255,.15); }
.about-icon { font-size: 10rem; color: #f59e0b; }
.site-footer { background: #1f2937; }

.services-section .category-title { color: #1f2937; margin: 1.5rem 0 1rem; }
.service-tile {
    background: white; border-radius: 12px; padding: 1.5rem 1rem;
    text-align: center; position: relative; transition: all .2s;
    box-shadow: 0 1px 3px rgba(0,0,0,.05);
    border: 1px solid #e5e7eb; height: 100%;
}
.service-tile:hover { transform: translateY(-4px); box-shadow: 0 8px 16px rgba(0,0,0,.1); }
.service-icon {
    width: 60px; height: 60px; border-radius: 12px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white; display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; margin: 0 auto 1rem;
}
.service-name { font-weight: 600; color: #1f2937; }
.service-badge {
    position: absolute; top: 8px; right: 8px;
    color: white; padding: 2px 8px; border-radius: 4px; font-size: 10px; font-weight: 700;
}

/* ===== AUTH PAGES ===== */
.auth-wrapper {
    display: flex; min-height: 100vh; background: #f4f7fb;
}
.auth-left {
    flex: 1; padding: 4rem 3rem;
    background: linear-gradient(135deg, #1e3a8a 0%, #4f46e5 50%, #7c3aed 100%);
    display: none;
}
@media (min-width: 992px) { .auth-left { display: block; } }
.auth-right {
    flex: 1; display: flex; align-items: center; justify-content: center;
    padding: 2rem;
}
.auth-card {
    background: white; padding: 2.5rem; border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,.08); width: 100%; max-width: 450px;
}
.auth-card-wide { max-width: 700px; }

/* ===== PORTAL LAYOUT (USER DASHBOARD) ===== */
.portal-body { background: #fff5e1; }

.portal-topbar {
    background: linear-gradient(90deg, #1e40af 0%, #2563eb 100%);
    color: white; padding: .75rem 1.25rem;
    display: flex; align-items: center; justify-content: space-between;
    box-shadow: 0 2px 8px rgba(0,0,0,.1); position: sticky; top: 0; z-index: 100;
}
.btn-sidebar-toggle { background: transparent; border: none; color: white; font-size: 1.25rem; }
.top-nav-buttons { display: flex; gap: .5rem; flex-wrap: wrap; }
.nav-pill {
    color: white; text-decoration: none; padding: .4rem .9rem;
    border-radius: 8px; font-weight: 600; font-size: .85rem;
    display: inline-flex; align-items: center; gap: .35rem;
}
.nav-pill:hover { color: white; opacity: .9; }
.nav-blue { background: #3b82f6; }
.nav-green { background: #10b981; }
.nav-teal { background: #14b8a6; }
.nav-indigo { background: #6366f1; }
.nav-orange { background: #f97316; }
.nav-pink { background: #ec4899; }
.nav-green-dark { background: #059669; }
.nav-red { background: #dc2626; }
.balance-chip {
    background: #111827; color: white; padding: .45rem .8rem;
    border-radius: 8px; font-weight: 700;
}
.avatar {
    width: 38px; height: 38px; border-radius: 50%;
    background: white; color: #1f2937;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700;
}

.portal-layout {
    display: flex; min-height: calc(100vh - 65px);
}
.portal-sidebar {
    width: 260px; background: white; padding: 1rem;
    box-shadow: var(--sidebar-shadow);
    overflow-y: auto; max-height: calc(100vh - 65px); position: sticky; top: 65px;
}
.portal-main { flex: 1; padding: 1.25rem; overflow-x: hidden; }

@media (max-width: 991px) {
    .portal-sidebar {
        position: fixed; top: 65px; left: -260px; height: calc(100vh - 65px);
        transition: left .25s; z-index: 99;
    }
    .portal-sidebar.show { left: 0; }
}

/* Sidebar top action buttons */
.sidebar-top-btns {
    display: flex !important;
    gap: .5rem;
    margin-bottom: 1rem;
    width: 100%;
}
.sidebar-btn-dashboard,
.sidebar-btn-print {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: .45rem;
    border-radius: 12px !important;
    font-weight: 700 !important;
    font-size: .9rem !important;
    padding: .75rem 1rem !important;
    text-decoration: none !important;
    color: #fff !important;
    border: none !important;
    white-space: nowrap;
    cursor: pointer;
    transition: transform .15s, opacity .15s;
    line-height: 1.2;
}
.sidebar-btn-dashboard:hover,
.sidebar-btn-print:hover {
    color: #fff !important;
    opacity: .88;
    transform: translateY(-1px);
}
.sidebar-btn-dashboard {
    flex: 2 1 0% !important;
    background: linear-gradient(135deg, #818cf8 0%, #6366f1 40%, #4f46e5 100%) !important;
    box-shadow: 0 4px 14px rgba(79, 70, 229, .4) !important;
}
.sidebar-btn-print {
    flex: 1 1 0% !important;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #f97316 100%) !important;
    box-shadow: 0 4px 14px rgba(249, 115, 22, .4) !important;
}

/* Sidebar items */
.wallet-card {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white; padding: 1rem; border-radius: 12px; margin-bottom: 1rem;
}
.wallet-card small { opacity: .85; letter-spacing: 1px; font-size: 10px; }
.wallet-card h4 { font-weight: 800; }
.btn-add, .btn-history {
    background: rgba(255,255,255,.25); color: white; border: none;
    padding: .35rem .7rem; border-radius: 8px; font-size: .8rem; font-weight: 600;
    text-decoration: none;
}
.sidebar-section-title {
    font-size: 11px; letter-spacing: 1px; color: #9ca3af;
    text-transform: uppercase; margin: 1rem 0 .5rem; font-weight: 700;
}
.sidebar-card {
    display: flex; align-items: center; gap: .75rem;
    padding: .75rem 1rem; border-radius: 12px;
    text-decoration: none; color: white; margin-bottom: .5rem;
}
.sidebar-card-purple { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.sidebar-card-orange { background: linear-gradient(135deg, #f97316, #ea580c); }
.sidebar-card-icon {
    width: 36px; height: 36px; background: rgba(255,255,255,.2);
    border-radius: 8px; display: flex; align-items: center; justify-content: center;
}
.card-title { font-weight: 700; font-size: .9rem; }
.sidebar-card small { opacity: .85; font-size: .7rem; }
.badge-hot, .badge-fast, .badge-new {
    background: white; color: #1f2937; padding: 1px 6px; border-radius: 4px;
    font-size: 9px; margin-left: 4px;
}
.badge-hot { background: #fbbf24; color: white; }
.badge-fast { background: #10b981; color: white; }
.badge-new { background: #ef4444; color: white; }

.sidebar-menu { display: flex; flex-direction: column; gap: 2px; margin-top: .5rem; }
.menu-item {
    display: flex; align-items: center; gap: .75rem;
    padding: .65rem .75rem; border-radius: 8px;
    color: #374151; text-decoration: none; font-weight: 500; font-size: .9rem;
}
.menu-item:hover, .menu-item.active { background: #f3f4f6; color: #1f2937; }
.text-purple { color: #8b5cf6; }

.theme-toggle {
    margin-top: 1rem; text-align: center; color: #6b7280;
    padding: .5rem; cursor: pointer; font-size: .85rem;
}

/* Stats cards */
.stat-card {
    color: white; padding: 1.25rem; border-radius: 12px;
    text-align: center; box-shadow: 0 4px 12px rgba(0,0,0,.08);
}
.stat-card h2 { font-weight: 800; margin: 0; }
.stat-card small { font-weight: 600; opacity: .95; letter-spacing: 1px; }
.stat-orange { background: linear-gradient(135deg, #f97316, #ea580c); }
.stat-blue { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.stat-green { background: linear-gradient(135deg, #10b981, #059669); }
.stat-red { background: linear-gradient(135deg, #ef4444, #dc2626); }

.services-block { background: white; border-radius: 14px; padding: 1.25rem; margin-bottom: 1.25rem; box-shadow: 0 1px 3px rgba(0,0,0,.04); }
.services-category {
    font-size: 11px; letter-spacing: 1px; color: #9ca3af;
    text-transform: uppercase; margin-bottom: 1rem; font-weight: 700;
}
.service-tile-mini {
    background: white; border: 1px solid #e5e7eb; border-radius: 10px;
    padding: 1rem .5rem; text-align: center; transition: all .2s;
    color: #1f2937; display: block; position: relative; height: 100%;
}
.service-tile-mini:hover { transform: translateY(-3px); box-shadow: 0 6px 12px rgba(0,0,0,.1); color: #1f2937; }
.service-icon-mini {
    width: 50px; height: 50px; border-radius: 10px;
    color: white; display: flex; align-items: center; justify-content: center;
    font-size: 1.25rem; margin: 0 auto .5rem;
}
.bg-success { background: linear-gradient(135deg, #10b981, #059669) !important; }
.bg-primary { background: linear-gradient(135deg, #3b82f6, #2563eb) !important; }
.bg-warning { background: linear-gradient(135deg, #f59e0b, #d97706) !important; }
.bg-danger { background: linear-gradient(135deg, #ef4444, #dc2626) !important; }
.bg-purple { background: linear-gradient(135deg, #8b5cf6, #6d28d9) !important; }
.bg-info { background: linear-gradient(135deg, #06b6d4, #0891b2) !important; }
.service-mini-name { font-size: .8rem; font-weight: 600; }

.btn-purple { background: linear-gradient(135deg, #8b5cf6, #6d28d9); color: white; border: none; }
.btn-orange { background: linear-gradient(135deg, #f97316, #ea580c); color: white; border: none; }
.btn-purple:hover, .btn-orange:hover { color: white; opacity: .9; }

/* Service form */
.balance-box, .charge-box {
    text-align: center; padding: .75rem; border-radius: 10px;
}
.balance-box { background: #d1fae5; color: #065f46; }
.charge-box { background: #fed7aa; color: #9a3412; }
.balance-box h5, .charge-box h5 { margin: 0; font-weight: 800; }

/* ===== ADMIN LAYOUT ===== */
.admin-body { background: #f1f5f9; }
.admin-topbar {
    background: linear-gradient(90deg, #0f172a 0%, #1e293b 100%);
    color: white; padding: .85rem 1.25rem;
    display: flex; align-items: center; justify-content: space-between;
    box-shadow: 0 2px 8px rgba(0,0,0,.15); position: sticky; top: 0; z-index: 100;
}
.admin-layout { display: flex; min-height: calc(100vh - 65px); }
.admin-sidebar {
    width: 250px; background: #1e293b; color: white;
    padding: 1rem 0; overflow-y: auto; max-height: calc(100vh - 65px); position: sticky; top: 65px;
}
.admin-main { flex: 1; padding: 1.5rem; overflow-x: hidden; }

@media (max-width: 991px) {
    .admin-sidebar { position: fixed; top: 65px; left: -250px; transition: left .25s; z-index: 99; height: calc(100vh - 65px); }
    .admin-sidebar.show { left: 0; }
}

.admin-menu { display: flex; flex-direction: column; }
.admin-menu-item {
    display: flex; align-items: center; gap: .75rem;
    padding: .8rem 1.25rem; color: #cbd5e1; text-decoration: none;
    font-weight: 500; border-left: 3px solid transparent;
}
.admin-menu-item:hover, .admin-menu-item.active {
    background: rgba(99, 102, 241, .15); color: white; border-left-color: #6366f1;
}
.admin-menu-section {
    font-size: 11px; color: #64748b; padding: 1rem 1.25rem .5rem;
    letter-spacing: 1px; text-transform: uppercase; font-weight: 700;
}

.admin-stat-card {
    color: white; padding: 1.25rem; border-radius: 14px;
    display: flex; justify-content: space-between; align-items: center;
    box-shadow: 0 4px 12px rgba(0,0,0,.08); cursor: pointer; transition: transform .2s;
}
.admin-stat-card:hover { transform: translateY(-3px); }
.admin-stat-card h2 { font-weight: 800; margin: 0; }
.admin-stat-card h6 { opacity: .9; font-size: .85rem; margin-bottom: .25rem; }
.admin-stat-card i { font-size: 2.5rem; opacity: .35; }
.bg-gradient-primary { background: linear-gradient(135deg, #4f46e5, #7c3aed); }
.bg-gradient-success { background: linear-gradient(135deg, #10b981, #059669); }
.bg-gradient-warning { background: linear-gradient(135deg, #f59e0b, #d97706); }
.bg-gradient-danger { background: linear-gradient(135deg, #ef4444, #dc2626); }
.bg-gradient-orange { background: linear-gradient(135deg, #f97316, #ea580c); }
.bg-gradient-green { background: linear-gradient(135deg, #22c55e, #16a34a); }
.bg-gradient-red { background: linear-gradient(135deg, #f43f5e, #e11d48); }
.bg-gradient-purple { background: linear-gradient(135deg, #a855f7, #7e22ce); }

/* Dashboard top banner (75%) + helpline (25%) */
.dash-banner {
    position: relative; overflow: hidden; border-radius: 16px;
    background: linear-gradient(120deg, #4f46e5 0%, #7c3aed 45%, #2563eb 100%);
    color: #fff; padding: 1.6rem 1.8rem; min-height: 150px;
    display: flex; align-items: center; box-shadow: 0 8px 24px rgba(79,70,229,.25);
}
.dash-banner::after {
    content: ""; position: absolute; right: -40px; top: -40px;
    width: 200px; height: 200px; border-radius: 50%;
    background: rgba(255,255,255,.10);
}
.dash-banner-content { position: relative; z-index: 1; width: 100%; }
.dash-banner-tag {
    display: inline-block; background: rgba(255,255,255,.18); color: #fff;
    font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
    padding: .25rem .7rem; border-radius: 30px; margin-bottom: .5rem;
}
.dash-banner-title { font-weight: 800; margin: 0 0 .25rem; font-size: 1.5rem; }
.dash-banner-sub { opacity: .92; font-size: .95rem; }
.dash-banner-notice {
    background: rgba(0,0,0,.18); border-radius: 8px; padding: .4rem .7rem;
    font-size: .85rem; display: flex; align-items: center;
}
.dash-banner-notice marquee { display: inline-block; }

.dash-help {
    background: #fff; border-radius: 16px; box-shadow: 0 1px 3px rgba(0,0,0,.06);
    overflow: hidden; display: flex; flex-direction: column;
}
.dash-help-head {
    background: linear-gradient(135deg, #0f172a, #1e293b); color: #fff;
    font-weight: 700; font-size: .95rem; padding: .75rem 1rem;
}
.dash-help-body { padding: .9rem; display: flex; flex-direction: column; gap: .55rem; }
.dash-help-btn {
    display: flex; align-items: center; gap: .6rem; text-decoration: none;
    font-weight: 600; font-size: .9rem; padding: .6rem .8rem; border-radius: 10px;
    background: #eef2ff; color: #4338ca; transition: all .15s;
}
.dash-help-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0,0,0,.08); }
.dash-help-btn.whatsapp { background: #dcfce7; color: #15803d; }
.dash-help-btn.email { background: #fef9c3; color: #a16207; word-break: break-all; }
.dash-help-btn i { font-size: 1.05rem; }

/* Tables */
.table th { font-weight: 700; font-size: .85rem; }
.card { border: none; border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,.05); }
.card-header { border-bottom: none; font-weight: 600; }

/* ===== User sidebar — prominent Transactions button ===== */
.sidebar-txn-btn {
    display: flex; align-items: center; gap: .7rem; text-decoration: none;
    margin: .25rem 0 .75rem; padding: .7rem .85rem; border-radius: 12px;
    background: linear-gradient(135deg, #0ea5e9, #2563eb); color: #fff;
    box-shadow: 0 4px 14px rgba(37,99,235,.28); transition: all .18s;
}
.sidebar-txn-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(37,99,235,.35); color: #fff; }
.sidebar-txn-btn.is-active { outline: 2px solid rgba(255,255,255,.65); outline-offset: 1px; }
.sidebar-txn-btn .txn-ic {
    width: 38px; height: 38px; flex: 0 0 38px; border-radius: 10px;
    background: rgba(255,255,255,.22); display: flex; align-items: center; justify-content: center; font-size: 1.1rem;
}
.sidebar-txn-btn .txn-txt { display: flex; flex-direction: column; line-height: 1.15; }
.sidebar-txn-btn .txn-txt strong { font-size: .95rem; font-weight: 700; }
.sidebar-txn-btn .txn-txt small { font-size: .7rem; opacity: .9; }
.sidebar-txn-btn .txn-arrow { margin-left: auto; opacity: .85; transition: transform .18s; }
.sidebar-txn-btn:hover .txn-arrow { transform: translateX(3px); }

/* ===== User sidebar — dynamic category headers ===== */
.sidebar-cat-head {
    display: flex; align-items: center; gap: .5rem;
    font-size: 10.5px; letter-spacing: .6px; text-transform: uppercase; font-weight: 800;
    color: #94a3b8; margin: .85rem .25rem .35rem; padding-top: .45rem;
    border-top: 1px solid rgba(148,163,184,.18);
}
.sidebar-cat-head .cat-count {
    margin-left: auto; background: #e2e8f0; color: #475569;
    border-radius: 20px; padding: 0 .45rem; font-size: 9.5px; font-weight: 700;
}

/* ── Manual-request service form (Voter Link Mobile, Voter PDF Request, etc.) ── */
.manual-stats {
    background: #fff; border: 1px solid #e5e7eb; border-radius: 14px;
    padding: 14px 16px; margin-bottom: 16px;
    box-shadow: 0 4px 14px rgba(99,102,241,.06);
}
.manual-stats-title {
    font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
    color: #6b7280; margin-bottom: 12px;
}
.manual-stats-title i { color: #6366f1; margin-right: 5px; }
.manual-stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.manual-stat {
    border-radius: 12px; padding: 14px 16px;
    display: flex; align-items: center; justify-content: space-between;
}
.manual-stat .ms-num { font-size: 26px; font-weight: 800; line-height: 1; }
.manual-stat .ms-lbl {
    font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
}
.manual-stat.is-pending    { background: #fef9e7; color: #92722a; }
.manual-stat.is-pending .ms-lbl    { color: #b08a30; }
.manual-stat.is-processing { background: #e8f1fe; color: #2456a6; }
.manual-stat.is-processing .ms-lbl { color: #3b6fc4; }

.manual-head {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #fff; border-radius: 12px 12px 0 0;
    padding: 12px 16px; margin: 4px 0 18px;
    display: flex; align-items: center; justify-content: space-between;
    box-shadow: 0 6px 18px rgba(124,58,237,.25);
}
.manual-head .mh-title { font-weight: 800; font-size: 15px; }
.manual-head .mh-title i { margin-right: 6px; opacity: .9; }
.manual-head .mh-eta {
    background: rgba(255,255,255,.22); border-radius: 20px;
    padding: 4px 12px; font-size: 12px; font-weight: 700;
}
.manual-head .mh-eta i { margin-right: 5px; }

/* ── Dashboard banner image slider (admin-uploaded) + richer help card ── */
.dash-banner-content { z-index: 2; }                 /* keep text above slides+overlay */
.dash-banner-slides { position: absolute; inset: 0; z-index: 0; }
.dash-banner-slide {
    position: absolute; inset: 0; background-size: cover; background-position: center;
    opacity: 0; transition: opacity 1.1s ease-in-out;
}
.dash-banner-slide.is-active { opacity: 1; }
.dash-banner.has-slides { background: #312e81; }      /* fallback colour under images */
.dash-banner-overlay {
    position: absolute; inset: 0; z-index: 1;
    background: linear-gradient(120deg, rgba(40,30,120,.86) 0%, rgba(91,33,182,.60) 45%, rgba(29,78,216,.84) 100%);
}
.dash-banner.has-slides::after { z-index: 1; }        /* deco circle stays below text */
.dash-help-meta {
    display: flex; align-items: center; gap: .5rem; font-size: .82rem;
    color: #475569; font-weight: 600; padding: .15rem .2rem;
}
.dash-help-meta i { color: #6366f1; }
.dash-help-note {
    font-size: .8rem; color: #64748b; background: #f1f5f9;
    border-radius: 8px; padding: .5rem .7rem; line-height: 1.35;
}
