/* CERA — single consolidated stylesheet (theme + admin + components). Edit here only. */

/* ============================================================
   CERA â€” shared theme tokens (admin + superadmin + storefront)
   Accent color is overridden per-tenant via inline --accent.
   ============================================================ */
:root {
    /* Primary = blue (per-tenant overridable). Secondary palette = orange + green. */
    --accent: #2563eb;
    --accent-rgb: 37, 99, 235;
    --accent-dark: #1d4ed8;
    --accent-soft: rgba(37, 99, 235, .10);

    /* Brand palette: blue Â· orange Â· green */
    --blue: #2563eb;   --blue-soft: rgba(37, 99, 235, .12);
    --orange: #f97316; --orange-soft: rgba(249, 115, 22, .12);
    --green: #16a34a;  --green-soft: rgba(22, 163, 74, .12);

    --bg: #f3f6fc;
    --surface: #ffffff;
    --surface-2: #f8fafc;
    --border: #e6e9f2;
    --text: #1f2430;
    --text-muted: #6b7280;
    --radius: 14px;
    --radius-sm: 10px;
    --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
    --shadow: 0 4px 16px rgba(16, 24, 40, .07);
    --shadow-lg: 0 12px 32px rgba(16, 24, 40, .12);

    --sidebar-w: 256px;
    --topbar-h: 64px;
    --font: 'Inter', 'Figtree', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

[data-theme="dark"] {
    --bg: #0f1117;
    --surface: #171a23;
    --surface-2: #1d212c;
    --border: #2a2f3c;
    --text: #e6e8ee;
    --text-muted: #9aa3b2;
    --accent-soft: rgba(var(--accent-rgb), .18);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow: 0 4px 16px rgba(0, 0, 0, .35);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, .5);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    font-size: 14.5px;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); }

/* ---- Buttons ---- */
.btn-accent {
    background: var(--accent); border-color: var(--accent); color: #fff;
}
.btn-accent:hover, .btn-accent:focus { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.btn-soft-accent { background: var(--accent-soft); color: var(--accent); border: 0; }
.btn-soft-accent:hover { background: var(--accent); color: #fff; }
.text-accent { color: var(--accent) !important; }
.bg-accent { background: var(--accent) !important; color: #fff; }

/* ---- Cards / surfaces ---- */
.card, .surface {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
.card { color: var(--text); }
.card-header { background: transparent; border-bottom: 1px solid var(--border); font-weight: 600; }

/* ---- KPI cards ---- */
.kpi { display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.25rem; }
.kpi .kpi-icon {
    width: 52px; height: 52px; border-radius: 13px; display: grid; place-items: center;
    font-size: 1.4rem; background: var(--accent-soft); color: var(--accent); flex: 0 0 auto;
}
.kpi .kpi-label { color: var(--text-muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
.kpi .kpi-value { font-size: 1.55rem; font-weight: 700; line-height: 1.1; }

/* ---- Forms ---- */
.form-control, .form-select {
    border-radius: var(--radius-sm);
    border-color: var(--border);
    background: var(--surface);
    color: var(--text);
    padding: .5rem .75rem;
}
.form-control:focus, .form-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 .2rem var(--accent-soft);
    background: var(--surface);
    color: var(--text);
}
.form-label { font-weight: 600; font-size: .82rem; color: var(--text-muted); margin-bottom: .3rem; }
label.error, .invalid-feedback.d-block { color: #e23b3b; font-size: .8rem; }
.is-invalid { border-color: #e23b3b !important; }

/* ---- Tables ---- */
table.dataTable { border-collapse: collapse !important; }
.table { color: var(--text); --bs-table-bg: transparent; }
.table > :not(caption) > * > * { border-bottom-color: var(--border); }
.table thead th { color: var(--text-muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .03em; }

/* ---- Badges for statuses ---- */
.badge-status { font-weight: 600; padding: .35em .6em; border-radius: 7px; font-size: .72rem; }
.badge-paid    { background: #e6f7ee; color: #18794e; }
.badge-partial { background: #fff4e0; color: #b25f00; }
.badge-unpaid, .badge-overdue { background: #fdeaea; color: #c5303a; }
.badge-draft   { background: #eef0f5; color: #5b6473; }
.badge-sent    { background: var(--accent-soft); color: var(--accent); }
[data-theme="dark"] .badge-paid { background: rgba(24,121,78,.2); }
[data-theme="dark"] .badge-partial { background: rgba(178,95,0,.25); }
[data-theme="dark"] .badge-unpaid, [data-theme="dark"] .badge-overdue { background: rgba(197,48,58,.25); }
[data-theme="dark"] .badge-draft { background: rgba(91,100,115,.3); }

/* ---- Misc ---- */
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--text-muted); }
.empty-state i { font-size: 2.5rem; opacity: .4; }
.spinner-overlay {
    position: absolute; inset: 0; background: rgba(255,255,255,.6); display: grid; place-items: center; z-index: 5; border-radius: var(--radius);
}
[data-theme="dark"] .spinner-overlay { background: rgba(0,0,0,.45); }
.btn[disabled] .btn-spin { display: inline-block; }
.btn-spin { display: none; width: 1rem; height: 1rem; border: 2px solid rgba(255,255,255,.5); border-top-color: #fff; border-radius: 50%; animation: spin .6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Brand tri-color utilities (blue Â· orange Â· green) ---- */
.btn-orange { background: var(--orange); border-color: var(--orange); color: #fff; }
.btn-orange:hover { background: #ea6a0d; color: #fff; }
.btn-green { background: var(--green); border-color: var(--green); color: #fff; }
.btn-green:hover { background: #138a3f; color: #fff; }
.btn-soft-orange { background: var(--orange-soft); color: var(--orange); border: 0; }
.btn-soft-orange:hover { background: var(--orange); color: #fff; }
.btn-soft-green { background: var(--green-soft); color: var(--green); border: 0; }
.btn-soft-green:hover { background: var(--green); color: #fff; }
.text-blue { color: var(--blue) !important; } .text-orange { color: var(--orange) !important; } .text-green { color: var(--green) !important; }
.bg-blue { background: var(--blue) !important; color:#fff; } .bg-orange { background: var(--orange) !important; color:#fff; } .bg-green { background: var(--green) !important; color:#fff; }

/* KPI icon color cycles â€” gives each panel the blue/orange/green rhythm */
.kpi:nth-of-type(3n+1) .kpi-icon { background: var(--blue-soft);   color: var(--blue); }
.kpi:nth-of-type(3n+2) .kpi-icon { background: var(--orange-soft); color: var(--orange); }
.kpi:nth-of-type(3n)   .kpi-icon { background: var(--green-soft);  color: var(--green); }

/* ---- Pagination â†’ right aligned everywhere ---- */
.dataTables_wrapper .dataTables_paginate { text-align: right; float: right; }
.pagination { justify-content: flex-end; margin-bottom: 0; }
.pagination .page-item.active .page-link { background: var(--accent); border-color: var(--accent); }
.pagination .page-link { color: var(--accent); }
nav[role="navigation"] { display: flex; justify-content: flex-end; }
nav[role="navigation"] .pagination { margin: 0; }

/* status badge accents aligned to the brand palette */
.badge-sent    { background: var(--blue-soft);   color: var(--blue); }
.badge-partial { background: var(--orange-soft); color: var(--orange); }
.badge-paid    { background: var(--green-soft);  color: var(--green); }


/* ============================================================
   CERA â€” admin/superadmin dashboard shell (sidebar + topbar)
   ============================================================ */
.app-shell { display: flex; min-height: 100vh; }

/* ---- Sidebar ---- */
.sidebar {
    width: var(--sidebar-w); flex: 0 0 var(--sidebar-w);
    background: var(--surface); border-right: 1px solid var(--border);
    position: fixed; inset: 0 auto 0 0; z-index: 1040;
    display: flex; flex-direction: column;
    transition: transform .25s ease;
}
.sidebar-brand {
    height: var(--topbar-h); display: flex; align-items: center; gap: .6rem;
    padding: 0 1.25rem; font-weight: 700; font-size: 1.1rem; color: var(--text);
    border-bottom: 1px solid var(--border);
}
.sidebar-brand img { height: 30px; }
.sidebar-brand .dot { width: 30px; height: 30px; border-radius: 9px; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: .95rem; }
.sidebar-nav { overflow-y: auto; padding: .75rem .65rem 2rem; flex: 1; }
.sidebar-nav .nav-section { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); padding: 1rem .6rem .35rem; }
.sidebar-nav .nav-link {
    display: flex; align-items: center; gap: .7rem; padding: .6rem .7rem; margin-bottom: 2px;
    border-radius: 10px; color: var(--text); font-weight: 500; font-size: .9rem;
}
.sidebar-nav .nav-link i { font-size: 1.05rem; width: 20px; text-align: center; color: var(--text-muted); }
.sidebar-nav .nav-link:hover { background: var(--surface-2); }
.sidebar-nav .nav-link.active { background: var(--accent); color: #fff; box-shadow: var(--shadow); }
.sidebar-nav .nav-link.active i { color: #fff; }

/* collapsible groups */
.sidebar-nav .nav-group { justify-content: flex-start; }
.sidebar-nav .nav-group .chev { margin-left: auto; font-size: .8rem; transition: transform .2s ease; }
.sidebar-nav .nav-group.collapsed .chev { transform: rotate(-90deg); }
.sidebar-nav .nav-group:not(.collapsed) { color: var(--accent); background: var(--accent-soft); }
.sidebar-nav .nav-group:not(.collapsed) > i:first-child { color: var(--accent); }
.sidebar-nav .nav-sub { padding-left: .55rem; margin: 2px 0; border-left: 2px solid var(--border); }
.sidebar-nav .nav-sub .nav-link { font-size: .86rem; padding: .48rem .7rem; }
.sidebar-nav .nav-sub .nav-link i { font-size: .95rem; }

/* ---- Main column ---- */
.app-main { flex: 1; margin-left: var(--sidebar-w); min-width: 0; display: flex; flex-direction: column; }
.topbar {
    height: var(--topbar-h); background: var(--surface); border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 1030; display: flex; align-items: center; gap: 1rem; padding: 0 1.25rem;
}
.topbar .search { flex: 1; max-width: 420px; }
.topbar .search .form-control { background: var(--surface-2); border: 0; }
.topbar .icon-btn {
    width: 40px; height: 40px; border-radius: 11px; border: 1px solid var(--border); background: var(--surface);
    display: grid; place-items: center; color: var(--text); position: relative;
}
.topbar .icon-btn:hover { background: var(--surface-2); }
.topbar .icon-btn .dot-badge { position: absolute; top: 7px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: #ef4444; }
.avatar { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 700; }

.page-body { padding: 1.5rem; flex: 1; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.page-head h1 { font-size: 1.4rem; font-weight: 700; margin: 0; }
.page-head .crumbs { color: var(--text-muted); font-size: .82rem; }

/* ---- Sidebar toggle (mobile) ---- */
.sidebar-backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 1035; }
@media (max-width: 992px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .app-main { margin-left: 0; }
    .sidebar-backdrop.show { display: block; }
}

/* ---- Invoice line-item builder ---- */
#itemsTable { min-width: 820px; font-size: .95rem; }          /* keeps columns readable; scrolls on small screens */
.line-items td, .line-items th { vertical-align: middle; padding: .55rem .5rem; }
.line-items th { font-size: .8rem; }
.line-items .form-control, .line-items .form-select { font-size: .92rem; padding: .45rem .6rem; height: auto; }
.line-items .qty, .line-items .rate, .line-items .disc { min-width: 92px; }
.line-items .taxr { min-width: 78px; }
.line-items .prod-select { min-width: 220px; }
.line-items .amount { font-weight: 600; white-space: nowrap; }
.line-items thead th { position: sticky; top: 0; background: var(--surface); z-index: 1; }
/* scroll hint shadow on the items wrapper */
.items-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.items-scroll::-webkit-scrollbar { height: 8px; }
.items-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 8px; }
.totals-box { max-width: 360px; margin-left: auto; }
.totals-box .row-line { display: flex; justify-content: space-between; padding: .3rem 0; }
.totals-box .grand { font-size: 1.2rem; font-weight: 700; border-top: 2px solid var(--border); margin-top: .4rem; padding-top: .6rem; }

/* ---- Image uploader (products) ---- */
.img-dropzone { border: 2px dashed var(--border); border-radius: var(--radius); padding: 1.5rem; text-align: center; cursor: pointer; color: var(--text-muted); transition: .15s; }
.img-dropzone.drag { border-color: var(--accent); background: var(--accent-soft); }
.img-grid { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1rem; }
.img-thumb { position: relative; width: 96px; height: 96px; border-radius: 11px; overflow: hidden; border: 2px solid var(--border); }
.img-thumb.primary { border-color: var(--accent); }
.img-thumb img { width: 100%; height: 100%; object-fit: cover; }
.img-thumb .actions { position: absolute; inset: auto 0 0 0; background: rgba(0,0,0,.55); display: flex; justify-content: center; gap: .4rem; padding: .2rem; }
.img-thumb .actions button { background: none; border: 0; color: #fff; font-size: .8rem; cursor: pointer; }
.img-thumb .star { position: absolute; top: 4px; right: 5px; color: #ffc107; font-size: .9rem; }


/* ===================== Auth (split login) ===================== */
.auth-split { display: flex; min-height: 100vh; }
.auth-aside { position: relative; flex: 1 1 52%; max-width: 640px; padding: 3rem 3.4rem; color: #fff; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; background: linear-gradient(135deg, var(--accent), #111a3a 85%); }
.auth-aside::before, .auth-aside::after { content: ""; position: absolute; border-radius: 50%; filter: blur(2px); background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.22), transparent 70%); animation: float 14s ease-in-out infinite; }
.auth-aside::before { width: 420px; height: 420px; top: -120px; right: -120px; }
.auth-aside::after { width: 320px; height: 320px; bottom: -100px; left: -80px; animation-delay: -6s; }
@keyframes float { 0%,100% { transform: translateY(0) translateX(0); } 50% { transform: translateY(-26px) translateX(16px); } }
.auth-grid-lines { position: absolute; inset: 0; opacity: .12; background-image: linear-gradient(#fff 1px, transparent 1px), linear-gradient(90deg, #fff 1px, transparent 1px); background-size: 46px 46px; -webkit-mask-image: radial-gradient(circle at 50% 40%, #000, transparent 75%); mask-image: radial-gradient(circle at 50% 40%, #000, transparent 75%); }
.auth-brand { display: flex; align-items: center; gap: .7rem; font-weight: 700; font-size: 1.3rem; position: relative; z-index: 2; }
.auth-brand .logo-dot { width: 44px; height: 44px; border-radius: 12px; background: rgba(255,255,255,.16); display: grid; place-items: center; backdrop-filter: blur(6px); border: 1px solid rgba(255,255,255,.25); }
.auth-brand img { height: 46px; border-radius: 10px; background: #fff; padding: 4px; }
.auth-brand .logo-chip { width: 50px; height: 50px; border-radius: 13px; background: #fff; display: grid; place-items: center; padding: 6px; box-shadow: 0 6px 18px rgba(0,0,0,.18); }
.auth-brand .logo-chip img { height: auto; max-width: 100%; max-height: 100%; object-fit: contain; background: none; padding: 0; border-radius: 0; }
/* tenant brand mark above the form (right side) */
.auth-tenant-brand { align-items: center; gap: .6rem; font-weight: 700; font-size: 1.15rem; margin-bottom: 1.3rem; color: var(--text); }
.auth-tenant-brand img { height: 40px; border-radius: 9px; }
.auth-tenant-brand .logo-dot { width: 40px; height: 40px; border-radius: 11px; background: var(--accent); color: #fff; display: grid; place-items: center; }
.auth-hero { position: relative; z-index: 2; }
.auth-hero h1 { font-size: 2.5rem; font-weight: 800; line-height: 1.1; margin: 0 0 1rem; letter-spacing: -.5px; }
.auth-hero h1 .grad { background: linear-gradient(90deg,#fff,#cdd6ff); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.auth-hero p { font-size: 1.02rem; opacity: .85; max-width: 30rem; }
.feat-list { list-style: none; padding: 0; margin: 1.8rem 0 0; display: grid; gap: .85rem; }
.feat-list li { display: flex; align-items: center; gap: .8rem; font-weight: 500; opacity: 0; transform: translateY(12px); animation: rise .6s forwards; }
.feat-list li:nth-child(1){animation-delay:.15s} .feat-list li:nth-child(2){animation-delay:.28s} .feat-list li:nth-child(3){animation-delay:.41s} .feat-list li:nth-child(4){animation-delay:.54s} .feat-list li:nth-child(5){animation-delay:.67s}
@keyframes rise { to { opacity: 1; transform: translateY(0); } }
.feat-list .ic { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22); font-size: 1rem; flex: 0 0 auto; }
.float-card { position: absolute; right: 2.4rem; bottom: 7.5rem; width: 230px; z-index: 2; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25); border-radius: 16px; padding: 1rem; backdrop-filter: blur(10px); box-shadow: 0 20px 40px rgba(0,0,0,.25); animation: bob 5s ease-in-out infinite; }
@keyframes bob { 0%,100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-14px) rotate(-2deg); } }
.float-card .fc-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: .55rem; }
.float-card .bar { height: 7px; border-radius: 4px; background: rgba(255,255,255,.35); }
.float-card .chip { font-size: .62rem; padding: 2px 8px; border-radius: 6px; background: #18c08a; font-weight: 700; }
.float-card .amt { font-size: 1.35rem; font-weight: 800; }
.auth-stats { display: flex; gap: 2rem; position: relative; z-index: 2; }
.auth-stats .s b { font-size: 1.3rem; font-weight: 800; display: block; }
.auth-stats .s span { opacity: .75; font-size: .8rem; }
.auth-foot { position: relative; z-index: 2; opacity: .8; font-size: .82rem; }
.auth-foot a { color: #fff; text-decoration: underline; }
.auth-main { flex: 1 1 48%; display: grid; place-items: center; padding: 2rem 1.5rem; }
.auth-form-wrap { width: 100%; max-width: 400px; animation: rise .55s .1s both; }
.auth-mobile-brand { display: none; align-items: center; gap: .6rem; justify-content: center; margin-bottom: 1.6rem; font-weight: 700; font-size: 1.2rem; }
.auth-mobile-brand .logo-dot { width: 40px; height: 40px; border-radius: 11px; background: var(--accent); color: #fff; display: grid; place-items: center; }
.auth-mobile-brand img { height: 40px; }
.auth-card-clean { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow-lg); padding: 2.2rem; }
.auth-bg { display: grid; place-items: center; min-height: 100vh; }

/* password show/hide toggle + caps-lock hint + trust bar (shared by all logins) */
.pw-wrap { position: relative; }
.pw-wrap > input { padding-right: 2.6rem; }
.pw-toggle { position: absolute; top: 50%; right: .5rem; transform: translateY(-50%); border: 0; background: none; color: var(--text-muted); padding: .3rem .4rem; cursor: pointer; line-height: 1; border-radius: 7px; }
.pw-toggle:hover { color: var(--accent); background: var(--accent-soft); }
.pw-caps { display: none; margin-top: .4rem; font-size: .76rem; color: #b25f00; align-items: center; gap: .35rem; }
.pw-caps.show { display: flex; }
.auth-trust { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.1rem; margin-top: 1.3rem; font-size: .74rem; color: var(--text-muted); }
.auth-trust span { display: inline-flex; align-items: center; gap: .35rem; }
.auth-trust i { color: var(--green); }

@media (max-width: 900px) { .auth-aside { display: none; } .auth-mobile-brand { display: flex; } }

/* ===================== Storefront product grid ===================== */
.product-card { overflow: hidden; transition: transform .18s ease, box-shadow .18s ease; }
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.pcard-img { width: 100%; height: 160px; object-fit: cover; border-radius: var(--radius) var(--radius) 0 0; }
.pcard-noimg { display: grid; place-items: center; background: var(--surface-2); color: var(--text-muted); font-size: 2rem; }
.product-col { animation: fadeUp .4s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
.filter-bar { position: sticky; top: var(--topbar-h); z-index: 10; }
.inf-loader { display: none; text-align: center; padding: 1.5rem; color: var(--text-muted); }
.inf-loader.show { display: block; }
.inf-spin { width: 1.6rem; height: 1.6rem; border: 3px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; }
.pskel { height: 218px; border-radius: var(--radius); background: linear-gradient(100deg, var(--surface-2) 30%, var(--border) 50%, var(--surface-2) 70%); background-size: 200% 100%; animation: sh 1.2s infinite; }
@keyframes sh { to { background-position: -200% 0; } }

/* ===================== Public marketing site ===================== */
.mk { --mk-accent: #2563eb; --mk-accent2: #f97316; --mk-accent3: #16a34a; color: #1f2430; }
.mk-nav { position: sticky; top: 0; z-index: 1000; background: rgba(255,255,255,.92); backdrop-filter: blur(10px); border-bottom: 1px solid #eef1f7; }
.mk-nav .brand { font-weight: 800; font-size: 1.25rem; letter-spacing: -.3px; color: #111a3a; display: flex; align-items: center; gap: .5rem; }
.mk-nav .brand .dot { width: 34px; height: 34px; border-radius: 9px; background: linear-gradient(135deg,#2563eb,#16a34a); color:#fff; display: grid; place-items: center; }
.mk-nav a.nav-link { color: #4a5163; font-weight: 500; }
.mk-nav a.nav-link:hover { color: var(--mk-accent); }
.mk-btn { background: var(--mk-accent); color: #fff; border: 0; border-radius: 10px; padding: .6rem 1.2rem; font-weight: 600; transition: .15s; display:inline-block; }
.mk-btn:hover { background: #1d4ed8; color: #fff; transform: translateY(-1px); }
.mk-btn-ghost { background: transparent; border: 1.5px solid #d8deea; color: #1f2430; border-radius: 10px; padding: .6rem 1.2rem; font-weight: 600; }
.mk-btn-ghost:hover { border-color: var(--mk-accent); color: var(--mk-accent); }

.mk-hero { position: relative; overflow: hidden; background:
    radial-gradient(1100px 500px at 90% -10%, rgba(37,99,235,.12), transparent 60%),
    radial-gradient(900px 500px at -10% 20%, rgba(22,163,74,.10), transparent 55%), #fff; padding: 5rem 0 4rem; }
.mk-hero h1 { font-size: 3.2rem; font-weight: 800; line-height: 1.08; letter-spacing: -1px; color: #0f1730; }
.mk-hero h1 .grad { background: linear-gradient(90deg,#2563eb,#16a34a); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.mk-hero p.lead { font-size: 1.18rem; color: #5b6273; max-width: 34rem; }
.mk-badge { display:inline-block; background: #eaf1ff; color: var(--mk-accent); font-weight: 600; font-size: .8rem; padding: .35rem .8rem; border-radius: 30px; margin-bottom: 1rem; }
.mk-hero-card { background: #fff; border: 1px solid #eef1f7; border-radius: 18px; box-shadow: 0 30px 60px rgba(16,24,40,.12); padding: 1.2rem; animation: mkfloat 6s ease-in-out infinite; }
@keyframes mkfloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
.mk-hero-card .bar { height: 9px; border-radius: 5px; background: #eef1f7; }
.mk-hero-card .chip { font-size:.65rem; font-weight:700; padding:3px 9px; border-radius:6px; }

.mk-stats { background: #0f1730; color: #fff; padding: 2.2rem 0; }
.mk-stats b { font-size: 1.9rem; font-weight: 800; display:block; }
.mk-stats span { opacity: .7; font-size: .85rem; }

.mk-section { padding: 4.5rem 0; }
.mk-section h2 { font-size: 2.2rem; font-weight: 800; letter-spacing: -.5px; color: #0f1730; }
.mk-section .sub { color: #6b7280; font-size: 1.05rem; max-width: 40rem; margin: 0 auto; }
.mk-feat { background: #fff; border: 1px solid #eef1f7; border-radius: 16px; padding: 1.6rem; height: 100%; transition: .18s; }
.mk-feat:hover { transform: translateY(-5px); box-shadow: 0 18px 40px rgba(16,24,40,.10); border-color: #dfe7f5; }
.mk-feat .ic { width: 52px; height: 52px; border-radius: 13px; display: grid; place-items: center; font-size: 1.4rem; margin-bottom: 1rem; }
.mk-feat h5 { font-weight: 700; }
.mk-feat p { color: #6b7280; font-size: .92rem; margin: 0; }
.ic-blue { background: rgba(37,99,235,.12); color: #2563eb; }
.ic-orange { background: rgba(249,115,22,.12); color: #f97316; }
.ic-green { background: rgba(22,163,74,.12); color: #16a34a; }

.mk-step { text-align:center; }
.mk-step .n { width: 54px; height: 54px; border-radius: 50%; background: linear-gradient(135deg,#2563eb,#16a34a); color:#fff; font-weight:800; font-size:1.3rem; display:grid; place-items:center; margin: 0 auto 1rem; }

.mk-price { border: 1px solid #eef1f7; border-radius: 18px; padding: 2rem; background:#fff; height:100%; transition:.18s; }
.mk-price.pop { border: 2px solid var(--mk-accent); box-shadow: 0 20px 50px rgba(37,99,235,.18); position: relative; }
.mk-price.pop::before { content:"Popular"; position:absolute; top:-12px; left:50%; transform:translateX(-50%); background:var(--mk-accent); color:#fff; font-size:.72rem; font-weight:700; padding:3px 12px; border-radius:20px; }
.mk-price .amt { font-size: 2.4rem; font-weight: 800; color:#0f1730; }
.mk-price ul { list-style:none; padding:0; margin:1.2rem 0; }
.mk-price li { padding:.4rem 0; color:#4a5163; } .mk-price li i { color: var(--mk-accent3); margin-right:.5rem; }

.mk-cta { background: linear-gradient(135deg,#2563eb,#111a3a); color:#fff; border-radius: 22px; padding: 3rem; }
.mk-contact-card { background:#fff; border:1px solid #eef1f7; border-radius:18px; box-shadow: 0 20px 50px rgba(16,24,40,.08); }
.mk-footer { background:#0f1730; color:#aab2c5; padding: 3rem 0 2rem; }
.mk-footer a { color:#cdd5e6; text-decoration:none; } .mk-footer a:hover { color:#fff; }
.mk-reveal { opacity:0; transform: translateY(24px); transition: .6s ease; }
.mk-reveal.in { opacity:1; transform:none; }
@media (max-width: 768px){ .mk-hero h1 { font-size: 2.3rem; } .mk-section { padding: 3rem 0; } }

/* ============================================================
   Professional polish layer — depth, motion, focus rhythm.
   Additive only; refines the existing shell without restructuring.
   ============================================================ */
/* Smoother, consistent interaction transitions */
.btn, .nav-link, .icon-btn, .card, .kpi, .form-control, .form-select, .badge-status { transition: background-color .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease, transform .16s ease; }

/* Buttons get a little depth + press feedback */
.btn-accent, .btn-orange, .btn-green { box-shadow: 0 2px 6px rgba(var(--accent-rgb), .25); }
.btn-accent:hover, .btn-orange:hover, .btn-green:hover { box-shadow: 0 6px 16px rgba(var(--accent-rgb), .32); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn { font-weight: 600; border-radius: var(--radius-sm); }

/* Sidebar active item: gradient + accent rail instead of flat fill */
.sidebar-nav .nav-link { position: relative; }
.sidebar-nav .nav-link.active {
    background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 78%, #000));
    box-shadow: 0 6px 16px rgba(var(--accent-rgb), .30);
}
.sidebar-nav .nav-link.active::before {
    content: ""; position: absolute; left: -.65rem; top: 18%; bottom: 18%;
    width: 3px; border-radius: 0 4px 4px 0; background: var(--accent);
}
.sidebar-nav .nav-link:not(.active):hover { transform: translateX(2px); }

/* Topbar: frosted + reveals a shadow once you scroll */
.topbar { backdrop-filter: saturate(1.4) blur(8px); background: color-mix(in srgb, var(--surface) 88%, transparent); box-shadow: 0 1px 0 var(--border); }

/* Cards lift subtly on hover when interactive (kpi + product already handled) */
.kpi { border-radius: var(--radius); }
.card.card-hover:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

/* Page header gets a refined sub-rule */
.page-head h1 { letter-spacing: -.3px; }

/* Status badges: pill shape + tiny dot for scannability */
.badge-status { display: inline-flex; align-items: center; gap: .4em; border-radius: 999px; padding: .32em .7em; }
.badge-status::before { content: ""; width: .5em; height: .5em; border-radius: 50%; background: currentColor; opacity: .85; }

/* DataTables search + length controls aligned to the design system */
.dataTables_wrapper .dataTables_filter input, .dataTables_wrapper .dataTables_length select {
    border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); padding: .35rem .6rem;
}
.dataTables_wrapper .dataTables_filter input:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 .2rem var(--accent-soft); }
.dataTables_wrapper .dataTables_info { color: var(--text-muted); font-size: .82rem; }

/* Select2 single control height matches Bootstrap inputs */
.select2-container--bootstrap-5 .select2-selection { border-color: var(--border); border-radius: var(--radius-sm); }

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
