/* ==========================================================================
   PORTAL.CSS - CỔNG DỊCH VỤ SỐ CÔNG DÂN PHƯỜNG / XÃ
   Thiết kế giao diện hiện đại chuẩn Cổng Dịch vụ công Quốc gia (DVC.GOV.VN)
   Màu chủ đạo: Royal Navy (#0f3d64), Emerald Green (#059669), Flag Red (#b91c1c)
   ========================================================================== */

:root {
    --portal-primary: #0f3d64;
    --portal-primary-hover: #0a2944;
    --portal-primary-light: #e6f0fa;
    --portal-accent: #b91c1c;
    --portal-gold: #d97706;
    --portal-gold-light: #fef3c7;
    --portal-success: #059669;
    --portal-success-light: #ecfdf5;
    --portal-warning: #d97706;
    --portal-danger: #dc2626;
    --portal-bg: #f8fafc;
    --portal-card-bg: #ffffff;
    --portal-text: #1e293b;
    --portal-muted: #64748b;
    --portal-border: #e2e8f0;
    --portal-radius: 12px;
    --portal-shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --portal-shadow-md: 0 4px 6px -1px rgba(0,0,0,0.08), 0 2px 4px -1px rgba(0,0,0,0.04);
    --portal-shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.03);
}

body.portal-body {
    background-color: var(--portal-bg);
    color: var(--portal-text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

/* ================= Top National Motto Bar ================= */
.portal-top-bar {
    background: #8b0000;
    background: linear-gradient(90deg, #991b1b 0%, #b91c1c 50%, #991b1b 100%);
    color: #ffffff;
    font-size: 0.8125rem;
    padding: 6px 0;
    border-bottom: 2px solid #f59e0b;
}

.portal-top-bar .motto-main {
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.portal-top-bar .motto-sub {
    font-size: 0.75rem;
    opacity: 0.95;
    font-style: italic;
}

.portal-top-bar a {
    color: #fef08a;
    text-decoration: none;
    font-weight: 600;
}
.portal-top-bar a:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* ==========================================================================
   HEADER 2 TẦNG (GOVTECH 2-TIER HEADER)
   Tầng 1: Quốc huy, Tên đơn vị hành chính, Hotline 24/7, Thông báo, VNeID
   Tầng 2: Menu phân hệ điều hướng chính xuống dưới theo chuẩn thiết kế
   ========================================================================== */
.portal-header-wrapper {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: #ffffff;
    box-shadow: 0 4px 20px rgba(15, 61, 100, 0.08);
}

.portal-header-top {
    background: #ffffff;
    border-bottom: 1px solid #edf2f7;
}

.portal-emblem-svg {
    width: 52px;
    height: 52px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.12));
    transition: transform 0.2s ease;
}

.portal-brand:hover .portal-emblem-svg {
    transform: scale(1.05);
}

.portal-brand-titles {
    line-height: 1.25;
}

.portal-brand-level {
    font-size: 1.125rem;
    font-weight: 850;
    color: #991b1b;
    letter-spacing: -0.2px;
    text-transform: uppercase;
}

.portal-brand-city {
    font-size: 0.825rem;
    font-weight: 700;
    color: #0f3d64;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.portal-brand-sep {
    width: 1px;
    height: 38px;
    background: #e2e8f0;
}

.portal-brand-portal-title {
    font-size: 0.875rem;
    font-weight: 800;
    color: #0f3d64;
    letter-spacing: 0.2px;
    line-height: 1.2;
}

.portal-brand-portal-sub {
    font-size: 0.6875rem;
    font-weight: 600;
    color: #64748b;
    letter-spacing: 0.3px;
    line-height: 1.2;
}

/* Utilities in Tier 1 */
.portal-header-action {
    display: flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.portal-header-action:hover {
    background: #fee2e2;
    border-color: #fca5a5;
}

.action-icon-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.action-caption {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: #64748b;
    line-height: 1.1;
}

.action-value {
    font-size: 13px;
    line-height: 1.2;
}

.portal-header-icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #334155;
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.portal-header-icon-btn:hover {
    background: #e2e8f0;
    color: #0f3d64;
    transform: scale(1.05);
}

.portal-badge-dot {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #dc2626;
    color: #ffffff;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 800;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(220, 38, 38, 0.35);
    border: 2px solid #ffffff;
}

.notif-dropdown-menu {
    width: 340px;
    border-radius: 14px;
    overflow: hidden;
}

.portal-user-pill {
    display: flex;
    align-items: center;
    padding: 4px 14px 4px 4px;
    border-radius: 30px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.portal-user-pill:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
}

.portal-user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ffffff;
}

.btn-vneid {
    background: linear-gradient(135deg, #a81c1c 0%, #dc2626 100%);
    color: #ffffff !important;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 7px 16px;
    border-radius: 20px;
    border: none;
    box-shadow: 0 3px 10px rgba(185, 28, 28, 0.25);
    transition: all 0.2s ease;
}

.btn-vneid:hover {
    background: linear-gradient(135deg, #881313 0%, #b91c1c 100%);
    box-shadow: 0 4px 14px rgba(185, 28, 28, 0.35);
    transform: translateY(-1px);
}

.vneid-badge-icon {
    color: #fef08a;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
}

.portal-mobile-toggle {
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    border-radius: 8px;
    padding: 6px 10px;
    color: #0f3d64;
    transition: background 0.2s;
}

.portal-mobile-toggle:hover {
    background: #e2e8f0;
}

/* ==========================================================================
   TẦNG 2: NAVBAR MENU ĐIỀU HƯỚNG XUỐNG DƯỚI (DEEP GOVTECH BLUE)
   ========================================================================== */
.portal-navbar-tier2 {
    background: linear-gradient(90deg, #092540 0%, #0f3d64 50%, #154c79 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 12px rgba(15, 61, 100, 0.12);
}

.portal-navbar-tier2 .container {
    padding-left: 12px;
    padding-right: 12px;
}

.portal-nav-list {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap !important;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2px;
    width: 100%;
    overflow-x: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.portal-nav-list::-webkit-scrollbar {
    display: none;
}

.portal-nav-item {
    display: flex;
    flex-shrink: 0;
}

.portal-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.84rem;
    font-weight: 600;
    padding: 10px 10px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap !important;
}

.portal-nav-link i {
    font-size: 1rem;
    opacity: 0.9;
}

.portal-nav-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
}

.portal-nav-link.active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.22);
    font-weight: 700;
    box-shadow: inset 0 -3px 0 #fbbf24;
}

@media (min-width: 992px) {
    .portal-nav-list {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        justify-content: space-between !important;
    }
    .portal-nav-item {
        flex: 1 1 auto;
        text-align: center;
        justify-content: center;
    }
    .portal-nav-link {
        width: 100%;
        justify-content: center;
        padding: 10px 8px !important;
        font-size: 0.83rem !important;
        white-space: nowrap !important;
    }
}

/* ==========================================================================
   HERO BANNER & FAST TOOLS CARD (TRANG CHỦ)
   ========================================================================== */
.portal-hero-section {
    background: #f4f7fb;
}

.portal-hero-card {
    background: linear-gradient(135deg, #092540 0%, #0f3d64 55%, #185a91 100%);
    border-radius: 20px;
    box-shadow: 0 12px 32px rgba(15, 61, 100, 0.16);
    color: #ffffff;
    min-height: 320px;
}

.portal-hero-heading {
    font-size: clamp(1.85rem, 3.4vw, 2.6rem);
    font-weight: 850;
    color: #ffffff;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.portal-hero-tagline {
    font-size: 1rem;
    color: #cbd5e1;
    font-weight: 500;
}

.portal-hero-search {
    background: #ffffff;
    border-radius: 12px;
    padding: 4px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.16);
}

.portal-hero-search .form-control {
    font-size: 0.95rem;
    box-shadow: none !important;
}

.portal-hero-search .btn-primary {
    background: linear-gradient(135deg, #b91c1c 0%, #dc2626 100%);
    border: none;
    border-radius: 8px;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(185, 28, 28, 0.3);
    transition: all 0.2s ease;
}

.portal-hero-search .btn-primary:hover {
    background: linear-gradient(135deg, #991b1b 0%, #b91c1c 100%);
    box-shadow: 0 6px 14px rgba(185, 28, 28, 0.4);
}

.portal-search-chips {
    gap: 6px;
}

.search-chip {
    background: rgba(255, 255, 255, 0.16);
    color: #f1f5f9;
    padding: 3px 12px;
    border-radius: 14px;
    font-size: 0.78rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.search-chip:hover {
    background: #ffffff;
    color: #0f3d64;
    transform: translateY(-1px);
}

.portal-hero-img-wrap {
    height: 100%;
    min-height: 320px;
    overflow: hidden;
    position: relative;
    border-radius: 0 20px 20px 0;
}

.portal-hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.portal-hero-img-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, #092540 0%, rgba(9, 37, 64, 0.35) 40%, rgba(0, 0, 0, 0.08) 100%);
}

.portal-hero-img-caption {
    position: absolute;
    bottom: 14px;
    right: 14px;
    background: rgba(15, 23, 42, 0.78);
    backdrop-filter: blur(8px);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Auth Card on Right Column */
.portal-auth-card {
    background: #ffffff;
    border: 1px solid #e2e8f0 !important;
    border-top: 3px solid #b91c1c !important;
}

.auth-card-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #e0f2fe;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-vneid-primary {
    background: linear-gradient(135deg, #a81c1c 0%, #dc2626 100%);
    color: #ffffff !important;
    border: none;
    border-radius: 10px;
    font-size: 0.9375rem;
    box-shadow: 0 4px 12px rgba(185, 28, 28, 0.25);
    transition: all 0.2s ease;
}

.btn-vneid-primary:hover {
    background: linear-gradient(135deg, #881313 0%, #b91c1c 100%);
    box-shadow: 0 6px 16px rgba(185, 28, 28, 0.35);
    transform: translateY(-1px);
}

.vneid-shield-icon {
    color: #fef08a;
    font-size: 1.15rem;
    display: inline-flex;
    align-items: center;
}

/* Fast Tools Card */
.portal-fast-tools-card {
    background: #ffffff;
    border: 1px solid #e2e8f0 !important;
}

.fast-tool-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 12px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #1e293b;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s ease;
    height: 100%;
}

.fast-tool-btn:hover {
    background: #ffffff;
    border-color: #3b82f6;
    color: #1d4ed8;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.12);
    transform: translateY(-1px);
}

.fast-tool-btn i {
    font-size: 1.25rem;
    line-height: 1;
}

/* ==========================================================================
   LƯỚI 10 DỊCH VỤ NHANH DÀNH CHO CÔNG DÂN
   ========================================================================== */
.portal-services-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 10px;
}

.service-pill-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
    padding: 12px 6px;
    border-radius: 14px;
    transition: all 0.2s ease;
}

.service-pill-item:hover {
    background: #f1f5f9;
    transform: translateY(-3px);
}

.service-pill-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #ffffff;
    margin-bottom: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}

.service-pill-item:hover .service-pill-icon {
    transform: scale(1.08);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
}

.service-pill-name {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.3;
}

/* Gradients for service icons */
.red-grad { background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%); }
.blue-grad { background: linear-gradient(135deg, #1d4ed8 0%, #3b82f6 100%); }
.green-grad { background: linear-gradient(135deg, #059669 0%, #10b981 100%); }
.orange-grad { background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%); }
.purple-grad { background: linear-gradient(135deg, #7c3aed 0%, #8b5cf6 100%); }
.teal-grad { background: linear-gradient(135deg, #0d9488 0%, #14b8a6 100%); }
.indigo-grad { background: linear-gradient(135deg, #4338ca 0%, #6366f1 100%); }
.pink-grad { background: linear-gradient(135deg, #db2777 0%, #ec4899 100%); }
.emerald-grad { background: linear-gradient(135deg, #047857 0%, #10b981 100%); }
.gray-grad { background: linear-gradient(135deg, #475569 0%, #64748b 100%); }

/* 3-Column Home Section Elements */
.text-navy {
    color: #0f3d64 !important;
}

.procedure-item-row {
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.procedure-item-row:hover {
    background: #f1f5f9;
    border-color: #e2e8f0;
    transform: translateX(4px);
}

.stepper-mini-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    flex: 1;
}

.mini-bubble {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 11px;
    margin-bottom: 4px;
}

.stepper-mini-col.active .mini-bubble {
    background: #0f3d64;
    color: #ffffff;
    box-shadow: 0 0 0 3px rgba(15, 61, 100, 0.2);
}

.stepper-mini-col.completed .mini-bubble {
    background: #059669;
    color: #ffffff;
}

.news-item-row {
    transition: background 0.2s ease;
}

.news-item-row:hover .news-title {
    color: #0f3d64 !important;
}

.news-thumbnail {
    transition: transform 0.2s ease;
}

.news-item-row:hover .news-thumbnail {
    transform: scale(1.04);
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ================= Quick Actions Bar ================= */
.quick-action-card {
    background: #ffffff;
    border: 1px solid var(--portal-border);
    border-radius: var(--portal-radius);
    padding: 20px 16px;
    text-align: center;
    text-decoration: none;
    color: var(--portal-text);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    box-shadow: var(--portal-shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    height: 100%;
}

.quick-action-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--portal-shadow-md);
    border-color: #3b82f6;
    color: var(--portal-primary);
}

.quick-action-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.quick-action-icon.blue { background: #e0f2fe; color: #0284c7; }
.quick-action-icon.green { background: #dcfce7; color: #16a34a; }
.quick-action-icon.purple { background: #f3e8ff; color: #9333ea; }
.quick-action-icon.amber { background: #fef3c7; color: #d97706; }
.quick-action-icon.red { background: #fee2e2; color: #dc2626; }
.quick-action-icon.indigo { background: #e0e7ff; color: #4f46e5; }

.quick-action-title {
    font-size: 0.9375rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0;
}

/* ================= Tracking Widget ================= */
.tracking-card {
    background: #ffffff;
    border-radius: var(--portal-radius);
    border: 1px solid var(--portal-border);
    padding: 28px;
    box-shadow: var(--portal-shadow-md);
}

.tracking-stepper {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin: 32px 0 24px;
}

.tracking-stepper::before {
    content: "";
    position: absolute;
    top: 20px;
    left: 40px;
    right: 40px;
    height: 3px;
    background: #e2e8f0;
    z-index: 1;
}

.tracking-step {
    position: relative;
    z-index: 2;
    text-align: center;
    flex: 1;
}

.step-bubble {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #ffffff;
    border: 3px solid #cbd5e1;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9375rem;
    margin: 0 auto 10px;
    transition: all 0.3s;
}

.tracking-step.completed .step-bubble {
    background: var(--portal-success);
    border-color: var(--portal-success);
    color: #ffffff;
}

.tracking-step.active .step-bubble {
    background: var(--portal-primary);
    border-color: var(--portal-primary);
    color: #ffffff;
    box-shadow: 0 0 0 4px rgba(15, 61, 100, 0.2);
}

.step-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #64748b;
    line-height: 1.3;
}

.tracking-step.active .step-label {
    color: var(--portal-primary);
    font-weight: 700;
}

.tracking-step.completed .step-label {
    color: var(--portal-success);
    font-weight: 700;
}

/* ================= Procedure Item Cards ================= */
.procedure-card {
    background: #ffffff;
    border: 1px solid var(--portal-border);
    border-radius: var(--portal-radius);
    padding: 22px;
    box-shadow: var(--portal-shadow-sm);
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.procedure-card:hover {
    box-shadow: var(--portal-shadow-md);
    border-color: #93c5fd;
    transform: translateY(-2px);
}

.procedure-code {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--portal-muted);
    background: #f1f5f9;
    padding: 3px 8px;
    border-radius: 6px;
    display: inline-block;
}

.procedure-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
    margin: 10px 0 8px;
    line-height: 1.4;
}

.procedure-meta {
    font-size: 0.8125rem;
    color: var(--portal-muted);
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.procedure-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.dvc-level-badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
}

/* ================= News Card ================= */
.news-card {
    background: #ffffff;
    border: 1px solid var(--portal-border);
    border-radius: var(--portal-radius);
    overflow: hidden;
    box-shadow: var(--portal-shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--portal-shadow-md);
}

.news-thumb {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background: #e2e8f0;
}

.news-body {
    padding: 18px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.news-category {
    font-size: 0.75rem;
    font-weight: 700;
    color: #b91c1c;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.news-title {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.4;
    color: #0f172a;
    margin-bottom: 8px;
    text-decoration: none;
}
.news-title:hover {
    color: var(--portal-primary);
}

.news-summary {
    font-size: 0.875rem;
    color: var(--portal-muted);
    line-height: 1.5;
    margin-bottom: 12px;
    flex-grow: 1;
}

.news-date {
    font-size: 0.75rem;
    color: #94a3b8;
}

/* ================= Hotline / Emergency Box ================= */
.hotline-card {
    background: linear-gradient(135deg, #fff1f2 0%, #ffe4e6 100%);
    border: 1px solid #fecdd3;
    border-radius: var(--portal-radius);
    padding: 20px;
}

.hotline-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px dashed #fda4af;
}

.hotline-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.hotline-number {
    font-size: 1.125rem;
    font-weight: 800;
    color: #be123c;
    text-decoration: none;
}
.hotline-number:hover {
    text-decoration: underline;
}

/* ================= Status Pills ================= */
.portal-badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    display: inline-block;
}

.portal-badge.status-new { background: #e0f2fe; color: #0369a1; }
.portal-badge.status-processing { background: #fef3c7; color: #b45309; }
.portal-badge.status-additional { background: #ffedd5; color: #c2410c; }
.portal-badge.status-approved { background: #dcfce7; color: #15803d; }
.portal-badge.status-returned { background: #f1f5f9; color: #475569; }

/* ================= Footer ================= */
.portal-footer {
    background: #092540;
    color: #cbd5e1;
    padding: 48px 0 24px;
    font-size: 0.875rem;
    border-top: 4px solid #b91c1c;
}

.portal-footer h5 {
    color: #ffffff;
    font-weight: 800;
    font-size: 1rem;
    margin-bottom: 16px;
    letter-spacing: -0.2px;
}

.portal-footer a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s;
}
.portal-footer a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.portal-footer-bottom {
    margin-top: 36px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.8125rem;
    color: #64748b;
    text-align: center;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .portal-hero-title {
        font-size: 1.75rem;
    }
    .tracking-stepper::before {
        display: none;
    }
    .tracking-stepper {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }
    .tracking-step {
        display: flex;
        align-items: center;
        gap: 12px;
        text-align: left;
    }
    .step-bubble {
        margin: 0;
    }
}

/* Shared public page surface */
.portal-page-heading {
    background: linear-gradient(115deg, #eaf4ff 0%, #f7fbff 62%, #fff 100%);
    border-bottom: 1px solid #dce9f5;
}
.portal-page-heading h1 { color: #103b65; letter-spacing: -.035em; }
.portal-payment-notice { max-width: 690px; }
.portal-payment-icon {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border-radius: 18px;
    color: #0f5db7;
    background: #e8f2ff;
}
.portal-body .card { transition: box-shadow .2s ease, transform .2s ease; }
.portal-body .card:focus-within { box-shadow: 0 10px 30px rgba(19, 60, 104, .1); }
.portal-body .form-control:focus, .portal-body .form-select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 .2rem rgba(59, 130, 246, .13);
}
.portal-body .btn { border-radius: 10px; }
#portal-gis-map { z-index: 1; }
@media (max-width: 991px) {
    .portal-brand-text { max-width: min(58vw, 340px); }
    .portal-brand-title, .portal-brand-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* Select2 fields match native portal inputs. */
.portal-body .select2-container { max-width: 100%; }
.portal-body .select2-container .select2-choice {
    height: 42px;
    line-height: 40px;
    padding-left: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #fff;
    box-shadow: none;
    color: #1e293b;
}
.portal-body .select2-container .select2-choice > .select2-chosen { line-height: 40px; }
.portal-body .select2-container .select2-choice .select2-arrow {
    border-left: 1px solid #e2e8f0;
    background: #f8fafc;
    border-radius: 0 9px 9px 0;
}
.portal-body .select2-container-active .select2-choice {
    border-color: #3b82f6;
    box-shadow: 0 0 0 .2rem rgba(59, 130, 246, .13);
}
.portal-body .form-select-lg + .select2-container .select2-choice,
.portal-body .form-select-lg + .select2-container .select2-choice > .select2-chosen {
    height: 50px;
    line-height: 48px;
}

/* Refined shared presentation for citizen pages. */
.portal-body { background: #f4f7fb; }
.portal-navbar { box-shadow: 0 8px 28px rgba(12, 43, 76, .06); }
.portal-nav-links .nav-link { border-radius: 12px; }
.portal-nav-links .nav-link.active { box-shadow: inset 0 -2px 0 #2d73c4; }
.portal-body main > .bg-primary.text-white.py-4 {
    background: radial-gradient(circle at 85% 15%, rgba(106, 164, 226, .24), transparent 28%), linear-gradient(120deg, #0d3155, #165b91) !important;
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
}
.portal-body main > .bg-primary.text-white.py-4 h2 { letter-spacing: -.035em; font-size: clamp(1.6rem, 3vw, 2.2rem); }
.portal-body main > .container.py-4, .portal-body main > .container.py-5 { padding-top: 2.25rem !important; padding-bottom: 3rem !important; }
.portal-body .card {
    border: 1px solid #e6edf5 !important;
    border-radius: 18px !important;
    box-shadow: 0 8px 30px rgba(19, 49, 83, .055) !important;
}
.portal-body .card:hover { box-shadow: 0 12px 34px rgba(19, 49, 83, .09) !important; }
.portal-body .form-control, .portal-body .form-select {
    min-height: 44px;
    border: 1px solid #cfdaea;
    border-radius: 10px;
    color: #18324e;
    background-color: #fff;
}
.portal-body .form-control::placeholder { color: #8494a9; }
.portal-body .form-label { color: #27415f; font-weight: 650; }
.portal-body .btn-primary { background: #145da0; border-color: #145da0; box-shadow: 0 4px 12px rgba(20, 93, 160, .14); }
.portal-body .btn-primary:hover { background: #0d497e; border-color: #0d497e; }
.portal-avatar { display: block; object-fit: cover; border-radius: 50%; background: #e7eef7; border: 2px solid #fff; }
.portal-avatar-sm { width: 30px; height: 30px; }
.portal-avatar-lg { width: 82px; height: 82px; margin: auto; }

.portal-auth-modal .modal-dialog { max-width: 820px; }
.portal-auth-modal .modal-content { display: grid; grid-template-columns: .82fr 1.18fr; overflow: hidden; border: 0; border-radius: 22px; box-shadow: 0 30px 80px rgba(8, 26, 48, .25); }
.portal-auth-intro { display: flex; flex-direction: column; justify-content: center; min-height: 500px; padding: 40px; color: #fff; background: radial-gradient(circle at 90% 12%, rgba(255,255,255,.18), transparent 28%), linear-gradient(155deg, #0c3157, #17629b); }
.portal-auth-symbol { display: grid; place-items: center; width: 54px; height: 54px; margin-bottom: 28px; border-radius: 16px; background: rgba(255,255,255,.16); }
.portal-auth-symbol svg { width: 27px; height: 27px; }
.portal-auth-eyebrow { font-size: .7rem; font-weight: 800; letter-spacing: .14em; color: #a9d2f4; }
.portal-auth-intro h2 { margin: 12px 0; font-size: clamp(1.8rem, 3vw, 2.45rem); font-weight: 800; letter-spacing: -.04em; }
.portal-auth-intro p { color: #d8e8f5; line-height: 1.7; }
.portal-auth-note { display: flex; align-items: flex-start; gap: 10px; margin-top: 35px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.2); color: #d8e8f5; font-size: .83rem; }
.portal-auth-note svg { flex: 0 0 17px; width: 17px; height: 17px; color: #7dd3ac; }
.portal-auth-content { position: relative; padding: 44px 42px 32px; }
.portal-auth-close { position: absolute; top: 20px; right: 20px; }
.portal-auth-tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 11px; background: #edf3f9; }
.portal-auth-tabs button { min-width: 105px; padding: 8px 12px; border: 0; border-radius: 8px; background: transparent; color: #60748d; font-weight: 700; }
.portal-auth-tabs button.active { background: #fff; color: #145da0; box-shadow: 0 2px 7px rgba(14, 54, 91, .1); }
.portal-auth-title { margin: 28px 0 4px; color: #123451; font-size: 1.35rem; font-weight: 800; letter-spacing: -.025em; }
.portal-auth-subtitle { margin-bottom: 23px; color: #65788e; font-size: .87rem; }
.portal-auth-content .form-label { margin-bottom: 6px; font-size: .85rem; }
.portal-auth-content .form-control { min-height: 46px; }
.portal-auth-submit { min-height: 46px; margin-top: 5px; font-weight: 700; }
.portal-auth-staff { margin: 23px 0 0; padding-top: 17px; border-top: 1px solid #edf1f6; color: #66788c; text-align: center; font-size: .8rem; }
.portal-auth-staff a { color: #145da0; font-weight: 700; text-decoration: none; }
.portal-auth-verification { padding: 12px; border-radius: 10px; background: #edf5fd; color: #315f8f; font-size: .85rem; }
@media (max-width: 767px) {
    .portal-auth-modal .modal-dialog { margin: 12px; }
    .portal-auth-modal .modal-content { display: block; }
    .portal-auth-intro { min-height: 0; padding: 22px 28px; }
    .portal-auth-symbol, .portal-auth-note { display: none; }
    .portal-auth-intro h2 { margin-bottom: 4px; font-size: 1.4rem; }
    .portal-auth-intro p { margin-bottom: 0; font-size: .8rem; }
    .portal-auth-content { padding: 26px 24px; }
}

/* ==========================================================================
   MOBILE APP BOTTOM NAVIGATION BAR (FIXED BOTTOM DVC APP BAR)
   ========================================================================== */
.portal-mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    box-shadow: 0 -4px 18px rgba(15, 61, 100, 0.08);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1040;
    padding: 4px 6px;
}

.mobile-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 600;
    transition: color 0.15s;
    position: relative;
    padding: 4px 0;
}

.mobile-nav-item i {
    font-size: 1.25rem;
    line-height: 1.2;
}

.mobile-nav-item.active {
    color: #0f3d64;
    font-weight: 700;
}

.mobile-nav-highlight {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0f3d64 0%, #1d4ed8 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: -22px;
    box-shadow: 0 4px 12px rgba(15, 61, 100, 0.35);
    border: 3px solid #ffffff;
    transition: transform 0.15s;
}

.mobile-nav-highlight:hover {
    transform: scale(1.05);
}

.mobile-nav-highlight i {
    font-size: 1.35rem;
    color: #ffffff;
    line-height: 1;
}

.mobile-nav-badge {
    position: absolute;
    top: -4px;
    right: -8px;
    background: #dc2626;
    color: #ffffff;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 5px;
    line-height: 1;
}

/* Responsive adjustments across devices */
@media (max-width: 1199.98px) {
    .portal-services-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 8px;
    }
}

@media (max-width: 991.98px) {
    body.portal-body {
        padding-bottom: 74px !important;
    }
    .portal-navbar-tier2 {
        padding: 8px 0;
    }
    .portal-nav-list {
        flex-direction: column;
        gap: 2px;
        padding: 8px 0;
    }
    .portal-nav-link {
        padding: 10px 14px;
        border-radius: 8px;
        width: 100%;
    }
    .portal-nav-link.active {
        box-shadow: none;
        border-left: 3px solid #fbbf24;
        border-radius: 0 8px 8px 0;
    }
    .portal-hero-img-wrap {
        border-radius: 0 0 20px 20px;
        min-height: 220px;
    }
}

@media (max-width: 575.98px) {
    .portal-brand-level {
        font-size: 0.95rem;
    }
    .portal-brand-city {
        font-size: 0.72rem;
    }
    .portal-emblem-svg {
        width: 40px;
        height: 40px;
    }
    .portal-hero-heading {
        font-size: 1.6rem;
    }
    .portal-services-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 4px;
    }
    .service-pill-item {
        padding: 8px 2px;
    }
    .service-pill-icon {
        width: 44px;
        height: 44px;
        border-radius: 12px;
        font-size: 1.25rem;
        margin-bottom: 4px;
    }
    .service-pill-name {
        font-size: 0.6875rem;
    }
}

/* ==========================================================================
   ENRICHED HOME PAGE STYLES (ĐA DẠNG THÔNG TIN CÔNG DÂN)
   ========================================================================== */
.stat-icon-box {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.leader-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-radius: 16px;
    border: 1px solid #f1f5f9;
}

.leader-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(15, 61, 100, 0.08) !important;
}

.leader-avatar-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    background: #e2e8f0;
    border: 3px solid #ffffff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.gis-feature-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 12px;
    color: #1e293b;
    text-decoration: none;
    transition: all 0.2s ease;
}

.gis-feature-pill:hover {
    background: #0f3d64;
    color: #ffffff;
    border-color: #0f3d64;
    transform: translateY(-1px);
}

.survey-option-btn {
    border: 1px solid #e2e8f0;
    background: #ffffff;
    border-radius: 12px;
    padding: 10px 14px;
    text-align: left;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 500;
    color: #334155;
    transition: all 0.2s ease;
    cursor: pointer;
}

.survey-option-btn:hover,
.survey-option-btn.selected {
    border-color: #0d6efd;
    background: #f0f7ff;
    color: #0d6efd;
    font-weight: 600;
}

.feedback-card-home {
    border-radius: 14px;
    transition: all 0.2s ease;
    border: 1px solid #f1f5f9;
}

.feedback-card-home:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
}


