/**
 * SpeedOf.Me API Portal - Custom Styles
 * Built on Bootstrap 5
 */

/* CSS Custom Properties */
:root {
    --som-primary: #0d5b6e;          /* Brand accent: dark teal (was Bootstrap blue #0d6efd) */
    --som-primary-hover: #0a4a59;    /* Darker teal for hover/active states */
    --som-primary-rgb: 13, 91, 110;
    --som-success: #198754;
    --som-warning: #ffc107;
    --som-danger: #dc3545;
    --som-dark: #212529;
    --som-light: #f8f9fa;
    --som-gray: #6c757d;
    --sidebar-width: 250px;
    --navbar-height: 56px;

    /* Remap Bootstrap link colors to the teal accent */
    --bs-link-color: var(--som-primary);
    --bs-link-color-rgb: var(--som-primary-rgb);
    --bs-link-hover-color: var(--som-primary-hover);
    --bs-link-hover-color-rgb: 10, 74, 89;
}

/* ==========================================================================
   Brand accent override — remap Bootstrap's "primary" (blue) to dark teal.
   Bootstrap's compiled components hardcode #0d6efd via their own --bs-* vars,
   so changing --som-primary alone isn't enough; we remap the component vars
   here. Everything that is currently the blue accent becomes teal; default
   text/grays are untouched. Chart data series colors are intentionally left.
   ========================================================================== */
.btn-primary {
    --bs-btn-bg: var(--som-primary);
    --bs-btn-border-color: var(--som-primary);
    --bs-btn-hover-bg: var(--som-primary-hover);
    --bs-btn-hover-border-color: var(--som-primary-hover);
    --bs-btn-active-bg: var(--som-primary-hover);
    --bs-btn-active-border-color: var(--som-primary-hover);
    --bs-btn-disabled-bg: var(--som-primary);
    --bs-btn-disabled-border-color: var(--som-primary);
    --bs-btn-focus-shadow-rgb: var(--som-primary-rgb);
}
.btn-outline-primary {
    --bs-btn-color: var(--som-primary);
    --bs-btn-border-color: var(--som-primary);
    --bs-btn-hover-bg: var(--som-primary);
    --bs-btn-hover-border-color: var(--som-primary);
    --bs-btn-active-bg: var(--som-primary);
    --bs-btn-active-border-color: var(--som-primary);
    --bs-btn-focus-shadow-rgb: var(--som-primary-rgb);
}
.btn-link {
    --bs-btn-color: var(--som-primary);
    --bs-btn-hover-color: var(--som-primary-hover);
}
.text-primary { color: var(--som-primary) !important; }
.bg-primary { background-color: var(--som-primary) !important; }
.border-primary { border-color: var(--som-primary) !important; }
.text-bg-primary,
.badge.text-bg-primary { background-color: var(--som-primary) !important; color: #fff !important; }
.form-check-input:checked { background-color: var(--som-primary); border-color: var(--som-primary); }
.form-check-input:focus { border-color: var(--som-primary); box-shadow: 0 0 0 0.25rem rgba(var(--som-primary-rgb), 0.25); }
.progress-bar { background-color: var(--som-primary); }
.list-group-item.active { background-color: var(--som-primary); border-color: var(--som-primary); }
.page-link {
    --bs-pagination-color: var(--som-primary);
    --bs-pagination-hover-color: var(--som-primary-hover);
    --bs-pagination-active-bg: var(--som-primary);
    --bs-pagination-active-border-color: var(--som-primary);
    --bs-pagination-focus-box-shadow: 0 0 0 0.25rem rgba(var(--som-primary-rgb), 0.25);
}
.spinner-border.text-primary { color: var(--som-primary) !important; }

/* Body */
body {
    background-color: #f5f7fa;
    min-height: 100vh;
}

/* Navbar */
.navbar {
    z-index: 1030;
}

.navbar-brand img {
    filter: brightness(0) invert(1);
}

/* Sidebar */
#sidebarMenu {
    width: var(--sidebar-width);
    background: #fff;
}

/* Desktop: Always visible fixed sidebar */
@media (min-width: 992px) {
    #sidebarMenu {
        position: fixed !important;
        top: var(--navbar-height);
        left: 0;
        height: calc(100vh - var(--navbar-height));
        border-right: 1px solid #dee2e6;
        z-index: 1020;
        visibility: visible !important;
        transform: none !important;
    }
}

.sidebar-nav {
    padding: 1rem 0;
}

.nav-section {
    padding: 0.75rem 1.25rem 0.25rem;
}

.nav-section-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--som-gray);
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    padding: 0.625rem 1.25rem;
    color: var(--som-dark);
    border-radius: 0;
    transition: all 0.15s ease;
}

.sidebar-nav .nav-link:hover {
    background-color: var(--som-light);
    color: var(--som-primary);
}

.sidebar-nav .nav-link.active {
    background-color: #e1f0f4;
    color: var(--som-primary);
    font-weight: 500;
    border-left: 3px solid var(--som-primary);
}

.sidebar-nav .nav-link i {
    width: 1.5rem;
    font-size: 1.1rem;
}

.sidebar-nav .nav-link span {
    margin-left: 0.5rem;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    margin-top: var(--navbar-height);
    min-height: calc(100vh - var(--navbar-height));
}

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

/* Cards */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: box-shadow 0.15s ease;
}

.card:hover {
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid #eee;
}

/* Stat Cards */
.stat-card {
    text-align: center;
    padding: 0.75rem;
}

.stat-card .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--som-dark);
    line-height: 1;
}

.stat-card .stat-label {
    font-size: 0.75rem;
    color: var(--som-gray);
    margin-top: 0.25rem;
}

.stat-card .stat-sublabel {
    font-size: 0.7rem;
    color: var(--som-gray);
}

/* Collapse Icon Animation */
.collapse-icon {
    transition: transform 0.2s ease;
}

[aria-expanded="true"] .collapse-icon {
    transform: rotate(180deg);
}

/* API Key Display */
.api-key-display {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 1.1rem;
    letter-spacing: 0.05em;
    background: var(--som-light);
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    border: 1px solid #dee2e6;
}

.api-key-masked {
    color: var(--som-gray);
}

/* Progress Bars */
.progress-quota {
    height: 8px;
    border-radius: 4px;
}

.progress-quota .progress-bar {
    transition: width 0.3s ease;
}

/* Badges */
.badge-plan {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.35em 0.65em;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

/* Clickable plan badge link */
.badge-plan-link:hover .badge-plan {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.badge-plan-link:active .badge-plan {
    transform: translateY(0);
}

/*
 * Plan Badge Colors - CANONICAL COLORS
 * Use these colors consistently for all plan-related UI elements
 * (badges, filters, progress bars, etc.)
 * See: src/api/portal/CLAUDE.md "Plan Badge Colors" section
 */
.badge-trial {
    background-color: #ffc107;  /* Yellow */
    color: #000;
}

.badge-startup {
    background-color: #f97316;  /* Orange */
    color: #fff;
}

.badge-business {
    background-color: #4338ca;  /* Indigo */
    color: #fff;
}

.badge-pro {
    background-color: #8b5cf6;  /* Purple */
    color: #fff;
}

/* Enterprise/Custom plan badges - use gradient for premium feel (#667eea -> #764ba2) */
/* Match any badge class starting with enterprise- or pro-plus- */
.badge-enterprise,
.badge-pro-plus-l1,
.badge-pro-plus-l2,
[class*="badge-enterprise-"],
[class*="badge-pro-plus-"] {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);  /* Blue-Purple Gradient */
    color: #fff !important;
}

/* Plan-colored Progress Bars */
.progress-bar.bg-plan-startup {
    background-color: #f97316 !important;
}
.progress-bar.bg-plan-business {
    background-color: #4338ca !important;
}
.progress-bar.bg-plan-pro {
    background-color: #8b5cf6 !important;
}
.progress-bar.bg-plan-enterprise {
    background-color: #764ba2 !important;
}

/* ---------------------------------------------------------------------------
 * Billing-Period Pill (header / drawer)
 *
 * Sits in the badges row next to "Enterprise Plan" and "API Active". Same
 * height as those badges; the bar is a small inline indicator on the left,
 * not a full-width sliver, so the pill reads as one tidy unit. The hover
 * shadow from .badge-plan-link is suppressed on this pill — the others lift
 * because they're nav targets; this one is informational.
 * ------------------------------------------------------------------------- */
.badge-billing-period {
    /* Plain inline-block (NOT inline-flex) so it shares Bootstrap's .badge
       baseline alignment with the sibling .badge-plan elements. The bar is an
       inline child with vertical-align:middle — no flex, no baseline drift.
       Slightly larger font + a visible indigo tint give this chip its own
       voice next to the plain plan/status badges; numbers should read at a
       glance, not blend into the background. */
    display: inline-block;
    background-color: #e0e7ff;     /* indigo-100, distinct from white */
    color: #312e81;                /* indigo-900 for readable contrast */
    font-size: 0.8rem;             /* bumped from .badge 0.75rem */
    font-weight: 600;
    padding: 0.3em 0.7em;          /* trim vertical to keep total height ≈ siblings */
}

/* Suppress the lift-on-hover for the pill (other plan badges keep it). */
.badge-plan-link:hover .badge-billing-period,
.badge-plan-link:active .badge-billing-period {
    transform: none;
    box-shadow: none;
}

.bp-pill__bar {
    display: inline-block;
    width: 60px;                          /* readable proportions for fine % values */
    height: 6px;
    margin-right: 0.55em;
    vertical-align: middle;               /* center on the text's x-height, not baseline */
    background-color: rgba(0, 0, 0, 0.14); /* contrasts against any state bg (indigo / amber / red) */
    border-radius: 3px;
    overflow: hidden;
}

/* Default fill is the enterprise color. Plan-specific classes below override
   it WITHOUT the `.progress-bar` prefix used elsewhere in the codebase — the
   pill bar isn't a Bootstrap progress-bar so it wouldn't match those rules. */
.bp-pill__bar-fill {
    display: block;
    height: 100%;
    transition: width 0.3s ease;
    background-color: #764ba2;            /* enterprise purple — also the fallback */
}
.bp-pill__bar-fill.bg-plan-startup  { background-color: #f97316; }
.bp-pill__bar-fill.bg-plan-business { background-color: #4338ca; }
.bp-pill__bar-fill.bg-plan-pro      { background-color: #8b5cf6; }
.bp-pill__bar-fill.bg-plan-enterprise { background-color: #764ba2; }

/* State colors override the plan-color fill at high usage */
.badge-billing-period.state-warn .bp-pill__bar-fill {
    background-color: #f59e0b !important; /* amber */
}
.badge-billing-period.state-danger .bp-pill__bar-fill {
    background-color: #dc2626 !important; /* red */
}
.badge-billing-period.state-warn {
    background-color: #fef3c7;
    color: #78350f;
}
.badge-billing-period.state-danger {
    background-color: #fee2e2;
    color: #7f1d1d;
}
/* Over-cap (>=100%): solid dark red, white text. Distinct from state-danger
   so a customer accruing overage charges sees it at a glance — even at the
   tiny <480px variant where only "%XXX" is visible. */
.badge-billing-period.state-over {
    background-color: #991b1b;
    color: #ffffff;
}
.badge-billing-period.state-over .bp-pill__bar {
    background-color: rgba(255, 255, 255, 0.25); /* track contrasts on dark bg */
}
.badge-billing-period.state-over .bp-pill__bar-fill {
    background-color: #ffffff !important;
}

/* Responsive text variants — only one is visible at a time. */
.bp-pill__text--full,
.bp-pill__text--abbr,
.bp-pill__text--tiny {
    display: none;
    white-space: nowrap;
}

/* Desktop ≥768px: full numerator/denominator */
@media (min-width: 768px) {
    .bp-pill__text--full { display: inline; }
}

/* Tablet 480–767px: abbreviated (258K / 2.5M) */
@media (min-width: 480px) and (max-width: 767.98px) {
    .bp-pill__text--abbr { display: inline; }
}

/* Mobile <480px: percent only */
@media (max-width: 479.98px) {
    .bp-pill__text--tiny { display: inline; }
    /* …and the bar shrinks too, otherwise it dominates the pill at narrow widths */
    .bp-pill__bar { width: 36px; }
}

/* Collapsible card-header pattern (used by the dashboard Resources card).
 * The header is a full-width <button>, styled to look like a normal card header.
 * Chevron flips when the collapse is open (Bootstrap toggles .collapsed).
 */
.card-header-toggle .btn-link {
    color: inherit;
    font-weight: 500;
}
.card-header-toggle .btn-link:focus {
    box-shadow: none;
}
.toggle-chevron {
    transition: transform 0.2s ease;
}
.card-header-toggle .btn[aria-expanded="true"] .toggle-chevron {
    transform: rotate(180deg);
}

/* Full billing-period card on billing.php — wider bar, badge state colors apply. */
.billing-period-card__bar {
    border-radius: 6px;
}
.billing-period-card .badge.state-warn  { background-color: #fef3c7; color: #78350f; }
.billing-period-card .badge.state-danger { background-color: #fee2e2; color: #7f1d1d; }
.billing-period-card .badge.state-over  { background-color: #991b1b; color: #ffffff; }
.billing-period-card .badge.state-normal { background-color: #eef2ff; color: #1f2937; }
.billing-period-card .badge.state-unlimited { background-color: #eef2ff; color: #1f2937; }
/* Card's progress bar adopts dark red when over cap (renderBillingPeriodCard
   routes 'state-over' onto the .progress-bar element in that case). */
.billing-period-card .progress-bar.state-over { background-color: #991b1b !important; }

/* Current Plan Row Highlighting */
.current-plan-row {
    background-color: #f8fafc !important;
    border-left: 3px solid;
}
.current-plan-row.plan-startup {
    border-left-color: #f97316;
}
.current-plan-row.plan-business {
    border-left-color: #4338ca;
}
.current-plan-row.plan-pro {
    border-left-color: #8b5cf6;
}
.current-plan-row.plan-enterprise {
    border-left-color: #764ba2;
}

/* Domain Tags */
.domain-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    background: var(--som-light);
    border: 1px solid #dee2e6;
    border-radius: 50rem;
    font-size: 0.875rem;
    margin: 0.25rem;
}

.domain-badge i {
    margin-right: 0.375rem;
}

.domain-badge .badge {
    margin-left: 0.5rem;
    font-size: 0.7rem;
}

.domain-badge .btn-remove {
    margin-left: 0.5rem;
    padding: 0;
    border: none;
    background: none;
    color: var(--som-gray);
    cursor: pointer;
}

.domain-badge .btn-remove:hover {
    color: var(--som-danger);
}

/* Code Blocks */
.code-block {
    position: relative;
}

.code-block pre {
    margin-bottom: 0;
    font-size: 0.875rem;
}

.code-block .copy-btn {
    opacity: 0;
    transition: opacity 0.15s ease;
}

.code-block:hover .copy-btn {
    opacity: 1;
}

/* Quick Start Drawer */
#quickStartDrawer .list-group-item {
    border-left: none;
    border-right: none;
    padding: 0.875rem 0;
}

#quickStartDrawer .list-group-item:first-child {
    border-top: none;
}

/* Toast Customization */
.toast {
    background: #fff;
}

.toast.bg-success {
    background: #d1e7dd !important;
}

.toast.bg-danger {
    background: #f8d7da !important;
}

.toast.bg-warning {
    background: #fff3cd !important;
}

/* Tables */
.table-responsive {
    border-radius: 0.375rem;
    overflow-x: auto;
    overflow-y: visible;
}

.table thead th {
    background: var(--som-light);
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    border-bottom-width: 1px;
}

.table tbody tr {
    transition: background-color 0.15s ease;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

/* Admin Users Table - Sticky Columns */
/* Checkbox column */
.admin-users-table .col-check,
.admin-users-table th:nth-child(1),
.admin-users-table td:nth-child(1) {
    position: sticky;
    left: 0;
    background: #f8f9fa !important;
    z-index: 10;
    width: 18px !important;
    min-width: 18px !important;
    max-width: 18px !important;
    padding: 0.15rem 0.2rem !important;
    text-align: center;
}

/* Row number column */
.admin-users-table .col-rownum,
.admin-users-table th:nth-child(2),
.admin-users-table td:nth-child(2) {
    position: sticky;
    left: 18px;
    background: #f8f9fa !important;
    z-index: 10;
    width: 20px !important;
    min-width: 20px !important;
    max-width: 32px !important;
    padding: 0.15rem 0.2rem !important;
    text-align: right;
    border-right: 1px solid #dee2e6;
    font-size: 0.75rem;
    color: #6c757d;
}

.admin-users-table thead th:nth-child(1),
.admin-users-table thead th:nth-child(2) {
    background: var(--som-light) !important;
    z-index: 11;
}

/* Ensure row hover doesn't break sticky backgrounds */
.admin-users-table tbody tr:hover td:nth-child(1),
.admin-users-table tbody tr:hover td:nth-child(2) {
    background: #e8f4ff !important;
}

/* Scroll hint for wide tables */
.table-scroll-wrapper {
    position: relative;
}

.table-scroll-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 30px;
    background: linear-gradient(to right, transparent, rgba(0,0,0,0.05));
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.2s;
}

.table-scroll-wrapper.scrolled-right::after {
    opacity: 0;
}

/* Compact usage columns */
.admin-users-table .col-usage {
    white-space: nowrap;
    text-align: right;
    font-variant-numeric: tabular-nums;
    min-width: 55px;
    font-size: 0.85rem;
}

/* Column group header row */
.admin-users-table .column-groups th {
    background: var(--som-light);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--som-gray);
    padding: 0.35rem 0.5rem;
    border-bottom: none;
}

/* Status Indicators */
.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.status-dot.active {
    background-color: var(--som-success);
}

.status-dot.inactive {
    background-color: var(--som-danger);
}

.status-dot.trial {
    background-color: var(--som-warning);
}

/* Form Styling */
.form-label {
    font-weight: 500;
    color: var(--som-dark);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--som-primary);
    box-shadow: 0 0 0 0.2rem rgba(var(--som-primary-rgb), 0.15);
}

/* Tabs */
.nav-tabs {
    border-bottom: 2px solid #dee2e6;
}

.nav-tabs .nav-link {
    border: none;
    color: var(--som-gray);
    padding: 0.75rem 1.25rem;
    font-weight: 500;
}

.nav-tabs .nav-link:hover {
    color: var(--som-primary);
    border: none;
}

.nav-tabs .nav-link.active {
    color: var(--som-primary);
    border: none;
    border-bottom: 2px solid var(--som-primary);
    margin-bottom: -2px;
}

/* Analytics Preview Card */
.analytics-preview .country-item {
    display: flex;
    align-items: center;
    padding: 0.4rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.analytics-preview .country-item:last-child {
    border-bottom: none;
}

.analytics-preview .country-flag {
    font-size: 1.25rem;
    margin-right: 0.75rem;
    line-height: 1;
}

.analytics-preview .country-name {
    flex: 1;
    font-weight: 500;
}

.analytics-preview .country-tests {
    color: var(--som-gray);
    font-size: 0.875rem;
}

.analytics-preview .trend-up {
    color: var(--som-success);
}

.analytics-preview .trend-down {
    color: var(--som-danger);
}

.analytics-preview .trend-neutral {
    color: var(--som-gray);
}

.analytics-preview .speed-stat {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.analytics-preview .speed-value {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1;
}

.analytics-preview .speed-unit {
    font-size: 0.875rem;
    color: var(--som-gray);
}

.analytics-preview .speed-trend {
    font-size: 0.875rem;
    margin-left: auto;
}

.analytics-preview .device-legend {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.5rem;
    font-size: 0.8rem;
}

.analytics-preview .legend-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.analytics-preview .legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.analytics-preview .legend-dot.desktop {
    background-color: #0d6efd;
}

.analytics-preview .legend-dot.mobile {
    background-color: #198754;
}

.analytics-preview .donut-center-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    pointer-events: none;
}

.analytics-preview .donut-pct {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--som-dark);
    line-height: 1;
}

.analytics-preview .donut-label {
    font-size: 0.7rem;
    color: var(--som-gray);
    text-transform: uppercase;
}

.analytics-preview .stat-unit {
    font-size: 0.7rem;
    color: var(--som-gray);
}

/* Sparkline */
.sparkline-container {
    height: 50px;
    width: 100%;
}

/* Utility Classes */
.cursor-pointer {
    cursor: pointer;
}

.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.3s ease;
}

/* Mobile Responsive Fixes */
@media (max-width: 767.98px) {
    /* Speed Trends card - fix stacked columns */
    .analytics-preview .row.border-top > .col-md-4 {
        border-right: none !important;
        border-bottom: 1px solid #eee;
        padding-bottom: 1rem;
        margin-bottom: 1rem;
    }
    .analytics-preview .row.border-top > .col-md-4:last-child {
        border-bottom: none;
        margin-bottom: 0;
        padding-bottom: 0;
    }
}

/* ============================================
   Skeleton Loading Placeholders (progressive loading)
   ============================================ */

/* Base shimmer block: animated gradient sweeping left-to-right */
.skeleton {
    position: relative;
    overflow: hidden;
    background-color: #e9edf2;
    border-radius: 6px;
}

.skeleton::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: translateX(-100%);
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0,
        rgba(255, 255, 255, 0.6) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    animation: skeleton-shimmer 1.4s ease-in-out infinite;
}

@keyframes skeleton-shimmer {
    100% { transform: translateX(100%); }
}

/* Shaped helpers */
.skeleton-text {
    height: 0.85rem;
    margin-bottom: 0.5rem;
}

.skeleton-text.sm { width: 40%; }
.skeleton-text.md { width: 65%; }
.skeleton-text.lg { width: 85%; }

/* Stat-card body placeholder: a big value line + a small label line */
.skeleton-stat {
    height: 1.9rem;
    width: 60%;
    margin: 0 auto 0.5rem;
}

.skeleton-stat-label {
    height: 0.7rem;
    width: 80%;
    margin: 0 auto;
}

/* Chart-area placeholder: fills the canvas slot */
.skeleton-chart {
    width: 100%;
    height: 120px;
}

.skeleton-chart.tall { height: 200px; }

/* Reduced motion: keep the placeholder, drop the sweep */
@media (prefers-reduced-motion: reduce) {
    .skeleton::after {
        animation: none;
    }
}

/* Print Styles */
@media print {
    .sidebar-nav,
    .navbar,
    .btn,
    .toast-container {
        display: none !important;
    }

    .main-content {
        margin-left: 0 !important;
        margin-top: 0 !important;
    }
}
