:root {
    --primary: #715b97;
    --primary-d: #715b97;
    --accent: #f59e0b;
    --success: #10b981;
    --danger: #ef4444;
    --bg: #f0f4ff;
    --card-bg: #ffffff;
    --border: #dde3f0;
    --text: #1e293b;
    --muted: #64748b;
    --sidebar-w: 260px;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Nunito', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    margin: 0;
}

/* ── Top Navbar ── */
.top-navbar {
    /* background: linear-gradient(135deg, #1a56db 0%, #1341b0 100%); */
    background: linear-gradient(135deg, #3b1c64b8 0%, #5e35b1ba 100%);
    color: #fff;
    height: 62px;
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 1050;
    box-shadow: 0 2px 12px rgba(26, 86, 219, .35);
}

.top-navbar .brand {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: .5px;
    display: flex;
    align-items: center;
    gap: .55rem;
    color: #fff;
    text-decoration: none;
}

.top-navbar .brand-badge {
    background: var(--accent);
    color: #1e293b;
    font-size: .65rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 20px;
    letter-spacing: 1px;
}

.top-navbar .nav-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: .85rem;
    opacity: .88;
}

.top-navbar .nav-right i {
    font-size: 1.1rem;
}

/* ── Main Wrapper ── */
.main-wrapper {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2rem 1.25rem 3rem;
}

/* ── Page Header ── */
.page-header {
    background: linear-gradient(120deg, #1a56db 0%, #2563eb 50%, #1d4ed8 100%);
    border-radius: 16px;
    padding: 2rem 2rem 1.75rem;
    color: #fff;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
    display: none;
}

.page-header::before {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .07);
}

.page-header::after {
    content: '';
    position: absolute;
    bottom: -60px;
    right: 60px;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .05);
}

.page-header h1 {
    font-size: 1.6rem;
    font-weight: 800;
    margin: 0 0 .25rem;
}

.page-header p {
    margin: 0;
    opacity: .78;
    font-size: .9rem;
}

.page-header .route-badge {
    display: inline-block;
    background: rgba(255, 255, 255, .15);
    border: 1px solid rgba(255, 255, 255, .25);
    color: #fff;
    font-family: 'Fira Code', monospace;
    font-size: .75rem;
    padding: 3px 12px;
    border-radius: 20px;
    margin-top: .6rem;
}

/* ── Cards ── */
.card-custom {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 2px 16px rgba(26, 86, 219, .06);
}

.card-custom .card-header-custom {
    background: linear-gradient(90deg, #f8faff 0%, #eef2ff 100%);
    border-bottom: 1px solid var(--border);
    border-radius: 14px 14px 0 0;
    padding: .9rem 1.4rem;
    font-weight: 700;
    font-size: .95rem;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: .5rem;
}

/* ── Form ── */
.form-label {
    font-weight: 700;
    font-size: .82rem;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--muted);
    margin-bottom: .35rem;
}

.form-control,
.form-select {
    border: 1.5px solid var(--border);
    border-radius: 9px;
    font-size: .9rem;
    padding: .55rem .85rem;
    transition: border-color .2s, box-shadow .2s;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 86, 219, .12);
    outline: none;
}

.form-control.is-invalid {
    border-color: var(--danger);
}

.upload-zone {
    border: 2px dashed #8267b5;
    border-radius: 10px;
    padding: 1.5rem 1rem;
    text-align: center;
    background: #f5f7ff;
    cursor: pointer;
    transition: border-color .2s, background .2s;
}

.upload-zone:hover {
    border-color: var(--primary);
    background: #eef2ff;
}

.upload-zone i {
    font-size: 2rem;
    color: #8166bd;
}

.upload-zone p {
    margin: .4rem 0 0;
    font-size: .85rem;
    color: var(--muted);
}

.btn-submit {
    /* background: linear-gradient(135deg, #1a56db, #2563eb); */
    background: linear-gradient(135deg, #705a95, #8266be);
    border: none;
    border-radius: 9px;
    color: #fff;
    font-weight: 700;
    padding: .65rem 2rem;
    font-size: .95rem;
    letter-spacing: .3px;
    transition: transform .15s, box-shadow .15s;
}

.btn-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(26, 86, 219, .35);
    color: #fff;
}

.btn-reset {
    background: #f1f5f9;
    border: 1.5px solid var(--border);
    border-radius: 9px;
    color: var(--muted);
    font-weight: 700;
    padding: .65rem 1.5rem;
    font-size: .95rem;
    transition: background .15s;
}

.btn-reset:hover {
    background: #e2e8f0;
    color: var(--text);
}

/* ── Stats Row ── */
.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 2px 8px rgba(26, 86, 219, .05);
}

.stat-icon {
    width: 46px;
    height: 46px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.stat-icon.blue {
    background: #dbeafe;
    color: #2563eb;
}

.stat-icon.green {
    background: #d1fae5;
    color: #059669;
}

.stat-icon.amber {
    background: #fef3c7;
    color: #d97706;
}

.stat-label {
    font-size: .75rem;
    color: var(--muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.stat-value {
    font-size: 1.4rem;
    font-weight: 800;
    line-height: 1.2;
    color: var(--text);
}

/* ── Table ── */
.table-wrapper {
    overflow-x: auto;
    border-radius: 0 0 14px 14px;
}

.table-custom {
    width: 100%;
    border-collapse: collapse;
    font-size: .875rem;
}

.table-custom thead th {
    background: #715b98;
    color: #fff;
    font-weight: 700;
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .6px;
    padding: .85rem 1rem;
    white-space: nowrap;
}

.table-custom thead th:first-child {
    border-radius: 0;
}

.table-custom tbody tr {
    border-bottom: 1px solid #eef2ff;
    transition: background .15s;
}

.table-custom tbody tr:hover {
    background: #f5f8ff;
}

.table-custom tbody tr:last-child {
    border-bottom: none;
}

.table-custom td {
    padding: .8rem 1rem;
    vertical-align: middle;
    color: var(--text);
}

.table-custom td.muted {
    color: var(--muted);
    font-size: .82rem;
}

.badge-state {
    background: #dbeafe;
    color: #1d4ed8;
    border-radius: 6px;
    padding: 3px 10px;
    font-size: .78rem;
    font-weight: 700;
}

.badge-district {
    background: #f3e8ff;
    color: #7c3aed;
    border-radius: 6px;
    padding: 3px 10px;
    font-size: .78rem;
    font-weight: 700;
}

.badge-code {
    background: #ecfdf5;
    color: #059669;
    border-radius: 6px;
    padding: 3px 10px;
    font-size: .78rem;
    font-weight: 700;
    font-family: 'Fira Code', monospace;
}

.file-link {
    color: var(--primary);
    text-decoration: none;
    font-family: 'Fira Code', monospace;
    font-size: .8rem;
    display: flex;
    align-items: center;
    gap: .3rem;
}

.file-link:hover {
    text-decoration: underline;
}

.btn-del {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    border-radius: 7px;
    padding: .3rem .65rem;
    font-size: .8rem;
    transition: background .15s;
}

.btn-del:hover {
    background: #fee2e2;
    color: #b91c1c;
}

/* ── Alerts ── */
.alert-success-custom {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
    border-radius: 10px;
    padding: .85rem 1.25rem;
    display: flex;
    align-items: center;
    gap: .7rem;
    font-weight: 600;
    font-size: .9rem;
}

/* ── Pagination ── */
.pagination .page-link {
    border-radius: 7px !important;
    margin: 0 2px;
    color: var(--primary);
    border-color: var(--border);
    font-weight: 600;
    font-size: .85rem;
}

.pagination .page-item.active .page-link {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* ── Search ── */
.search-box {
    position: relative;
}

.search-box i {
    position: absolute;
    left: .85rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
}

.search-box input {
    padding-left: 2.4rem;
    border-radius: 9px;
    border: 1.5px solid var(--border);
    font-size: .875rem;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .main-wrapper {
        padding: 1rem .75rem 2rem;
    }

    .page-header {
        padding: 1.4rem 1.25rem;
    }

    .page-header h1 {
        font-size: 1.3rem;
    }
    .top-navbar .nav-right {
        margin-left: auto;
        display: flex;
        align-items: center;
        gap: 0.2rem;
        font-size: .75rem;
        opacity: .88;
    }
    .top-navbar .brand-badge {
        display: none;
    }
}

@media (max-width: 576px) {
    .stat-card {
        padding: .8rem 1rem;
    }

    .stat-value {
        font-size: 1.2rem;
    }
}
.taganch{
    text-decoration: none;
}
input#district {
    background-color: #e8f0fe;
}
input#state {
    background-color: #e8f0fe;
}
label#dlr_code-error, label#invoice-error, label#file-error {
    color: red;
}
.required::after {
    content: " *";
    color: red;
    font-weight: bold;
}
.auto-hide {
    animation: fadeOut 0.5s ease 2s forwards; 
    /* fadeOut runs after 2s delay, lasts 0.5s, then applies final state */
}

@keyframes fadeOut {
    to {
        opacity: 0;
        visibility: hidden;
        height: 0;
        margin: 0;
        padding: 0;
    }
}
#divLoading {
    margin: 0px;
    padding: 0px;
    position: fixed;
    right: 0px;
    top: 0px;
    width: 100%;
    height: 100%;
    background-color: rgb(102, 102, 102);
    z-index: 30001;
    opacity: 0.8;
    text-align: center;
}
div#divLoading p.loaderpara {
    top: 100%;
    height: auto;
    margin: 0 auto;
    padding-top: 13%;
}