/* =====================================================================
   G-SMaRT Coop Cable System - the cable / fiber theme (loads after assets/css/app.css)
   Navy network shell, cyan signal accents, violet fiber glow; layered depth; motion that
   stops for people who ask their system for reduced motion. No build step, no web fonts.
   ===================================================================== */

:root {
  --navy-950: #070f22;
  --navy-900: #0b1630;
  --navy-800: #10204a;
  --navy-700: #182c5c;
  --navy-600: #24396d;
  --cyan: #00b8d9;
  --cyan-bright: #22d3ee;
  --cyan-600: #0891b2;
  --cyan-700: #0e7490;
  --cyan-800: #155e75;
  --cyan-tint: #e2f6fa;
  --violet: #7c3aed;
  --green: #10b981;
  --amber: #f59e0b;
  --red: #ef4444;
  --slate: #94a3b8;

  --page: #f4f7fb;
  --surface: #ffffff;
  --surface-2: #f7f9fc;
  --ink: #12203d;
  --ink-soft: #3e4c66;
  --muted: #64728a;
  --line: #e1e7f0;
  --line-soft: #edf1f6;
  --blue: var(--cyan-600);
  --blue-deep: var(--cyan-700);
  --blue-tint: var(--cyan-tint);
  --radius: 14px;
  --radius-sm: 9px;
  --bar-h: 60px;
  --sidebar-w: 276px;
  --ease: cubic-bezier(.2, .75, .2, 1);
  --fiber: linear-gradient(90deg, #22d3ee, #0891b2 45%, #7c3aed);
  --raise-1: 0 1px 0 rgba(255, 255, 255, .85) inset, 0 1px 2px rgba(11, 22, 48, .06), 0 10px 24px -16px rgba(11, 22, 48, .28);
  --raise-2: 0 1px 0 rgba(255, 255, 255, .85) inset, 0 2px 6px rgba(11, 22, 48, .07), 0 22px 40px -22px rgba(11, 22, 48, .38);
  --raise-3: 0 2px 4px rgba(11, 22, 48, .08), 0 30px 60px -26px rgba(11, 22, 48, .5);
  --inset: inset 0 1px 2px rgba(11, 22, 48, .07);
  --font: Inter, "Segoe UI Variable Text", "Segoe UI", Roboto, system-ui, -apple-system, "Helvetica Neue", Arial, "Noto Sans", sans-serif;

  --bs-primary: #0891b2;
  --bs-primary-rgb: 8, 145, 178;
  --bs-primary-text-emphasis: #0e5468;
  --bs-primary-bg-subtle: #d8f3f9;
  --bs-primary-border-subtle: #9fdeec;
  --bs-success: #059669;
  --bs-success-rgb: 5, 150, 105;
  --bs-danger: #dc2626;
  --bs-danger-rgb: 220, 38, 38;
  --bs-warning: #f59e0b;
  --bs-warning-rgb: 245, 158, 11;
  --bs-info: #06b6d4;
  --bs-info-rgb: 6, 182, 212;
  --bs-body-font-family: var(--font);
  --bs-body-color: #12203d;
  --bs-body-color-rgb: 18, 32, 61;
  --bs-border-color: #e1e7f0;
  --bs-link-color: #0e7490;
  --bs-link-color-rgb: 14, 116, 144;
  --bs-link-hover-color: #155e75;
  --bs-link-hover-color-rgb: 21, 94, 117;
  --bs-focus-ring-color: rgba(8, 145, 178, .3);
  --bs-secondary-color: #64728a;
}

html { scroll-padding-top: calc(var(--bar-h) + 14px); }
body.gs-app, body.platform, body {
  font-family: var(--font);
  background-color: var(--page);
  background-image:
    radial-gradient(1100px 520px at 105% -12%, rgba(34, 211, 238, .09), rgba(34, 211, 238, 0) 62%),
    radial-gradient(900px 420px at -8% -6%, rgba(124, 58, 237, .055), rgba(124, 58, 237, 0) 60%);
  background-attachment: fixed;
  color: var(--ink);
  font-size: .9rem;
  font-feature-settings: "tnum" 0, "cv11" 1;
}
::selection { background: #bdeef7; color: #0b1630; }
:focus-visible { outline: 2px solid rgba(8, 145, 178, .6); outline-offset: 2px; }
a { color: var(--bs-link-color); }
h1, h2, h3, h4, h5, h6 { color: var(--navy-900); letter-spacing: -.012em; }
.text-primary { color: var(--cyan-700) !important; }
.text-muted { color: var(--muted) !important; }

/* ================================================================== top bar */
.navbar.app-bar {
  position: sticky; top: 0; z-index: 1030;
  display: flex; flex-wrap: nowrap; align-items: center; justify-content: space-between; gap: .75rem;
  min-height: var(--bar-h); padding: 0 1rem 0 .9rem;
  background: rgba(9, 18, 40, .92) !important;
  -webkit-backdrop-filter: blur(14px) saturate(150%); backdrop-filter: blur(14px) saturate(150%);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .05) inset, 0 10px 30px -14px rgba(3, 8, 20, .7);
  transition: box-shadow .3s var(--ease), background-color .3s var(--ease);
}
.navbar.app-bar.is-scrolled { background: rgba(9, 18, 40, .97) !important; box-shadow: 0 1px 0 rgba(255, 255, 255, .05) inset, 0 14px 34px -12px rgba(3, 8, 20, .85); }
.app-bar-left, .app-bar-right { display: flex; align-items: center; gap: .55rem; min-width: 0; }
.app-bar-right { gap: .45rem; }
.app-bar .navbar-brand, .offcanvas-header .navbar-brand { display: flex; align-items: center; gap: .65rem; margin: 0 .35rem 0 0; padding: 0; color: #fff; min-width: 0; }
.brand-tile {
  width: 36px; height: 36px; flex: 0 0 36px; border-radius: 11px; display: inline-grid; place-items: center; background: none; padding: 0;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 6px 18px -6px rgba(34, 211, 238, .65), 0 2px 6px rgba(0, 0, 0, .4);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.brand-tile .brand-mark { display: block; border-radius: 10px; }
.navbar-brand:hover .brand-tile { transform: rotate(-6deg) scale(1.05); box-shadow: 0 0 0 1px rgba(255, 255, 255, .12), 0 8px 24px -6px rgba(34, 211, 238, .9), 0 2px 6px rgba(0, 0, 0, .4); }
.brand-mark .bm-w1, .brand-mark .bm-w2 { animation: gsWave 3.2s var(--ease) infinite; transform-origin: 11px 21px; }
.brand-mark .bm-w2 { animation-delay: .35s; }
@keyframes gsWave { 0%, 60%, 100% { opacity: 1; } 75% { opacity: .35; } }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; min-width: 0; }
.brand-a { font-weight: 800; font-size: 1.02rem; letter-spacing: .01em; color: #fff; }
.brand-b { font-weight: 500; font-size: .74rem; color: #8fe6f6; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-bar .company {
  align-items: center; gap: .45rem; color: #a9b7cf; font-size: .8rem; padding: .3rem .7rem; margin-left: .25rem;
  border-left: 1px solid rgba(255, 255, 255, .12); white-space: nowrap; max-width: 260px; overflow: hidden; text-overflow: ellipsis;
}
.app-bar .company .bi { color: var(--cyan-bright); }

/* the fiber line under the bar: a pulse of light runs along it */
.fiber-line { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; overflow: hidden; pointer-events: none;
  background: linear-gradient(90deg, rgba(34, 211, 238, .15), rgba(8, 145, 178, .45) 40%, rgba(124, 58, 237, .35) 75%, rgba(34, 211, 238, .12)); }
.fiber-line span { position: absolute; top: 0; bottom: 0; width: 22%; left: -22%;
  background: linear-gradient(90deg, rgba(34, 211, 238, 0), #a5f3fc 45%, #fff 50%, #c4b5fd 55%, rgba(124, 58, 237, 0));
  box-shadow: 0 0 12px 2px rgba(34, 211, 238, .8); animation: gsPulse 5.5s linear infinite; }
@keyframes gsPulse { 0% { transform: translateX(0); } 100% { transform: translateX(560%); } }

.app-search .form-control {
  width: 330px; height: 38px; padding-left: 2.1rem; border-radius: 11px; color: #e8eef9;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .35); transition: width .35s var(--ease), background-color .2s, box-shadow .2s;
}
.app-search .form-control::placeholder { color: #7f8ea8; }
.app-search .form-control:focus { width: 380px; background: #fff; color: var(--ink); border-color: var(--cyan-bright); box-shadow: 0 0 0 .22rem rgba(34, 211, 238, .28); }
.app-search .bi { color: #7f8ea8; z-index: 2; }
.app-search .form-control:focus ~ .bi, .app-search:focus-within .bi { color: var(--cyan-700); }
.bell-btn, .app-bar .btn-user {
  height: 38px; min-width: 38px; border-radius: 11px; color: #d4deee; border: 1px solid rgba(255, 255, 255, .1);
  background: rgba(255, 255, 255, .05); box-shadow: 0 1px 0 rgba(255, 255, 255, .06) inset, 0 2px 6px rgba(0, 0, 0, .3);
  display: inline-flex; align-items: center; justify-content: center; transition: background-color .2s, color .2s, transform .15s var(--ease), border-color .2s;
}
.bell-btn:hover, .app-bar .btn-user:hover, .app-bar .btn-user.show { color: #fff; background: rgba(34, 211, 238, .14); border-color: rgba(34, 211, 238, .35); text-decoration: none; }
.bell-btn:active, .app-bar .btn-user:active { transform: translateY(1px) scale(.97); }
.bell-btn .bell-count { background: linear-gradient(180deg, #f87171, #dc2626); border: 2px solid var(--navy-900); color: #fff; font-weight: 700; font-size: .66rem; line-height: 14px; animation: gsPop .5s var(--ease) both; }
@keyframes gsPop { from { transform: scale(.3); opacity: 0; } to { transform: none; opacity: 1; } }
.bell-btn.is-quiet { opacity: .6; }
.app-bar .btn-user { gap: .5rem; padding: 0 .55rem 0 .3rem; }
.app-bar .btn-user.btn-menu { padding: 0; width: 40px; font-size: 1.25rem; }
.user-avatar { width: 30px; height: 30px; border-radius: 9px; display: inline-grid; place-items: center; font-size: .72rem; font-weight: 800; color: #04263a;
  background: linear-gradient(135deg, #67e8f9, #22d3ee 45%, #a78bfa); box-shadow: 0 0 0 1px rgba(255, 255, 255, .25) inset; letter-spacing: .02em; }
.app-bar .btn-user .user-name { font-size: .84rem; font-weight: 600; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-bar .company-switch-btn { height: 38px; border-radius: 11px; background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .12); color: #d4deee; }
.app-bar .company-switch-btn .bi { color: var(--cyan-bright); }
.user-menu { min-width: 240px; }

/* ================================================================== shell and side menu */
.app-shell { min-height: calc(100vh - var(--bar-h)); }
.sidebar {
  width: var(--sidebar-w); min-width: var(--sidebar-w); color: #c3cee0;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='276' height='420' viewBox='0 0 276 420'%3E%3Cg fill='none' stroke-width='1.2'%3E%3Cpath d='M-10 380 C 60 330, 120 400, 190 330 S 260 300, 290 250' stroke='%2322d3ee' stroke-opacity='.14'/%3E%3Cpath d='M-10 410 C 70 350, 140 420, 210 350 S 270 330, 290 290' stroke='%237c3aed' stroke-opacity='.14'/%3E%3Cpath d='M-10 350 C 50 310, 110 360, 170 310 S 250 270, 290 220' stroke='%2322d3ee' stroke-opacity='.08'/%3E%3C/g%3E%3Cg fill='%2322d3ee' fill-opacity='.35'%3E%3Ccircle cx='190' cy='330' r='2'/%3E%3Ccircle cx='120' cy='372' r='1.6'/%3E%3Ccircle cx='250' cy='282' r='1.6'/%3E%3C/g%3E%3C/svg%3E") no-repeat left bottom,
    linear-gradient(180deg, #0b1630 0%, #0c1a3a 55%, #0a1430 100%) !important;
  border-right: 1px solid rgba(255, 255, 255, .05) !important;
}
@media (min-width: 992px) {
  .sidebar { position: sticky; top: var(--bar-h); height: calc(100vh - var(--bar-h)); overflow-y: auto; box-shadow: 1px 0 0 rgba(255, 255, 255, .03) inset, 10px 0 30px -18px rgba(11, 22, 48, .55); }
}
.sidebar .offcanvas-body { display: flex !important; flex-direction: column; min-height: 100%; padding-top: .55rem !important; }
.sidebar { scrollbar-width: thin; scrollbar-color: rgba(148, 163, 184, .3) transparent; }
.sidebar::-webkit-scrollbar { width: 8px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, .28); border-radius: 8px; border: 2px solid #0b1630; }
.sidebar .accordion { --bs-accordion-bg: transparent; --bs-accordion-border-color: transparent; --bs-accordion-color: #c3cee0; --bs-accordion-btn-color: #c3cee0; --bs-accordion-active-color: #fff; --bs-accordion-active-bg: transparent;
  --bs-accordion-transition: color .2s ease, background-color .2s ease; }
.sidebar .accordion-item { background: transparent; border: 0; margin: 1px .55rem; }
.sidebar .accordion-button {
  font-size: .87rem; font-weight: 600; color: #c3cee0; background: transparent; padding: .5rem .55rem; gap: .65rem; border-radius: 11px; box-shadow: none;
  transition: background-color .2s, color .2s;
}
.sidebar .accordion-button:hover { background: rgba(255, 255, 255, .05); color: #fff; }
.sidebar .accordion-button:focus-visible { box-shadow: 0 0 0 2px rgba(34, 211, 238, .5); }
.sidebar .accordion-button:not(.collapsed) { color: #fff; background: rgba(255, 255, 255, .04); }
.sidebar .accordion-button::after {
  width: .75rem; height: .75rem; background-size: .75rem; opacity: .55; filter: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23c3cee0'%3E%3Cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E") !important;
  transition: transform .3s var(--ease), opacity .2s;
}
.sidebar .accordion-button:not(.collapsed)::after { opacity: .9; }
.sidebar .accordion-body { padding: .15rem 0 .45rem; }
.sidebar .collapsing { transition: height .32s var(--ease); }
.menu-ico {
  width: 30px; height: 30px; flex: 0 0 30px; border-radius: 9px; display: inline-grid; place-items: center; font-size: .9rem; color: #9fb0cb;
  background: linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .02)); border: 1px solid rgba(255, 255, 255, .07);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .06) inset, 0 2px 5px rgba(0, 0, 0, .25); transition: color .25s, background .25s, box-shadow .25s, transform .25s var(--ease);
}
.sidebar .accordion-button:hover .menu-ico { color: #e6fbff; transform: translateX(1px); }
.accordion-button:not(.collapsed) .menu-ico, .sidebar .accordion-button:not(.collapsed) .menu-ico {
  color: #fff; border-color: rgba(255, 255, 255, .18);
  background: linear-gradient(135deg, #22d3ee, #0891b2 55%, #7c3aed);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .35) inset, 0 6px 16px -4px rgba(34, 211, 238, .55);
}
.menu-name { flex: 1 1 auto; min-width: 0; }
.menu-link {
  position: relative; display: block; margin: 1px 0 1px 1.15rem; padding: .36rem .65rem .36rem 1.45rem; border-radius: 9px; color: #a9b7cf; font-size: .84rem; line-height: 1.3;
  border-left: 0; transition: background-color .18s, color .18s, padding-left .25s var(--ease);
}
.menu-link::before { content: ""; position: absolute; left: .6rem; top: 50%; width: 5px; height: 5px; margin-top: -2.5px; border-radius: 50%; background: rgba(148, 163, 184, .35); transition: background .2s, box-shadow .2s, transform .2s; }
.menu-link:hover { background: rgba(255, 255, 255, .05); color: #fff; padding-left: 1.6rem; text-decoration: none; }
.menu-link:hover::before { background: var(--cyan-bright); }
.menu-link.active {
  color: #ecfeff; font-weight: 600; background: linear-gradient(90deg, rgba(34, 211, 238, .2), rgba(34, 211, 238, .04));
  box-shadow: 0 0 0 1px rgba(34, 211, 238, .18) inset;
}
.menu-link.active::before { background: var(--cyan-bright); box-shadow: 0 0 0 3px rgba(34, 211, 238, .2), 0 0 10px rgba(34, 211, 238, .9); transform: scale(1.2); }
.menu-group { padding: .65rem .8rem .2rem 2.6rem; font-size: .72rem; font-weight: 600; letter-spacing: .01em; text-transform: none; color: #6f80a0; }
.menu-sub { padding: .45rem .8rem .1rem 2.6rem; font-size: .72rem; color: #6f80a0; }
.menu-reports summary.menu-group { padding-left: 2.6rem; }
.menu-reports summary::before { border-left-color: #6f80a0; }
.menu-reports summary:hover { color: var(--cyan-bright); }
.platform-link { display: flex; align-items: center; gap: .6rem; padding-left: .7rem; margin-left: .55rem; margin-right: .55rem; }
.platform-link::before { display: none; }
.platform-link .bi { color: #7f8ea8; }
.platform-link.active .bi { color: var(--cyan-bright); }
.platform .sidebar .menu-group { padding-left: 1.3rem; }
.side-company { display: flex; align-items: center; gap: .5rem; margin: .2rem .9rem .6rem; padding: .5rem .7rem; border-radius: 10px; background: rgba(255, 255, 255, .05); color: #c3cee0; font-size: .82rem; }
.side-company .bi { color: var(--cyan-bright); }
.side-foot { margin-top: auto; display: flex; align-items: center; gap: .55rem; padding: .9rem 1.2rem 1rem; font-size: .72rem; color: #5f7093; }
.side-signal { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(16, 185, 129, .18); animation: gsLive 2.4s ease-out infinite; }
.sidebar .offcanvas-header { border-bottom: 1px solid rgba(255, 255, 255, .07); padding: .75rem 1rem; }
@media (max-width: 991.98px) {
  .offcanvas-lg.sidebar { --bs-offcanvas-width: 300px; --bs-offcanvas-bg: #0b1630; box-shadow: 30px 0 60px -20px rgba(0, 0, 0, .6); }
  .offcanvas-lg.sidebar .offcanvas-body { overflow-y: auto; }
}
.offcanvas-backdrop.show { opacity: .55; -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }

/* ================================================================== content area and its entry motion */
.main-area { min-width: 0; padding: 1.25rem 1.5rem 2.5rem; }
.main-area.main-bare { padding: 1rem; }
@media (min-width: 1600px) { .main-area { padding-left: 2rem; padding-right: 2rem; } }
@keyframes gsRise { from { opacity: 0; translate: 0 10px; } to { opacity: 1; translate: 0 0; } }
@keyframes gsFade { from { opacity: 0; } to { opacity: 1; } }
.main-area > *:not(.modal):not(.sticky-actions) { animation: gsRise .5s var(--ease) backwards; }
.main-area > *:nth-child(2) { animation-delay: .04s; }
.main-area > *:nth-child(3) { animation-delay: .08s; }
.main-area > *:nth-child(4) { animation-delay: .12s; }
.main-area > *:nth-child(5) { animation-delay: .16s; }
.main-area > *:nth-child(6) { animation-delay: .2s; }
.main-area > *:nth-child(n+7) { animation-delay: .24s; }
.stagger > * { animation: gsRise .55s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 55ms); }

/* ================================================================== page bar */
.page-bar {
  position: relative; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem .75rem;
  margin-bottom: 1.1rem; padding: .65rem 1rem .65rem 1.2rem; min-height: 56px; z-index: 6;
  background: rgba(255, 255, 255, .86); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--raise-1);
}
.page-bar::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 4px; border-radius: 0 4px 4px 0; background: linear-gradient(180deg, #22d3ee, #7c3aed); box-shadow: 0 0 12px rgba(34, 211, 238, .55); }
.page-bar h1 { font-size: 1.14rem; font-weight: 750; letter-spacing: -.015em; margin: 0; color: var(--navy-900); }
.page-bar .page-actions { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }

/* ================================================================== cards */
.card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--raise-1); }
.card > .card-header {
  background: linear-gradient(180deg, #ffffff, #f8fafd); border-bottom: 1px solid var(--line-soft); padding: .7rem 1rem;
  font-weight: 650; font-size: .9rem; color: var(--navy-900); border-radius: var(--radius) var(--radius) 0 0;
}
.card > .card-footer { background: var(--surface-2); border-top: 1px solid var(--line-soft); border-radius: 0 0 var(--radius) var(--radius); }
.card > .card-body { padding: 1rem 1.05rem; }
a.card, .card.is-link, .isp-card.is-link { transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s; color: inherit; }
a.card:hover, .card.is-link:hover, .isp-card.is-link:hover { transform: translateY(-3px); box-shadow: var(--raise-2); border-color: #c9e9f1; text-decoration: none; }
.isp-card { margin-bottom: 1rem; overflow: visible; }
.isp-card > .card-body > .table-responsive:last-child { margin-bottom: -.25rem; }
.isp-card > .table-responsive { border-radius: 0 0 var(--radius) var(--radius); }
.sec-title { display: flex; align-items: center; gap: .55rem; margin: 0 0 .8rem; font-size: .98rem; font-weight: 700; color: var(--navy-900); letter-spacing: -.01em; }
.sec-title::before { content: ""; width: 4px; height: 1.05em; border-radius: 3px; background: linear-gradient(180deg, #22d3ee, #7c3aed); flex: 0 0 4px; }
.sec-title .sec-aside, .sec-title small { margin-left: auto; font-size: .8rem; font-weight: 500; color: var(--muted); }

/* the dashboard figures of the older pages */
.kpi.card { border-left: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--raise-1); transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.kpi.card:hover { transform: translateY(-3px); box-shadow: var(--raise-2); }
.kpi.card::after { background: radial-gradient(circle at 30% 30%, rgba(34, 211, 238, .14), rgba(34, 211, 238, 0) 70%); }
.kpi.card .value { color: var(--navy-900); font-weight: 750; }
.coop-tile { border-radius: var(--radius) !important; transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
a.coop-tile:hover { transform: translateY(-3px); box-shadow: var(--raise-2); text-decoration: none; }

/* ================================================================== KPI tiles (IspUi::kpi) */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .9rem; margin-bottom: 1.1rem; }
.kpi-grid.kpi-grid-sm { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.kpi-grid > * { animation: gsRise .55s var(--ease) backwards; }
.kpi-grid > :nth-child(1) { animation-delay: .03s; } .kpi-grid > :nth-child(2) { animation-delay: .08s; } .kpi-grid > :nth-child(3) { animation-delay: .13s; }
.kpi-grid > :nth-child(4) { animation-delay: .18s; } .kpi-grid > :nth-child(5) { animation-delay: .23s; } .kpi-grid > :nth-child(6) { animation-delay: .28s; }
.kpi-grid > :nth-child(7) { animation-delay: .33s; } .kpi-grid > :nth-child(8) { animation-delay: .38s; } .kpi-grid > :nth-child(n+9) { animation-delay: .43s; }
.kpi:not(.card) {
  --tone: #0891b2; --tone-2: #22d3ee; --tone-soft: rgba(8, 145, 178, .1);
  position: relative; display: flex; align-items: center; gap: .9rem; padding: 1rem 1.6rem 1rem 1.05rem; min-height: 92px; overflow: hidden; container-type: inline-size;
  color: var(--ink); background: linear-gradient(180deg, #fff, #fbfcfe); border: 1px solid var(--line); border-left: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--raise-1); transition: transform .28s var(--ease), box-shadow .28s var(--ease), border-color .28s;
}
.kpi:not(.card)::after { content: ""; position: absolute; right: -36px; top: -36px; width: 110px; height: 110px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, var(--tone-soft), rgba(255, 255, 255, 0) 70%); pointer-events: none; }
.kpi:not(.card)::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: linear-gradient(90deg, var(--tone-2), var(--tone)); opacity: .0; transform: scaleX(.2); transform-origin: left; transition: opacity .3s, transform .45s var(--ease); }
a.kpi:hover { transform: translateY(-4px); box-shadow: var(--raise-2); border-color: color-mix(in srgb, var(--tone) 30%, #e1e7f0); text-decoration: none; color: var(--ink); }
a.kpi:hover::before { opacity: 1; transform: scaleX(1); }
.kpi-ico { width: 46px; height: 46px; flex: 0 0 46px; border-radius: 13px; display: inline-grid; place-items: center; font-size: 1.2rem; color: #fff;
  background: linear-gradient(135deg, var(--tone-2), var(--tone)); box-shadow: 0 1px 0 rgba(255, 255, 255, .35) inset, 0 10px 20px -8px var(--tone); transition: transform .35s var(--ease); }
a.kpi:hover .kpi-ico { transform: rotate(-6deg) scale(1.06); }
.kpi-body { display: flex; flex-direction: column; min-width: 0; gap: .05rem; position: relative; z-index: 1; }
.kpi-label { font-size: .77rem; font-weight: 600; color: var(--muted); }
.kpi-value { font-size: 1.45rem; font-weight: 800; letter-spacing: -.025em; line-height: 1.15; color: var(--navy-900); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-sub { font-size: .76rem; color: var(--muted); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.kpi-go { position: absolute; right: .75rem; top: .7rem; color: var(--slate); font-size: .85rem; opacity: .45; transition: transform .25s var(--ease), opacity .25s, color .25s; z-index: 1; }
a.kpi:hover .kpi-go { transform: translateX(3px); opacity: 1; color: var(--tone); }
.kpi.kpi-ok { --tone: #059669; --tone-2: #34d399; --tone-soft: rgba(16, 185, 129, .12); }
.kpi.kpi-warn { --tone: #d97706; --tone-2: #fbbf24; --tone-soft: rgba(245, 158, 11, .14); }
.kpi.kpi-bad { --tone: #dc2626; --tone-2: #f87171; --tone-soft: rgba(239, 68, 68, .12); }
.kpi.kpi-info { --tone: #0891b2; --tone-2: #22d3ee; --tone-soft: rgba(34, 211, 238, .13); }
.kpi.kpi-idle { --tone: #64748b; --tone-2: #a3b1c6; --tone-soft: rgba(148, 163, 184, .14); }
.kpi.kpi-violet { --tone: #6d28d9; --tone-2: #a78bfa; --tone-soft: rgba(124, 58, 237, .12); }

@container (max-width: 275px) { .kpi-value { font-size: 1.3rem; } .kpi-ico { width: 40px; height: 40px; flex-basis: 40px; font-size: 1.05rem; } }
@container (max-width: 230px) { .kpi-value { font-size: 1.12rem; } }

/* ================================================================== status lights (plain text with a dot, never a capsule) */
.st { display: inline-flex; align-items: center; gap: .42rem; font-size: .82rem; font-weight: 600; white-space: nowrap; color: #475569; line-height: 1.25; }
.st::before { content: ""; width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: #94a3b8; box-shadow: 0 0 0 3px rgba(148, 163, 184, .18); }
.st-ok { color: #047857; } .st-ok::before { background: #10b981; box-shadow: 0 0 0 3px rgba(16, 185, 129, .18); }
.st-warn { color: #b45309; } .st-warn::before { background: #f59e0b; box-shadow: 0 0 0 3px rgba(245, 158, 11, .2); }
.st-bad { color: #b91c1c; } .st-bad::before { background: #ef4444; box-shadow: 0 0 0 3px rgba(239, 68, 68, .18); }
.st-info { color: #0e7490; } .st-info::before { background: #06b6d4; box-shadow: 0 0 0 3px rgba(6, 182, 212, .18); }
.st-idle { color: #64748b; } .st-idle::before { background: #94a3b8; }
/* live states pulse where one record is in focus (record header, KPI tiles, dashboards) or when asked (.is-live) */
.isp-head .st-ok::before, .isp-head .st-bad::before, .isp-head .st-warn::before, .kpi .st::before, .st.is-live::before, .dash-live .st-ok::before, .dash-live .st-bad::before { animation: gsLive 2.4s ease-out infinite; }
.isp-head .st-bad::before, .dash-live .st-bad::before { animation-name: gsLiveBad; }
.isp-head .st-warn::before { animation-name: gsLiveWarn; }
@keyframes gsLive { 0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, .55); } 70% { box-shadow: 0 0 0 7px rgba(16, 185, 129, 0); } 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); } }
@keyframes gsLiveBad { 0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, .55); } 70% { box-shadow: 0 0 0 7px rgba(239, 68, 68, 0); } 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); } }
@keyframes gsLiveWarn { 0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, .55); } 70% { box-shadow: 0 0 0 7px rgba(245, 158, 11, 0); } 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); } }
.st-lg { font-size: .92rem; }
.st-lg::before { width: 10px; height: 10px; flex-basis: 10px; }

/* the older status words (badge(), status_badge(), co-state): plain text with the same dot */
.badge { display: inline-flex !important; align-items: center; gap: .38rem; padding: 0 !important; font-size: .8rem; font-weight: 650; background: none !important; border: 0 !important; border-radius: 0 !important; }
.badge::before { content: ""; width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: currentColor; opacity: .85; }
.badge.text-bg-primary, .badge.bg-primary { color: #0e7490 !important; }
.badge.text-bg-success, .badge.bg-success { color: #047857 !important; }
.badge.text-bg-danger, .badge.bg-danger { color: #b91c1c !important; }
.badge.text-bg-warning, .badge.bg-warning { color: #b45309 !important; }
.badge.text-bg-info, .badge.bg-info { color: #0e7490 !important; }
.bell-count::before, .badge.no-dot::before { display: none; }

/* ================================================================== record header (IspUi pages) */
.isp-head {
  position: relative; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1rem;
  margin-bottom: 1rem; padding: 1rem 1.15rem; z-index: 5;
  background: linear-gradient(120deg, #ffffff 55%, #f1fbfd); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--raise-1);
}
.isp-head::after {
  content: ""; position: absolute; right: 0; top: 0; bottom: 0; width: 300px; max-width: 60%; pointer-events: none; border-radius: 0 var(--radius) var(--radius) 0;
  background: radial-gradient(circle at 100% 0, rgba(34, 211, 238, .16), rgba(34, 211, 238, 0) 70%), repeating-radial-gradient(circle at 100% 0, rgba(8, 145, 178, .07) 0 1px, transparent 1px 16px);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 65%); mask-image: linear-gradient(90deg, transparent, #000 65%);
}
.isp-head > * { position: relative; z-index: 1; min-width: 0; }
.isp-head-title { margin: 0; font-size: 1.28rem; font-weight: 800; letter-spacing: -.02em; color: var(--navy-900); display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .75rem; }
.isp-head-sub { margin-top: .25rem; color: var(--muted); font-size: .86rem; display: flex; flex-wrap: wrap; gap: .25rem 1rem; }
.isp-head-actions { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.isp-head-actions form { margin: 0; }

/* ================================================================== tables */
.table { --bs-table-border-color: var(--line-soft); --bs-table-hover-bg: #effafc; --bs-table-active-bg: #e2f6fa; --bs-table-striped-bg: #f8fafc; color: var(--ink); }
.table thead th {
  background: linear-gradient(180deg, #f7f9fc, #eff3f8); color: #4a5a76; font-size: .75rem; font-weight: 700; letter-spacing: .01em;
  border-bottom: 1px solid #dbe2ec; box-shadow: 0 1px 0 #fff inset;
}
.table-hover > tbody > tr { transition: background-color .12s ease; }
.table tfoot td, .table tfoot th { background: #f5f8fb; border-top: 2px solid #d5deea; }
.isp-table { margin: 0; font-size: .86rem; }
.isp-table > tbody > tr > td { border-bottom-color: var(--line-soft); }
.isp-table > tbody > tr:last-child > td { border-bottom: 0; }
.isp-table td.num, .isp-table th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.isp-table td .text-muted, .isp-table .sub { font-size: .78rem; }
.isp-table tr.is-muted > td { color: var(--muted); }
.isp-table tr.is-flag > td:first-child { box-shadow: inset 3px 0 0 #f59e0b; }
.isp-table tr.is-bad > td:first-child { box-shadow: inset 3px 0 0 #ef4444; }
.isp-table tr.is-ok > td:first-child { box-shadow: inset 3px 0 0 #10b981; }
.card > .table-responsive > .table > thead > tr > th:first-child, .card > .table > thead > tr > th:first-child { border-top-left-radius: var(--radius); }
.card > .table-responsive > .table > thead > tr > th:last-child, .card > .table > thead > tr > th:last-child { border-top-right-radius: var(--radius); }
.num, td.num, th.num { font-variant-numeric: tabular-nums; }
.neg { color: #b91c1c; }
.report-table tr.group-row td { background: #eef3f8; }
.bar { background: linear-gradient(90deg, #22d3ee, #0891b2); box-shadow: 0 2px 8px -2px rgba(8, 145, 178, .5); border-radius: 5px; }

/* ================================================================== buttons */
.btn { --bs-btn-font-weight: 600; border-radius: var(--radius-sm); transition: transform .12s var(--ease), box-shadow .2s var(--ease), background-color .2s, border-color .2s, color .2s; }
.btn:active, .btn.active { transform: translateY(1px) scale(.98); }
.btn-sm { --bs-btn-padding-y: .34rem; --bs-btn-padding-x: .72rem; border-radius: 8px; }
.btn-primary {
  --bs-btn-color: #fff; --bs-btn-bg: #0891b2; --bs-btn-border-color: #0b7d99; --bs-btn-hover-color: #fff; --bs-btn-hover-bg: #0786a5; --bs-btn-hover-border-color: #0a6f88;
  --bs-btn-active-color: #fff; --bs-btn-active-bg: #0e7490; --bs-btn-active-border-color: #0e6680; --bs-btn-disabled-bg: #0891b2; --bs-btn-disabled-border-color: #0891b2;
  --bs-btn-focus-shadow-rgb: 8, 145, 178;
  background-image: linear-gradient(180deg, #13b3d4 0%, #0891b2 55%, #0b7c99 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .3) inset, 0 -1px 0 rgba(0, 0, 0, .12) inset, 0 6px 16px -8px rgba(8, 145, 178, .8), 0 1px 2px rgba(11, 22, 48, .2);
}
.btn-primary:hover { box-shadow: 0 1px 0 rgba(255, 255, 255, .3) inset, 0 -1px 0 rgba(0, 0, 0, .12) inset, 0 10px 22px -8px rgba(8, 145, 178, .9), 0 1px 2px rgba(11, 22, 48, .2); filter: saturate(1.1); }
.btn-success { --bs-btn-bg: #059669; --bs-btn-border-color: #047857; --bs-btn-hover-bg: #04875f; --bs-btn-hover-border-color: #036b4c; --bs-btn-active-bg: #047857;
  background-image: linear-gradient(180deg, #10b981, #059669 60%, #047857); box-shadow: 0 1px 0 rgba(255, 255, 255, .3) inset, 0 6px 16px -8px rgba(5, 150, 105, .75), 0 1px 2px rgba(11, 22, 48, .2); }
.btn-danger { --bs-btn-bg: #dc2626; --bs-btn-border-color: #b91c1c; --bs-btn-hover-bg: #c81e1e; --bs-btn-hover-border-color: #991b1b; --bs-btn-active-bg: #b91c1c;
  background-image: linear-gradient(180deg, #f05252, #dc2626 60%, #b91c1c); box-shadow: 0 1px 0 rgba(255, 255, 255, .28) inset, 0 6px 16px -8px rgba(220, 38, 38, .7), 0 1px 2px rgba(11, 22, 48, .2); }
.btn-warning { --bs-btn-color: #3b2300; --bs-btn-bg: #f59e0b; --bs-btn-border-color: #d97706; --bs-btn-hover-bg: #f2a523; --bs-btn-hover-color: #3b2300; --bs-btn-active-bg: #d97706;
  background-image: linear-gradient(180deg, #fbbf24, #f59e0b 60%, #e08e06); }
.btn-dark, .btn-secondary { --bs-btn-bg: #24396d; --bs-btn-border-color: #182c5c; --bs-btn-hover-bg: #1d3163; --bs-btn-hover-border-color: #10204a; --bs-btn-active-bg: #10204a;
  background-image: linear-gradient(180deg, #2c4580, #1d3163); }
.btn-info { --bs-btn-color: #fff; --bs-btn-bg: #06b6d4; --bs-btn-border-color: #0891b2; --bs-btn-hover-bg: #0aa7c3; --bs-btn-hover-color: #fff; }
[class*="btn-outline-"], .btn-light {
  background-color: #fff; background-image: linear-gradient(180deg, #ffffff, #f4f7fb);
  box-shadow: 0 1px 0 #fff inset, 0 1px 2px rgba(11, 22, 48, .08), 0 4px 10px -8px rgba(11, 22, 48, .3);
}
.btn-outline-primary { --bs-btn-color: #0e7490; --bs-btn-border-color: #9fdbe9; --bs-btn-hover-color: #fff; --bs-btn-hover-bg: #0891b2; --bs-btn-hover-border-color: #0891b2;
  --bs-btn-active-bg: #0e7490; --bs-btn-active-border-color: #0e7490; --bs-btn-focus-shadow-rgb: 8, 145, 178; }
.btn-outline-primary:hover { background-image: linear-gradient(180deg, #13b3d4, #0891b2); box-shadow: 0 8px 18px -10px rgba(8, 145, 178, .9); }
.btn-outline-secondary { --bs-btn-color: #33415c; --bs-btn-border-color: #ccd5e2; --bs-btn-hover-color: #0b1630; --bs-btn-hover-bg: #eef3f8; --bs-btn-hover-border-color: #b8c4d4; --bs-btn-active-bg: #e3eaf3; --bs-btn-active-color: #0b1630; }
.btn-outline-success { --bs-btn-color: #047857; --bs-btn-border-color: #9edcc4; --bs-btn-hover-bg: #059669; --bs-btn-hover-border-color: #059669; }
.btn-outline-danger { --bs-btn-color: #b91c1c; --bs-btn-border-color: #f3b1b1; --bs-btn-hover-bg: #dc2626; --bs-btn-hover-border-color: #dc2626; }
.btn-outline-warning { --bs-btn-color: #a14f05; --bs-btn-border-color: #f5cf8a; --bs-btn-hover-bg: #f59e0b; --bs-btn-hover-border-color: #f59e0b; --bs-btn-hover-color: #3b2300; }
.btn-outline-dark { --bs-btn-color: #182c5c; --bs-btn-border-color: #b9c4d8; --bs-btn-hover-bg: #182c5c; --bs-btn-hover-border-color: #182c5c; }
.btn-outline-info { --bs-btn-color: #0e7490; --bs-btn-border-color: #a5e4ef; --bs-btn-hover-bg: #06b6d4; --bs-btn-hover-border-color: #06b6d4; --bs-btn-hover-color: #fff; }
.btn-outline-primary:focus-visible:not(:hover) { color: #0e7490; }
.btn-link { --bs-btn-color: #0e7490; --bs-btn-hover-color: #155e75; }
.btn.is-rippling { position: relative; overflow: hidden; }
.btn .gs-ripple { position: absolute; border-radius: 50%; pointer-events: none; transform: scale(0); background: rgba(255, 255, 255, .45); animation: gsRipple .55s ease-out forwards; }
[class*="btn-outline-"] .gs-ripple, .btn-light .gs-ripple, .btn-link .gs-ripple { background: rgba(8, 145, 178, .2); }
@keyframes gsRipple { to { transform: scale(2.6); opacity: 0; } }

/* ================================================================== fields */
.form-label { font-size: .76rem; font-weight: 650; color: #4a5a76; }
.form-control, .form-select { border-color: #d3dbe6; border-radius: var(--radius-sm); color: var(--ink); background-color: #fff; transition: border-color .2s, box-shadow .2s, background-color .2s; }
.form-control-sm, .form-select-sm { border-radius: 8px; }
.form-control:hover, .form-select:hover { border-color: #b4c1d2; }
.form-control:focus, .form-select:focus { border-color: #22b8d6; box-shadow: var(--inset), 0 0 0 .22rem rgba(34, 211, 238, .2); }
.form-check-input:checked { background-color: #0891b2; border-color: #0e7490; box-shadow: 0 2px 6px -1px rgba(8, 145, 178, .55); }
.form-check-input:focus { border-color: #22b8d6; box-shadow: 0 0 0 .2rem rgba(34, 211, 238, .22); }
.form-switch .form-check-input:checked { background-color: #10b981; border-color: #059669; }
.input-group-text { background: linear-gradient(180deg, #fbfcfe, #eef3f8); border-color: #d3dbe6; color: #4a5a76; }
.form-control:disabled, .form-select:disabled, .form-control[readonly] { background-color: #f2f5f9; }

/* ================================================================== alerts, dropdowns, modals, tabs, pagination */
.alert { border-radius: 12px; border-width: 1px 1px 1px 4px; box-shadow: 0 1px 2px rgba(11, 22, 48, .05), 0 8px 20px -16px rgba(11, 22, 48, .35); animation: gsRise .45s var(--ease) backwards; }
.alert-info { --bs-alert-bg: #ecfafd; --bs-alert-border-color: #a8e4f0; --bs-alert-color: #0e4f62; border-left-color: #06b6d4; }
.alert-success { --bs-alert-bg: #ecfdf5; --bs-alert-border-color: #a7e3cc; --bs-alert-color: #065f46; border-left-color: #10b981; }
.alert-warning { --bs-alert-bg: #fffaeb; --bs-alert-border-color: #f6d79a; --bs-alert-color: #7a4504; border-left-color: #f59e0b; }
.alert-danger { --bs-alert-bg: #fef2f2; --bs-alert-border-color: #f5b8b8; --bs-alert-color: #8c1d1d; border-left-color: #ef4444; }
.alert-primary { --bs-alert-bg: #ecfafd; --bs-alert-border-color: #a8e4f0; --bs-alert-color: #0e4f62; border-left-color: #0891b2; }
.alert-secondary, .alert-light { border-left-color: #94a3b8; }
.dropdown-menu { border: 1px solid var(--line); border-radius: 13px; padding: .4rem; box-shadow: 0 4px 10px rgba(11, 22, 48, .08), 0 28px 50px -20px rgba(11, 22, 48, .45); }
.dropdown-menu.show { animation: gsDrop .22s var(--ease) backwards; transform-origin: top; }
@keyframes gsDrop { from { opacity: 0; translate: 0 -6px; } to { opacity: 1; translate: 0 0; } }
.dropdown-item { border-radius: 8px; padding: .42rem .7rem; color: var(--ink); }
.dropdown-item:hover, .dropdown-item:focus { background: #eaf8fb; color: #0b1630; }
.dropdown-item.active, .dropdown-item:active { background: #0891b2; color: #fff; }
.modal-content { border: 1px solid rgba(225, 231, 240, .9); border-radius: 18px; box-shadow: 0 40px 90px -30px rgba(7, 15, 34, .65), 0 6px 16px rgba(11, 22, 48, .14); }
.modal-header { background: linear-gradient(180deg, #fff, #f7f9fc); border-radius: 18px 18px 0 0; border-bottom-color: var(--line-soft); }
.modal-title { font-weight: 750; color: var(--navy-900); }
.modal-footer { background: #f8fafc; border-radius: 0 0 18px 18px; border-top-color: var(--line-soft); }
.modal.fade .modal-dialog { transform: translateY(14px) scale(.98); transition: transform .3s var(--ease), opacity .3s; }
.modal.show .modal-dialog { transform: none; }
.modal-backdrop.show { opacity: .5; }
.modal-backdrop { background-color: #050b1a; }
.nav-tabs .nav-link { border-radius: 9px 9px 0 0; color: #4a5a76; font-weight: 600; }
.nav-tabs .nav-link:hover { background: #eef4f9; color: var(--navy-900); }
.nav-tabs .nav-link.active { color: #0e7490; border-bottom-color: #0891b2; }
.nav-pills .nav-link.active, .nav-pills .show > .nav-link { background: linear-gradient(135deg, #13b3d4, #0891b2); box-shadow: 0 6px 14px -8px rgba(8, 145, 178, .9); }
.pagination { --bs-pagination-color: #0e7490; --bs-pagination-active-bg: #0891b2; --bs-pagination-active-border-color: #0891b2; --bs-pagination-hover-color: #155e75; --bs-pagination-focus-box-shadow: 0 0 0 .2rem rgba(34, 211, 238, .25); --bs-pagination-border-radius: 9px; }
.progress { --bs-progress-bar-bg: #0891b2; border-radius: 99px; background: #e8eef5; }
.progress-bar { background-image: linear-gradient(90deg, #22d3ee, #0891b2); }
.list-group-item.active { background: #0891b2; border-color: #0891b2; }
.list-group-item { border-color: var(--line-soft); }
.list-group-item-action:hover { background: #f1fafc; }
.table-primary { --bs-table-bg: #d8f3f9; --bs-table-border-color: #b5e6f0; }
.text-bg-primary { background-color: #0891b2 !important; }
.bg-primary { background-color: #0891b2 !important; }
.border-primary { border-color: #67cfe4 !important; }
.link-primary { color: #0e7490 !important; }
.tooltip { --bs-tooltip-bg: #0b1630; --bs-tooltip-border-radius: 8px; }

/* ================================================================== the cable / internet page parts */
/* tabs as links: an underline marks the open one */
.isp-tabs { display: flex; gap: .15rem; margin: 0 0 1rem; padding: 0 .35rem; overflow-x: auto; scrollbar-width: none;
  background: rgba(255, 255, 255, .78); border: 1px solid var(--line); border-radius: 13px; box-shadow: var(--raise-1); }
.isp-tabs::-webkit-scrollbar { display: none; }
.isp-tab { position: relative; flex: 0 0 auto; display: inline-flex; align-items: center; gap: .4rem; padding: .7rem .85rem; color: #4a5a76; font-weight: 600; font-size: .85rem; white-space: nowrap;
  transition: color .2s; }
.isp-tab::after { content: ""; position: absolute; left: .6rem; right: .6rem; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: linear-gradient(90deg, #22d3ee, #0891b2 55%, #7c3aed);
  transform: scaleX(0); transition: transform .3s var(--ease); box-shadow: 0 -2px 10px rgba(34, 211, 238, .55); }
.isp-tab:hover { color: var(--navy-900); text-decoration: none; }
.isp-tab:hover::after { transform: scaleX(.35); }
.isp-tab.is-active { color: #0e7490; }
.isp-tab.is-active::after { transform: scaleX(1); }
.isp-tab .bi { opacity: .85; }
.isp-tab .tab-n { font-size: .74rem; font-weight: 700; color: var(--muted); }

/* GET filter bar */
.isp-filter { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .6rem .7rem; margin: 0 0 1rem; padding: .75rem .85rem;
  background: rgba(255, 255, 255, .85); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--raise-1); }
.isp-f { flex: 0 1 180px; min-width: 140px; }
.isp-f-grow { flex: 1 1 260px; }
.isp-f .form-label { margin-bottom: .2rem; }
.isp-filter-actions { display: flex; gap: .4rem; align-items: center; margin-left: auto; }
.isp-filter .form-control[type=search] { padding-left: 2rem; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='%2364728a' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85zm-5.242 1.156a5 5 0 1 1 0-10 5 5 0 0 1 0 10z'/%3E%3C/svg%3E") no-repeat .7rem center; }

/* paging */
.isp-pager { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem; padding: .7rem .2rem .2rem; }
.isp-pager > span:last-child { display: flex; gap: .35rem; }
.card .isp-pager { padding: .7rem 1rem; border-top: 1px solid var(--line-soft); }

/* nothing to show */
.isp-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .6rem; padding: 2.6rem 1rem; color: var(--muted); text-align: center; font-size: .9rem; }
.isp-empty > .bi { width: 64px; height: 64px; display: grid; place-items: center; font-size: 1.6rem; border-radius: 20px; color: #0891b2;
  background: radial-gradient(circle at 30% 25%, #ffffff, #e2f6fa 70%); box-shadow: 0 0 0 1px #cdeef5 inset, 0 12px 26px -14px rgba(8, 145, 178, .6); animation: gsFloat 4s ease-in-out infinite; }
@keyframes gsFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }

/* label / value pairs of a detail panel */
.isp-dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .85rem 1.25rem; margin: 0; }
.isp-dl > div { min-width: 0; padding-left: .7rem; border-left: 2px solid var(--line-soft); transition: border-color .2s; }
.isp-dl > div:hover { border-left-color: #67cfe4; }
.isp-dl dt { font-size: .74rem; font-weight: 600; color: var(--muted); margin-bottom: .12rem; }
.isp-dl dd { margin: 0; font-weight: 550; color: var(--ink); overflow-wrap: anywhere; }
.isp-dl.isp-dl-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 575.98px) { .isp-dl, .isp-dl.isp-dl-2 { grid-template-columns: 1fr 1fr; } }

/* subscriber account picker */
.isp-acct-field { position: relative; }
.isp-acct-field .form-control[data-isp-account] { padding-left: 2rem; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='%230891b2' viewBox='0 0 16 16'%3E%3Cpath d='M3 14s-1 0-1-1 1-4 6-4 6 3 6 4-1 1-1 1H3zm5-6a3 3 0 1 0 0-6 3 3 0 0 0 0 6z'/%3E%3C/svg%3E") no-repeat .7rem center; }
.isp-acct-menu { position: absolute; left: 0; right: 0; top: 100%; margin-top: .3rem; z-index: 1065; max-height: 330px; overflow-y: auto; padding: .35rem;
  background: #fff; border: 1px solid var(--line); border-radius: 13px; box-shadow: 0 4px 10px rgba(11, 22, 48, .08), 0 28px 50px -20px rgba(11, 22, 48, .45); animation: gsDrop .2s var(--ease) backwards; }
.isp-acct-opt { display: block; width: 100%; text-align: left; border: 0; background: transparent; padding: .5rem .65rem; border-radius: 9px; color: var(--ink); transition: background-color .12s; }
.isp-acct-opt:hover, .isp-acct-opt.is-active { background: #eaf8fb; }
.isp-acct-opt.is-active { box-shadow: inset 3px 0 0 #0891b2; }
.isp-acct-l1 { display: block; font-size: .87rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.isp-acct-l1 strong { color: #0e7490; font-variant-numeric: tabular-nums; }
.isp-acct-l2 { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .6rem; margin-top: .1rem; font-size: .76rem; color: var(--muted); }
.isp-acct-l2 .st { font-size: .74rem; }
.isp-acct-none { padding: .7rem .8rem; color: var(--muted); font-size: .84rem; }

/* printed documents (invoice, receipt, statement, contract, application form) */
.isp-doc { background: #fff; max-width: 880px; margin: 0 auto 1rem; padding: 38px 44px; border: 1px solid var(--line); border-radius: 6px; box-shadow: var(--raise-3); color: #111827; }
.isp-doc .table thead th { background: #f1f5f9; color: #1f2937; }
.doc-head { display: flex; align-items: flex-start; gap: 1rem; padding-bottom: 1rem; margin-bottom: 1.1rem; border-bottom: 2px solid #0b1630; }
.doc-logo { width: 64px; height: 64px; object-fit: contain; flex: 0 0 64px; }
.doc-co { display: flex; flex-direction: column; gap: .1rem; font-size: .82rem; color: #374151; min-width: 0; }
.doc-co strong { font-size: 1.08rem; color: #0b1630; }
.doc-title { margin-left: auto; text-align: right; }
.doc-title h2 { margin: 0 0 .25rem; font-size: 1.3rem; font-weight: 800; letter-spacing: .02em; color: #0b1630; }
@media (max-width: 575.98px) {
  .isp-doc { padding: 18px 14px; }
  .doc-head { flex-wrap: wrap; }
  .doc-title { margin-left: 0; text-align: left; width: 100%; }
}

/* mini charts drawn with SVG (dashboards) */
.chart-svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart-svg .grid line { stroke: #e7edf4; stroke-width: 1; }
.chart-svg .axis text, .chart-svg text.lbl { fill: #64728a; font-size: 11px; font-family: var(--font); }
.chart-svg .bar-b { fill: url(#gBilled); }
.chart-svg .bar-c { fill: url(#gColl); }
.chart-svg rect.bar-b, .chart-svg rect.bar-c { transform-box: fill-box; transform-origin: bottom; animation: gsGrow .9s var(--ease) both; }
.chart-svg .line-s { fill: none; stroke: #7c3aed; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1200; stroke-dashoffset: 1200; animation: gsDraw 1.6s .35s var(--ease) forwards; filter: drop-shadow(0 3px 6px rgba(124, 58, 237, .35)); }
.chart-svg .dot-s { fill: #fff; stroke: #7c3aed; stroke-width: 2; transform-box: fill-box; transform-origin: center; animation: gsPop .4s var(--ease) backwards; }
.chart-svg .area-s { fill: url(#gArea); opacity: 0; animation: gsFade .8s 1.2s ease forwards; }
@keyframes gsGrow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes gsDraw { to { stroke-dashoffset: 0; } }
.chart-legend { display: flex; flex-wrap: wrap; gap: .35rem 1.1rem; font-size: .78rem; color: var(--muted); }
.chart-legend span { display: inline-flex; align-items: center; gap: .4rem; }
.chart-legend i { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }

/* a horizontal stacked bar (aging) and simple meters */
.stack-bar { display: flex; height: 14px; border-radius: 99px; overflow: hidden; background: #edf2f7; box-shadow: var(--inset); }
.stack-bar > span { height: 100%; transform-origin: left; animation: gsGrowX 1s var(--ease) both; }
@keyframes gsGrowX { from { transform: scaleX(0); } to { transform: none; } }
.meter { height: 8px; border-radius: 99px; background: #edf2f7; overflow: hidden; box-shadow: var(--inset); }
.meter > span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #22d3ee, #0891b2 60%, #7c3aed); transform-origin: left; animation: gsGrowX 1.1s var(--ease) both; }
.legend-rows { display: grid; gap: .4rem; margin-top: .8rem; }
.legend-row { display: flex; align-items: center; gap: .55rem; font-size: .84rem; }
.legend-row i { width: 10px; height: 10px; border-radius: 3px; flex: 0 0 10px; }
.legend-row .num { margin-left: auto; font-weight: 650; }

/* attention list and activity feed */
.attn-list { list-style: none; margin: 0; padding: 0; }
.attn-list li + li { border-top: 1px solid var(--line-soft); }
.attn-list a { display: flex; align-items: center; gap: .75rem; padding: .65rem 1rem; color: var(--ink); transition: background-color .15s, padding-left .25s var(--ease); }
.attn-list a:hover { background: #f1fafc; padding-left: 1.25rem; text-decoration: none; }
.attn-list .st { white-space: normal; color: var(--ink); font-weight: 600; align-items: flex-start; }
.attn-list .st::before { margin-top: .35em; }
.attn-list .attn-n { margin-left: auto; min-width: 2.2rem; text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--navy-900); }
.attn-list .bi-chevron-right { color: var(--slate); }
.feed { list-style: none; margin: 0; padding: .3rem 0; }
.feed li { position: relative; display: flex; gap: .75rem; padding: .55rem 1rem .55rem 2.2rem; font-size: .84rem; }
.feed li::before { content: ""; position: absolute; left: 1.05rem; top: 0; bottom: 0; width: 2px; background: linear-gradient(180deg, #d7eef4, #ece7fb); }
.feed li::after { content: ""; position: absolute; left: calc(1.05rem - 4px); top: .95rem; width: 10px; height: 10px; border-radius: 50%; background: #fff; border: 2px solid #0891b2; }
.feed li:first-child::before { top: .95rem; }
.feed li:last-child::before { bottom: calc(100% - .95rem); }
.feed .feed-main { min-width: 0; flex: 1 1 auto; }
.feed .feed-when { white-space: nowrap; color: var(--muted); font-size: .76rem; }

/* notices */
.sim-note { display: flex; align-items: center; gap: .75rem; margin-bottom: 1rem; padding: .7rem 1rem; border-radius: 12px; font-size: .86rem;
  color: #4c1d95; background: linear-gradient(90deg, #f3edff, #eefbfe); border: 1px solid #ddd0fb; box-shadow: var(--raise-1); }
.sim-note .bi { font-size: 1.1rem; color: #7c3aed; }

/* loading shimmer */
.skeleton { position: relative; overflow: hidden; background: #e9eef5; border-radius: 8px; color: transparent !important; min-height: 1em; }
.skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .75), rgba(255, 255, 255, 0)); animation: gsShimmer 1.3s infinite; }
@keyframes gsShimmer { to { transform: translateX(100%); } }

/* sticky actions of long forms */
.sticky-actions { background: rgba(244, 247, 251, .88); border-top: 1px solid var(--line); }

/* ================================================================== strips under the bar */
.platform-strip, .company-strip { position: relative; z-index: 2; }

/* ================================================================== log in, join, portal-style single cards */
body.login-bg {
  min-height: 100vh; background: #070f22; color: #e6eefb; overflow-x: hidden;
  background-image: radial-gradient(1000px 600px at 85% -10%, rgba(34, 211, 238, .22), rgba(34, 211, 238, 0) 60%), radial-gradient(900px 600px at -10% 110%, rgba(124, 58, 237, .25), rgba(124, 58, 237, 0) 60%), linear-gradient(160deg, #0b1630, #070f22 70%);
}
.net-bg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; opacity: .9; }
.net-bg .fib { fill: none; stroke-width: 1.4; stroke-linecap: round; }
.net-bg .fib-a { stroke: rgba(34, 211, 238, .22); }
.net-bg .fib-b { stroke: rgba(124, 58, 237, .22); }
.net-bg .pulse { fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-dasharray: 40 900; animation: gsFlow 7s linear infinite; }
.net-bg .pulse-a { stroke: #67e8f9; filter: drop-shadow(0 0 6px #22d3ee); }
.net-bg .pulse-b { stroke: #c4b5fd; filter: drop-shadow(0 0 6px #7c3aed); animation-duration: 9s; }
.net-bg .node { fill: #0b1630; stroke: #22d3ee; stroke-width: 1.5; }
.net-bg .node-glow { fill: #22d3ee; opacity: .5; animation: gsBlink 3s ease-in-out infinite; }
@keyframes gsFlow { from { stroke-dashoffset: 940; } to { stroke-dashoffset: 0; } }
@keyframes gsBlink { 0%, 100% { opacity: .15; } 50% { opacity: .7; } }
.login-wrap { position: relative; z-index: 1; min-height: calc(100vh - 2.6rem); display: flex; align-items: center; justify-content: center; padding: 2rem 1rem; }
.login-card {
  position: relative; overflow: hidden; width: 100%; max-width: 430px; border: 1px solid rgba(255, 255, 255, .5); border-radius: 22px; background: #fff; color: var(--ink);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .9) inset, 0 50px 100px -30px rgba(0, 0, 0, .75), 0 0 0 1px rgba(34, 211, 238, .15), 0 0 80px -20px rgba(34, 211, 238, .35);
  animation: gsRise .7s var(--ease) backwards;
}
.login-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--fiber); }
.join-wrap .login-card, .login-card.is-wide { max-width: 560px; }
.login-card .brand-tile { width: 48px; height: 48px; flex-basis: 48px; border-radius: 14px; }
.login-card .brand-tile .brand-mark { width: 48px; height: 48px; border-radius: 14px; }
.login-title { font-size: 1.15rem; font-weight: 800; margin: 0; color: var(--navy-900); letter-spacing: -.015em; }
.login-sub { color: var(--muted); font-size: .84rem; }
.login-card .form-control { padding: .65rem .85rem; border-radius: 11px; }
.login-card .input-icon { position: relative; }
.login-card .input-icon > .bi { position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); color: #8a99b2; pointer-events: none; transition: color .2s; }
.login-card .input-icon > .form-control { padding-left: 2.35rem; }
.login-card .input-icon:focus-within > .bi { color: #0891b2; }
.login-card .btn-primary { padding: .7rem; font-weight: 700; border-radius: 11px; letter-spacing: .01em; }
.login-foot { display: flex; align-items: center; gap: .5rem; color: var(--muted); font-size: .78rem; margin-top: 1.4rem; padding-top: 1rem; border-top: 1px solid var(--line-soft); }
.login-foot .bi { color: #0891b2; }
.login-footer { position: relative; z-index: 1; text-align: center; color: #7f8ea8; font-size: .78rem; padding: 0 1rem 1.2rem; }
.login-footer a { color: #67e8f9; }
.join-wrap { max-width: 600px; }

/* ================================================================== platform (Super Admin) pages */
.co-state::before { box-shadow: 0 0 0 3px rgba(148, 163, 184, .2); }

/* ================================================================== phones and tablets */
@media (max-width: 1199.98px) {
  .app-search .form-control { width: 230px; }
  .app-search .form-control:focus { width: 260px; }
  .app-bar .company { max-width: 170px; }
}
@media (max-width: 991.98px) {
  .main-area { padding: 1rem 1rem 2rem; }
  .brand-b { display: none; }
}
@media (max-width: 767.98px) {
  :root { --bar-h: 56px; }
  .navbar.app-bar { padding: 0 .6rem; gap: .4rem; }
  .app-bar-left { gap: .4rem; }
  .app-bar-right { gap: .3rem; }
  .bell-btn, .app-bar .btn-user { height: 40px; min-width: 40px; }
  .app-bar .btn-user .user-name { display: none; }
  .app-bar .btn-user { padding: 0 .35rem; }
  .app-bar .btn-user.dropdown-toggle::after { display: none; }
  .brand-tile { width: 34px; height: 34px; flex-basis: 34px; }
  .brand-tile .brand-mark { width: 34px; height: 34px; }
  .main-area { padding: .8rem .75rem 2rem !important; }
  .page-bar { padding: .6rem .8rem .6rem 1rem; flex-direction: column; align-items: stretch; }
  .page-bar h1 { text-align: left; }
  .page-bar .page-actions .btn { min-height: 40px; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
  .kpi:not(.card) { flex-direction: column; align-items: flex-start; gap: .55rem; padding: .85rem; min-height: 0; }
  .kpi-ico { width: 38px; height: 38px; flex-basis: 38px; font-size: 1rem; border-radius: 11px; }
  .kpi-value { font-size: 1.22rem; }
  .isp-head { padding: .85rem .9rem; }
  .isp-head-title { font-size: 1.12rem; }
  .isp-head-actions { width: 100%; }
  .isp-head-actions > .btn, .isp-head-actions > form, .isp-head-actions > a.btn { flex: 1 1 auto; }
  .isp-head-actions > form > .btn { width: 100%; }
  .isp-filter { padding: .65rem; }
  .isp-f, .isp-f-grow { flex: 1 1 calc(50% - .4rem); min-width: 0; }
  .isp-f-grow { flex-basis: 100%; }
  .isp-filter-actions { width: 100%; margin-left: 0; }
  .isp-filter-actions .btn { flex: 1 1 auto; }
  .isp-tab { padding: .75rem .75rem; }
  .isp-pager { justify-content: center; text-align: center; }
  .attn-list a { padding: .75rem .9rem; }
  .btn:not(.btn-link):not(.btn-close) { min-height: 40px; }
  .btn-sm { min-height: 38px; }
}
@media (max-width: 380px) {
  .kpi-grid { grid-template-columns: 1fr; }
}

/* ================================================================== motion preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .fiber-line span, .net-bg .pulse { display: none; }
  .chart-svg .line-s { stroke-dashoffset: 0; }
  .chart-svg .area-s { opacity: 1; }
}

/* ================================================================== print: the document only */
@media print {
  body, body.gs-app, body.bare { background: #fff !important; background-image: none !important; }
  .navbar.app-bar, .sidebar, .fiber-line, .isp-tabs, .isp-filter, .isp-pager, .isp-head-actions, .kpi-go, .sim-note { display: none !important; }
  .main-area { padding: 0 !important; }
  .main-area > *, .kpi-grid > *, .alert, .card, .stagger > * { animation: none !important; }
  .card, .isp-card, .page-bar, .isp-head, .kpi:not(.card), .isp-doc { box-shadow: none !important; border-color: #d1d5db; background: #fff !important; }
  .page-bar::before, .isp-head::after, .kpi:not(.card)::after { display: none; }
  .isp-doc { border: 0; padding: 0; max-width: none; margin: 0; }
  .doc-head { border-bottom-color: #000; }
  .kpi-ico { box-shadow: none; }
  .st::before { box-shadow: none !important; animation: none !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  a[href] { color: inherit !important; }
}
