/* =================================================
   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); }

/* 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; }
