/* Application Usage Monthly Dashboard - V18 executive responsive layout */
.appusage-dashboard {
    min-height: 100vh;
    max-width: 100%;
    overflow-x: hidden;
    background: #f8fafc;
    color: #0f172a;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.appusage-dashboard *,
.appusage-dashboard *::before,
.appusage-dashboard *::after {
    box-sizing: border-box;
}

.appusage-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.appusage-header h1 {
    margin: 0 0 6px;
    font-size: clamp(24px, 2.2vw, 34px);
    line-height: 1.15;
    letter-spacing: -0.03em;
    font-weight: 900;
    color: #0f172a;
}

.appusage-header p {
    margin: 0;
    color: #64748b;
    font-size: 14px;
}

.appusage-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 10px;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
    max-width: 100%;
}

.appusage-month-label {
    font-size: 13px;
    font-weight: 800;
    color: #475569;
    white-space: nowrap;
}

.appusage-select,
.appusage-refresh {
    height: 40px;
    border-radius: 13px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #0f172a;
    font-weight: 800;
    padding: 0 13px;
    outline: none;
}

.appusage-refresh {
    border: 0;
    background: linear-gradient(135deg, #0f766e, #14b8a6);
    color: #ffffff;
    cursor: pointer;
    box-shadow: 0 12px 20px rgba(20, 184, 166, 0.22);
}

.appusage-refresh:hover { filter: brightness(0.98); }

.appusage-kpi-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.appusage-kpi-card {
    min-width: 0;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 18px;
    display: flex;
    gap: 14px;
    align-items: flex-start;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.appusage-kpi-icon {
    width: 44px;
    height: 44px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ecfeff;
    color: #0f766e;
    font-weight: 950;
    flex-shrink: 0;
}

.appusage-kpi-meta { min-width: 0; }
.appusage-kpi-meta span,
.appusage-kpi-meta small { display: block; }

.appusage-kpi-meta span {
    color: #64748b;
    font-size: 13px;
    font-weight: 850;
    line-height: 1.35;
}

.appusage-kpi-meta strong {
    display: block;
    color: #0f172a;
    font-size: clamp(24px, 2vw, 32px);
    line-height: 1.05;
    margin: 6px 0;
    letter-spacing: -0.04em;
}

.appusage-kpi-meta small {
    color: #94a3b8;
    font-size: 12px;
}

.appusage-analytics-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(340px, 0.85fr);
    gap: 18px;
    margin-bottom: 18px;
    align-items: stretch;
}

.appusage-grid,
.appusage-single-column {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    align-items: start;
    max-width: 100%;
}

.appusage-panel {
    min-width: 0;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 22px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
    overflow: hidden;
}

.appusage-panel-header,
.appusage-chart-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    padding: 18px 22px 14px;
    border-bottom: 1px solid #eef2f7;
}

.appusage-panel-header h2,
.appusage-chart-header h2 {
    margin: 0 0 4px;
    font-size: 18px;
    font-weight: 900;
    color: #0f172a;
}

.appusage-panel-header p,
.appusage-chart-header p {
    margin: 0;
    color: #64748b;
    font-size: 13px;
}

.appusage-count-pill {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    border-radius: 999px;
    background: #f0fdfa;
    color: #0f766e;
    border: 1px solid #99f6e4;
    padding: 6px 11px;
    font-size: 12px;
    font-weight: 900;
}

/* Charts */
.appusage-chart-panel { min-height: 286px; }

.appusage-horizontal-chart {
    display: grid;
    gap: 10px;
    padding: 18px 22px 22px;
}

.appusage-chart-row {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(110px, 180px) minmax(0, 1fr) 76px;
    gap: 12px;
    align-items: center;
    border: 0;
    background: transparent;
    padding: 8px 10px;
    border-radius: 14px;
    color: inherit;
    cursor: pointer;
    text-align: left;
}

.appusage-chart-row:hover,
.appusage-chart-row.selected {
    background: #ecfeff;
}

.appusage-chart-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 900;
    color: #0f172a;
}

.appusage-chart-track,
.appusage-mini-track,
.appusage-bar-wrap {
    height: 10px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}

.appusage-chart-fill,
.appusage-mini-fill,
.appusage-bar {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #14b8a6, #0ea5e9);
}

.appusage-chart-value {
    text-align: right;
    color: #0f766e;
    font-weight: 950;
    font-variant-numeric: tabular-nums;
}

.appusage-window-chart {
    height: 158px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    align-items: end;
    padding: 18px 22px 10px;
}

.appusage-window-bar {
    height: 100%;
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 6px;
    text-align: center;
    min-width: 0;
}

.appusage-window-value {
    color: #0f172a;
    font-size: 13px;
    font-weight: 950;
    font-variant-numeric: tabular-nums;
}

.appusage-window-track {
    width: 52px;
    height: 100%;
    margin: 0 auto;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    border-radius: 16px;
    background: #e0f2fe;
    overflow: hidden;
}

.appusage-window-fill {
    width: 100%;
    border-radius: 16px 16px 0 0;
    background: linear-gradient(180deg, #0ea5e9, #14b8a6);
}

.appusage-window-label {
    color: #64748b;
    font-size: 12px;
    font-weight: 850;
}

.appusage-selected-app-box {
    margin: 8px 22px 20px;
    padding: 14px;
    border-radius: 18px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.appusage-selected-app-title {
    font-size: 13px;
    font-weight: 950;
    color: #0f172a;
    margin-bottom: 10px;
}

.appusage-mini-metric {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) 70px;
    gap: 10px;
    align-items: center;
    margin: 7px 0;
}

.appusage-mini-metric span {
    color: #64748b;
    font-size: 12px;
    font-weight: 850;
}

.appusage-mini-metric strong {
    text-align: right;
    color: #0f766e;
    font-size: 12px;
    font-weight: 950;
    font-variant-numeric: tabular-nums;
}

/* Tables */
.appusage-table-scroll {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: auto;
    max-height: 52vh;
    overscroll-behavior: contain;
}

.appusage-detail-panel .appusage-table-scroll { max-height: 46vh; }

.appusage-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    min-width: 0;
}

.appusage-summary-table { min-width: 0; }

.appusage-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f8fafc;
    color: #475569;
    font-size: 12px;
    letter-spacing: 0.01em;
    font-weight: 900;
    text-align: left;
    padding: 12px 14px;
    border-bottom: 1px solid #e2e8f0;
}

.appusage-table td {
    padding: 13px 14px;
    border-bottom: 1px solid #f1f5f9;
    color: #0f172a;
    font-size: 13px;
    vertical-align: middle;
    word-break: break-word;
}

.appusage-summary-table th:nth-child(1),
.appusage-summary-table td:nth-child(1) { width: 28%; }
.appusage-summary-table th:nth-child(2),
.appusage-summary-table td:nth-child(2) { width: 10%; }
.appusage-summary-table th:nth-child(3),
.appusage-summary-table td:nth-child(3) { width: 22%; }
.appusage-summary-table th:nth-child(4),
.appusage-summary-table td:nth-child(4) { width: 30%; }
.appusage-summary-table th:nth-child(5),
.appusage-summary-table td:nth-child(5) { width: 10%; }

.appusage-table tr:hover td { background: #f8fafc; }
.appusage-summary-row { cursor: pointer; }
.appusage-summary-row.selected td {
    background: #ecfeff;
    border-bottom-color: #bae6fd;
}

.appusage-table .num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.appusage-table .strong {
    font-weight: 950;
    color: #0f766e;
}

.appusage-big-num {
    font-size: 17px !important;
    font-weight: 950;
    color: #0f172a;
}

.appusage-app-name,
.appusage-user-name {
    font-weight: 950;
    color: #0f172a;
}

.appusage-app-key {
    margin-top: 3px;
    color: #64748b;
    font-size: 11px;
}

.appusage-bar-wrap {
    margin-top: 9px;
    height: 7px;
}

.appusage-inline-metrics {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.appusage-inline-metrics span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    border-radius: 999px;
    padding: 5px 9px;
    color: #0f172a;
    font-weight: 900;
    font-size: 12px;
}

.appusage-inline-metrics b {
    color: #0f766e;
    font-weight: 950;
}

.appusage-run-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.appusage-run-metrics div {
    min-width: 0;
    padding: 8px 9px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.appusage-run-metrics span,
.appusage-run-metrics strong {
    display: block;
}

.appusage-run-metrics span {
    color: #64748b;
    font-size: 11px;
    font-weight: 850;
}

.appusage-run-metrics strong {
    margin-top: 3px;
    color: #0f766e;
    font-size: 13px;
    font-weight: 950;
    font-variant-numeric: tabular-nums;
}

.appusage-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 850;
    background: #f1f5f9;
    color: #475569;
}

.appusage-status.good { background: #dcfce7; color: #166534; }
.appusage-status.warn { background: #ffedd5; color: #9a3412; }

.appusage-empty,
.appusage-state-card {
    padding: 44px 20px;
    text-align: center;
    color: #64748b;
}

.appusage-empty {
    border: 1px dashed #cbd5e1;
    margin: 18px;
    border-radius: 16px;
    background: #f8fafc;
}

.appusage-empty-compact {
    padding: 16px;
    margin: 12px 0 0;
}

.appusage-state-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}

.appusage-state-card h3 {
    color: #0f172a;
    margin: 12px 0 8px;
    font-size: 20px;
}

.appusage-error { border-color: #fecaca; background: #fff7f7; }

.appusage-error-note {
    display: inline-block;
    margin-top: 14px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #ffffff;
    color: #991b1b;
    border: 1px solid #fecaca;
    font-size: 13px;
    font-weight: 800;
}

.appusage-state-icon { font-size: 36px; }

.appusage-spinner {
    width: 42px;
    height: 42px;
    margin: 0 auto;
    border-radius: 999px;
    border: 4px solid #ccfbf1;
    border-top-color: #0f766e;
    animation: appusage-spin 0.8s linear infinite;
}

@keyframes appusage-spin { to { transform: rotate(360deg); } }

@media (max-width: 1440px) {
    .appusage-kpi-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .appusage-kpi-card { padding: 16px; }
    .appusage-kpi-icon { width: 40px; height: 40px; }
    .appusage-kpi-meta span { font-size: 12px; }
}

@media (max-width: 1280px) {
    .appusage-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .appusage-analytics-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
    .appusage-summary-table,
    .appusage-table { min-width: 760px; table-layout: auto; }
    .appusage-table-scroll { max-height: 58vh; }
}

@media (max-width: 760px) {
    .appusage-header { align-items: stretch; }
    .appusage-actions { width: 100%; flex-wrap: wrap; }
    .appusage-select { flex: 1; min-width: 180px; }
    .appusage-kpi-grid { grid-template-columns: 1fr; }
    .appusage-header h1 { font-size: 24px; }
    .appusage-chart-row { grid-template-columns: 92px minmax(0, 1fr) 58px; gap: 8px; }
    .appusage-window-track { width: 42px; }
}

/* V71: Application Usage popup detail */
.appusage-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(15, 23, 42, 0.58);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 4vh 18px;
    overflow: auto;
}

.appusage-modal {
    width: min(1180px, 100%);
    background: #ffffff;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.32);
    border: 1px solid #e2e8f0;
}

.appusage-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    padding: 20px 24px;
    border-bottom: 1px solid #e2e8f0;
    background: linear-gradient(135deg, #f8fafc, #ecfeff);
}

.appusage-modal-header h2 {
    margin: 0 0 5px;
    color: #0f172a;
    font-size: 22px;
    font-weight: 950;
    letter-spacing: -0.03em;
}

.appusage-modal-header p {
    margin: 0;
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
}

.appusage-modal-close {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 14px;
    background: #f1f5f9;
    color: #334155;
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
    font-weight: 900;
}

.appusage-modal-close:hover {
    background: #e2e8f0;
}

.appusage-modal-body {
    padding: 20px 24px 24px;
}

.appusage-modal-kpis {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}

.appusage-modal-kpis .appusage-kpi-card {
    min-height: 96px;
    padding: 14px;
    box-shadow: none;
}

.appusage-modal-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.appusage-modal-summary div {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 12px 14px;
}

.appusage-modal-summary span {
    display: block;
    color: #64748b;
    font-size: 12px;
    font-weight: 850;
}

.appusage-modal-summary strong {
    display: block;
    margin-top: 4px;
    color: #0f766e;
    font-size: 20px;
    font-weight: 950;
}

.appusage-popup-table-scroll {
    max-height: 58vh;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
}

.appusage-popup-table {
    min-width: 900px;
    table-layout: auto;
}

.appusage-popup-table th:first-child,
.appusage-popup-table td:first-child {
    width: 56px;
}

@media (max-width: 1100px) {
    .appusage-modal-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .appusage-modal-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
    .appusage-modal-backdrop { padding: 2vh 10px; }
    .appusage-modal-body { padding: 14px; }
    .appusage-modal-header { padding: 16px; }
    .appusage-modal-kpis,
    .appusage-modal-summary { grid-template-columns: 1fr; }
}

/* App Card Layout - Redesign */
.appusage-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 20px;
    padding: 0 24px 24px;
}

.appusage-app-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
    transition: all 0.2s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.appusage-app-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
    border-color: #cbd5e1;
}

.appusage-app-card.selected {
    border-color: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.2);
}

.appusage-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.appusage-card-title h3 {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 800;
    color: #0f172a;
}

.appusage-card-type {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
}

.appusage-card-price {
    font-size: 15px;
    font-weight: 900;
    color: #1e40af;
    background: #eff6ff;
    padding: 4px 10px;
    border-radius: 8px;
    white-space: nowrap;
}

.appusage-card-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.appusage-card-stat {
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 10px;
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.appusage-card-stat span {
    font-size: 11px;
    color: #64748b;
    font-weight: 700;
    text-transform: uppercase;
}

.appusage-card-stat strong {
    font-size: 16px;
    font-weight: 900;
    color: #0f172a;
}

.appusage-card-charts {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 20px;
    align-items: center;
    background: #f8fafc;
    border-radius: 12px;
    padding: 14px;
    border: 1px solid #e2e8f0;
}

.appusage-pie-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.appusage-pie {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.08);
}

.appusage-pie-legend {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
}

.appusage-legend-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    color: #475569;
    font-weight: 600;
}

.appusage-legend-item-left {
    display: flex;
    align-items: center;
    gap: 6px;
}

.appusage-legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}
.appusage-legend-dot.green { background: #22c55e; }
.appusage-legend-dot.red { background: #ef4444; }
.appusage-legend-dot.gray { background: #cbd5e1; }

.appusage-legend-item b {
    color: #0f172a;
    font-weight: 800;
}

.appusage-bar-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.appusage-bar-container-title {
    font-size: 11px;
    color: #64748b;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.appusage-bar-row {
    display: grid;
    grid-template-columns: 40px 1fr 24px;
    gap: 8px;
    align-items: center;
}

.appusage-bar-label {
    font-size: 11px;
    font-weight: 700;
    color: #475569;
}

.appusage-bar-track-small {
    height: 6px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.appusage-bar-fill-small {
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, #0ea5e9, #3b82f6);
}

.appusage-bar-val {
    font-size: 11px;
    font-weight: 800;
    color: #0f172a;
    text-align: right;
}

@media (max-width: 800px) {
    .appusage-cards-grid {
        grid-template-columns: 1fr;
    }
}

/* ================================================
   License Savings Table — Premium Redesign
   ================================================ */

/* Header */
.savings-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 24px 24px 0;
    flex-wrap: wrap;
}
.savings-header-text h2 {
    margin: 0 0 4px;
    font-size: 1.15rem;
    font-weight: 900;
    color: #0f172a;
    letter-spacing: -0.01em;
}
.savings-header-text p {
    margin: 0;
    font-size: .82rem;
    color: #64748b;
}

/* KPI Row */
.savings-kpi-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    padding: 16px 24px 8px;
}
.savings-kpi-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border-radius: 14px;
    backdrop-filter: blur(8px);
    transition: transform .18s ease, box-shadow .18s ease;
}
.savings-kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}
.savings-kpi-total {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 1px solid #bfdbfe;
}
.savings-kpi-30 {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 1px solid #fde68a;
}
.savings-kpi-60 {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border: 1px solid #a7f3d0;
}
.savings-kpi-unused {
    background: linear-gradient(135deg, #fef2f2 0%, #fecaca 100%);
    border: 1px solid #fca5a5;
}
.savings-kpi-icon {
    font-size: 1.6rem;
    flex-shrink: 0;
}
.savings-kpi-content {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}
.savings-kpi-label {
    font-size: .72rem;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.savings-kpi-value {
    font-size: 1.2rem;
    font-weight: 900;
    color: #0f172a;
    line-height: 1.2;
}
.savings-kpi-pct {
    font-size: .72rem;
    color: #64748b;
    font-weight: 600;
}

/* Table wrapper */
.savings-table-scroll {
    padding: 8px 24px 0;
}

/* Table */
.savings-table {
    border-radius: 12px;
    overflow: hidden;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}
.savings-table thead tr {
    /* Removed background gradient, inheriting from appusage-table th */
}
.savings-table thead th {
    color: #475569;
    font-size: .72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: 14px 12px;
    border-bottom: 2px solid #94a3b8;
    white-space: nowrap;
    vertical-align: bottom;
    line-height: 1.4;
}
.savings-th-app {
    text-align: left !important;
    min-width: 160px;
}
.savings-th-warn {
    color: #d97706 !important;
}
.savings-th-save30 {
    color: #ea580c !important;
}
.savings-th-save60 {
    color: #059669 !important;
}
.savings-th-save90 {
    color: #2563eb !important;
}

/* Body Rows */
.savings-row {
    transition: background .15s ease;
}
.savings-row-even {
    background: #f8fafc;
}
.savings-row:hover {
    background: #e0f2fe !important;
}
.savings-table tbody td {
    padding: 11px 12px;
    font-size: .83rem;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
}
.savings-td-app {
    font-weight: 700;
    color: #0f172a !important;
    white-space: nowrap;
}

/* Cell colors */
.savings-cell-use {
    color: #0369a1 !important;
    font-weight: 600;
}
.savings-cell-cost {
    color: #6b7280 !important;
    font-size: .78rem;
}
.savings-cell-fullval {
    font-weight: 800 !important;
    color: #1e40af !important;
}
.savings-cell-save30 {
    font-weight: 800 !important;
    color: #b45309 !important;
    background: rgba(251, 191, 36, 0.08);
}
.savings-cell-save60 {
    font-weight: 800 !important;
    color: #047857 !important;
    background: rgba(16, 185, 129, 0.08);
}
.savings-cell-save90 {
    font-weight: 800 !important;
    color: #1d4ed8 !important;
    background: rgba(59, 130, 246, 0.08);
}

/* Danger / Warning cells */
.savings-cell-danger {
    color: #dc2626 !important;
    font-weight: 800;
    background: rgba(239, 68, 68, 0.08);
}
.savings-cell-warn {
    color: #d97706 !important;
    font-weight: 700;
    background: rgba(245, 158, 11, 0.06);
}

/* Footer total row */
.savings-total-row {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%) !important;
    font-weight: 900;
}
.savings-total-row td {
    padding: 14px 12px !important;
    font-size: .85rem;
    border-top: 2px solid #6ee7b7;
    border-bottom: none !important;
    color: #064e3b;
}

/* Footer note */
.savings-footer-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 16px 24px 20px;
    padding: 14px 18px;
    border-radius: 12px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    color: #475569;
    font-size: .78rem;
    line-height: 1.7;
}
.savings-note-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: 1px;
}
.savings-legend-inline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    flex-wrap: wrap;
}
.savings-legend-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-left: 8px;
}
.savings-legend-dot:first-child {
    margin-left: 0;
}
.savings-dot-danger {
    background: #ef4444;
}
.savings-dot-warn {
    background: #f59e0b;
}
.savings-dot-ok {
    background: #22c55e;
}

/* Responsive */
@media (max-width: 768px) {
    .savings-kpi-row {
        grid-template-columns: 1fr 1fr;
    }
    .savings-header,
    .savings-table-scroll,
    .savings-footer-note {
        padding-left: 16px;
        padding-right: 16px;
    }
}
@media (max-width: 480px) {
    .savings-kpi-row {
        grid-template-columns: 1fr;
    }
}
