/* ============================================================
   BPCL LPG Portal - Premium Design System
   Matching the original React/Tailwind design.
   Primary: #1a237e (Navy), Accent: #ffc107 (Yellow)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ── CSS Variables ──────────────────────────────────────────── */
:root {
    /* Brand Colors */
    --bpcl-navy:        #1a237e;
    --bpcl-navy-mid:    #283593;
    --bpcl-navy-deep:   #0d47a1;
    --bpcl-blue-light:  #1565c0;
    --bpcl-yellow:      #ffc107;
    --bpcl-yellow-dark: #e6a900;
    --bpcl-yellow-pale: #fff8e1;

    /* Legacy aliases (keep for any views using old vars) */
    --bpcl-red:         #D4202C;
    --bpcl-red-dark:    #B01A24;
    --bpcl-blue:        #1a237e;

    /* Neutral Palette */
    --bpcl-gray-light:  #f5f7fa;
    --bpcl-gray:        #e8edf2;
    --bpcl-gray-mid:    #dee3ea;
    --bpcl-text:        #1e2a3a;
    --bpcl-text-muted:  #64748b;

    /* Shadows */
    --shadow-xs:   0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
    --shadow-sm:   0 2px 8px rgba(0,0,0,.08);
    --shadow-md:   0 4px 16px rgba(0,0,0,.10);
    --shadow-lg:   0 8px 32px rgba(0,0,0,.12);

    /* Radii */
    --radius-sm:   6px;
    --radius-md:   10px;
    --radius-lg:   14px;
    --radius-pill: 9999px;
}

/* ── Global Reset ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    color: var(--bpcl-text);
    background-color: var(--bpcl-gray-light);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--bpcl-navy);
    transition: color .18s;
}
a:hover { color: var(--bpcl-yellow-dark); }

/* ── Yellow Accent Top Strip ────────────────────────────────── */
.bpcl-top-strip {
    background: var(--bpcl-yellow);
    height: 4px;
    width: 100%;
    flex-shrink: 0;
}

/* ── Navbar ─────────────────────────────────────────────────── */
.navbar-bpcl {
    background: linear-gradient(135deg, #1a237e 0%, #283593 100%);
    box-shadow: 0 2px 12px rgba(10,20,80,.25);
    padding-top: 0;
    padding-bottom: 0;
    border-top: none;
}

.navbar-bpcl .navbar-brand {
    color: #ffffff;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: .2px;
    line-height: 1.2;
    padding-top: 10px;
    padding-bottom: 10px;
}
.navbar-bpcl .navbar-brand:hover { color: var(--bpcl-yellow); }

.navbar-bpcl .nav-link {
    color: rgba(255,255,255,.88);
    font-weight: 500;
    font-size: 13.5px;
    padding: 18px 14px;
    border-bottom: 3px solid transparent;
    transition: color .18s, border-color .18s;
}
.navbar-bpcl .nav-link:hover {
    color: #fff;
    border-bottom-color: rgba(255,193,7,.5);
}
.navbar-bpcl .nav-link.active {
    color: var(--bpcl-yellow) !important;
    border-bottom-color: var(--bpcl-yellow);
    font-weight: 600;
}

.navbar-bpcl .navbar-toggler {
    border-color: rgba(255,255,255,.4);
    padding: 6px 10px;
}
.navbar-bpcl .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255,255,255,0.85%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Staff Login button */
.btn-staff-login {
    background: var(--bpcl-yellow);
    color: var(--bpcl-navy) !important;
    border: none;
    font-weight: 700;
    font-size: 13px;
    padding: 7px 16px;
    border-radius: var(--radius-sm);
    transition: background .18s, transform .1s;
    white-space: nowrap;
}
.btn-staff-login:hover {
    background: var(--bpcl-yellow-dark);
    color: var(--bpcl-navy) !important;
    transform: translateY(-1px);
}

/* Logout button */
.btn-nav-logout {
    border: 1.5px solid rgba(255,255,255,.45);
    color: rgba(255,255,255,.9) !important;
    background: transparent;
    font-size: 12.5px;
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    transition: all .18s;
}
.btn-nav-logout:hover {
    border-color: rgba(255,255,255,.8);
    color: #fff !important;
    background: rgba(255,255,255,.1);
}

/* Legacy compat aliases for old brand-strip */
.brand-strip { display: none !important; }

/* ── Page Header ────────────────────────────────────────────── */
.page-header {
    background: #ffffff;
    padding: 18px 0;
    border-bottom: 1px solid var(--bpcl-gray);
    margin-bottom: 24px;
    box-shadow: var(--shadow-xs);
}
.page-header h1 {
    color: var(--bpcl-navy);
    font-size: 22px;
    font-weight: 700;
    margin: 0;
}
.page-header .breadcrumb {
    background: transparent;
    margin-bottom: 0;
    padding: 0;
    font-size: 12.5px;
}
.page-header .breadcrumb-item a { color: var(--bpcl-navy-mid); }
.page-header .breadcrumb-item.active { color: var(--bpcl-text-muted); }

/* ── Hero Section ───────────────────────────────────────────── */
.hero-section,
.bpcl-gradient {
    position: relative;
    background: linear-gradient(135deg, #1a237e 0%, #0d47a1 50%, #1565c0 100%);
    color: #ffffff;
    padding: 80px 0 72px;
    overflow: hidden;
}

/* Diagonal pattern overlay */
.hero-section::before,
.bpcl-gradient::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 20px,
        rgba(255,193,7,.07) 20px,
        rgba(255,193,7,.07) 21px
    );
    pointer-events: none;
}

.hero-section > *, .bpcl-gradient > * { position: relative; z-index: 1; }

.hero-section h1 {
    font-size: 38px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 16px;
    letter-spacing: -.3px;
}
.hero-section h1 .accent-text { color: var(--bpcl-yellow); }

.hero-section p {
    font-size: 16px;
    opacity: .88;
    max-width: 620px;
    margin: 0 auto 28px;
    line-height: 1.65;
}

/* Hero pill badge */
.hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.25);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 16px;
    border-radius: var(--radius-pill);
    letter-spacing: .4px;
    margin-bottom: 20px;
    backdrop-filter: blur(4px);
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn-bpcl {
    background: var(--bpcl-yellow);
    color: var(--bpcl-navy);
    border: none;
    font-weight: 700;
    font-size: 13.5px;
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    transition: background .18s, transform .12s, box-shadow .18s;
    box-shadow: 0 2px 8px rgba(255,193,7,.3);
}
.btn-bpcl:hover, .btn-bpcl:focus {
    background: var(--bpcl-yellow-dark);
    color: var(--bpcl-navy);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255,193,7,.4);
}
.btn-bpcl:active { transform: translateY(0); }

.btn-bpcl-outline {
    background: transparent;
    color: var(--bpcl-navy);
    border: 2px solid var(--bpcl-navy);
    font-weight: 600;
    font-size: 13.5px;
    padding: 8px 22px;
    border-radius: var(--radius-sm);
    transition: all .18s;
}
.btn-bpcl-outline:hover {
    background: var(--bpcl-navy);
    color: #fff;
}

/* Hero outline variant */
.btn-hero-outline {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255,255,255,.7);
    font-weight: 600;
    font-size: 13.5px;
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    transition: all .18s;
}
.btn-hero-outline:hover {
    background: rgba(255,255,255,.15);
    border-color: rgba(255,255,255,1);
    color: #fff;
}

.btn-bpcl-blue {
    background: var(--bpcl-navy);
    color: #fff;
    border: none;
    font-weight: 600;
    padding: 8px 20px;
    border-radius: var(--radius-sm);
    transition: background .18s;
}
.btn-bpcl-blue:hover { background: var(--bpcl-navy-mid); color: #fff; }

/* ── Cards ──────────────────────────────────────────────────── */
.card {
    border: 1px solid var(--bpcl-gray-mid);
    box-shadow: var(--shadow-xs);
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    background: #fff;
    transition: box-shadow .2s;
}
.card:hover { box-shadow: var(--shadow-sm); }

.card-header {
    background: #fff;
    border-bottom: 1px solid var(--bpcl-gray);
    font-weight: 600;
    color: var(--bpcl-navy);
    padding: 14px 20px;
    border-radius: var(--radius-md) var(--radius-md) 0 0 !important;
}

/* ── Dashboard Stat Cards ───────────────────────────────────── */
.stat-card {
    border-radius: var(--radius-md);
    padding: 22px 20px;
    color: #fff;
    text-align: center;
    transition: transform .2s, box-shadow .2s;
    border: none;
    box-shadow: var(--shadow-sm);
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

.stat-card .stat-number {
    font-size: 36px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 4px;
}
.stat-card .stat-label {
    font-size: 12.5px;
    font-weight: 500;
    opacity: .9;
    letter-spacing: .2px;
}

.stat-card.bg-pending       { background: linear-gradient(135deg, #FF9800, #F57C00); }
.stat-card.bg-approved      { background: linear-gradient(135deg, #4CAF50, #388E3C); }
.stat-card.bg-rejected      { background: linear-gradient(135deg, #F44336, #D32F2F); }
.stat-card.bg-consideration { background: linear-gradient(135deg, #2196F3, #1976D2); }
.stat-card.bg-delivered     { background: linear-gradient(135deg, #009688, #00796B); }
.stat-card.bg-total         { background: linear-gradient(135deg, #1a237e, #283593); }

/* ── Feature Cards (homepage) ───────────────────────────────── */
.feature-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    height: 100%;
    border: 1px solid var(--bpcl-gray-mid);
    box-shadow: var(--shadow-xs);
    transition: transform .2s, box-shadow .2s;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.feature-icon-circle {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    flex-shrink: 0;
}

/* Step Cards */
.step-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 28px 20px;
    height: 100%;
    border: 1px solid var(--bpcl-gray-mid);
    box-shadow: var(--shadow-xs);
    text-align: center;
    transition: transform .2s, box-shadow .2s;
}
.step-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.step-icon-circle {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

/* ── Forms ──────────────────────────────────────────────────── */
.form-section {
    background: #fff;
    border-radius: 8px;
    padding: 20px 24px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    border: 1px solid #e5e7eb;
}

.form-section-title {
    color: var(--bpcl-navy);
    font-size: 14px;
    font-weight: 600;
    padding-bottom: 12px;
    margin-bottom: 16px;
    border-bottom: 2px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 8px;
}
.form-section-title i {
    color: var(--bpcl-navy);
    font-size: 15px;
    opacity: 0.8;
}

.form-label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 5px;
    font-size: 12.5px;
    letter-spacing: .1px;
}
.form-label .required { color: #dc2626; margin-left: 2px; }

.form-control, .form-select {
    font-size: 13.5px;
    border-color: var(--bpcl-gray-mid);
    border-radius: var(--radius-sm);
    color: var(--bpcl-text);
    transition: border-color .18s, box-shadow .18s;
}
.form-control:focus, .form-select:focus {
    border-color: var(--bpcl-navy-mid);
    box-shadow: 0 0 0 3px rgba(40,53,147,.12);
    outline: none;
}
.form-control.is-invalid, .form-select.is-invalid {
    border-color: #dc2626;
}
.invalid-feedback { color: #dc2626; font-size: 11.5px; }

/* Readonly fields */
.form-control[readonly] {
    background: #f8fafc;
    color: var(--bpcl-text-muted);
}

/* Input group */
.input-group-text {
    background: #f8fafc;
    border-color: var(--bpcl-gray-mid);
    font-size: 13px;
}

/* ── OTP Section ────────────────────────────────────────────── */
#otpVerifySection {
    background: #f0f4ff;
    border: 1px solid #c7d2fe;
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    margin-top: 10px;
}

/* ── Location Block ─────────────────────────────────────────── */
.location-block {
    background: var(--bpcl-gray-light);
    border: 1.5px solid var(--bpcl-gray);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    margin-bottom: 14px;
    transition: border-color .2s;
}
.location-block:hover { border-color: var(--bpcl-navy-mid); }

.location-block .location-header {
    font-weight: 700;
    color: var(--bpcl-navy);
    font-size: 13px;
    margin-bottom: 14px;
}
.btn-remove-location {
    color: #dc2626;
    cursor: pointer;
    font-size: 12px;
    background: none;
    border: none;
    padding: 0;
}
.btn-remove-location:hover { color: #b91c1c; }

/* ── Tables ─────────────────────────────────────────────────── */
.table-bpcl thead th {
    background: var(--bpcl-navy);
    color: #fff;
    font-weight: 600;
    font-size: 12.5px;
    padding: 11px 14px;
    border: none;
    white-space: nowrap;
    letter-spacing: .1px;
}
.table-bpcl tbody td {
    padding: 10px 14px;
    font-size: 13px;
    vertical-align: middle;
    border-color: var(--bpcl-gray);
}
.table-bpcl tbody tr:hover { background: rgba(26,35,126,.035); }
.table-bpcl { border-radius: var(--radius-md); overflow: hidden; }

/* ── Status Badges ──────────────────────────────────────────── */
.badge-status {
    padding: 5px 12px;
    border-radius: var(--radius-pill);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.badge-pending       { background: #FFF3E0; color: #E65100; }
.badge-approved      { background: #E8F5E9; color: #2E7D32; }
.badge-rejected      { background: #FFEBEE; color: #C62828; }
.badge-consideration { background: #E3F2FD; color: #1565C0; }
.badge-seek-details  { background: #FFF8E1; color: #F9A825; }
.badge-delivered     { background: #E0F2F1; color: #00695C; }
.badge-not-delivered { background: #FCE4EC; color: #AD1457; }
.badge-so-review     { background: #EDE7F6; color: #4527A0; }
.badge-recommended   { background: #F1F8E9; color: #558B2F; }

/* ── Ministry Notice Banner ─────────────────────────────────── */
.ministry-notice {
    background: #fffde7;
    border-top: 1px solid #ffe082;
    border-bottom: 2px solid #ffc107;
    padding: 12px 0;
}
.ministry-notice p { font-size: 13px; color: #4a3800; margin: 0; }

/* ── Section Headings (How It Works, Features) ──────────────── */
.section-heading {
    color: var(--bpcl-navy);
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -.2px;
}
.section-subheading {
    color: var(--bpcl-text-muted);
    font-size: 15px;
    margin-bottom: 0;
}

/* ── Login Page ─────────────────────────────────────────────── */
.login-container {
    max-width: 440px;
    margin: 56px auto;
    padding: 0 16px;
}

.login-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 44px 40px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--bpcl-gray);
}

.login-icon-circle {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--bpcl-navy), var(--bpcl-navy-mid));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 4px 16px rgba(26,35,126,.3);
}

.login-logo {
    text-align: center;
    margin-bottom: 28px;
}
.login-logo h2 {
    color: var(--bpcl-navy);
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 4px;
}
.login-logo p {
    color: var(--bpcl-text-muted);
    font-size: 13.5px;
    margin: 0;
}

/* Login submit button */
.btn-login {
    background: linear-gradient(135deg, var(--bpcl-navy), var(--bpcl-navy-mid));
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    padding: 12px;
    border-radius: var(--radius-sm);
    border: none;
    width: 100%;
    transition: opacity .2s, transform .12s;
}
.btn-login:hover { opacity: .92; color: #fff; transform: translateY(-1px); }

/* ── Timeline ───────────────────────────────────────────────── */
.timeline {
    position: relative;
    padding: 0;
    list-style: none;
}
.timeline::before {
    content: '';
    position: absolute;
    top: 0; bottom: 0; left: 20px;
    width: 2px;
    background: linear-gradient(to bottom, var(--bpcl-navy), var(--bpcl-gray));
}
.timeline-item {
    position: relative;
    padding-left: 52px;
    margin-bottom: 20px;
}
.timeline-item .timeline-dot {
    position: absolute;
    left: 11px;
    top: 4px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--bpcl-navy);
    border: 3px solid #fff;
    box-shadow: 0 0 0 2px var(--bpcl-navy);
}
.timeline-item .timeline-content {
    background: #fff;
    border-radius: var(--radius-md);
    padding: 12px 16px;
    box-shadow: var(--shadow-xs);
    border: 1px solid var(--bpcl-gray);
}
.timeline-item .timeline-date   { font-size: 11.5px; color: var(--bpcl-text-muted); }
.timeline-item .timeline-action { font-weight: 700; color: var(--bpcl-navy); font-size: 13.5px; }
.timeline-item .timeline-user   { font-size: 12px; color: var(--bpcl-text-muted); }

/* ── Dashboard Tabs ─────────────────────────────────────────── */
.nav-tabs { border-bottom: 2px solid var(--bpcl-gray); }
.nav-tabs .nav-link {
    color: var(--bpcl-text-muted);
    font-weight: 600;
    font-size: 13px;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    padding: 10px 20px;
    transition: color .18s, border-color .18s;
}
.nav-tabs .nav-link:hover {
    color: var(--bpcl-navy);
    border-bottom-color: var(--bpcl-gray-mid);
}
.nav-tabs .nav-link.active {
    color: var(--bpcl-navy);
    border-bottom-color: var(--bpcl-yellow);
    background: transparent;
    font-weight: 700;
}

/* ── Alerts ─────────────────────────────────────────────────── */
.alert-bpcl {
    border-left: 4px solid var(--bpcl-navy);
    background: #eef2ff;
    color: var(--bpcl-text);
    border-radius: var(--radius-sm);
}

/* ── CTA Banner Section ─────────────────────────────────────── */
.cta-section {
    background: linear-gradient(135deg, var(--bpcl-navy) 0%, var(--bpcl-navy-mid) 100%);
    padding: 60px 0;
}

/* ── Footer ─────────────────────────────────────────────────── */
.footer {
    background: #111827;
    color: rgba(255,255,255,.55);
    padding: 28px 0 20px;
    text-align: center;
    font-size: 12.5px;
    margin-top: 48px;
    border-top: 3px solid var(--bpcl-yellow);
}
.footer a { color: var(--bpcl-yellow); }
.footer a:hover { color: var(--bpcl-yellow-dark); }
.footer p { margin-bottom: 4px; }

/* ── DataTables Override ────────────────────────────────────── */
.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: var(--bpcl-navy) !important;
    color: #fff !important;
    border: none !important;
    border-radius: var(--radius-sm);
}
.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: var(--bpcl-navy-mid) !important;
    color: #fff !important;
    border: none !important;
}

/* ── Utilities ──────────────────────────────────────────────── */
.text-bpcl-navy   { color: var(--bpcl-navy); }
.text-bpcl-yellow { color: var(--bpcl-yellow); }
.text-bpcl-red    { color: var(--bpcl-red); }
.text-bpcl-blue   { color: var(--bpcl-navy); }
.bg-bpcl-navy     { background: var(--bpcl-navy); }
.bg-bpcl-yellow   { background: var(--bpcl-yellow); }
.bg-bpcl-red      { background: var(--bpcl-red); }
.bg-bpcl-blue     { background: var(--bpcl-navy); }
.cursor-pointer   { cursor: pointer; }
.font-weight-600  { font-weight: 600; }

/* ── Smooth Section Transitions ─────────────────────────────── */
section { transition: none; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 992px) {
    .navbar-bpcl .nav-link {
        padding: 10px 12px;
        border-bottom: none;
    }
    .navbar-bpcl .nav-link.active {
        border-bottom: none;
        background: rgba(255,193,7,.12);
        border-radius: var(--radius-sm);
    }
    .navbar-bpcl .navbar-collapse {
        padding-bottom: 12px;
        border-top: 1px solid rgba(255,255,255,.1);
        margin-top: 6px;
    }
}

/* ── DataTables Responsive Overrides ────────────────────────── */
table.dataTable {
    width: 100% !important;
}

.dataTables_wrapper {
    font-size: 13px;
}

.dataTables_wrapper .dataTables_filter input {
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 13px;
    width: 180px;
}

.dataTables_wrapper .dataTables_length select {
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 13px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    padding: 4px 10px !important;
    font-size: 13px;
    border-radius: 4px !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: var(--bpcl-navy) !important;
    color: #fff !important;
    border: 1px solid var(--bpcl-navy) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: #e8edf2 !important;
    color: var(--bpcl-navy) !important;
    border: 1px solid #dee2e6 !important;
}

/* DataTables child row (responsive expand) */
table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control:before,
table.dataTable.dtr-inline.collapsed > tbody > tr > th.dtr-control:before {
    background-color: var(--bpcl-navy) !important;
    border: none !important;
    box-shadow: 0 1px 3px rgba(0,0,0,.2);
}

table.dataTable.dtr-inline.collapsed > tbody > tr.parent > td.dtr-control:before,
table.dataTable.dtr-inline.collapsed > tbody > tr.parent > th.dtr-control:before {
    background-color: #dc2626 !important;
}

table.dataTable > tbody > tr.child ul.dtr-details {
    width: 100%;
}

table.dataTable > tbody > tr.child ul.dtr-details > li {
    border-bottom: 1px solid #f1f3f5;
    padding: 8px 0;
    display: flex;
    justify-content: space-between;
}

table.dataTable > tbody > tr.child span.dtr-title {
    font-weight: 600;
    color: var(--bpcl-navy);
    font-size: 12px;
    min-width: 120px;
}

table.dataTable > tbody > tr.child span.dtr-data {
    text-align: right;
    font-size: 13px;
}

/* ── Mobile Nav Tabs (scrollable) ──────────────────────────── */
.nav-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.nav-tabs::-webkit-scrollbar { display: none; }

/* ── Responsive: Tablet ────────────────────────────────────── */
@media (max-width: 768px) {
    .hero-section,
    .bpcl-gradient { padding: 40px 0 36px; }
    .hero-section h1 { font-size: 24px; }
    .hero-section p  { font-size: 14px; }

    .stat-card { padding: 14px 12px; margin-bottom: 10px; }
    .stat-card .stat-number { font-size: 24px; }
    .stat-card .stat-label { font-size: 11px; }

    .login-card { padding: 24px 18px; }

    .form-section { padding: 14px 16px; }
    .form-section-title { font-size: 13px; margin-bottom: 12px; padding-bottom: 10px; }

    .card-header { padding: 10px 14px; font-size: 13px; }
    .card-body { padding: 14px; }

    .page-header h1 { font-size: 18px; }

    .section-heading { font-size: 20px; }

    /* Table compactness */
    .table-bpcl thead th { padding: 8px 10px; font-size: 11px; }
    .table-bpcl tbody td { padding: 8px 10px; font-size: 12px; }

    /* DataTables compact */
    .dataTables_wrapper .dataTables_filter input { width: 140px; }

    /* Tabs scroll hint */
    .nav-tabs .nav-link { white-space: nowrap; font-size: 12px; padding: 8px 14px; }

    /* Action buttons compact */
    .btn-sm { font-size: 11px; padding: 4px 10px; }
    .dropdown-menu { font-size: 12px; }
}

/* ── Responsive: Mobile ────────────────────────────────────── */
@media (max-width: 576px) {
    body { font-size: 13px; }

    .container, .container-fluid { padding-left: 12px; padding-right: 12px; }

    .hero-section,
    .bpcl-gradient { padding: 32px 0 28px; }
    .hero-section h1 { font-size: 20px; line-height: 1.3; }
    .hero-section p { font-size: 13px; }
    .hero-section .btn { font-size: 13px; padding: 8px 16px; }

    .stat-card { padding: 12px 10px; border-radius: 6px; }
    .stat-card .stat-number { font-size: 22px; }
    .stat-card .stat-label { font-size: 10px; }

    .form-section { padding: 12px; margin-bottom: 12px; }
    .form-section-title { font-size: 12.5px; gap: 6px; }
    .form-label { font-size: 11.5px; }
    .form-control, .form-select { font-size: 13px; padding: 6px 10px; }

    .login-container { margin: 20px auto; }
    .login-card { padding: 20px 16px; }

    .page-header { padding: 14px 0; margin-bottom: 16px; }
    .page-header h1 { font-size: 16px; }

    /* DataTables mobile */
    .dataTables_wrapper .dataTables_length,
    .dataTables_wrapper .dataTables_filter { text-align: left !important; }
    .dataTables_wrapper .dataTables_filter input { width: 100%; }
    .dataTables_wrapper .dataTables_info { font-size: 11px; }
    .dataTables_wrapper .dataTables_paginate .paginate_button { padding: 3px 8px !important; font-size: 12px; }

    /* Card-style request display on mobile */
    .table-bpcl thead th { font-size: 10.5px; padding: 6px 8px; }
    .table-bpcl tbody td { font-size: 11.5px; padding: 6px 8px; }

    /* Tabs compact */
    .nav-tabs .nav-link { font-size: 11px; padding: 6px 10px; }
    .nav-tabs .badge { font-size: 9px; padding: 2px 5px; }

    /* Modals full width on mobile */
    .modal-dialog { margin: 10px; max-width: calc(100% - 20px); }
    .modal-header { padding: 12px 16px; }
    .modal-body { padding: 12px 16px; }
    .modal-footer { padding: 8px 16px; }

    /* Badge compact */
    .badge-status { font-size: 9px; padding: 3px 8px; letter-spacing: .3px; }

    /* Timeline compact */
    .timeline-item { padding-left: 40px; margin-bottom: 14px; }
    .timeline-item .timeline-action { font-size: 12px; }
    .timeline-item .timeline-date { font-size: 10px; }
    .timeline-item .timeline-user { font-size: 10px; }
    .timeline::before { left: 16px; }
    .timeline-item .timeline-dot { left: 9px; width: 14px; height: 14px; }

    /* Footer compact */
    .footer { padding: 14px 0; font-size: 11px; }

    /* Hide non-essential on mobile */
    .d-mobile-none { display: none !important; }
}

/* ── Responsive: Very small ────────────────────────────────── */
@media (max-width: 380px) {
    .hero-section h1 { font-size: 18px; }
    .stat-card .stat-number { font-size: 20px; }
    .navbar-brand span { font-size: 12px !important; }
    .navbar-brand img { height: 32px !important; }
}

/* -- Fix dropdown menus inside DataTables -- */
.dataTables_wrapper {
    position: relative;
}

.dataTables_wrapper .dropdown-menu {
    z-index: 1050;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 4px 0;
    min-width: 200px;
}

.dataTables_wrapper .dropdown-item {
    font-size: 13px;
    padding: 8px 14px;
}

.dataTables_wrapper .dropdown-item:hover {
    background: #f1f5f9;
}

/* Ensure Actions column is always visible and properly sized */
.table-bpcl th:last-child,
.table-bpcl td:last-child {
    min-width: 110px;
    text-align: center;
    white-space: nowrap;
}

/* Fix DataTable responsive child row dropdowns */
table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control {
    position: relative;
}

/* Action dropdown button styling */
.btn-action-dropdown {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 4px;
    color: #374151;
}
.btn-action-dropdown:hover {
    background: #e9ecef;
    border-color: #ced4da;
}
