/* =========================================================================
   FluxAmmo — Blesta client template design layer
   Lagom-inspired: left icon-rail, electric blue + gradients, Roboto. Light only.
   Hand-authored over Bootstrap 4.6; loaded after application.min.css + theme.css.
   Sections: 0 Fonts · 1 Tokens · 2 Base · 3 Shell/Rail · 4 Topbar · 5 Title ·
   6 Cards · 7 Tables · 8 Buttons · 9 Forms · 10 Secondary/List · 11 Dropdowns ·
   12 Badges/Alerts · 13 Pagination · 14 Stat cards · 15 Login · 16 Footer ·
   17 Modal/Loading · 18 Responsive
   ========================================================================= */

/* 0 ---- Fonts ---------------------------------------------------------- */
@font-face { font-family:"Roboto"; font-style:normal; font-weight:400; font-display:swap; src:url("../webfonts/Roboto-400.woff2") format("woff2"); }
@font-face { font-family:"Roboto"; font-style:normal; font-weight:500; font-display:swap; src:url("../webfonts/Roboto-500.woff2") format("woff2"); }
@font-face { font-family:"Roboto"; font-style:normal; font-weight:700; font-display:swap; src:url("../webfonts/Roboto-700.woff2") format("woff2"); }
@font-face { font-family:"Roboto"; font-style:normal; font-weight:900; font-display:swap; src:url("../webfonts/Roboto-900.woff2") format("woff2"); }

/* 1 ---- Tokens -------------------------------------------------------- */
:root {
    --flux-primary:#065CFE; --flux-primary-dark:#003CB2; --flux-primary-light:#25A9FF;
    --flux-primary-soft:#E5EFFF; --flux-primary-soft-2:#F0F5FF;
    --flux-grad:linear-gradient(90deg,#003CB2 0%,#065CFE 100%);
    --flux-grad-v:linear-gradient(180deg,#065CFE 0%,#003CB2 100%);
    --flux-success:#1E7B32; --flux-success-soft:#E8F7EC;
    --flux-warning:#B84B00; --flux-warning-soft:#FFF3E5;
    --flux-danger:#CA202C;  --flux-danger-soft:#FCEEEF;
    --flux-info:#0158FE;    --flux-info-soft:#E5EEFF;
    --flux-text:#17191C; --flux-text-2:#4B4F58; --flux-text-muted:#6D7482;
    --flux-app-bg:#F3F5F7; --flux-surface:#FFFFFF; --flux-surface-2:#F7F7F8; --flux-border:#DEE0E3;
    --flux-font:"Roboto",-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;
    --flux-r-sm:8px; --flux-r:12px; --flux-r-lg:16px; --flux-pill:999px;
    --flux-rail-w:116px;
    --flux-shadow-sm:0 1px 2px rgba(23,25,28,.06),0 1px 3px rgba(23,25,28,.05);
    --flux-shadow-md:0 6px 18px -8px rgba(23,25,28,.15),0 2px 6px -3px rgba(23,25,28,.08);
    --flux-shadow-lg:0 24px 48px -16px rgba(23,25,28,.22),0 8px 16px -10px rgba(23,25,28,.12);
    --flux-ease:cubic-bezier(0.16,1,0.3,1);
}

/* 2 ---- Base --------------------------------------------------------- */
body.flux {
    font-family:var(--flux-font);
    background:var(--flux-app-bg);
    color:var(--flux-text-2);
    font-size:.9375rem;
    line-height:1.55;
    -webkit-font-smoothing:antialiased;
}
body.flux a { color:var(--flux-primary); }
body.flux a:hover { color:var(--flux-primary-dark); }
body.flux h1,body.flux h2,body.flux h3,body.flux h4,body.flux h5 { color:var(--flux-text); font-weight:700; letter-spacing:-.01em; }
body.flux ::selection { background:var(--flux-primary-soft-2); }
body.flux *:focus-visible { outline:none; box-shadow:0 0 0 3px rgba(6,92,254,.3); border-radius:var(--flux-r-sm); }
body.flux ::-webkit-scrollbar { width:10px; height:10px; }
body.flux ::-webkit-scrollbar-thumb { background:#cfd3d8; border-radius:var(--flux-pill); border:2px solid var(--flux-app-bg); }

/* 3 ---- App shell / left icon-rail ----------------------------------- */
.flux-shell { min-height:100vh; }
.flux-rail {
    position:fixed; top:0; left:0; bottom:0; width:var(--flux-rail-w);
    background:var(--flux-surface); border-right:1px solid var(--flux-border);
    display:flex; flex-direction:column; z-index:1040;
    transition:transform .25s var(--flux-ease);
}
.flux-rail-brand { padding:16px 8px; text-align:center; border-bottom:1px solid var(--flux-border); }
/* Logos are often wide wordmarks; fit to rail width at the correct aspect ratio.
   height:auto !important overrides Blesta's inline client_logo_height. */
.flux-rail-brand img { width:auto; height:auto !important; max-width:100%; max-height:44px; display:inline-block; }
/* overflow must stay visible so hover flyouts are not clipped (overflow-y:auto would force x to clip). */
.flux-rail-nav { flex:1 1 auto; overflow:visible; padding:12px 8px; display:flex; flex-direction:column; gap:5px; }
.flux-rail-group { position:relative; }
.flux-rail-item {
    display:flex; flex-direction:column; align-items:center; gap:7px;
    padding:13px 6px; border-radius:var(--flux-r); text-decoration:none;
    color:var(--flux-text-muted); font-size:.74rem; font-weight:600; text-align:center;
    line-height:1.2; transition:background .15s var(--flux-ease),color .15s var(--flux-ease);
}
.flux-rail-item i { font-size:1.42rem; line-height:1; }
.flux-rail-item .flux-rail-label { display:block; word-break:break-word; }
.flux-rail-item:hover { background:var(--flux-surface-2); color:var(--flux-primary); }
.flux-rail-item.active { background:var(--flux-primary-soft); color:var(--flux-primary); }
.flux-rail-item.active i { color:var(--flux-primary); }
/* flyout for items with sub-nav */
.flux-flyout {
    position:absolute; top:0; left:calc(100% + 6px); min-width:200px;
    background:var(--flux-surface); border:1px solid var(--flux-border); border-radius:var(--flux-r);
    box-shadow:var(--flux-shadow-md); padding:6px; z-index:1060;
    opacity:0; visibility:hidden; transform:translateX(-6px);
    transition:opacity .15s var(--flux-ease),transform .15s var(--flux-ease),visibility .15s;
}
.flux-rail-group:hover .flux-flyout,.flux-rail-group:focus-within .flux-flyout { opacity:1; visibility:visible; transform:translateX(0); }
.flux-flyout-head { font-size:.7rem; font-weight:700; text-transform:uppercase; letter-spacing:.06em; color:var(--flux-text-muted); padding:6px 10px 4px; }
.flux-flyout-item { display:block; padding:7px 10px; border-radius:var(--flux-r-sm); color:var(--flux-text-2); text-decoration:none; font-size:.85rem; }
.flux-flyout-item:hover { background:var(--flux-primary-soft); color:var(--flux-primary); }
.flux-flyout-item.active { background:var(--flux-primary-soft); color:var(--flux-primary); font-weight:600; }
.flux-rail-backdrop { display:none; position:fixed; inset:0; background:rgba(23,25,28,.4); z-index:1035; }

.flux-body { margin-left:var(--flux-rail-w); min-height:100vh; display:flex; flex-direction:column; }

/* 4 ---- Top bar ------------------------------------------------------ */
.flux-topbar {
    position:sticky; top:0; z-index:1030;
    display:flex; align-items:center; gap:10px;
    height:60px; padding:0 24px;
    background:rgba(255,255,255,.9); backdrop-filter:saturate(1.2) blur(6px);
    border-bottom:1px solid var(--flux-border);
}
.flux-topbar-spacer { flex:1 1 auto; }
.flux-topbar-right { display:flex; align-items:center; gap:8px; }
.flux-topbar-item .dropdown-toggle,.flux-topbar-link,.flux-user-link {
    display:inline-flex; align-items:center; gap:7px;
    padding:7px 12px; border-radius:var(--flux-pill);
    color:var(--flux-text-2); text-decoration:none; font-weight:500; font-size:.875rem;
    background:transparent; border:1px solid transparent;
}
.flux-topbar-item .dropdown-toggle:hover,.flux-user-link:hover { background:var(--flux-surface-2); border-color:var(--flux-border); color:var(--flux-text); }
.flux-user-avatar {
    width:30px; height:30px; border-radius:var(--flux-pill);
    background:var(--flux-grad); color:#fff; font-weight:700; font-size:.8rem;
    display:inline-flex; align-items:center; justify-content:center;
}
.flux-staff-badge a { color:#fff; }
.flux-rail-toggle {
    width:40px; height:40px; border:1px solid var(--flux-border); background:var(--flux-surface);
    border-radius:var(--flux-r-sm); color:var(--flux-text-2); cursor:pointer;
}

/* 5 ---- Page title --------------------------------------------------- */
.flux-main { flex:1 1 auto; }
.flux-main .title { background:transparent; }
.flux-main .title h3 {
    margin:0; padding:28px 0 6px; font-size:2.1rem; font-weight:900;
    letter-spacing:-.03em; color:var(--flux-text);
}
.flux-main > .container-md { padding-bottom:30px; }

/* 6 ---- Cards -------------------------------------------------------- */
body.flux .card,body.flux .card-blesta,body.flux .panel,body.flux .panel-blesta {
    background:var(--flux-surface); border:1px solid var(--flux-border);
    border-radius:var(--flux-r); box-shadow:var(--flux-shadow-sm); margin-bottom:20px;
}
body.flux .card .card-header,body.flux .card-blesta > .card-header,body.flux .panel-heading {
    background:var(--flux-surface); border-bottom:1px solid var(--flux-border);
    padding:14px 18px; font-weight:700; font-size:.95rem; color:var(--flux-text); border-radius:var(--flux-r) var(--flux-r) 0 0;
}
body.flux .card .card-body,body.flux .panel-body { padding:18px; }
body.flux .card .card-footer,body.flux .panel-footer { background:var(--flux-surface-2); border-top:1px solid var(--flux-border); padding:12px 18px; }

/* 7 ---- Tables ------------------------------------------------------- */
body.flux .table { color:var(--flux-text-2); margin-bottom:0; }
body.flux .table thead th {
    background:var(--flux-surface-2); border-bottom:1px solid var(--flux-border); border-top:0;
    text-transform:uppercase; font-size:.7rem; letter-spacing:.06em; font-weight:700; color:var(--flux-text-muted);
    padding:12px 14px;
}
body.flux .table td { padding:12px 14px; border-top:1px solid var(--flux-border); vertical-align:middle; }
body.flux .table tbody tr:hover { background:var(--flux-primary-soft-2); }
body.flux .table-striped tbody tr:nth-of-type(odd) { background:var(--flux-surface-2); }
body.flux .card .table:first-child thead th:first-child { border-top-left-radius:var(--flux-r); }
body.flux .card .table:first-child thead th:last-child { border-top-right-radius:var(--flux-r); }

/* 8 ---- Buttons ------------------------------------------------------ */
body.flux .btn {
    border-radius:var(--flux-r-sm); font-weight:700; font-size:.875rem;
    padding:.5rem 1rem; transition:all .15s var(--flux-ease); border:1px solid transparent;
}
body.flux .btn-sm { padding:.35rem .7rem; font-size:.8rem; }
body.flux .btn:active { transform:translateY(1px); }
body.flux .btn-primary { background:var(--flux-grad); border:none; color:#fff; box-shadow:0 1px 2px rgba(6,92,254,.25); }
body.flux .btn-primary:hover,body.flux .btn-primary:focus { background:var(--flux-primary-dark); color:#fff; box-shadow:var(--flux-shadow-md); }
body.flux .btn-success { background:var(--flux-success); border-color:var(--flux-success); color:#fff; }
body.flux .btn-success:hover { background:#19672A; border-color:#19672A; color:#fff; }
body.flux .btn-info { background:var(--flux-info); border-color:var(--flux-info); color:#fff; }
body.flux .btn-danger { background:var(--flux-danger); border-color:var(--flux-danger); color:#fff; }
body.flux .btn-warning { background:var(--flux-warning); border-color:var(--flux-warning); color:#fff; }
body.flux .btn-secondary { background:var(--flux-text-2); border-color:var(--flux-text-2); color:#fff; }
body.flux .btn-light { background:var(--flux-surface); border:1px solid var(--flux-border); color:var(--flux-text-2); }
body.flux .btn-light:hover { background:var(--flux-surface-2); color:var(--flux-text); }
body.flux .btn-outline-primary { border:1px solid var(--flux-primary); color:var(--flux-primary); background:transparent; }
body.flux .btn-outline-primary:hover { background:var(--flux-primary); color:#fff; }
body.flux .btn-link { color:var(--flux-primary); font-weight:600; }

/* 9 ---- Forms -------------------------------------------------------- */
body.flux label { font-weight:600; font-size:.82rem; color:var(--flux-text-2); margin-bottom:.35rem; }
body.flux .form-control {
    border:1px solid var(--flux-border); border-radius:var(--flux-r-sm);
    background:var(--flux-surface); color:var(--flux-text); font-size:.9rem; padding:.55rem .8rem; height:auto;
}
body.flux .form-control:hover { border-color:var(--flux-text-muted); }
body.flux .form-control:focus { border-color:var(--flux-primary); box-shadow:0 0 0 3px rgba(6,92,254,.18); }
body.flux .custom-select { border-radius:var(--flux-r-sm); border-color:var(--flux-border); }
body.flux .input-group-text { background:var(--flux-surface-2); border-color:var(--flux-border); border-radius:var(--flux-r-sm); }
body.flux .checkbox input,body.flux input[type=checkbox],body.flux input[type=radio] { accent-color:var(--flux-primary); }

/* 10 ---- Secondary nav / list groups (Lagom "Actions" panel) --------- */
body.flux .list-group { border-radius:var(--flux-r); }
body.flux .flux-actions,body.flux .list-group { background:transparent; }
body.flux .list-group-item {
    border:1px solid var(--flux-border); color:var(--flux-text-2); font-weight:500; font-size:.9rem; padding:11px 14px;
}
body.flux .list-group-item + .list-group-item { border-top:0; }
body.flux .list-group-item:first-child { border-radius:var(--flux-r) var(--flux-r) 0 0; }
body.flux .list-group-item:last-child { border-radius:0 0 var(--flux-r) var(--flux-r); }
body.flux .list-group-item.active { background:var(--flux-primary-soft); color:var(--flux-primary); border-color:var(--flux-border); font-weight:700; }
body.flux .list-group-item-action:hover { background:var(--flux-surface-2); color:var(--flux-primary); }
body.flux .list-group-item i { color:var(--flux-text-muted); }
body.flux .list-group-item.active i { color:var(--flux-primary); }

/* 11 ---- Dropdowns --------------------------------------------------- */
body.flux .dropdown-menu { border:1px solid var(--flux-border); border-radius:var(--flux-r); box-shadow:var(--flux-shadow-md); padding:6px; }
body.flux .dropdown-item { border-radius:var(--flux-r-sm); padding:8px 12px; color:var(--flux-text-2); font-size:.88rem; }
body.flux .dropdown-item:hover { background:var(--flux-primary-soft); color:var(--flux-primary); }
body.flux .dropdown-divider { margin:6px 4px; border-color:var(--flux-border); }

/* 12 ---- Badges / alerts -------------------------------------------- */
body.flux .badge { border-radius:var(--flux-pill); font-weight:700; font-size:.72rem; padding:.35em .7em; }
body.flux .badge-success { background:var(--flux-success-soft); color:var(--flux-success); }
body.flux .badge-danger { background:var(--flux-danger-soft); color:var(--flux-danger); }
body.flux .badge-warning { background:var(--flux-warning-soft); color:var(--flux-warning); }
body.flux .badge-info { background:var(--flux-info-soft); color:var(--flux-info); }
body.flux .badge-primary { background:var(--flux-primary-soft); color:var(--flux-primary); }
body.flux .badge-secondary { background:var(--flux-surface-2); color:var(--flux-text-2); }
body.flux .alert { border-radius:var(--flux-r); border:1px solid transparent; padding:14px 16px; }
body.flux .alert-success { background:var(--flux-success-soft); border-color:#cdebd4; color:var(--flux-success); }
body.flux .alert-danger,body.flux .alert-error { background:var(--flux-danger-soft); border-color:#f3d2d4; color:var(--flux-danger); }
body.flux .alert-warning { background:var(--flux-warning-soft); border-color:#ffe2c2; color:var(--flux-warning); }
body.flux .alert-info { background:var(--flux-info-soft); border-color:#cfe0ff; color:var(--flux-info); }

/* 13 ---- Pagination ------------------------------------------------- */
body.flux .pagination { gap:4px; }
body.flux .page-link { border-radius:var(--flux-r-sm); border:1px solid var(--flux-border); color:var(--flux-text-2); margin:0; }
body.flux .page-link:hover { background:var(--flux-primary-soft); color:var(--flux-primary); }
body.flux .page-item.active .page-link { background:var(--flux-primary); border-color:var(--flux-primary); color:#fff; }

/* 14 ---- Stat / summary cards (gradient) ---------------------------- */
body.flux .flux-stat {
    background:var(--flux-grad-v); color:#fff; border:none; border-radius:var(--flux-r);
    box-shadow:var(--flux-shadow-md); padding:20px;
}
body.flux .flux-stat .flux-stat-label { text-transform:uppercase; font-size:.72rem; letter-spacing:.07em; opacity:.85; }
body.flux .flux-stat .flux-stat-value { font-size:1.9rem; font-weight:900; letter-spacing:-.02em; line-height:1.1; }
body.flux .flux-stat .btn-light { background:rgba(255,255,255,.18); border-color:rgba(255,255,255,.3); color:#fff; }
body.flux .flux-stat .btn-light:hover { background:rgba(255,255,255,.28); color:#fff; }
/* Dashboard cards that come in via AJAX keep the standard card styling above */
body.flux .row.cards .card { transition:transform .15s var(--flux-ease),box-shadow .15s var(--flux-ease); min-height:92px; }
body.flux .row.cards .card:hover { transform:translateY(-2px); box-shadow:var(--flux-shadow-md); }
/* stock rules `.cards .card` (system font) and `.cards .card .card-content .card-value` (45px) need chain-matching */
body.flux .cards .card,body.flux .panel .panel-heading .panel-title { font-family:var(--flux-font); }
body.flux .cards .card .card-content { padding-left:8px; padding-right:8px; }
body.flux .cards .card .card-content .card-value { white-space:nowrap; font-weight:900; letter-spacing:-.02em; line-height:1.15; color:var(--flux-text); font-size:clamp(1.05rem, 0.7rem + 1.6vw, 1.55rem); }
body.flux .cards .card .card-content .card-label { text-transform:uppercase; font-size:.7rem; letter-spacing:.06em; color:var(--flux-text-muted); font-weight:600; }

/* 15 ---- Login ------------------------------------------------------ */
body.flux.flux-login-page { background:var(--flux-app-bg); }
.flux-plain { padding:7vh 0 4vh; }
.flux-login { text-align:center; }
.flux-login-glyph {
    display:inline-flex; align-items:center; justify-content:center; width:56px; height:56px;
    border-radius:var(--flux-r-lg); background:var(--flux-grad); color:#fff; font-size:1.4rem; margin-bottom:14px;
    box-shadow:var(--flux-shadow-md);
}
.flux-login-title { font-size:1.7rem; font-weight:900; letter-spacing:-.03em; margin:0 0 4px; }
.flux-login-sub { color:var(--flux-text-muted); margin-bottom:20px; }
.flux-login-card { text-align:left; box-shadow:var(--flux-shadow-lg); }
.flux-login-card .card-footer,.flux-login-card .panel-footer { font-size:.85rem; }

/* 16 ---- Footer ----------------------------------------------------- */
body.flux .footer { color:var(--flux-text-muted); font-size:.8rem; }
body.flux .footer hr { border-color:var(--flux-border); }
body.flux .footer a { color:var(--flux-text-2); }
body.flux .footer a:hover { color:var(--flux-primary); }

/* 17 ---- Modal / loading ------------------------------------------- */
body.flux .modal-content { border:none; border-radius:var(--flux-r-lg); box-shadow:var(--flux-shadow-lg); }
body.flux .modal-header { border-bottom:1px solid var(--flux-border); padding:16px 20px; }
body.flux .modal-footer { border-top:1px solid var(--flux-border); }

/* 18 ---- Responsive ------------------------------------------------- */
@media (max-width:767.98px) {
    .flux-rail { transform:translateX(-100%); width:220px; box-shadow:var(--flux-shadow-lg); }
    .flux-rail .flux-rail-item { flex-direction:row; justify-content:flex-start; gap:12px; text-align:left; font-size:.9rem; padding:12px 14px; }
    .flux-rail .flux-rail-item i { font-size:1rem; width:22px; text-align:center; }
    .flux-flyout { position:static; opacity:1; visibility:visible; transform:none; box-shadow:none; border:none; padding:0 0 0 34px; }
    body.flux-rail-open .flux-rail { transform:translateX(0); }
    body.flux-rail-open .flux-rail-backdrop { display:block; }
    .flux-body { margin-left:0; }
    .flux-main .title h3 { font-size:1.6rem; }
    .flux-topbar { padding:0 16px; }
}

/* =========================================================================
   PHASE D — theme reclaim · tables/tabs polish · order plugin · portal
   ========================================================================= */

/* 19 ---- Theme reclaim ------------------------------------------------
   The server theme.css (admin colour settings) marks button, badge, helper,
   list-group and table-hover colours !important. To keep the FluxAmmo identity
   regardless of the selected admin theme, we match with !important here;
   our body.flux prefix outranks every theme.css selector on specificity.   */
body.flux .btn-primary,body.flux .btn-primary:disabled,body.flux .btn-primary.disabled {
    color:#fff !important; background-color:var(--flux-primary) !important;
    background-image:var(--flux-grad) !important; border-color:transparent !important;
}
body.flux .btn-primary:hover,body.flux .btn-primary:focus,body.flux .btn-primary:active {
    color:#fff !important; background-image:none !important;
    background-color:var(--flux-primary-dark) !important; border-color:transparent !important;
}
body.flux .btn-primary:disabled,body.flux .btn-primary.disabled { opacity:.55; }

body.flux .btn-success { color:#fff !important; background-color:var(--flux-success) !important; border-color:var(--flux-success) !important; }
body.flux .btn-success:hover { background-color:#19672A !important; border-color:#19672A !important; color:#fff !important; }
body.flux .btn-info { color:#fff !important; background-color:var(--flux-info) !important; border-color:var(--flux-info) !important; }
body.flux .btn-info:hover { background-color:var(--flux-primary-dark) !important; border-color:var(--flux-primary-dark) !important; color:#fff !important; }
body.flux .btn-warning { color:#fff !important; background-color:var(--flux-warning) !important; border-color:var(--flux-warning) !important; }
body.flux .btn-warning:hover { background-color:#963c00 !important; border-color:#963c00 !important; color:#fff !important; }
body.flux .btn-danger { color:#fff !important; background-color:var(--flux-danger) !important; border-color:var(--flux-danger) !important; }
body.flux .btn-danger:hover { background-color:#a31a24 !important; border-color:#a31a24 !important; color:#fff !important; }
body.flux .btn-secondary { color:#fff !important; background-color:var(--flux-text-2) !important; border-color:var(--flux-text-2) !important; }
body.flux .btn-secondary:hover { background-color:var(--flux-text) !important; border-color:var(--flux-text) !important; color:#fff !important; }
body.flux .btn-light { color:var(--flux-text-2) !important; background-color:var(--flux-surface) !important; border-color:var(--flux-border) !important; }
body.flux .btn-light:hover { color:var(--flux-primary) !important; background-color:var(--flux-primary-soft-2) !important; border-color:var(--flux-primary-light) !important; }
body.flux .btn-outline-primary { color:var(--flux-primary) !important; border-color:var(--flux-primary) !important; background:transparent !important; }
body.flux .btn-outline-primary:hover { color:#fff !important; background:var(--flux-primary) !important; }

/* soft status pills (replaces the solid theme.css badge fills) */
body.flux .badge-primary { color:var(--flux-primary) !important; background-color:var(--flux-primary-soft) !important; }
body.flux .badge-secondary { color:var(--flux-text-2) !important; background-color:var(--flux-app-bg) !important; }
body.flux .badge-success { color:var(--flux-success) !important; background-color:var(--flux-success-soft) !important; }
body.flux .badge-info { color:var(--flux-info) !important; background-color:var(--flux-info-soft) !important; }
body.flux .badge-warning { color:var(--flux-warning) !important; background-color:var(--flux-warning-soft) !important; }
body.flux .badge-danger { color:var(--flux-danger) !important; background-color:var(--flux-danger-soft) !important; }
body.flux .badge-light { color:var(--flux-text-2) !important; background-color:var(--flux-surface-2) !important; }
body.flux .flux-staff-badge { background-color:var(--flux-primary) !important; color:#fff !important; }
body.flux .flux-staff-badge a { color:#fff !important; }

/* colour helpers */
body.flux .text-primary { color:var(--flux-primary) !important; }
body.flux .text-success { color:var(--flux-success) !important; }
body.flux .text-info { color:var(--flux-info) !important; }
body.flux .text-warning { color:var(--flux-warning) !important; }
body.flux .text-danger { color:var(--flux-danger) !important; }
body.flux .text-secondary,body.flux .text-muted { color:var(--flux-text-muted) !important; }
body.flux .bg-primary { background-color:var(--flux-primary) !important; }
body.flux .bg-success { background-color:var(--flux-success) !important; }
body.flux .bg-info { background-color:var(--flux-info) !important; }
body.flux .bg-warning { background-color:var(--flux-warning) !important; }
body.flux .bg-danger { background-color:var(--flux-danger) !important; }
body.flux .bg-light,body.flux .bg-white { background-color:var(--flux-surface) !important; }
body.flux .border-primary { border-color:var(--flux-primary) !important; }

/* list-group highlight + headings */
body.flux a.list-group-item:hover,body.flux a.list-group-item:focus,
body.flux .list-group.list-options a.list-group-item:hover { background-color:var(--flux-surface-2) !important; }
body.flux a.list-group-item.active,body.flux a.list-group-item.active:hover,body.flux a.list-group-item.active:focus { background-color:var(--flux-primary-soft) !important; color:var(--flux-primary) !important; }
body.flux .list-group-item h4 { color:var(--flux-text) !important; }
body.flux .list-group-item.credits { color:var(--flux-primary) !important; }
body.flux .top-focus-box { background-color:var(--flux-primary-soft-2) !important; border:1px solid var(--flux-primary-soft); border-radius:var(--flux-r); }

/* 20 ---- Tables & tabs polish ---------------------------------------- */
body.flux .table-curved { border-collapse:separate; border-spacing:0; border-radius:0; margin-bottom:0; }
body.flux .table-curved td,body.flux .table-curved th { border-left:0; border-right:0; border-bottom:0; }
body.flux .table-curved th { border-top:0; border-radius:0; }
body.flux .table-curved td,body.flux .table-curved tbody>tr>td,body.flux .table-curved tbody>tr>td:first-child { border-left:0; border-top:1px solid var(--flux-border); border-radius:0; }
body.flux .table-curved tr:last-child td:first-child,body.flux .table-curved tr:last-child td:last-child,
body.flux .table-curved thead tr:first-child td:first-child,body.flux .table-curved thead tr:first-child td:last-child { border-radius:0; }
body.flux .table-striped>tbody>tr:nth-child(2n+1)>td,body.flux .table-striped-alt>tbody>tr:nth-child(2n+1)>td,
body.flux .table-striped>tbody>tr:nth-child(2n+1)>th,body.flux .table-striped-alt>tbody>tr:nth-child(2n+1)>th { background-color:var(--flux-surface); }
body.flux .table-striped>tbody>tr:nth-child(2n)>td,body.flux .table-striped-alt>tbody>tr:nth-child(2n)>td,
body.flux .table-striped>tbody>tr:nth-child(2n)>th,body.flux .table-striped-alt>tbody>tr:nth-child(2n)>th { background-color:var(--flux-surface-2); }
body.flux .table-hover>tbody>tr:hover>td,body.flux .table-hover>tbody>tr:hover>th { background-color:var(--flux-primary-soft-2) !important; }
body.flux .table th a { color:var(--flux-text-muted); text-decoration:none; }
body.flux .table th a:hover,body.flux .table th a.asc,body.flux .table th a.desc { color:var(--flux-primary); }
body.flux .table tr.expand { cursor:pointer; }
body.flux .table tr.expand_details>td,body.flux .table tr.sub-item>td { background:var(--flux-surface-2) !important; }
body.flux .table-responsive { border-radius:0 0 var(--flux-r) var(--flux-r); }
body.flux .btn.btn-xs { padding:.22rem .55rem; font-size:.75rem; border-radius:6px; }

/* card-links ("Open | Closed") become segmented pills */
body.flux .card-links,body.flux .panel-links { padding:0 0 12px; font-size:.82rem; display:flex; flex-wrap:wrap; gap:6px; }
body.flux .card-links>li,body.flux .panel-links>li { display:inline-block; color:var(--flux-text-2); }
body.flux .card-links>li+li:before,body.flux .panel-links>li+li:before { content:none; padding:0; }
body.flux .card-links>li>a,body.flux .panel-links>li>a { display:inline-block; padding:5px 12px; border-radius:var(--flux-pill); color:var(--flux-text-2); font-weight:600; text-decoration:none; background:var(--flux-surface-2); border:1px solid var(--flux-border); }
body.flux .card-links>li>a:hover,body.flux .panel-links>li>a:hover { color:var(--flux-primary); border-color:var(--flux-primary-light); }
body.flux .card-links>.active>a,body.flux .panel-links>.active>a,body.flux .card-links>li.active>a { background:var(--flux-primary-soft); color:var(--flux-primary); border-color:var(--flux-primary-soft); }
body.flux .card-links .badge,body.flux .panel-links .badge { background-color:var(--flux-primary) !important; color:#fff !important; font-size:.65rem; padding:2px 6px; }

/* bootstrap nav-tabs (service manage tabs etc.) */
body.flux .nav-tabs { border-bottom:1px solid var(--flux-border); }
body.flux .nav-tabs .nav-link { border:0; border-bottom:2px solid transparent; color:var(--flux-text-2); font-weight:600; padding:10px 16px; border-radius:0; }
body.flux .nav-tabs .nav-link:hover { color:var(--flux-primary); }
body.flux .nav-tabs .nav-link.active,body.flux .nav-tabs .nav-item.show .nav-link { color:var(--flux-primary); border-bottom-color:var(--flux-primary); background:transparent; }
body.flux .tab-content { padding-top:16px; }

/* misc polish */
body.flux .help-block,body.flux .form-text { color:var(--flux-text-muted); font-size:.8rem; }
body.flux address { color:var(--flux-text-2); line-height:1.6; }
body.flux .progress { height:8px; border-radius:var(--flux-pill); background:var(--flux-app-bg); }
body.flux .progress-bar { background:var(--flux-grad); }
body.flux .input-group-append .btn { border-radius:0 var(--flux-r-sm) var(--flux-r-sm) 0; }
body.flux hr { border-top-color:var(--flux-border); }
body.flux blockquote { border:1px solid var(--flux-primary-soft); padding:.8rem 1rem; color:var(--flux-text-2); background:var(--flux-primary-soft-2); border-radius:var(--flux-r-sm); }

/* 21 ---- Order plugin coexistence (standard / wizard / ajax) ---------
   order.css hard-codes #fff/#efefef/#999 and (wizard+ajax) .card{background:inherit}.
   The body.flux prefix outranks it despite loading later.                  */
body.flux .card-steps { background:var(--flux-surface); border-radius:var(--flux-r); padding:14px; }
body.flux .card-steps i { opacity:1; color:var(--flux-text-muted); }
body.flux .card-steps p { opacity:1; color:var(--flux-text-2); margin-bottom:0; }
body.flux .card-steps a.active:before { color:var(--flux-primary); }
body.flux .package {
    background:var(--flux-surface); border:1px solid var(--flux-border); border-radius:var(--flux-r);
    box-shadow:var(--flux-shadow-sm); opacity:.8; overflow:hidden; margin:10px 0 18px;
    transition:transform .15s var(--flux-ease),box-shadow .15s var(--flux-ease),opacity .15s;
}
body.flux .package:hover { opacity:1; transform:translateY(-2px); box-shadow:var(--flux-shadow-md); }
body.flux .package.selected { opacity:1; border-color:var(--flux-primary); box-shadow:0 0 0 3px rgba(6,92,254,.14),var(--flux-shadow-md); }
body.flux .package .package-name,body.flux .package-name.card-header { border-radius:0; padding:12px 14px; background:var(--flux-primary-soft-2); color:var(--flux-primary-dark); font-weight:900; border-bottom:1px solid var(--flux-border); }
body.flux .package p { border-bottom:1px dashed var(--flux-border); }
body.flux .package h4 { color:var(--flux-text); font-weight:900; letter-spacing:-.02em; }
body.flux .package .price-box { background:var(--flux-surface-2); }
body.flux .package .price-box p { color:var(--flux-text-muted); border:0; }
body.flux .package .order { background:var(--flux-surface); border-radius:0; border-top:1px solid var(--flux-border); padding:12px; }
body.flux .package-list { background:var(--flux-surface); border:1px solid var(--flux-border); border-radius:var(--flux-r); box-shadow:var(--flux-shadow-sm); }
body.flux .package-list .instructions,body.flux .package-slider .instructions { color:var(--flux-text-muted); }
body.flux .package-groups .list-group-item { border-radius:var(--flux-r); }
body.flux .package-slider { border-top-color:var(--flux-border); }
body.flux .package-slider .slider.slider-horizontal .slider-track-high { background:var(--flux-border) !important; opacity:1; }
body.flux .package-slider .slider.slider-horizontal .slider-selection { background:var(--flux-grad) !important; }
body.flux .package-slider .slider .slider-handle { background:var(--flux-primary) !important; box-shadow:0 0 0 4px rgba(6,92,254,.2); }
body.flux .card-order { background:var(--flux-surface); border:1px solid var(--flux-border); border-radius:var(--flux-r); font-size:.85rem; padding:10px 14px; }
body.flux .card-order .table>thead>tr>th { border-bottom:2px solid var(--flux-border); background:none; }
body.flux .card-order .total-due h4 { color:var(--flux-text); font-weight:900; }
body.flux .whois { background-color:var(--flux-primary-soft-2); border:1px solid var(--flux-primary-soft); border-radius:var(--flux-r-lg); }
body.flux .totals-box table>tbody>tr>td { color:var(--flux-text); }
body.flux .section-title h3 { font-weight:900; letter-spacing:-.02em; }
body.flux #payment-method .card-body label { font-weight:500; }
body.flux .gateway-logo { border-radius:6px; }
body.flux .pass-reset { color:var(--flux-text-muted); }

/* 22 ---- Portal landing (Portal / CMS plugin) -------------------------
   Styles the stock link-box markup AND the optional .flux-hero blocks.     */
body.flux .thanks blockquote {
    background:var(--flux-grad); color:#fff; border:0; border-radius:var(--flux-r-lg);
    padding:30px 34px; margin:0 0 26px; box-shadow:var(--flux-shadow-md);
}
body.flux .thanks blockquote h4 { color:#fff; font-weight:900; font-size:1.7rem; letter-spacing:-.03em; }
body.flux .thanks blockquote p,body.flux .thanks blockquote li { color:rgba(255,255,255,.9); }
body.flux .thanks blockquote a { color:#fff; text-decoration:underline; }
body.flux .portal-box a { display:block; text-decoration:none; }
body.flux .portal-box .card { text-align:center; transition:transform .18s var(--flux-ease),box-shadow .18s var(--flux-ease),border-color .18s; height:calc(100% - 20px); }
body.flux .portal-box .card:hover { transform:translateY(-4px); box-shadow:var(--flux-shadow-md); border-color:var(--flux-primary-light); }
body.flux .portal-box .card-body { padding:30px 22px; }
body.flux .portal-box .card-body i,body.flux .portal-box .card-body i.fa-4x {
    display:inline-flex; align-items:center; justify-content:center; width:72px; height:72px;
    border-radius:var(--flux-r-lg); background:var(--flux-primary-soft); color:var(--flux-primary); font-size:1.8rem; margin-bottom:14px;
}
body.flux .portal-box .card-body h4 { color:var(--flux-text); font-weight:900; letter-spacing:-.02em; }
body.flux .portal-box .card-body p { color:var(--flux-text-muted); margin-bottom:0; }

body.flux .flux-hero { background:var(--flux-grad); color:#fff; border-radius:var(--flux-r-lg); padding:48px 42px; margin-bottom:26px; box-shadow:var(--flux-shadow-md); position:relative; overflow:hidden; }
body.flux .flux-hero:after { content:""; position:absolute; right:-80px; top:-80px; width:320px; height:320px; border-radius:50%; background:rgba(255,255,255,.08); }
body.flux .flux-hero h1 { color:#fff; font-weight:900; font-size:2.6rem; letter-spacing:-.04em; max-width:640px; margin-bottom:12px; position:relative; }
body.flux .flux-hero p { color:rgba(255,255,255,.9); font-size:1.1rem; max-width:560px; position:relative; }
body.flux .flux-hero .btn { position:relative; margin:6px 8px 0 0; }
body.flux .flux-hero .btn-light { color:var(--flux-primary-dark) !important; }
body.flux .flux-hero .btn-outline-light { color:#fff !important; border:1px solid rgba(255,255,255,.7) !important; background:transparent !important; }
body.flux .flux-hero .btn-outline-light:hover { background:rgba(255,255,255,.15) !important; }
body.flux .flux-values .flux-value { background:var(--flux-surface); border:1px solid var(--flux-border); border-radius:var(--flux-r); padding:22px; height:calc(100% - 20px); margin-bottom:20px; box-shadow:var(--flux-shadow-sm); }
body.flux .flux-values .flux-value i { color:var(--flux-primary); font-size:1.4rem; margin-bottom:10px; display:block; }
body.flux .flux-values .flux-value h5 { font-weight:900; }
@media (max-width:767.98px) { body.flux .flux-hero { padding:30px 22px; } body.flux .flux-hero h1 { font-size:1.9rem; } }

/* 23 ---- Portal content authored with lookammo lk-* classes ------------
   The live Portal content (admin-edited, shared by every template) uses the
   lk-* class names. Styling them here lets it render properly under FluxAmmo
   with no content edit.                                                     */
body.flux .lk-portal { padding:0 0 10px; }
body.flux .lk-portal-hero { background:var(--flux-grad); color:#fff; border-radius:var(--flux-r-lg); padding:48px 42px; margin-bottom:24px; box-shadow:var(--flux-shadow-md); position:relative; overflow:hidden; }
body.flux .lk-portal-hero:after { content:""; position:absolute; right:-80px; top:-90px; width:320px; height:320px; border-radius:50%; background:rgba(255,255,255,.08); }
body.flux .lk-eyebrow { display:inline-block; position:relative; text-transform:uppercase; font-size:.72rem; font-weight:700; letter-spacing:.1em; color:rgba(255,255,255,.9); background:rgba(255,255,255,.14); padding:5px 12px; border-radius:var(--flux-pill); margin-bottom:14px; }
body.flux .lk-hero-title { position:relative; color:#fff; font-weight:900; font-size:clamp(1.8rem, 1.2rem + 2.4vw, 2.8rem); letter-spacing:-.04em; line-height:1.1; max-width:720px; margin:0 0 12px; }
body.flux .lk-hero-sub { position:relative; color:rgba(255,255,255,.9); font-size:1.08rem; max-width:620px; margin:0; }
body.flux .lk-hero-actions { position:relative; display:flex; flex-wrap:wrap; gap:10px; margin-top:22px; }
body.flux .lk-hero-actions .btn-success { background-image:none !important; background-color:#fff !important; border-color:#fff !important; color:var(--flux-primary-dark) !important; }
body.flux .lk-hero-actions .btn-success:hover { background-color:var(--flux-primary-soft) !important; border-color:var(--flux-primary-soft) !important; color:var(--flux-primary-dark) !important; }
body.flux .lk-hero-actions .btn-light { background:transparent !important; color:#fff !important; border:1px solid rgba(255,255,255,.7) !important; }
body.flux .lk-hero-actions .btn-light:hover { background:rgba(255,255,255,.15) !important; color:#fff !important; border-color:#fff !important; }

body.flux .lk-valueprops { display:grid; grid-template-columns:repeat(auto-fit, minmax(230px, 1fr)); gap:16px; margin-bottom:24px; }
body.flux .lk-vp { display:flex; align-items:flex-start; gap:14px; background:var(--flux-surface); border:1px solid var(--flux-border); border-radius:var(--flux-r); padding:18px; box-shadow:var(--flux-shadow-sm); }
body.flux .lk-vp-ic,body.flux .lk-card-ic { flex:0 0 auto; display:inline-flex; align-items:center; justify-content:center; width:44px; height:44px; border-radius:var(--flux-r-sm); background:var(--flux-primary-soft); color:var(--flux-primary); font-size:1.1rem; }
body.flux .lk-vp-t { font-weight:700; color:var(--flux-text); }
body.flux .lk-vp-d { color:var(--flux-text-muted); font-size:.88rem; }

body.flux .lk-quick { display:grid; grid-template-columns:repeat(auto-fit, minmax(250px, 1fr)); gap:16px; }
body.flux .lk-card { display:flex; flex-direction:column; gap:6px; background:var(--flux-surface); border:1px solid var(--flux-border); border-radius:var(--flux-r); padding:22px; text-decoration:none; box-shadow:var(--flux-shadow-sm); transition:transform .18s var(--flux-ease), box-shadow .18s var(--flux-ease), border-color .18s; }
body.flux .lk-card:hover { transform:translateY(-3px); box-shadow:var(--flux-shadow-md); border-color:var(--flux-primary-light); text-decoration:none; }
body.flux .lk-card-ic { width:48px; height:48px; margin-bottom:6px; }
body.flux .lk-card-t { font-weight:900; font-size:1.1rem; color:var(--flux-text); letter-spacing:-.02em; }
body.flux .lk-card-d { color:var(--flux-text-muted); font-size:.9rem; }
body.flux .lk-card-go { margin-top:auto; padding-top:8px; color:var(--flux-primary); font-weight:700; font-size:.88rem; }
body.flux .lk-card-go i { transition:transform .18s var(--flux-ease); }
body.flux .lk-card:hover .lk-card-go i { transform:translateX(3px); }
body.flux .lk-card-primary { border-color:var(--flux-primary); background:var(--flux-primary-soft-2); }
body.flux .lk-card-primary .lk-card-ic { background:var(--flux-grad); color:#fff; }
@media (max-width:767.98px) { body.flux .lk-portal-hero { padding:30px 22px; } }

/* 24 ---- Radius + select fixes (found on the live install) ----------------
   Stock CSS sets `.card-blesta, .panel-blesta, .rounded-lg { border-radius:.3rem !important }`,
   which beat the 12px card radius everywhere. Match with !important (body.flux wins on specificity). */
body.flux .card-blesta,body.flux .panel-blesta { border-radius:var(--flux-r) !important; }
body.flux .rounded-lg { border-radius:var(--flux-r-lg) !important; }
body.flux .card-blesta > .card-header { border-radius:var(--flux-r) var(--flux-r) 0 0 !important; }
body.flux .card-blesta > .card-footer { border-radius:0 0 var(--flux-r) var(--flux-r); }
/* long option text (e.g. "1 Year @ Rs8,400.00LKR") must fit inside narrow plan-card selects */
body.flux select.form-control { text-overflow:ellipsis; }
body.flux .package select.form-control { font-size:.78rem; padding-left:.55rem; padding-right:.3rem; }
