/* E-Ration Card Print — Cohesive Sky-Cyan & Clean White SaaS Theme + Curated Multi-Font Pairing */
@import url('https://fonts.googleapis.com/css2?family=Hind+Siliguri:wght@400;500;600;700&family=JetBrains+Mono:wght@500;600;700&family=Outfit:wght@600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --bs-primary: #0284c7;
    --bs-primary-rgb: 2, 132, 199;
    --erp-font-display: 'Outfit', 'Hind Siliguri', sans-serif;
    --erp-font-body: 'Plus Jakarta Sans', 'Hind Siliguri', 'Segoe UI', system-ui, sans-serif;
    --erp-font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
    --erp-sky: #0ea5e9;
    --erp-cyan: #06b6d4;
    --erp-deep: #0369a1;
    --erp-navy: #0f172a;
    --erp-surface: #f8fafc;
    --erp-border: #e2e8f0;
    --erp-green: #16a34a;
    --erp-amber: #facc15;
    --erp-radius: 0.9rem;
}

body {
    font-family: var(--erp-font-body);
    background-color: var(--erp-surface) !important;
    color: #1e293b;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .h1, .h2, .h3, .display-4, .navbar-brand, .erp-page-title, .fs-3, .fs-4 {
    font-family: var(--erp-font-display) !important;
    letter-spacing: -0.025em;
}

code, .font-monospace, .badge code {
    font-family: var(--erp-font-mono) !important;
    letter-spacing: -0.01em;
}

.card,
.small-box {
    border-radius: var(--erp-radius);
    border-color: var(--erp-border);
}

/* Clean White Glass Navbar */
.erp-navbar {
    background: rgba(255, 255, 255, 0.94) !important;
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--erp-border);
}

.erp-navbar .navbar-brand {
    color: var(--erp-navy) !important;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.erp-navbar .nav-link {
    font-weight: 600;
    font-size: 0.875rem;
    color: #334155 !important;
    transition: color 0.15s ease;
}

.erp-navbar .nav-link:hover {
    color: var(--bs-primary) !important;
}

.erp-navbar .navbar-toggler {
    border-color: #cbd5e1;
}

/* Vibrant Sky-to-Cyan Hero */
.erp-hero {
    background: radial-gradient(circle at 88% 18%, rgba(250, 204, 21, 0.22), transparent 36%),
        radial-gradient(circle at 12% 85%, rgba(56, 189, 248, 0.35), transparent 45%),
        linear-gradient(135deg, #0c4a6e 0%, #0284c7 52%, #06b6d4 100%);
    color: #fff;
    position: relative;
    overflow: hidden;
}

/* Primary Gradient CTA Button */
.btn-primary,
.erp-cta-btn {
    background: linear-gradient(90deg, #0284c7 0%, #06b6d4 100%);
    border: none;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 6px 18px rgba(2, 132, 199, 0.24);
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.btn-primary:hover,
.erp-cta-btn:hover {
    background: linear-gradient(90deg, #0369a1 0%, #0891b2 100%);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(2, 132, 199, 0.34);
}

.btn-outline-primary {
    color: #0284c7;
    border-color: #0284c7;
    font-weight: 600;
}

.btn-outline-primary:hover {
    background: #0284c7;
    border-color: #0284c7;
    color: #fff;
}

.erp-glass-btn {
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.42);
    color: #fff;
    backdrop-filter: blur(8px);
    transition: all 0.2s ease;
}

.erp-glass-btn:hover {
    background: #fff;
    color: #0c4a6e;
    transform: translateY(-1px);
}

/* Cards & Feature Tiles */
.erp-feature-card {
    border: 1px solid var(--erp-border);
    border-radius: var(--erp-radius);
    background: #fff;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.erp-feature-card:hover {
    transform: translateY(-4px);
    border-color: #7dd3fc;
    box-shadow: 0 16px 32px rgba(2, 132, 199, 0.10);
}

/* Form Controls */
.form-control:focus,
.form-select:focus {
    border-color: #0ea5e9;
    box-shadow: 0 0 0 0.22rem rgba(14, 165, 233, 0.20);
}

/* 3-Step Order Wizard */
.erp-stepper {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-bottom: 1.75rem;
}

.erp-stepper::before {
    content: '';
    position: absolute;
    top: 18px;
    left: 10%;
    right: 10%;
    height: 3px;
    background: #e2e8f0;
    z-index: 0;
}

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

.erp-step-circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #475569;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.35rem;
    transition: all 0.2s ease;
}

.erp-step-item.active .erp-step-circle {
    background: linear-gradient(135deg, #0284c7, #06b6d4);
    color: #fff;
    box-shadow: 0 0 0 5px rgba(14, 165, 233, 0.22);
}

.erp-step-item.done .erp-step-circle {
    background: var(--erp-green);
    color: #fff;
}

/* Tracking Horizontal Progress */
.erp-track-steps {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.5rem;
}

@media (max-width: 767px) {
    .erp-track-steps {
        grid-template-columns: repeat(2, 1fr);
    }
}

.erp-track-node {
    padding: 0.8rem 0.5rem;
    border-radius: 0.75rem;
    text-align: center;
    background: #f1f5f9;
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid #e2e8f0;
}

.erp-track-node.done {
    background: #ecfdf5;
    color: #047857;
    border-color: #6ee7b7;
}

.erp-track-node.current {
    background: #e0f2fe;
    color: #0369a1;
    border-color: #38bdf8;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.16);
}

/* PDF Dropzone */
.erp-pdf-dropzone {
    border-style: dashed !important;
    border-color: #94a3b8 !important;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.erp-pdf-dropzone:hover {
    border-color: #0284c7 !important;
    background-color: #f0f9ff !important;
}

/* Accordion Polish */
.accordion-button:not(.collapsed) {
    background-color: #f0f9ff;
    color: #0369a1;
    box-shadow: none;
}

/* 3D PVC Card Front/Back Flip Animation (CR80 aspect ratio) */
.erp-flip-scene,
.erp-card-img-wrap {
    perspective: 1100px;
    aspect-ratio: 1.586 / 1;
    width: 100%;
    position: relative;
    cursor: pointer;
    background: #f1f5f9;
    overflow: hidden;
}

.erp-card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 6px;
}

.erp-flip-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
    transform-style: preserve-3d;
}

.erp-flip-scene:hover .erp-flip-inner,
.erp-flip-scene.flipped .erp-flip-inner {
    transform: rotateY(180deg);
}

.erp-flip-face {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
}

.erp-flip-face img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 6px;
}

.erp-flip-back {
    transform: rotateY(180deg);
}

.erp-flip-badge {
    position: absolute;
    right: 8px;
    bottom: 8px;
    z-index: 3;
    background: rgba(15, 23, 42, 0.72);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 999px;
    backdrop-filter: blur(6px);
    border: none;
}

/* Transparent Hero with Full-Bleed Multi-Photo Background Slider */
.erp-hero-transparent {
    background: transparent;
}

.erp-hero-bg-carousel {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.erp-hero-scrim {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.56) 0%, rgba(2, 132, 199, 0.34) 100%);
    pointer-events: none;
}

/* Order Page Hero Background */
.erp-order-hero-bg {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.78) 0%, rgba(240, 249, 255, 0.82) 100%),
        url('/assets/img/order-hero-bg.jpg') center center / cover no-repeat;
    border-bottom: 1px solid var(--erp-border);
}

/* Footer */
.erp-footer {
    background: #0f172a;
    color: #cbd5e1;
}

.erp-footer a:hover {
    color: #38bdf8 !important;
}

/* =========================================================
   MODERN SAAS ADMINLTE v4 POLISH (ALL PANELS)
   ========================================================= */
.erp-admin-body {
    background-color: #f1f5f9 !important;
}

[data-bs-theme="dark"] .erp-admin-body {
    background-color: #0b1120 !important;
}

.erp-admin-header {
    position: sticky !important;
    top: 0 !important;
    z-index: 1035 !important;
    background-color: #ffffff !important;
    border-bottom: 1px solid #e2e8f0 !important;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
    min-height: 58px;
}

[data-bs-theme="dark"] .erp-admin-header {
    background-color: #0f172a !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.erp-icon-btn {
    border-radius: 0.6rem;
    padding: 0.35rem 0.6rem !important;
    color: #334155 !important;
}

.erp-icon-btn:hover {
    background: rgba(2, 132, 199, 0.1);
    color: #0284c7 !important;
}

.erp-circle-btn {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.erp-avatar-circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0284c7, #06b6d4);
    color: #fff;
    font-weight: 700;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Sleek Solid Deep Navy Sidebar with Smooth Independent Scroll */
.erp-admin-sidebar {
    --lte-sidebar-bg: #0f172a;
    background-color: #0f172a !important;
    background-image: linear-gradient(180deg, #0f172a 0%, #111c33 100%) !important;
    opacity: 1 !important;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    height: 100vh !important;
    max-height: 100vh !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
}

.erp-admin-sidebar .sidebar-brand {
    background-color: #0f172a !important;
    flex-shrink: 0;
}

.erp-admin-sidebar .sidebar-wrapper {
    background-color: transparent !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2.5rem !important;
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.4) transparent;
}

.erp-admin-sidebar .sidebar-wrapper::-webkit-scrollbar {
    width: 6px;
}

.erp-admin-sidebar .sidebar-wrapper::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.35);
    border-radius: 999px;
}

.erp-admin-sidebar .nav-header {
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #64748b !important;
    padding: 0.75rem 0.75rem 0.25rem !important;
}

.erp-admin-sidebar .sidebar-menu .nav-link {
    border-radius: 0.65rem;
    padding: 0.52rem 0.8rem;
    font-size: 0.86rem;
    font-weight: 500;
    color: #cbd5e1 !important;
    transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.erp-admin-sidebar .sidebar-menu .nav-link .nav-icon {
    color: #94a3b8;
    font-size: 1rem;
    margin-right: 0.55rem;
    transition: color 0.16s ease;
}

.erp-admin-sidebar .sidebar-menu .nav-link:hover {
    background: rgba(56, 189, 248, 0.12);
    color: #ffffff !important;
}

.erp-admin-sidebar .sidebar-menu .nav-link:hover .nav-icon {
    color: #38bdf8;
}

.erp-admin-sidebar .sidebar-menu .nav-link.active {
    background: linear-gradient(90deg, #0284c7 0%, #06b6d4 100%) !important;
    color: #ffffff !important;
    font-weight: 600;
    box-shadow: 0 6px 16px rgba(2, 132, 199, 0.35);
}

.erp-admin-sidebar .sidebar-menu .nav-link.active .nav-icon {
    color: #ffffff !important;
}

/* Admin Main Content Cards, Tables & KPI Boxes */
.erp-page-title {
    font-size: 1.35rem;
    letter-spacing: -0.02em;
    color: #0f172a;
}

[data-bs-theme="dark"] .erp-page-title {
    color: #f8fafc;
}

.app-main .card {
    border: 1px solid #e2e8f0;
    border-radius: 0.95rem;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.04) !important;
    overflow: hidden;
}

[data-bs-theme="dark"] .app-main .card {
    border-color: rgba(255, 255, 255, 0.08);
    background-color: #111827;
}

.app-main .card-header {
    background: #ffffff;
    border-bottom: 1px solid #f1f5f9;
    padding: 0.85rem 1.2rem;
}

[data-bs-theme="dark"] .app-main .card-header {
    background: #111827;
    border-bottom-color: rgba(255, 255, 255, 0.07);
}

.app-main .card-title {
    font-size: 0.96rem;
    font-weight: 700;
}

.app-main .table thead th {
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    font-weight: 700;
    border-bottom-width: 1px;
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
}

.app-main .table tbody td {
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
    vertical-align: middle;
}

.app-main .small-box {
    border-radius: 1rem !important;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.app-main .small-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.12);
}

.app-main .form-control:focus,
.app-main .form-select:focus {
    border-color: #0284c7;
    box-shadow: 0 0 0 0.2rem rgba(2, 132, 199, 0.16);
}

.settings-nav-item.active {
    background: linear-gradient(90deg, #0284c7 0%, #06b6d4 100%) !important;
    border-color: transparent !important;
    color: #fff !important;
}

/* =========================================================
   TRUST-BUILDING PUBLIC WEBSITE ANIMATIONS
   ========================================================= */
@keyframes erpFadeUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes erpSheen {
    0% {
        transform: translateX(-120%) skewX(-20deg);
    }

    100% {
        transform: translateX(260%) skewX(-20deg);
    }
}

@keyframes erpLivePulse {
    0% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    }

    70% {
        box-shadow: 0 0 0 8px rgba(34, 197, 94, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

@keyframes erpCursorBlink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}
@keyframes erpSlideBlurIn {
    from { opacity: 0; transform: translateX(-28px); filter: blur(6px); }
    to   { opacity: 1; transform: translateX(0); filter: blur(0); }
}
@keyframes erpFlyRight {
    from { opacity: 0; transform: translateX(48px) scale(0.95); }
    to   { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes erpFlyLeft {
    from { opacity: 0; transform: translateX(-48px) scale(0.95); }
    to   { opacity: 1; transform: translateX(0) scale(1); }
}

.erp-type-cursor {
    display: inline-block;
    font-weight: 400;
    margin-left: 2px;
    animation: erpCursorBlink 0.85s step-end infinite;
}

/* Hero Staggered Entrance */
.erp-hero h1 {
    animation: erpFadeUp 0.65s cubic-bezier(0.22, 1, 0.36, 1) 0.06s both;
}

.erp-hero p.erp-hero-subtitle {
    animation: erpSlideBlurIn 0.85s cubic-bezier(0.22, 1, 0.36, 1) 0.22s both;
}

/* Quick Services Alternating Directional Fly-In Buttons */
.erp-qs-buttons { overflow: hidden; padding: 2px; }
.erp-qs-btn { transition: transform 0.22s ease, box-shadow 0.22s ease; }
.erp-qs-btn:hover { transform: translateX(5px); }
.erp-qs-buttons .erp-qs-from-right:nth-child(1) { animation: erpFlyRight 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.14s both; }
.erp-qs-buttons .erp-qs-from-left:nth-child(2)  { animation: erpFlyLeft  0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.30s both; }
.erp-qs-buttons .erp-qs-from-right:nth-child(3) { animation: erpFlyRight 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.46s both; }
.erp-qs-buttons .erp-qs-from-left:nth-child(4)  { animation: erpFlyLeft  0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.62s both; }

.erp-hero .erp-cta-btn {
    position: relative;
    overflow: hidden;
    animation: erpFadeUp 0.65s cubic-bezier(0.22, 1, 0.36, 1) 0.28s both;
}

.erp-hero .erp-cta-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 45%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.32), transparent);
    animation: erpSheen 3.8s ease-in-out infinite;
    pointer-events: none;
}

/* Scroll-Reveal Progressive Enhancement */
html.erp-anim-ready .erp-reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.62s cubic-bezier(0.22, 1, 0.36, 1), transform 0.62s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform;
}

html.erp-anim-ready .erp-reveal.erp-revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Subtle Card Hover Elevation on Public Pages */
main .card {
    transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.24s ease;
}

main .card:hover {
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08) !important;
}

/* Live Verified Green Pulse Dot */
.erp-live-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    margin-right: 6px;
    vertical-align: middle;
    animation: erpLivePulse 2s infinite;
}

@media (prefers-reduced-motion: reduce) {

    .erp-hero h1,
    .erp-hero p.lead,
    .erp-hero .erp-cta-btn,
    .erp-hero .erp-cta-btn::after,
    .erp-live-dot {
        animation: none !important;
    }

    html.erp-anim-ready .erp-reveal {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}