/* ============================================================
   Parking Management — Design System (modern flat SaaS)
   ============================================================ */
:root {
    --pm-primary: #4f46e5;          /* indigo-600 */
    --pm-primary-rgb: 79, 70, 229;
    --pm-primary-dark: #4338ca;
    --pm-primary-soft: #eef2ff;
    --pm-accent: #06b6d4;           /* cyan-500 */
    --pm-success: #10b981;
    --pm-danger: #ef4444;
    --pm-warning: #f59e0b;
    --pm-ink: #0f172a;              /* slate-900 */
    --pm-muted: #64748b;            /* slate-500 */
    --pm-line: #e7e9f3;
    --pm-bg: #f5f6fb;
    --pm-card: #ffffff;
    --pm-radius: 14px;
    --pm-radius-sm: 10px;
    --pm-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 6px 20px rgba(16, 24, 40, .06);
    --pm-shadow-lg: 0 10px 40px rgba(16, 24, 40, .12);
    --pm-sidebar-bg: #0b1220;
    --pm-sidebar-ink: #9aa6c0;
}

* { -webkit-tap-highlight-color: transparent; }

body {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Sans Bengali', sans-serif;
    background: var(--pm-bg);
    color: var(--pm-ink);
    font-size: .95rem;
    line-height: 1.55;
    /* Sticky footer: fill the viewport so a short page still pins the footer to the bottom. */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6, .navbar-brand { font-weight: 700; letter-spacing: -.01em; }
a { color: var(--pm-primary); }
.text-muted { color: var(--pm-muted) !important; }

/* ---- Buttons ---- */
.btn { border-radius: var(--pm-radius-sm); font-weight: 600; padding: .5rem 1rem; transition: all .15s ease; }
.btn-lg { padding: .7rem 1.4rem; }
.btn-sm { padding: .35rem .7rem; border-radius: 8px; }
.btn-primary { background: var(--pm-primary); border-color: var(--pm-primary); box-shadow: 0 6px 16px rgba(var(--pm-primary-rgb), .25); }
.btn-primary:hover, .btn-primary:focus { background: var(--pm-primary-dark); border-color: var(--pm-primary-dark); transform: translateY(-1px); }
.btn-outline-primary { color: var(--pm-primary); border-color: rgba(var(--pm-primary-rgb), .4); }
.btn-outline-primary:hover { background: var(--pm-primary); border-color: var(--pm-primary); }
.btn-light { background: #fff; border-color: var(--pm-line); }

/* ---- Cards ---- */
.card { border: 1px solid var(--pm-line); border-radius: var(--pm-radius); box-shadow: var(--pm-shadow); }
.card .card-body { padding: 1.25rem; }
.shadow-sm { box-shadow: var(--pm-shadow) !important; }

/* ---- Forms ---- */
.form-control, .form-select { border-radius: var(--pm-radius-sm); border-color: var(--pm-line); padding: .55rem .8rem; }
.form-control:focus, .form-select:focus { border-color: var(--pm-primary); box-shadow: 0 0 0 .2rem rgba(var(--pm-primary-rgb), .15); }
.form-label { font-weight: 600; font-size: .85rem; color: #334155; margin-bottom: .35rem; }
.input-group-text { background: var(--pm-primary-soft); border-color: var(--pm-line); color: var(--pm-primary); }

/* ---- Badges ---- */
.badge { font-weight: 600; padding: .4em .7em; border-radius: 7px; }
.badge.bg-success { background: rgba(16,185,129,.12) !important; color: #047857; }
.badge.bg-danger { background: rgba(239,68,68,.12) !important; color: #b91c1c; }
.badge.bg-warning { background: rgba(245,158,11,.15) !important; color: #b45309; }
.badge.bg-secondary { background: #eef1f7 !important; color: #475569; }
.badge.bg-info { background: rgba(6,182,212,.12) !important; color: #0e7490; }
.badge.bg-primary { background: rgba(var(--pm-primary-rgb),.12) !important; color: var(--pm-primary-dark); }

/* ---- Tables ---- */
.table { --bs-table-hover-bg: var(--pm-primary-soft); margin-bottom: 0; }
.table > thead th { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--pm-muted); font-weight: 700; border-bottom: 1px solid var(--pm-line); background: #fafbff; }
.table > tbody td { border-color: #f1f2f8; vertical-align: middle; }
.table-card { border: 1px solid var(--pm-line); border-radius: var(--pm-radius); overflow: hidden; background: #fff; box-shadow: var(--pm-shadow); }

/* ---- Stat widgets ---- */
.pm-stat { display: flex; align-items: center; gap: 1rem; }
.pm-stat .pm-stat-ic { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-size: 1.4rem; flex: 0 0 auto; }
.pm-stat .pm-stat-val { font-size: 1.7rem; font-weight: 800; line-height: 1; letter-spacing: -.02em; }
.pm-stat .pm-stat-lbl { font-size: .8rem; color: var(--pm-muted); }
.ic-indigo { background: var(--pm-primary-soft); color: var(--pm-primary); }
.ic-cyan { background: #ecfeff; color: #0891b2; }
.ic-green { background: #ecfdf5; color: #059669; }
.ic-amber { background: #fffbeb; color: #d97706; }
.ic-rose { background: #fff1f2; color: #e11d48; }

/* ---- Back-office sidebar ---- */
.pm-shell { display: flex; min-height: 100vh; }
.pm-sidebar { width: 250px; background: var(--pm-sidebar-bg); color: #fff; flex: 0 0 auto; }
.pm-sidebar .pm-brand { padding: 1.1rem 1.25rem; font-weight: 800; font-size: 1.05rem; color: #fff; border-bottom: 1px solid rgba(255,255,255,.06); }
.pm-nav { padding: .75rem; }
.pm-nav .pm-nav-head { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: #5b6781; padding: .75rem .75rem .35rem; }
.pm-nav a { color: var(--pm-sidebar-ink); text-decoration: none; display: flex; align-items: center; gap: .65rem; padding: .6rem .8rem; border-radius: 10px; font-weight: 500; font-size: .9rem; margin-bottom: 2px; transition: all .12s ease; }
.pm-nav a i { font-size: 1.05rem; width: 1.2rem; text-align: center; }
.pm-nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.pm-nav a.active { background: var(--pm-brand, var(--pm-primary)); color: #fff; box-shadow: 0 6px 16px rgba(var(--pm-primary-rgb),.35); }
.pm-topbar { background: #fff; border-bottom: 1px solid var(--pm-line); padding: .6rem 1.1rem; display: flex; align-items: center; gap: .75rem; position: sticky; top: 0; z-index: 20; }
.pm-content { padding: 1.5rem; flex: 1 1 auto; min-width: 0; }
.pm-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--pm-primary-soft); color: var(--pm-primary); display: grid; place-items: center; font-weight: 700; font-size: .85rem; }

/* ---- Public marketing ---- */
.pm-public-nav { background: rgba(255,255,255,.85); backdrop-filter: saturate(180%) blur(10px); border-bottom: 1px solid var(--pm-line); }
.pm-hero { background: radial-gradient(1200px 500px at 80% -10%, rgba(6,182,212,.12), transparent), radial-gradient(900px 500px at 0% 0%, rgba(var(--pm-primary-rgb),.10), transparent); }
.pm-hero h1 { font-size: clamp(2rem, 4vw, 3.2rem); }
.pm-gradient-text { background: linear-gradient(90deg, var(--pm-primary), var(--pm-accent)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.pm-feature-ic { width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center; font-size: 1.5rem; background: var(--pm-primary-soft); color: var(--pm-primary); }
.pm-price-card { border: 1px solid var(--pm-line); border-radius: 18px; transition: all .2s ease; }
.pm-price-card:hover { transform: translateY(-4px); box-shadow: var(--pm-shadow-lg); }
.pm-price-card.popular { border-color: var(--pm-primary); box-shadow: 0 12px 40px rgba(var(--pm-primary-rgb),.18); }
.pm-step-num { width: 44px; height: 44px; border-radius: 50%; background: var(--pm-primary); color: #fff; display: grid; place-items: center; font-weight: 800; margin: 0 auto; }

/* ---- Auth ---- */
.pm-auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; background: radial-gradient(900px 500px at 100% 0%, rgba(var(--pm-primary-rgb),.10), transparent), var(--pm-bg); }
.pm-auth-card { width: 100%; max-width: 420px; }

/* ---- Auth split layout ---- */
.pm-auth-split { min-height: 100vh; display: flex; }
.pm-auth-aside { flex: 0 0 44%; max-width: 44%; background: var(--auth-grad, linear-gradient(150deg, var(--pm-primary), var(--pm-primary-dark) 55%, #1e1b4b)); color: #fff; padding: 3rem 3.25rem; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.pm-auth-aside::before { content: ""; position: absolute; inset: 0; background: radial-gradient(600px 320px at 85% 8%, rgba(6,182,212,.30), transparent), radial-gradient(520px 320px at -10% 100%, rgba(255,255,255,.14), transparent); }
.pm-auth-aside > * { position: relative; z-index: 1; }
.pm-auth-feature { display: flex; align-items: flex-start; gap: .85rem; margin-bottom: 1.15rem; }
.pm-auth-feature > .bi { font-size: 1.15rem; background: rgba(255,255,255,.16); width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; flex: 0 0 auto; }
.pm-auth-main { flex: 1 1 auto; display: grid; place-items: center; padding: 1.5rem; background: radial-gradient(800px 460px at 100% 0%, rgba(var(--pm-primary-rgb),.08), transparent), var(--pm-bg); }
.pm-auth-main .pm-auth-card { max-width: 420px; }
@media (max-width: 991.98px) { .pm-auth-aside { display: none; } }

/* ---- Password show/hide toggle ---- */
.pm-pw-toggle { color: var(--pm-muted); background: #fff; }
.pm-pw-toggle:hover, .pm-pw-toggle:focus { color: var(--auth-accent, var(--pm-primary)); background: #fff; }

/* ---- Per-role auth accent (set by _AuthLayout via --auth-accent) ---- */
.pm-auth-main .pm-feature-ic { background: var(--auth-accent-soft, var(--pm-primary-soft)); color: var(--auth-accent, var(--pm-primary)); }
.pm-auth-main .input-group-text { background: var(--auth-accent-soft, var(--pm-primary-soft)); color: var(--auth-accent, var(--pm-primary)); }
.pm-auth-main a { color: var(--auth-accent, var(--pm-primary)); }
.pm-auth-main .btn-primary { background: var(--auth-accent, var(--pm-primary)); border-color: var(--auth-accent, var(--pm-primary)); box-shadow: 0 6px 16px rgba(15,23,42,.16); }
.pm-auth-main .btn-primary:hover, .pm-auth-main .btn-primary:focus { filter: brightness(.93); background: var(--auth-accent, var(--pm-primary)); border-color: var(--auth-accent, var(--pm-primary)); }
.pm-auth-main .form-control:focus, .pm-auth-main .form-select:focus { border-color: var(--auth-accent, var(--pm-primary)); box-shadow: 0 0 0 .2rem rgba(15,23,42,.10); }
.pm-auth-main .form-check-input:checked { background-color: var(--auth-accent, var(--pm-primary)); border-color: var(--auth-accent, var(--pm-primary)); }
.pm-auth-aside .pm-auth-pill { background: rgba(255,255,255,.16); color: #fff; font-weight: 600; }
.pm-auth-aside.is-dark { border-right: 1px solid rgba(255,255,255,.06); }

/* ---- Misc ---- */
.pm-empty { text-align: center; padding: 2.5rem 1rem; color: var(--pm-muted); }
.pm-empty i { font-size: 2.5rem; opacity: .4; display: block; margin-bottom: .5rem; }
/* ---- Footer (rich, dark) ---- */
footer.pm-footer { background: var(--pm-sidebar-bg); color: #cbd5e1; }
.pm-footer .pm-footer-brand { color: #fff; }
.pm-footer .pm-footer-muted { color: #93a0bd; }
.pm-footer .pm-footer-head { color: #fff; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 1rem; font-weight: 700; }
.pm-footer-links { margin: 0; }
.pm-footer-links li { margin-bottom: .55rem; color: #93a0bd; font-size: .9rem; }
.pm-footer-links a { color: #93a0bd; text-decoration: none; transition: color .15s ease; }
.pm-footer-links a:hover { color: #fff; }
.pm-footer-bottom { border-top: 1px solid rgba(255,255,255,.08); }
.pm-soc { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: rgba(255,255,255,.06); color: #cbd5e1; text-decoration: none; transition: all .15s ease; font-size: 1.05rem; }
.pm-soc:hover { background: var(--pm-primary); color: #fff; transform: translateY(-2px); }

/* ---- Contact info tiles ---- */
.pm-contact-tile { display: flex; align-items: flex-start; gap: .9rem; padding: 1rem; border: 1px solid var(--pm-line); border-radius: var(--pm-radius); background: #fff; box-shadow: var(--pm-shadow); height: 100%; }
.pm-contact-tile .pm-feature-ic { width: 44px; height: 44px; font-size: 1.2rem; flex: 0 0 auto; }

/* ---- About values ---- */
.pm-value-card { border: 1px solid var(--pm-line); border-radius: var(--pm-radius); background: #fff; box-shadow: var(--pm-shadow); padding: 1.5rem; height: 100%; transition: transform .2s ease, box-shadow .2s ease; }
.pm-value-card:hover { transform: translateY(-4px); box-shadow: var(--pm-shadow-lg); }
.pm-cta-band { background: linear-gradient(120deg, var(--pm-primary), var(--pm-primary-dark) 55%, var(--pm-accent)); border-radius: 22px; color: #fff; }
.text-truncate-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Hide empty validation summaries so an alert-styled summary only shows on real errors */
.validation-summary-valid { display: none; }

/* DataTables tidy-up */
.dataTables_wrapper .dataTables_filter input { border-radius: 8px; border: 1px solid var(--pm-line); padding: .35rem .6rem; }
.dataTables_wrapper .dataTables_paginate .paginate_button.current { background: var(--pm-primary) !important; border-color: var(--pm-primary) !important; color: #fff !important; border-radius: 8px; }
.dataTables_wrapper .dataTables_info, .dataTables_wrapper .dataTables_filter { font-size: .85rem; color: var(--pm-muted); }
.dataTables_wrapper .dataTables_paginate { font-size: .85rem; }

/* ============================================================
   Animations & micro-interactions
   ============================================================ */
@keyframes pmFadeInUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes pmFadeIn   { from { opacity: 0; } to { opacity: 1; } }
@keyframes pmPop      { 0% { opacity: 0; transform: scale(.85); } 60% { transform: scale(1.06); } 100% { opacity: 1; transform: scale(1); } }
@keyframes pmSpin     { to { transform: rotate(360deg); } }
@keyframes pmShimmer  { to { background-position: -200% 0; } }
@keyframes pmSlideInRight { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes pmPulseSoft { 0%,100% { opacity: 1; } 50% { opacity: .55; } }

/* Page-load entrance */
main.pm-content,
.pm-shell .pm-content,
main[role="main"] { animation: pmFadeInUp .45s cubic-bezier(.22,.61,.36,1) both; }
.biz-hero, .pm-cta-band { animation: pmFadeIn .6s ease both; }

/* Cards: gentle hover lift everywhere */
.card { transition: transform .18s ease, box-shadow .18s ease; }
.card:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(16,24,40,.10); }

/* Buttons: smooth + tactile press */
.btn { transition: all .15s ease, transform .07s ease; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.985); }

/* Sidebar nav: slide on hover/active */
.pm-nav a:hover { transform: translateX(3px); }
.pm-nav a.active { animation: pmFadeIn .25s ease both; }

/* Feature / stat icons: pop in */
.pm-feature-ic, .pm-stat-ic { animation: pmPop .5s cubic-bezier(.22,.61,.36,1) both; }

/* Alerts & toasts entrance */
.alert { animation: pmFadeInUp .3s ease both; }
.toast, .swal2-popup { animation: pmSlideInRight .3s ease both; }

/* Badges that flag attention (e.g. "Full", overdue) */
.badge.bg-danger { animation: pmPulseSoft 2.4s ease-in-out infinite; }

/* Table rows: fade in on hover focus */
.pm-datatable tbody tr { transition: background-color .15s ease, transform .12s ease; }

/* Progress bars animate to width */
.progress-bar { transition: width .6s cubic-bezier(.22,.61,.36,1); }

/* Utilities: spinner + skeleton loader */
.pm-spin { display: inline-block; width: 1.1em; height: 1.1em; vertical-align: -.15em;
    border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%;
    animation: pmSpin .7s linear infinite; }
.pm-skeleton { background: linear-gradient(90deg, #eceef5 25%, #f6f7fb 37%, #eceef5 63%);
    background-size: 200% 100%; animation: pmShimmer 1.3s ease infinite; border-radius: 10px; min-height: 1rem; }

/* Respect users who prefer less motion (accessibility) */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
        scroll-behavior: auto !important;
    }
}
