:root{
    --primary:#0f4aa1;
    --primary-dark:#0b3d86;
    --primary-soft:#eaf1ff;

    --bg:#f4f6f9;
    --surface:#ffffff;
    --surface-soft:#f8fafc;

    --border:#d6dee8;
    --border-soft:#e6edf5;
    --border-strong:#c4d0dd;

    --text:#1e293b;
    --text-soft:#475569;
    --text-muted:#64748b;

    --success:#15803d;
    --warning:#b45309;
    --danger:#b91c1c;

    --radius:8px;
    --shadow-sm:0 1px 2px rgba(16,24,40,.04);
    --shadow-md:0 8px 20px rgba(16,24,40,.06);

    --container-width:1200px;
}

*{ box-sizing:border-box; }

html, body{
    min-height:100%;
}

body{
    margin:0;
    background:var(--bg);
    color:var(--text);
    font-family:"Noto Sans Devanagari", system-ui, sans-serif;
    font-size:14px;
    line-height:1.5;
}

a{
    text-decoration:none;
    color:inherit;
}

svg{
    display:block;
}

.portal-shell{
    padding:18px 0 28px;
}

.portal-container{
    width:min(var(--container-width), calc(100% - 32px));
    margin:auto;
}

/* header */
.portal-header{
    background:var(--surface);
    border-bottom:1px solid var(--border);
    box-shadow:var(--shadow-sm);
}

.portal-header-inner{
    width:min(var(--container-width), calc(100% - 32px));
    margin:auto;
    min-height:74px;
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:16px;
    padding:10px 0;
}

.portal-brand{
    display:flex;
    align-items:center;
    gap:12px;
    min-width:0;
}

.portal-logo-wrap{
    width:50px;
    height:50px;
    border:1px solid var(--border);
    border-radius:8px;
    display:flex;
    align-items:center;
    justify-content:center;
    background:#fff;
    overflow:hidden;
    flex-shrink:0;
}

.portal-logo{
    max-width:32px;
    max-height:32px;
    object-fit:contain;
}

.portal-brand-text{
    min-width:0;
}

.portal-title{
    font-size:17px;
    font-weight:700;
    color:var(--text);
    line-height:1.25;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

.portal-subtitle{
    margin-top:3px;
    font-size:12px;
    color:var(--text-muted);
    line-height:1.45;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

.portal-nav{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
}

.portal-nav a{
    min-height:38px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:0 14px;
    border:1px solid transparent;
    border-radius:6px;
    font-size:13px;
    font-weight:600;
    color:var(--text-soft);
    transition:all .16s ease;
}

.portal-nav a:hover,
.portal-nav a.active{
    background:var(--surface-soft);
    border-color:var(--border);
    color:var(--primary-dark);
}

/* generic */
.page-header{
    background:var(--surface);
    border:1px solid var(--border);
    border-radius:var(--radius);
    padding:18px 20px;
    margin-bottom:16px;
    box-shadow:var(--shadow-sm);
}

.page-title{
    font-size:26px;
    font-weight:700;
    color:var(--text);
    line-height:1.3;
}

.page-subtitle{
    margin-top:6px;
    font-size:13px;
    color:var(--text-muted);
    line-height:1.7;
}

.portal-card{
    background:var(--surface);
    border:1px solid var(--border);
    border-radius:var(--radius);
    padding:18px;
    box-shadow:var(--shadow-sm);
}

.portal-card-title{
    font-size:17px;
    font-weight:700;
    margin:0 0 12px;
    color:var(--text);
}

/* buttons */
.btn-primary-ui{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:42px;
    padding:0 18px;
    background:var(--primary);
    border:1px solid var(--primary);
    color:#fff;
    border-radius:6px;
    font-size:13px;
    font-weight:700;
    transition:all .16s ease;
}

.btn-primary-ui:hover{
    background:var(--primary-dark);
    border-color:var(--primary-dark);
    color:#fff;
}

.btn-outline-ui{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:42px;
    padding:0 16px;
    border:1px solid var(--border-strong);
    background:#fff;
    color:var(--text-soft);
    border-radius:6px;
    font-size:13px;
    font-weight:700;
    transition:all .16s ease;
}

.btn-outline-ui:hover{
    background:var(--surface-soft);
    color:var(--text);
}

/* inputs */
.portal-input{
    width:100%;
    height:42px;
    border:1px solid var(--border-strong);
    border-radius:6px;
    padding:0 12px;
    background:#fff;
    color:var(--text);
    font-size:14px;
    outline:none;
    transition:border-color .16s ease, box-shadow .16s ease;
}

.portal-input:focus{
    border-color:var(--primary);
    box-shadow:0 0 0 3px rgba(15,74,161,.08);
}

.portal-label{
    display:block;
    margin-bottom:6px;
    font-size:13px;
    font-weight:600;
    color:var(--text);
}

.portal-help{
    margin-top:6px;
    font-size:12px;
    color:var(--text-muted);
    line-height:1.5;
}

/* grids */
.grid-2{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:16px;
}

.grid-3{
    display:grid;
    grid-template-columns:repeat(3, minmax(0, 1fr));
    gap:16px;
}

/* service list */
.service-grid{
    display:grid;
    grid-template-columns:repeat(3, minmax(0, 1fr));
    gap:14px;
}

.service-card{
    border:1px solid var(--border);
    background:#fff;
    border-radius:8px;
    padding:16px;
    transition:border-color .16s ease, box-shadow .16s ease, transform .16s ease;
    display:block;
    height:100%;
    box-shadow:var(--shadow-sm);
}

.service-card:hover{
    border-color:#c9d5e5;
    box-shadow:0 2px 8px rgba(0,0,0,.05);
    transform:translateY(-1px);
}

.service-card-head{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:12px;
    margin-bottom:12px;
}

.service-icon{
    width:38px;
    height:38px;
    min-width:38px;
    display:flex;
    align-items:center;
    justify-content:center;
    background:var(--primary-soft);
    border:1px solid #d7e4ff;
    border-radius:8px;
    color:var(--primary-dark);
}

.service-icon svg{
    width:18px;
    height:18px;
}

.service-badge{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:24px;
    padding:0 8px;
    border-radius:999px;
    background:#fff7ed;
    border:1px solid #fed7aa;
    color:var(--warning);
    font-size:11px;
    font-weight:700;
    white-space:nowrap;
}

.service-title{
    font-weight:700;
    font-size:15px;
    margin:0;
    color:var(--text);
    line-height:1.45;
}

.service-sub{
    margin-top:4px;
    font-size:12px;
    color:var(--text-muted);
    line-height:1.55;
}

.service-action{
    margin-top:12px;
    font-size:12px;
    color:var(--primary);
    font-weight:700;
}

/* sections */
.section-block{
    margin-bottom:18px;
}

.section-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    flex-wrap:wrap;
    margin-bottom:10px;
}

.section-title-ui{
    margin:0;
    font-size:18px;
    font-weight:700;
    color:var(--text);
    line-height:1.3;
}

.section-meta{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:30px;
    padding:0 10px;
    border:1px solid var(--border);
    border-radius:999px;
    background:var(--surface-soft);
    color:var(--text-muted);
    font-size:12px;
    font-weight:600;
}

/* tracking */
.status-timeline{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:14px;
    margin:16px 0 0;
}

.timeline-step{
    flex:1;
    text-align:center;
    position:relative;
}

.timeline-step:not(:last-child)::after{
    content:"";
    position:absolute;
    top:16px;
    left:calc(50% + 20px);
    right:calc(-50% + 20px);
    height:2px;
    background:#dbe4ee;
}

.timeline-circle{
    width:34px;
    height:34px;
    border-radius:50%;
    background:#e5e7eb;
    border:1px solid #d1d5db;
    margin:0 auto 6px;
    display:flex;
    align-items:center;
    justify-content:center;
    font-weight:700;
    font-size:13px;
    color:#475569;
    position:relative;
    z-index:2;
}

.timeline-step.active .timeline-circle{
    background:var(--primary);
    border-color:var(--primary);
    color:#fff;
}

.timeline-step.done .timeline-circle{
    background:#dcfce7;
    border-color:#86efac;
    color:#166534;
}

.timeline-label{
    font-size:12px;
    font-weight:600;
    color:var(--text-soft);
    line-height:1.45;
}

.timeline-step.active .timeline-label{
    color:var(--primary-dark);
}

.result-grid{
    display:grid;
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:12px;
}

.result-item{
    border:1px solid var(--border);
    border-radius:8px;
    background:#fff;
    padding:12px 14px;
}

.result-item strong{
    display:block;
    font-size:12px;
    color:var(--text-muted);
    margin-bottom:4px;
    font-weight:600;
}

.result-item span{
    display:block;
    font-size:14px;
    color:var(--text);
    font-weight:600;
    line-height:1.5;
    word-break:break-word;
}

.status-badge{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:28px;
    padding:0 10px;
    border-radius:999px;
    font-size:12px;
    font-weight:700;
    white-space:nowrap;
    border:1px solid transparent;
}

.status-pending{
    background:#fff7ed;
    color:#b45309;
    border-color:#fed7aa;
}

.status-processing{
    background:#eff6ff;
    color:#1d4ed8;
    border-color:#bfdbfe;
}

.status-approved,
.status-completed{
    background:#ecfdf5;
    color:#15803d;
    border-color:#bbf7d0;
}

.status-rejected{
    background:#fef2f2;
    color:#b91c1c;
    border-color:#fecaca;
}

.empty-state{
    margin-top:18px;
    background:#fff;
    border:1px dashed var(--border-strong);
    border-radius:8px;
    padding:28px 18px;
    text-align:center;
    color:var(--text-muted);
}

.empty-state strong{
    display:block;
    color:var(--text);
    font-size:15px;
    margin-bottom:6px;
}

@media(max-width:991px){
    .grid-2,
    .grid-3,
    .service-grid,
    .result-grid{
        grid-template-columns:1fr;
    }

    .portal-header-inner{
        align-items:flex-start;
        flex-direction:column;
    }
}

@media(max-width:767px){
    .portal-shell{
        padding:14px 0 20px;
    }

    .portal-container,
    .portal-header-inner{
        width:min(100% - 20px, var(--container-width));
    }

    .page-title{
        font-size:22px;
    }

    .portal-nav{
        width:100%;
    }

    .status-timeline{
        gap:8px;
    }

    .timeline-label{
        font-size:11px;
    }
}