/* ---------------------------------------------------------------------------
   IPTV Panel -- dark dashboard theme
   Layered on top of Bootstrap 5 (loaded from CDN in includes/layout/header.php)
--------------------------------------------------------------------------- */

:root {
    --ink-900: #070b12;
    --ink-800: #0b111c;
    --ink-700: #101827;
    --ink-600: #16202f;
    --line: #223047;
    --line-soft: #1b2739;
    --text: #e8eef8;
    --muted: #93a3bd;
    --brand: #3b82f6;
    --brand-dark: #2563eb;
    --brand-soft: rgba(59, 130, 246, 0.14);
    --good: #34d399;
    --warn: #fbbf24;
    --bad: #f87171;
    --info: #60a5fa;
    --sidebar-width: 264px;
    --radius: 14px;
}

body {
    background: var(--ink-900);
    color: var(--text);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--info);
    text-decoration: none;
}

a:hover {
    color: #93c5fd;
}

/* ---------------------------------------------------------------- layout */

.panel-body {
    min-height: 100vh;
}

.panel-shell {
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.panel-content {
    padding: 26px clamp(16px, 3vw, 34px) 40px;
    flex: 1;
    width: 100%;
    max-width: 1320px;
}

.panel-content-wide {
    max-width: none;
}

.panel-footer {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 18px clamp(16px, 3vw, 34px);
    border-top: 1px solid var(--line-soft);
    color: var(--muted);
    font-size: 0.85rem;
}

/* --------------------------------------------------------------- sidebar */

.panel-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--sidebar-width);
    background: linear-gradient(180deg, var(--ink-800), var(--ink-900));
    border-right: 1px solid var(--line-soft);
    display: flex;
    flex-direction: column;
    padding: 20px 14px;
    z-index: 1045;
    transition: transform 0.2s ease;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 8px 20px;
    color: var(--text);
}

.sidebar-logo,
.auth-logo {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: linear-gradient(140deg, var(--brand), #7c3aed);
    color: #fff;
    font-size: 1.15rem;
    flex: none;
}

.sidebar-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.sidebar-brand-text small {
    color: var(--muted);
    font-size: 0.75rem;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--muted);
    font-weight: 500;
    transition: background 0.15s ease, color 0.15s ease;
}

.sidebar-link i {
    font-size: 1.05rem;
    width: 20px;
    text-align: center;
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
}

.sidebar-link.active {
    background: var(--brand-soft);
    color: #dbeafe;
    box-shadow: inset 2px 0 0 var(--brand);
}

.sidebar-footer {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 16px;
}

.sidebar-support {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--line-soft);
    border-radius: 12px;
    padding: 12px;
    font-size: 0.85rem;
    color: var(--muted);
}

.panel-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(4, 8, 14, 0.6);
    z-index: 1040;
}

body.nav-open .panel-backdrop {
    display: block;
}

/* ---------------------------------------------------------------- topbar */

.panel-topbar {
    position: sticky;
    top: 0;
    z-index: 1030;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px clamp(16px, 3vw, 34px);
    background: rgba(11, 17, 28, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line-soft);
}

.topbar-title {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.topbar-eyebrow {
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.btn-icon {
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 6px 10px;
}

.btn-user {
    display: flex;
    align-items: center;
    gap: 10px;
    background: transparent;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--text);
    padding: 6px 12px;
}

.btn-user:hover,
.btn-user:focus {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
}

.avatar {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: var(--brand-soft);
    color: #bfdbfe;
    display: grid;
    place-items: center;
    font-size: 0.8rem;
    font-weight: 600;
}

/* ------------------------------------------------------------ page heads */

.page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}

.page-head h1 {
    font-size: clamp(1.35rem, 2.4vw, 1.75rem);
    font-weight: 650;
    margin: 0;
}

.page-subheading {
    color: var(--muted);
    margin: 6px 0 0;
    font-size: 0.92rem;
    max-width: 62ch;
}

.page-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* ----------------------------------------------------------------- cards */

.card,
.panel-card {
    background: var(--ink-700);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    color: var(--text);
}

.panel-card {
    padding: 20px;
}

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--line-soft);
    font-weight: 600;
    padding: 14px 18px;
}

.card-body {
    padding: 18px;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--ink-700);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
}

/* Customer dashboard: a service control center, without changing shared cards. */
.customer-dashboard {
    --dashboard-glow: rgba(59, 130, 246, 0.16);
}

.customer-dashboard .stat-card {
    position: relative;
    min-width: 0;
    color: var(--text);
    text-decoration: none;
    transition: border-color .18s ease, transform .18s ease, background .18s ease;
}

.customer-dashboard .stat-card:hover {
    color: var(--text);
    border-color: rgba(96, 165, 250, .45);
    background: linear-gradient(135deg, var(--ink-700), rgba(30, 48, 77, .9));
    transform: translateY(-2px);
}

.customer-dashboard .stat-card:focus-visible,
.customer-dashboard .dashboard-alert a:focus-visible,
.customer-dashboard .dashboard-panel a:focus-visible {
    outline: 3px solid rgba(96, 165, 250, .42);
    outline-offset: 3px;
}

.customer-dashboard .stat-card-primary {
    border-top: 2px solid var(--good);
}

.customer-dashboard .stat-card-expiry {
    border-top: 2px solid var(--brand);
}

.customer-dashboard .stat-arrow {
    position: absolute;
    top: 15px;
    right: 15px;
    color: var(--muted);
    font-size: .8rem;
    opacity: .7;
}

.customer-dashboard .stat-value-muted {
    color: var(--muted);
    font-size: 1.05rem;
    font-weight: 550;
}

.dashboard-kicker {
    display: block;
    margin-bottom: 5px;
    color: var(--info);
    font-size: .68rem;
    font-weight: 750;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.dashboard-alert {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border: 1px solid rgba(251, 191, 36, .3);
    border-left: 3px solid var(--warn);
    border-radius: var(--radius);
    background: linear-gradient(110deg, rgba(251, 191, 36, .1), var(--ink-700) 62%);
}

.dashboard-alert.is-expired {
    border-color: rgba(248, 113, 113, .35);
    border-left-color: var(--bad);
    background: linear-gradient(110deg, rgba(248, 113, 113, .1), var(--ink-700) 62%);
}

.dashboard-alert-icon {
    display: grid;
    flex: none;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    color: #fcd34d;
    background: rgba(251, 191, 36, .14);
    font-size: 1.15rem;
}

.dashboard-alert.is-expired .dashboard-alert-icon {
    color: #fca5a5;
    background: rgba(248, 113, 113, .14);
}

.dashboard-alert-copy {
    min-width: 0;
    flex: 1;
}

.dashboard-alert-copy strong {
    display: block;
    font-size: .98rem;
}

.dashboard-alert-copy p {
    color: var(--muted);
    font-size: .84rem;
}

.dashboard-alert-copy p span {
    display: block;
    color: #cbd5e1;
    font-size: .78rem;
}

.dashboard-empty {
    padding: 38px 24px;
    border: 1px solid rgba(96, 165, 250, .24);
    border-radius: var(--radius);
    text-align: center;
    background:
        radial-gradient(500px 180px at 50% 0%, rgba(59, 130, 246, .16), transparent 70%),
        var(--ink-700);
}

.dashboard-empty .dashboard-kicker {
    color: #93c5fd;
}

.dashboard-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--muted);
    font-size: .78rem;
}

.dashboard-steps span {
    padding: 7px 10px;
    border: 1px solid var(--line-soft);
    border-radius: 9px;
    background: rgba(255, 255, 255, .025);
}

.dashboard-steps b {
    margin-right: 5px;
    color: var(--info);
    font-size: .68rem;
}

.dashboard-steps i {
    color: var(--line);
}

.dashboard-panel {
    box-shadow: 0 16px 42px rgba(3, 7, 14, .12);
}

.dashboard-panel .dashboard-kicker {
    margin-bottom: 2px;
}

.dashboard-table tbody tr {
    transition: background .16s ease;
}

.dashboard-table tbody tr:hover {
    background: rgba(96, 165, 250, .045);
}

.invoice-panel {
    border-top: 2px solid var(--warn);
}

.stat-card .stat-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-size: 1.15rem;
    background: var(--brand-soft);
    color: #bfdbfe;
    flex: none;
}

.stat-card.good .stat-icon { background: rgba(52, 211, 153, 0.14); color: #6ee7b7; }
.stat-card.warn .stat-icon { background: rgba(251, 191, 36, 0.14); color: #fcd34d; }
.stat-card.bad .stat-icon  { background: rgba(248, 113, 113, 0.14); color: #fca5a5; }

.stat-value {
    font-size: 1.5rem;
    font-weight: 650;
    line-height: 1.1;
}

.stat-label {
    color: var(--muted);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ---------------------------------------------------------------- tables */

.table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--text);
    --bs-table-border-color: var(--line-soft);
    --bs-table-hover-bg: rgba(255, 255, 255, 0.03);
    --bs-table-hover-color: var(--text);
    margin-bottom: 0;
}

.table thead th {
    font-size: 0.74rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 600;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}

.table td,
.table th {
    padding: 12px 14px;
    vertical-align: middle;
}

.table-wrap {
    overflow-x: auto;
}

.table-empty {
    padding: 42px 18px;
    text-align: center;
    color: var(--muted);
}

.table-empty i {
    font-size: 1.8rem;
    display: block;
    margin-bottom: 10px;
    opacity: 0.6;
}

.cell-strong {
    font-weight: 600;
}

.cell-muted {
    color: var(--muted);
    font-size: 0.85rem;
}

/* ---------------------------------------------------------------- badges */

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 600;
    border: 1px solid transparent;
    white-space: nowrap;
}

.badge-active,
.badge-paid       { background: rgba(52, 211, 153, 0.13); color: #6ee7b7; border-color: rgba(52, 211, 153, 0.3); }
.badge-pending    { background: rgba(148, 163, 184, 0.14); color: #cbd5e1; border-color: rgba(148, 163, 184, 0.3); }
.badge-processing { background: rgba(96, 165, 250, 0.14); color: #93c5fd; border-color: rgba(96, 165, 250, 0.3); }
.badge-unpaid,
.badge-suspended  { background: rgba(251, 191, 36, 0.14); color: #fcd34d; border-color: rgba(251, 191, 36, 0.3); }
.badge-expired,
.badge-cancelled  { background: rgba(248, 113, 113, 0.13); color: #fca5a5; border-color: rgba(248, 113, 113, 0.3); }
.badge-refunded   { background: rgba(167, 139, 250, 0.14); color: #c4b5fd; border-color: rgba(167, 139, 250, 0.3); }

/* ----------------------------------------------------------------- forms */

.form-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 6px;
}

.form-control,
.form-select {
    background: var(--ink-800);
    border: 1px solid var(--line);
    color: var(--text);
    border-radius: 10px;
    padding: 10px 12px;
}

.form-control:focus,
.form-select:focus {
    background: var(--ink-800);
    color: var(--text);
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

.form-control::placeholder {
    color: #64748b;
}

.form-text {
    color: var(--muted);
}

.input-group-text {
    background: var(--ink-600);
    border-color: var(--line);
    color: var(--muted);
}

.btn-primary {
    background: var(--brand);
    border-color: var(--brand);
    font-weight: 600;
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--brand-dark);
    border-color: var(--brand-dark);
}

.btn-outline-light,
.btn-outline-secondary {
    border-color: var(--line);
    color: var(--text);
}

.btn-outline-light:hover,
.btn-outline-secondary:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--line);
    color: var(--text);
}

.btn-soft {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--line);
    color: var(--text);
}

.btn-soft:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
}

.filter-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: flex-end;
    margin-bottom: 18px;
}

.filter-bar .form-control,
.filter-bar .form-select {
    min-width: 170px;
}

/* -------------------------------------------------------- detail layouts */

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.detail-item .detail-label {
    color: var(--muted);
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 4px;
}

.detail-item .detail-value {
    font-weight: 550;
    word-break: break-word;
}

.credential {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--ink-800);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 8px 12px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.88rem;
    word-break: break-all;
}

.plan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.plan-card {
    background: var(--ink-700);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.plan-card .plan-price {
    font-size: 1.9rem;
    font-weight: 680;
}

.plan-card .plan-price span {
    font-size: 0.85rem;
    color: var(--muted);
    font-weight: 500;
}

.plan-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.plan-card ul i {
    color: var(--good);
    margin-right: 6px;
}

/* ---------------------------------------------------------- customer plans */

.panel-content-wide:has(.plans-catalog) {
    max-width: 1480px;
}

.plans-intro {
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 28px;
    min-height: 246px;
    margin: -4px 0 28px;
    padding: clamp(28px, 5vw, 52px);
    border: 1px solid rgba(96, 165, 250, 0.2);
    border-radius: 22px;
    background:
        radial-gradient(circle at 82% 42%, rgba(124, 58, 237, 0.3), transparent 22%),
        radial-gradient(circle at 98% 0%, rgba(59, 130, 246, 0.2), transparent 40%),
        linear-gradient(118deg, #111c31 0%, #0d1525 58%, #101629 100%);
    box-shadow: 0 20px 55px rgba(2, 6, 23, 0.24);
}

.plans-intro::after {
    position: absolute;
    inset: 0;
    pointer-events: none;
    content: "";
    opacity: 0.16;
    background-image: linear-gradient(rgba(148, 163, 184, 0.12) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.12) 1px, transparent 1px);
    background-size: 38px 38px;
    mask-image: linear-gradient(90deg, black, transparent 82%);
}

.plans-intro-copy {
    position: relative;
    z-index: 1;
    max-width: 610px;
}

.plans-kicker,
.plans-section-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #93c5fd;
    font-size: 0.7rem;
    font-weight: 750;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.plans-intro h2 {
    margin: 14px 0 12px;
    color: #f8fafc;
    font-size: clamp(2rem, 4vw, 3.45rem);
    font-weight: 760;
    letter-spacing: -0.055em;
    line-height: 0.98;
}

.plans-intro h2 span {
    color: #93c5fd;
}

.plans-intro p {
    max-width: 540px;
    margin: 0;
    color: #aab8cc;
    font-size: 0.98rem;
    line-height: 1.65;
}

.plans-intro-signal {
    position: relative;
    z-index: 1;
    width: 190px;
    height: 190px;
    flex: 0 0 190px;
    display: grid;
    place-items: center;
    color: #bfdbfe;
}

.signal-orbit {
    position: absolute;
    display: block;
    border: 1px solid rgba(147, 197, 253, 0.3);
    border-radius: 50%;
    transform: rotate(-28deg);
}

.signal-orbit::after {
    position: absolute;
    top: -4px;
    right: 20%;
    width: 7px;
    height: 7px;
    content: "";
    border-radius: 50%;
    background: #60a5fa;
    box-shadow: 0 0 18px #60a5fa;
}

.signal-orbit-one {
    width: 160px;
    height: 74px;
}

.signal-orbit-two {
    width: 116px;
    height: 150px;
    transform: rotate(45deg);
    border-color: rgba(167, 139, 250, 0.34);
}

.signal-core {
    display: grid;
    place-items: center;
    width: 60px;
    height: 60px;
    border: 1px solid rgba(191, 219, 254, 0.65);
    border-radius: 18px;
    color: #fff;
    font-size: 1.7rem;
    background: linear-gradient(145deg, #3b82f6, #7c3aed);
    box-shadow: 0 0 0 10px rgba(96, 165, 250, 0.08), 0 16px 35px rgba(37, 99, 235, 0.3);
}

.plans-intro-signal small {
    position: absolute;
    right: -4px;
    bottom: 6px;
    color: #8193ad;
    font-size: 0.55rem;
    font-weight: 750;
    letter-spacing: 0.16em;
    line-height: 1.5;
    text-align: right;
}

.plans-context-alert {
    border-color: rgba(96, 165, 250, 0.35);
    background: rgba(30, 64, 175, 0.16);
}

.plans-catalog {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.device-plan-section {
    overflow: hidden;
    border: 1px solid var(--line-soft);
    border-radius: 18px;
    background: linear-gradient(145deg, rgba(16, 24, 39, 0.96), rgba(11, 17, 28, 0.98));
    box-shadow: 0 14px 36px rgba(2, 6, 23, 0.16);
}

.device-plan-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 22px;
    padding: 24px 26px 21px;
    border-bottom: 1px solid var(--line-soft);
}

.device-plan-title {
    display: flex;
    align-items: center;
    gap: 14px;
}

.device-plan-icon {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(96, 165, 250, 0.28);
    border-radius: 13px;
    color: #93c5fd;
    font-size: 1.2rem;
    background: rgba(59, 130, 246, 0.12);
}

.device-plan-heading h3 {
    margin: 4px 0 0;
    font-size: 1.35rem;
    font-weight: 730;
    letter-spacing: -0.025em;
}

.device-plan-heading p {
    max-width: 360px;
    margin: 0;
    color: var(--muted);
    font-size: 0.84rem;
    line-height: 1.5;
    text-align: right;
}

.plans-table-wrap {
    overflow-x: auto;
}

.plans-table {
    width: 100%;
    min-width: 780px;
    border-collapse: collapse;
}

.plans-table th {
    padding: 14px 22px;
    color: #72849d;
    font-size: 0.68rem;
    font-weight: 760;
    letter-spacing: 0.11em;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}

.plans-table th:nth-child(3),
.plans-table th:nth-child(4),
.plans-table td:nth-child(3),
.plans-table td:nth-child(4) {
    text-align: right;
}

.plans-table th:last-child,
.plans-table td:last-child {
    text-align: right;
}

.plans-table td {
    padding: 18px 22px;
    border-top: 1px solid rgba(34, 48, 71, 0.72);
    vertical-align: middle;
}

.plans-table tbody tr {
    transition: background 0.18s ease;
}

.plans-table tbody tr:hover {
    background: rgba(59, 130, 246, 0.055);
}

.plans-table .plans-row-featured {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.08), rgba(124, 58, 237, 0.06));
}

.plans-plan-name {
    display: flex;
    align-items: center;
    gap: 9px;
}

.plans-plan-name strong {
    color: var(--text);
    font-size: 0.98rem;
}

.plans-plan-caption,
.plans-total-caption,
.plans-saving {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.72rem;
}

.plans-value-badge,
.plans-saving {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 3px 7px;
    border-radius: 999px;
    color: #86efac;
    font-size: 0.65rem;
    font-weight: 750;
    letter-spacing: 0.02em;
    background: rgba(52, 211, 153, 0.11);
}

.plans-saving {
    margin-left: auto;
}

.plans-saving-muted {
    color: var(--muted);
    background: transparent;
}

.plans-access {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #c4d1e4;
    font-size: 0.82rem;
}

.plans-access i {
    color: #60a5fa;
}

.plans-monthly-price {
    color: #cbd5e1;
    font-size: 0.98rem;
}

.plans-total-price {
    color: #f8fafc;
    font-size: 1.15rem;
}

.plans-choose-button {
    min-width: 104px;
    padding: 9px 13px;
    font-size: 0.78rem;
    font-weight: 700;
}

.plans-choose-button i {
    margin-left: 5px;
    transition: transform 0.18s ease;
}

.plans-choose-button:hover i,
.plans-choose-button:focus-visible i {
    transform: translateX(3px);
}

.plans-assurance {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 24px;
    padding: 18px 20px;
    border: 1px solid var(--line-soft);
    border-radius: 16px;
    background: rgba(16, 24, 39, 0.58);
}

.plans-assurance > div {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
}

.plans-assurance > div + div {
    padding-left: 18px;
    border-left: 1px solid var(--line-soft);
}

.plans-assurance > div > i {
    color: #60a5fa;
    font-size: 1.2rem;
}

.plans-assurance strong,
.plans-assurance small {
    display: block;
}

.plans-assurance strong {
    color: #dbeafe;
    font-size: 0.78rem;
}

.plans-assurance small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.7rem;
}

@media (max-width: 760px) {
    .plans-intro {
        min-height: 220px;
        padding: 28px 22px;
    }

    .plans-intro-signal {
        position: absolute;
        right: -24px;
        bottom: -16px;
        opacity: 0.42;
        transform: scale(0.82);
    }

    .device-plan-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
        padding: 20px;
    }

    .device-plan-heading p {
        max-width: none;
        text-align: left;
    }

    .plans-assurance {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .plans-assurance > div + div {
        padding-left: 0;
        border-top: 1px solid var(--line-soft);
        border-left: 0;
        padding-top: 14px;
    }
}

@media (max-width: 575.98px) {
    .plans-intro {
        min-height: 260px;
        margin-top: 0;
    }

    .plans-intro h2 {
        font-size: 2.35rem;
    }

    .plans-intro p {
        max-width: 270px;
        font-size: 0.87rem;
    }

    .plans-table {
        min-width: 0;
    }

    .plans-table thead {
        display: none;
    }

    .plans-table,
    .plans-table tbody,
    .plans-table tr,
    .plans-table td {
        display: block;
        width: 100%;
    }

    .plans-table tr {
        padding: 18px 16px;
        border-top: 1px solid rgba(34, 48, 71, 0.72);
    }

    .plans-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 16px;
        padding: 7px 0;
        border: 0;
        text-align: right !important;
    }

    .plans-table td::before {
        content: attr(data-label);
        color: #72849d;
        font-size: 0.66rem;
        font-weight: 760;
        letter-spacing: 0.09em;
        text-align: left;
        text-transform: uppercase;
    }

    .plans-table td:first-child {
        display: block;
        padding-top: 0;
        text-align: left !important;
    }

    .plans-table td:first-child::before {
        display: none;
    }

    .plans-table td:first-child .plans-plan-caption {
        margin-top: 5px;
    }

    .plans-table .plans-action-cell {
        display: block;
        padding-top: 13px;
    }

    .plans-table .plans-action-cell::before {
        display: none;
    }

    .plans-choose-button {
        width: 100%;
    }
}

/* ------------------------------------------------------------ auth pages */

.auth-body {
    background:
        radial-gradient(1000px 600px at 12% -10%, rgba(59, 130, 246, 0.18), transparent 60%),
        radial-gradient(800px 500px at 100% 0%, rgba(124, 58, 237, 0.16), transparent 55%),
        var(--ink-900);
    min-height: 100vh;
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 32px 16px;
}

.auth-card {
    width: min(460px, 100%);
    background: var(--ink-700);
    border: 1px solid var(--line-soft);
    border-radius: 18px;
    padding: 28px;
    box-shadow: 0 30px 70px rgba(3, 7, 14, 0.55);
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
    font-weight: 650;
    margin-bottom: 20px;
}

.auth-title {
    font-size: 1.3rem;
    font-weight: 650;
    margin-bottom: 4px;
}

.auth-subtitle {
    color: var(--muted);
    font-size: 0.92rem;
    margin-bottom: 20px;
}

.auth-footnote {
    margin-top: 18px;
    color: var(--muted);
    font-size: 0.9rem;
    text-align: center;
}

/* ----------------------------------------------------------- checkout flow */

.auth-card:has(.checkout-page) {
    width: min(1060px, 100%);
    padding: clamp(22px, 4vw, 42px);
    background:
        radial-gradient(520px 260px at 100% 0%, rgba(96, 165, 250, 0.09), transparent 72%),
        var(--ink-700);
}

.checkout-heading {
    margin-bottom: 26px;
}

.checkout-kicker {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #93c5fd;
    font-size: .68rem;
    font-weight: 750;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.checkout-page .auth-title {
    margin-top: 8px;
    font-size: clamp(1.65rem, 3vw, 2.25rem);
    letter-spacing: -.035em;
}

.checkout-page .auth-subtitle {
    max-width: 650px;
    margin-bottom: 0;
    line-height: 1.55;
}

.checkout-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr);
    gap: 20px;
    align-items: start;
}

.checkout-main {
    display: grid;
    gap: 20px;
}

.checkout-section,
.checkout-summary,
.checkout-plan-picker,
.checkout-confirmation-card {
    position: relative;
    border-color: rgba(96, 165, 250, .16);
    box-shadow: 0 15px 35px rgba(3, 7, 18, .15);
}

.checkout-section {
    padding: 25px;
}

.checkout-section h5,
.checkout-summary h5 {
    font-size: 1.06rem;
}

.checkout-step {
    float: right;
    color: #60a5fa;
    font-size: .72rem;
    font-weight: 750;
    letter-spacing: .09em;
}

.checkout-method {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 15px;
    border: 1px solid rgba(96, 165, 250, .38);
    border-radius: 13px;
    background: linear-gradient(110deg, rgba(59, 130, 246, .12), rgba(124, 58, 237, .08));
    cursor: pointer;
    transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.checkout-method:hover {
    border-color: rgba(147, 197, 253, .82);
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(3, 7, 18, .2);
}

.checkout-method .form-check-input {
    position: absolute;
    opacity: 0;
}

.checkout-method-icon {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    flex: 0 0 38px;
    border-radius: 10px;
    background: rgba(59, 130, 246, .2);
    color: #bfdbfe;
}

.checkout-method strong,
.checkout-method small {
    display: block;
}

.checkout-method small {
    margin-top: 3px;
    color: var(--muted);
    font-size: .78rem;
}

.checkout-method-check {
    margin-left: auto;
    color: #60a5fa;
    font-size: 1.1rem;
}

.checkout-summary {
    position: sticky;
    top: 22px;
    padding: 25px;
    background: linear-gradient(145deg, rgba(20, 34, 58, .98), rgba(13, 21, 37, .98));
}

.checkout-summary h5 {
    margin: 14px 0 5px;
}

.checkout-summary > p {
    color: var(--muted);
    font-size: .84rem;
}

.checkout-total {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 12px;
    margin: 22px 0 12px;
    padding: 16px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-size: .82rem;
}

.checkout-total strong {
    color: var(--text);
    font-size: 1.5rem;
    line-height: 1;
}

.checkout-submit {
    margin-top: 24px;
    min-height: 47px;
}

.checkout-reassurance {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    margin-top: 14px;
    color: var(--muted);
    font-size: .74rem;
    line-height: 1.45;
}

.checkout-reassurance i {
    color: #6ee7b7;
}

.checkout-plan-picker {
    padding: 25px;
}

.checkout-plan-list {
    display: grid;
    gap: 10px;
}

.checkout-plan-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    padding: 15px 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--text);
    text-decoration: none;
    transition: .18s ease;
}

.checkout-plan-option:hover {
    color: var(--text);
    border-color: rgba(96, 165, 250, .75);
    background: rgba(59, 130, 246, .07);
    transform: translateX(2px);
}

.checkout-plan-option strong,
.checkout-plan-option small {
    display: block;
}

.checkout-plan-option small {
    margin-top: 4px;
    color: var(--muted);
    font-size: .78rem;
}

.checkout-plan-price {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #bfdbfe;
    font-weight: 680;
    white-space: nowrap;
}

.checkout-complete {
    text-align: center;
}

.checkout-complete .auth-subtitle {
    margin: 8px auto 22px;
}

.checkout-success-icon {
    display: grid;
    width: 55px;
    height: 55px;
    place-items: center;
    margin: 0 auto 14px;
    border: 1px solid rgba(110, 231, 183, .45);
    border-radius: 18px;
    background: rgba(52, 211, 153, .1);
    color: #6ee7b7;
    font-size: 1.75rem;
}

.checkout-confirmation-card {
    margin-bottom: 18px;
    padding: 22px;
    text-align: left;
}

.demo-hint {
    margin-top: 18px;
    border: 1px dashed var(--line);
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 0.82rem;
    color: var(--muted);
}

.demo-hint strong {
    color: var(--text);
}

/* -------------------------------------------------------------- invoices */

.invoice-sheet {
    background: var(--ink-700);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    padding: clamp(20px, 4vw, 40px);
}

.invoice-head {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--line-soft);
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.invoice-total-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    color: var(--muted);
}

.invoice-total-row.grand {
    color: var(--text);
    font-size: 1.15rem;
    font-weight: 680;
    border-top: 1px solid var(--line);
    margin-top: 8px;
    padding-top: 12px;
}

/* ------------------------------------------------------------ responsive */

@media (max-width: 991.98px) {
    .panel-shell {
        margin-left: 0;
    }

    .panel-sidebar {
        transform: translateX(-100%);
    }

    body.nav-open .panel-sidebar {
        transform: translateX(0);
    }

    .checkout-layout {
        grid-template-columns: 1fr;
    }

    .checkout-summary {
        position: static;
    }
}

@media (max-width: 575.98px) {
    .page-head {
        margin-bottom: 16px;
    }

    .panel-content {
        padding: 18px 14px 32px;
    }

    .stat-card {
        padding: 14px;
    }

    .customer-dashboard .stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .customer-dashboard .stat-card {
        min-height: 106px;
        padding: 13px 11px;
        align-items: flex-start;
        gap: 10px;
    }

    .customer-dashboard .stat-card .stat-icon {
        width: 34px;
        height: 34px;
        border-radius: 10px;
        font-size: 1rem;
    }

    .customer-dashboard .stat-value {
        font-size: 1.2rem;
    }

    .customer-dashboard .stat-label {
        font-size: .68rem;
        line-height: 1.25;
    }

    .dashboard-alert {
        align-items: flex-start;
        flex-wrap: wrap;
        padding: 14px;
    }

    .dashboard-alert .btn {
        width: 100%;
        min-height: 42px;
    }

    .dashboard-empty {
        padding: 28px 16px;
    }

    .dashboard-steps {
        align-items: stretch;
        flex-direction: column;
        gap: 6px;
    }

    .dashboard-steps i {
        display: none;
    }

    .dashboard-steps span {
        text-align: left;
    }

    .customer-dashboard .dashboard-panel {
        padding: 16px;
    }

    .customer-dashboard .dashboard-table {
        min-width: 520px;
    }

    .auth-shell {
        padding: 18px 12px;
    }

    .auth-card:has(.checkout-page) {
        padding: 20px 16px;
        border-radius: 15px;
    }

    .checkout-heading {
        margin-bottom: 20px;
    }

    .checkout-section,
    .checkout-summary,
    .checkout-plan-picker,
    .checkout-confirmation-card {
        padding: 18px;
    }

    .checkout-method {
        align-items: flex-start;
        padding: 13px;
    }

    .checkout-method small {
        line-height: 1.4;
    }

    .checkout-plan-option {
        padding: 13px;
    }

    .checkout-plan-price {
        gap: 8px;
        font-size: .9rem;
    }
}

/* ----------------------------------------------------------------- print */

@media print {
    body {
        background: #fff;
        color: #111;
    }

    .panel-sidebar,
    .panel-topbar,
    .panel-footer,
    .page-actions,
    .no-print {
        display: none !important;
    }

    .panel-shell {
        margin-left: 0;
    }

    .invoice-sheet {
        background: #fff;
        border: none;
        color: #111;
        padding: 0;
    }

    .invoice-total-row,
    .cell-muted,
    .detail-label {
        color: #444 !important;
    }

    .table {
        --bs-table-color: #111;
        --bs-table-border-color: #ccc;
    }

    .status-badge {
        border: 1px solid #999;
        color: #111 !important;
        background: transparent !important;
    }
}

/* ---------------------------------------------------------------------------
   IPTVStone customer command deck
   A luminous midnight surface for the account area: calm enough for billing
   and credentials, with a subtle broadcast-grid atmosphere.
--------------------------------------------------------------------------- */
:root {
    --stone-950: #050711;
    --stone-925: #080b18;
    --stone-900: #0c1020;
    --stone-850: #11172a;
    --stone-panel: rgba(17, 23, 42, .78);
    --stone-panel-solid: #11172a;
    --stone-line: rgba(148, 163, 184, .14);
    --stone-line-bright: rgba(129, 140, 248, .28);
    --stone-focus: #a5b4fc;
    --stone-violet: #8b5cf6;
    --stone-cyan: #38bdf8;
    --stone-emerald: #34d399;
    --stone-shadow: 0 22px 60px rgba(1, 3, 12, .28);
}

html {
    color-scheme: dark;
    scrollbar-gutter: stable;
}

body.panel-body {
    position: relative;
    overflow-x: hidden;
    background:
        radial-gradient(900px 520px at 84% -10%, rgba(79, 70, 229, .18), transparent 66%),
        radial-gradient(680px 520px at 18% 100%, rgba(14, 165, 233, .08), transparent 70%),
        var(--stone-950);
}

body.panel-body::before {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: .38;
    background-image:
        linear-gradient(rgba(148, 163, 184, .035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, .035) 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: linear-gradient(to bottom, black, transparent 75%);
    content: "";
}

body.panel-body-customer {
    --brand: #7c6cf2;
    --brand-dark: #6755df;
    --brand-soft: rgba(124, 108, 242, .16);
    --ink-900: var(--stone-950);
    --ink-800: var(--stone-900);
    --ink-700: var(--stone-panel-solid);
    --ink-600: #1a2340;
    --line: rgba(148, 163, 184, .2);
    --line-soft: var(--stone-line);
    --muted: #9aa8c3;
}

body.panel-body.nav-open {
    overflow: hidden;
}

.skip-link {
    position: fixed;
    top: 10px;
    left: 14px;
    z-index: 2000;
    padding: 10px 14px;
    border-radius: 10px;
    background: #fff;
    color: #111827;
    font-weight: 700;
    transform: translateY(-160%);
    transition: transform .18s ease;
}

.skip-link:focus {
    transform: translateY(0);
}

.panel-sidebar {
    width: var(--sidebar-width);
    padding: 22px 16px 16px;
    overflow-y: auto;
    background:
        radial-gradient(360px 260px at 25% 0%, rgba(99, 102, 241, .18), transparent 72%),
        linear-gradient(180deg, #0f1427 0%, #080b16 72%);
    border-right: 1px solid rgba(148, 163, 184, .16);
    box-shadow: 18px 0 60px rgba(2, 4, 14, .18);
}

.panel-sidebar::after {
    position: absolute;
    top: 112px;
    right: -1px;
    bottom: 22px;
    width: 1px;
    background: linear-gradient(180deg, transparent, rgba(129, 140, 248, .5), transparent);
    content: "";
}

.sidebar-brand {
    position: relative;
    gap: 13px;
    margin-bottom: 18px;
    padding: 7px 8px 18px;
    border-bottom: 1px solid rgba(148, 163, 184, .12);
}

.sidebar-logo {
    position: relative;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(196, 181, 253, .35);
    border-radius: 14px;
    background:
        linear-gradient(145deg, rgba(139, 92, 246, .95), rgba(56, 189, 248, .82)),
        #7c3aed;
    box-shadow: 0 10px 26px rgba(99, 102, 241, .3), inset 0 1px rgba(255, 255, 255, .3);
}

.sidebar-logo-pulse {
    position: absolute;
    right: 4px;
    bottom: 4px;
    width: 7px;
    height: 7px;
    border: 2px solid #11172a;
    border-radius: 50%;
    background: var(--stone-emerald);
}

.sidebar-logo-pulse::after {
    position: absolute;
    inset: -5px;
    border: 1px solid rgba(52, 211, 153, .28);
    border-radius: inherit;
    content: "";
}

.sidebar-brand-text strong {
    font-size: .94rem;
    letter-spacing: .01em;
}

.sidebar-brand-text small {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 5px;
    color: #7f8eab;
    font-size: .68rem;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.sidebar-brand-text small span {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--stone-emerald);
    box-shadow: 0 0 10px rgba(52, 211, 153, .75);
}

.sidebar-nav-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 11px 8px;
    color: #65738e;
    font-size: .65rem;
    font-weight: 750;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.sidebar-nav-label i {
    color: #47536e;
}

.sidebar-nav {
    gap: 5px;
}

.sidebar-link {
    position: relative;
    min-height: 45px;
    gap: 12px;
    padding: 11px 12px;
    overflow: hidden;
    border: 1px solid transparent;
    border-radius: 12px;
    color: #8997b1;
    font-size: .9rem;
    transition: color .18s ease, background .18s ease, border-color .18s ease, transform .18s ease;
}

.sidebar-link::before {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(139, 92, 246, .14), transparent 70%);
    opacity: 0;
    transition: opacity .18s ease;
    content: "";
}

.sidebar-link > * {
    position: relative;
    z-index: 1;
}

.sidebar-link i:first-child {
    width: 21px;
    color: #71809b;
    font-size: 1.02rem;
    transition: color .18s ease, transform .18s ease;
}

.sidebar-link-arrow {
    width: auto !important;
    margin-left: auto;
    color: #53617c !important;
    font-size: .7rem !important;
    opacity: 0;
    transform: translate(-4px, 4px);
    transition: opacity .18s ease, transform .18s ease;
}

.sidebar-link:hover {
    border-color: rgba(148, 163, 184, .1);
    background: rgba(148, 163, 184, .07);
    color: #f1f5ff;
    transform: translateX(2px);
}

.sidebar-link:hover::before,
.sidebar-link.active::before {
    opacity: 1;
}

.sidebar-link:hover i:first-child {
    color: #c4b5fd;
    transform: scale(1.08);
}

.sidebar-link:hover .sidebar-link-arrow {
    opacity: 1;
    transform: translate(0, 0);
}

.sidebar-link:focus-visible {
    position: relative;
    z-index: 2;
    border-color: rgba(165, 180, 252, .6);
    background: rgba(129, 140, 248, .14);
    color: #fff;
    box-shadow: 0 0 0 3px rgba(129, 140, 248, .16);
}

.sidebar-link:focus-visible .sidebar-link-arrow {
    opacity: 1;
    transform: translate(0, 0);
}

.sidebar-link:active {
    background: rgba(129, 140, 248, .2);
    color: #fff;
    transform: translateX(1px) scale(.995);
}

.sidebar-link.active {
    border-color: rgba(129, 140, 248, .25);
    background: linear-gradient(100deg, rgba(99, 102, 241, .24), rgba(56, 189, 248, .06));
    color: #f5f3ff;
    box-shadow: inset 3px 0 0 #a78bfa, 0 9px 24px rgba(4, 6, 20, .16);
}

.sidebar-link.active i:first-child {
    color: #c4b5fd;
}

.sidebar-link.active .sidebar-link-arrow {
    color: #a5b4fc !important;
    opacity: 1;
    transform: translate(0, 0);
}

.panel-backdrop {
    width: 100%;
    border: 0;
    padding: 0;
    appearance: none;
}

.sidebar-footer {
    gap: 8px;
    padding-top: 18px;
}

.sidebar-support {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 3px;
    padding: 13px 11px;
    border: 1px solid rgba(56, 189, 248, .17);
    border-radius: 13px;
    background: linear-gradient(135deg, rgba(14, 165, 233, .11), rgba(99, 102, 241, .08));
}

.sidebar-support-icon {
    display: grid;
    flex: none;
    width: 31px;
    height: 31px;
    place-items: center;
    border-radius: 10px;
    background: rgba(56, 189, 248, .14);
    color: #7dd3fc;
}

.sidebar-support p {
    color: #dbeafe;
    font-size: .78rem;
    font-weight: 650;
}

.sidebar-support a {
    color: #7dd3fc;
    font-size: .72rem;
}

.sidebar-support a i {
    margin-left: 3px;
    font-size: .64rem;
}

.panel-topbar {
    min-height: 76px;
    padding: 14px clamp(18px, 3vw, 38px);
    background: rgba(8, 11, 24, .72);
    border-bottom: 1px solid rgba(148, 163, 184, .13);
    box-shadow: 0 12px 30px rgba(2, 4, 14, .11);
}

.panel-topbar::after {
    position: absolute;
    right: clamp(18px, 3vw, 38px);
    bottom: -1px;
    left: clamp(18px, 3vw, 38px);
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(129, 140, 248, .42), transparent);
    content: "";
}

.topbar-title {
    gap: 4px;
}

.topbar-eyebrow {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #8290ab;
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .13em;
}

.topbar-eyebrow i {
    color: #a78bfa;
    font-size: .78rem;
}

.topbar-title strong {
    color: #f8fafc;
    font-size: 1.06rem;
    letter-spacing: -.01em;
}

.topbar-status {
    align-items: center;
    gap: 7px;
    margin-left: 12px;
    padding: 7px 10px;
    border: 1px solid rgba(52, 211, 153, .17);
    border-radius: 999px;
    color: #8bd8b7;
    font-size: .69rem;
    font-weight: 650;
}

.topbar-status span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--stone-emerald);
    box-shadow: 0 0 9px rgba(52, 211, 153, .8);
}

.btn-icon,
.btn-user {
    border-color: rgba(148, 163, 184, .18);
    background: rgba(148, 163, 184, .06);
    transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}

.btn-icon:hover,
.btn-icon:focus-visible,
.btn-user:hover,
.btn-user:focus-visible {
    border-color: rgba(165, 180, 252, .42);
    background: rgba(129, 140, 248, .13);
    color: #f5f3ff;
    transform: translateY(-1px);
}

.btn-icon:active,
.btn-user:active {
    background: rgba(129, 140, 248, .2);
    transform: translateY(0) scale(.98);
}

.btn-user {
    min-height: 44px;
    padding: 5px 10px 5px 6px;
    font-size: .84rem;
}

.avatar {
    width: 33px;
    height: 33px;
    border: 1px solid rgba(196, 181, 253, .27);
    border-radius: 11px;
    background: linear-gradient(145deg, rgba(139, 92, 246, .3), rgba(56, 189, 248, .18));
    color: #ddd6fe;
}

.dropdown-menu {
    margin-top: 10px !important;
    min-width: 214px;
    padding: 8px;
    border: 1px solid rgba(148, 163, 184, .18);
    border-radius: 14px;
    background: rgba(16, 23, 43, .96);
    box-shadow: var(--stone-shadow);
    backdrop-filter: blur(18px);
}

.dropdown-item,
.dropdown-item-text {
    border-radius: 9px;
    color: #c4cee0;
}

.dropdown-item {
    padding: 9px 10px;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background: rgba(129, 140, 248, .13);
    color: #f5f3ff;
}

.dropdown-item:active {
    background: rgba(129, 140, 248, .22);
    color: #fff;
}

.dropdown-divider {
    border-color: rgba(148, 163, 184, .13);
}

.panel-content {
    position: relative;
    padding-top: clamp(28px, 4vw, 42px);
}

.page-head {
    position: relative;
    align-items: center;
    min-height: 58px;
    margin-bottom: clamp(24px, 3vw, 34px);
    padding-left: 17px;
}

.page-head::before {
    position: absolute;
    top: 2px;
    bottom: 2px;
    left: 0;
    width: 3px;
    border-radius: 4px;
    background: linear-gradient(180deg, #a78bfa, #38bdf8);
    box-shadow: 0 0 18px rgba(129, 140, 248, .35);
    content: "";
}

.page-head-mark {
    display: none;
}

.page-head h1 {
    color: #f8fafc;
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    letter-spacing: -.035em;
}

.page-subheading {
    color: #8c9ab5;
    font-size: .9rem;
}

.page-actions .btn {
    min-height: 42px;
}

.panel-card,
.card,
.invoice-sheet,
.plan-card {
    border-color: rgba(148, 163, 184, .14);
    background:
        linear-gradient(145deg, rgba(28, 37, 65, .66), rgba(13, 18, 34, .84));
    box-shadow: 0 14px 42px rgba(2, 4, 14, .14);
}

.panel-card {
    position: relative;
    overflow: hidden;
}

.panel-card::before {
    position: absolute;
    top: 0;
    right: 15%;
    left: 15%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(165, 180, 252, .28), transparent);
    content: "";
}

.panel-body-customer .panel-card h5,
.panel-body-customer .panel-card h6 {
    color: #f1f5ff;
}

.customer-dashboard .stat-card {
    border-color: rgba(148, 163, 184, .14);
    background:
        radial-gradient(180px 120px at 100% 0%, rgba(129, 140, 248, .13), transparent 75%),
        linear-gradient(145deg, rgba(25, 34, 61, .82), rgba(12, 17, 32, .92));
    box-shadow: 0 14px 34px rgba(2, 4, 14, .16);
}

.customer-dashboard .stat-card:hover {
    border-color: rgba(165, 180, 252, .4);
    background:
        radial-gradient(180px 120px at 100% 0%, rgba(129, 140, 248, .2), transparent 75%),
        linear-gradient(145deg, rgba(32, 42, 76, .9), rgba(13, 18, 34, .96));
    box-shadow: 0 18px 42px rgba(2, 4, 14, .28);
}

.dashboard-alert,
.dashboard-empty {
    box-shadow: 0 14px 36px rgba(2, 4, 14, .15);
}

.table-wrap {
    border: 1px solid rgba(148, 163, 184, .11);
    border-radius: 13px;
    background: rgba(4, 7, 16, .18);
}

.table {
    --bs-table-hover-bg: rgba(129, 140, 248, .07);
}

.table thead th {
    padding-top: 13px;
    padding-bottom: 13px;
    color: #8492ad;
    background: rgba(4, 7, 16, .16);
}

.table tbody tr:last-child td {
    border-bottom: 0;
}

.table tbody tr:hover {
    background: rgba(129, 140, 248, .055);
}

.table-empty {
    padding: 56px 22px;
}

.table-empty i {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    margin: 0 auto 13px;
    border: 1px solid rgba(165, 180, 252, .2);
    border-radius: 15px;
    background: rgba(129, 140, 248, .1);
    color: #a5b4fc;
}

.filter-bar {
    padding: 11px;
    border: 1px solid rgba(148, 163, 184, .13);
    border-radius: 14px;
    background: rgba(17, 23, 42, .55);
    box-shadow: 0 12px 30px rgba(2, 4, 14, .12);
}

.filter-bar .form-control,
.filter-bar .form-select {
    min-height: 42px;
}

.form-control,
.form-select {
    min-height: 44px;
    border-color: rgba(148, 163, 184, .2);
    background: rgba(5, 7, 17, .48);
}

textarea.form-control {
    min-height: 92px;
}

.form-control:focus,
.form-select:focus {
    border-color: rgba(165, 180, 252, .75);
    box-shadow: 0 0 0 3px rgba(129, 140, 248, .17), 0 0 24px rgba(99, 102, 241, .1);
}

.btn-primary {
    border-color: #7c6cf2;
    background: linear-gradient(135deg, #8b5cf6, #5b7cfa);
    box-shadow: 0 9px 22px rgba(99, 102, 241, .22);
}

.btn-primary:hover,
.btn-primary:focus {
    border-color: #a78bfa;
    background: linear-gradient(135deg, #9b75ff, #6d8bff);
    box-shadow: 0 11px 26px rgba(99, 102, 241, .32);
}

.btn-soft {
    border-color: rgba(148, 163, 184, .2);
    background: rgba(148, 163, 184, .07);
    color: #d7e0ef;
}

.btn-soft:hover,
.btn-soft:focus {
    border-color: rgba(165, 180, 252, .42);
    background: rgba(129, 140, 248, .13);
    color: #fff;
}

.detail-item {
    padding: 13px 14px;
    border: 1px solid rgba(148, 163, 184, .1);
    border-radius: 11px;
    background: rgba(4, 7, 16, .17);
}

.detail-item .detail-label {
    color: #7f8eaa;
}

.credential {
    border-color: rgba(148, 163, 184, .18);
    background: rgba(4, 7, 16, .42);
}

.pagination .page-link {
    min-width: 36px;
    min-height: 36px;
    display: grid;
    place-items: center;
    border-color: rgba(148, 163, 184, .17);
    background: rgba(148, 163, 184, .06);
    color: #b8c4d9;
}

.pagination .page-link:hover,
.pagination .page-item.active .page-link {
    border-color: rgba(165, 180, 252, .4);
    background: rgba(129, 140, 248, .18);
    color: #fff;
}

.alert {
    border-radius: 13px;
    box-shadow: 0 12px 30px rgba(2, 4, 14, .12);
}

.panel-footer {
    border-top-color: rgba(148, 163, 184, .12);
    color: #7887a2;
}

:focus-visible {
    outline: 3px solid rgba(165, 180, 252, .78);
    outline-offset: 3px;
}

@media (max-width: 991.98px) {
    .panel-sidebar {
        box-shadow: 22px 0 70px rgba(1, 3, 12, .5);
    }

    .panel-backdrop {
        background: rgba(3, 5, 14, .72);
        backdrop-filter: blur(4px);
    }

    .panel-menu-toggle {
        min-width: 44px;
        min-height: 44px;
    }
}

@media (max-width: 575.98px) {
    .panel-topbar {
        min-height: 68px;
        padding: 11px 14px;
    }

    .topbar-title strong {
        font-size: .98rem;
    }

    .panel-content {
        padding-top: 24px;
    }

    .page-head {
        min-height: 50px;
        padding-left: 13px;
    }

    .page-head h1 {
        font-size: 1.4rem;
    }

    .panel-card {
        border-radius: 13px;
    }

    .filter-bar {
        align-items: stretch;
    }

    .filter-bar .form-control,
    .filter-bar .form-select,
    .filter-bar .btn {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}

@media print {
    body.panel-body::before,
    .panel-card::before {
        display: none !important;
    }
}

/* ---------------------------------------------------------------------------
   Shared card language
   Every customer surface gets a calm base, then a small color cue based on
   its job: violet for account/overview, cyan for access, amber for billing,
   and emerald for completed/secure states.
--------------------------------------------------------------------------- */
.panel-card,
.card,
.invoice-sheet,
.plan-card,
.device-plan-section,
.plans-intro,
.plans-assurance,
.checkout-method,
.checkout-plan-option,
.auth-card {
    border-radius: 18px;
    border-color: rgba(148, 163, 184, .16);
    box-shadow:
        0 18px 50px rgba(1, 3, 12, .18),
        inset 0 1px rgba(255, 255, 255, .025);
}

.panel-card {
    padding: 22px;
    background:
        radial-gradient(360px 160px at 100% 0%, rgba(129, 140, 248, .08), transparent 74%),
        linear-gradient(145deg, rgba(27, 36, 65, .78), rgba(12, 17, 32, .92));
}

.panel-card:hover {
    border-color: rgba(165, 180, 252, .22);
}

.panel-card:has(.table-wrap) {
    border-top-color: rgba(56, 189, 248, .35);
    background:
        radial-gradient(460px 150px at 100% 0%, rgba(14, 165, 233, .09), transparent 75%),
        linear-gradient(145deg, rgba(25, 38, 64, .8), rgba(11, 17, 32, .94));
}

.panel-card:has(.detail-grid) {
    border-top-color: rgba(167, 139, 250, .36);
}

.panel-card:has(.credential) {
    border-top-color: rgba(52, 211, 153, .38);
    background:
        radial-gradient(460px 170px at 0% 0%, rgba(16, 185, 129, .08), transparent 72%),
        linear-gradient(145deg, rgba(23, 42, 57, .8), rgba(11, 18, 31, .94));
}

.panel-card:has(.filter-bar),
.panel-card:has(.invoice-total-row) {
    border-top-color: rgba(251, 191, 36, .34);
}

.panel-card > h5:first-child,
.panel-card > h6:first-child {
    position: relative;
    padding-bottom: 13px;
    border-bottom: 1px solid rgba(148, 163, 184, .1);
}

.panel-card > h5:first-child::after,
.panel-card > h6:first-child::after {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 42px;
    height: 2px;
    border-radius: 3px;
    background: linear-gradient(90deg, #a78bfa, #38bdf8);
    content: "";
}

.panel-card > .table-wrap {
    margin: 0 -5px;
}

.dashboard-panel {
    overflow: hidden;
    border-top-color: rgba(129, 140, 248, .34);
    background:
        radial-gradient(400px 140px at 100% 0%, rgba(99, 102, 241, .11), transparent 72%),
        linear-gradient(145deg, rgba(27, 36, 65, .82), rgba(12, 17, 32, .94));
}

.dashboard-panel .table-wrap {
    border-color: rgba(148, 163, 184, .13);
}

.dashboard-secondary .invoice-panel {
    border-top-color: rgba(251, 191, 36, .5);
    background:
        radial-gradient(380px 150px at 100% 0%, rgba(245, 158, 11, .1), transparent 72%),
        linear-gradient(145deg, rgba(44, 37, 48, .82), rgba(18, 17, 30, .95));
}

.dashboard-empty {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    background:
        radial-gradient(460px 180px at 50% 0%, rgba(129, 140, 248, .2), transparent 74%),
        linear-gradient(145deg, rgba(28, 38, 71, .86), rgba(12, 18, 34, .95));
    box-shadow: 0 20px 52px rgba(1, 3, 12, .2), inset 0 1px rgba(255, 255, 255, .04);
}

.dashboard-empty::before {
    position: absolute;
    inset: 12px;
    border: 1px dashed rgba(165, 180, 252, .15);
    border-radius: 13px;
    pointer-events: none;
    content: "";
}

.dashboard-empty > * {
    position: relative;
    z-index: 1;
}

.stat-card {
    min-height: 122px;
    border-radius: 17px;
    border-color: rgba(148, 163, 184, .15);
}

.stat-card .stat-icon {
    border: 1px solid rgba(165, 180, 252, .18);
    box-shadow: inset 0 1px rgba(255, 255, 255, .08);
}

.stat-card-primary .stat-icon {
    background: linear-gradient(145deg, rgba(52, 211, 153, .18), rgba(16, 185, 129, .06));
}

.stat-card-expiry .stat-icon {
    background: linear-gradient(145deg, rgba(56, 189, 248, .18), rgba(99, 102, 241, .08));
}

.stat-card.warn .stat-icon {
    background: linear-gradient(145deg, rgba(251, 191, 36, .2), rgba(245, 158, 11, .06));
}

.stat-card.bad .stat-icon {
    background: linear-gradient(145deg, rgba(248, 113, 113, .2), rgba(225, 29, 72, .06));
}

.detail-grid {
    gap: 13px;
}

.detail-item {
    min-height: 68px;
    border-radius: 13px;
    background: linear-gradient(135deg, rgba(5, 8, 18, .32), rgba(148, 163, 184, .035));
    box-shadow: inset 0 1px rgba(255, 255, 255, .02);
}

.detail-item:hover {
    border-color: rgba(165, 180, 252, .2);
    background: linear-gradient(135deg, rgba(15, 18, 37, .46), rgba(129, 140, 248, .06));
}

.credential {
    min-height: 48px;
    border-radius: 12px;
    box-shadow: inset 0 1px rgba(255, 255, 255, .025);
}

.credential .btn-icon {
    min-width: 36px;
    min-height: 36px;
}

.invoice-sheet {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(500px 180px at 100% 0%, rgba(251, 191, 36, .09), transparent 75%),
        linear-gradient(145deg, rgba(31, 36, 57, .88), rgba(13, 17, 31, .96));
}

.invoice-sheet::before {
    position: absolute;
    top: 0;
    right: 12%;
    left: 12%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #fbbf24, transparent);
    content: "";
}

.invoice-head {
    padding-bottom: 24px;
    border-bottom-color: rgba(148, 163, 184, .16);
}

.invoice-total-row.grand {
    padding: 15px 14px;
    border: 1px solid rgba(251, 191, 36, .22);
    border-radius: 12px;
    background: rgba(245, 158, 11, .08);
    color: #fff7ed;
}

.plan-card {
    border-top-color: rgba(52, 211, 153, .35);
    background:
        radial-gradient(280px 150px at 100% 0%, rgba(16, 185, 129, .1), transparent 75%),
        linear-gradient(145deg, rgba(25, 43, 55, .84), rgba(12, 18, 31, .95));
}

.plans-intro {
    border-color: rgba(129, 140, 248, .27);
    box-shadow: 0 22px 62px rgba(1, 3, 12, .26), inset 0 1px rgba(255, 255, 255, .05);
}

.device-plan-section {
    border-color: rgba(129, 140, 248, .2);
    background:
        radial-gradient(560px 130px at 0% 0%, rgba(99, 102, 241, .1), transparent 75%),
        linear-gradient(145deg, rgba(20, 29, 53, .9), rgba(10, 15, 29, .97));
}

.device-plan-heading {
    padding: 25px 27px 22px;
    background: linear-gradient(90deg, rgba(129, 140, 248, .07), transparent 72%);
}

.plans-table-wrap {
    background: rgba(4, 7, 16, .19);
}

.plans-table tbody tr {
    transition: background .18s ease, box-shadow .18s ease;
}

.plans-table tbody tr:hover {
    box-shadow: inset 3px 0 #8b5cf6;
}

.plans-table .plans-row-featured {
    box-shadow: inset 3px 0 #34d399;
}

.plans-assurance {
    border-color: rgba(52, 211, 153, .16);
    background:
        linear-gradient(135deg, rgba(16, 185, 129, .07), rgba(129, 140, 248, .04)),
        rgba(13, 19, 34, .72);
}

.checkout-section,
.checkout-summary,
.checkout-plan-picker,
.checkout-confirmation-card {
    border-top-color: rgba(56, 189, 248, .38);
}

.checkout-summary {
    background:
        radial-gradient(350px 180px at 100% 0%, rgba(139, 92, 246, .16), transparent 74%),
        linear-gradient(145deg, rgba(30, 32, 70, .88), rgba(13, 17, 33, .96));
    box-shadow: 0 22px 62px rgba(1, 3, 12, .24);
}

.checkout-total {
    border-color: rgba(165, 180, 252, .24);
    border-radius: 14px;
    background: rgba(129, 140, 248, .1);
}

.checkout-method {
    border-radius: 14px;
    border-color: rgba(148, 163, 184, .17);
    background: rgba(5, 8, 18, .22);
}

.checkout-method:hover,
.checkout-method:has(input:checked) {
    border-color: rgba(165, 180, 252, .52);
    background: linear-gradient(135deg, rgba(129, 140, 248, .14), rgba(56, 189, 248, .05));
    box-shadow: 0 10px 24px rgba(1, 3, 12, .16);
}

.checkout-method-icon {
    border: 1px solid rgba(165, 180, 252, .2);
    background: rgba(129, 140, 248, .12);
    color: #c4b5fd;
}

.auth-card {
    position: relative;
    overflow: hidden;
    border-color: rgba(129, 140, 248, .22);
    background:
        radial-gradient(360px 160px at 100% 0%, rgba(139, 92, 246, .13), transparent 75%),
        linear-gradient(145deg, rgba(23, 31, 57, .9), rgba(10, 14, 27, .96));
}

.auth-card::before {
    position: absolute;
    top: 0;
    right: 18%;
    left: 18%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #8b5cf6, #38bdf8, transparent);
    content: "";
}

.modal-content {
    overflow: hidden;
    border: 1px solid rgba(165, 180, 252, .24) !important;
    border-radius: 18px;
    background:
        radial-gradient(360px 160px at 100% 0%, rgba(139, 92, 246, .12), transparent 75%),
        #11172a !important;
    box-shadow: 0 30px 90px rgba(1, 3, 12, .55);
}

.modal-header,
.modal-footer {
    border-color: rgba(148, 163, 184, .13) !important;
}

.modal-header {
    padding: 18px 21px;
    background: rgba(129, 140, 248, .05);
}

.modal-body {
    padding: 21px;
}

@media (max-width: 575.98px) {
    .panel-card,
    .checkout-section,
    .checkout-summary,
    .checkout-plan-picker,
    .checkout-confirmation-card {
        padding: 18px;
        border-radius: 15px;
    }

    .device-plan-heading {
        padding: 20px;
    }

    .panel-card > .table-wrap {
        margin: 0 -2px;
    }
}

@media print {
    .invoice-sheet {
        background: #fff !important;
        border-color: transparent !important;
        box-shadow: none !important;
        color: #111 !important;
    }

    .invoice-sheet::before,
    .panel-card::before,
    .auth-card::before {
        display: none !important;
    }
}
