/* UsageTracking dashboard styles. Framework-agnostic; include from the host:
   <link rel="stylesheet" href="_content/UsageTracking/usage-dashboard.css" /> */

.ut-dashboard { font-size: 14px; max-width: 1100px; }
.ut-dashboard h2 { margin: 0; font-size: 22px; font-weight: 600; }
.ut-dashboard h3 { margin: 0 0 10px; font-size: 15px; font-weight: 600; }
.ut-muted { color: #888; }

.ut-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.ut-period button {
    border: 1px solid #ccc; background: transparent; color: inherit;
    padding: 4px 12px; cursor: pointer;
}
.ut-period button:first-child { border-radius: 4px 0 0 4px; }
.ut-period button:last-child { border-radius: 0 4px 4px 0; }
.ut-period button:not(:first-child) { margin-left: -1px; }
.ut-period button.active { background: #1976d2; color: #fff; border-color: #1976d2; }

.ut-cards { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.ut-card {
    flex: 1 1 140px; display: flex; flex-direction: column; gap: 2px;
    border: 1px solid rgba(128,128,128,.3); border-radius: 8px; padding: 12px 16px;
}
.ut-card .ut-num { font-size: 24px; font-weight: 700; }

.ut-section { margin-bottom: 24px; min-width: 0; }
.ut-section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.ut-section-head h3 { margin: 0; }
.ut-period-small button { padding: 2px 8px; font-size: 12px; }
.ut-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 900px) { .ut-columns { grid-template-columns: 1fr; } }

.ut-chart { display: flex; align-items: flex-end; gap: 2px; height: 90px; }
.ut-chart-col { flex: 1; height: 100%; display: flex; align-items: flex-end; }
.ut-chart-bar { width: 100%; background: #1976d2; border-radius: 2px 2px 0 0; min-height: 2px; }
.ut-chart-range { display: flex; justify-content: space-between; color: #888; font-size: 12px; margin-top: 4px; }

.ut-bar-row {
    display: grid; grid-template-columns: minmax(120px, 240px) 1fr 56px auto;
    gap: 8px; align-items: center; padding: 3px 0;
}
.ut-bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ut-bar-track { background: rgba(128,128,128,.15); border-radius: 3px; height: 12px; }
.ut-bar-fill { background: #1976d2; height: 100%; border-radius: 3px; }
.ut-bar-count { text-align: right; font-variant-numeric: tabular-nums; }
.ut-bar-extra { color: #888; font-size: 12px; white-space: nowrap; }

.ut-table { width: 100%; border-collapse: collapse; }
.ut-table th { text-align: left; font-weight: 600; padding: 4px 8px 4px 0; border-bottom: 1px solid rgba(128,128,128,.3); }
.ut-table td { padding: 4px 8px 4px 0; border-bottom: 1px solid rgba(128,128,128,.15); }

/* Deploy safety banner */
.ut-deploy {
    display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap;
    border-radius: 8px; padding: 12px 16px; margin-bottom: 20px;
    border: 1px solid transparent;
}
.ut-deploy-safe   { background: #e8f5e9; border-color: #a5d6a7; color: #2e7d32; }
.ut-deploy-warn   { background: #fff8e1; border-color: #ffe082; color: #f57f17; }
.ut-deploy-danger { background: #ffebee; border-color: #ef9a9a; color: #c62828; }
.ut-deploy-label  { font-weight: 700; font-size: 15px; white-space: nowrap; padding-top: 1px; }
.ut-deploy-users  { display: flex; flex-wrap: wrap; gap: 8px; }
.ut-deploy-user   { font-size: 13px; opacity: .85; }
.ut-deploy-user-hot { font-weight: 600; opacity: 1; }
