.nitro-emustats-window {
    min-width: 1024px;
    max-width: 1024px;
    min-height: 700px;
    max-height: 700px;
}

.nitro-emustats-window__content {
    padding: 0 !important;
    overflow: hidden !important;
}

.nitro-emustats {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    height: 100%;
    background: #f3f4f8;
    color: #1f2937;
}

.nitro-emustats__sidebar {
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 18px 14px 14px;
    background: linear-gradient(180deg, #f8f9fd 0%, #eef1f8 100%);
    border-right: 1px solid #d8deea;
}

.nitro-emustats__sidebar-brand h2 {
    margin: 0;
    font-size: 31px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: #1e2a44;
}

.nitro-emustats__sidebar-brand p {
    margin: 8px 0 0;
    font-size: 12px;
    color: #64748b;
}

.nitro-emustats__nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 22px;
}

.nitro-emustats__nav-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #d8deea;
    border-radius: 12px;
    background: #ffffff;
    color: #334155;
    cursor: pointer;
    transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.nitro-emustats__nav-button:hover {
    background: #f8fbff;
    border-color: #a9b8db;
}

.nitro-emustats__nav-button.is-active {
    background: linear-gradient(180deg, #e9efff 0%, #dbe7ff 100%);
    border-color: #7b93dd;
    transform: translateY(-1px);
}

.nitro-emustats__nav-button span,
.nitro-emustats__nav-button strong {
    font-size: 13px;
}

.nitro-emustats__nav-button strong {
    color: #5b6f99;
}

.nitro-emustats__sidebar-footer {
    margin-top: auto;
    padding-top: 18px;
}

.nitro-emustats__refresh-button {
    width: 100%;
    min-height: 34px;
    border: 1px solid #7b93dd;
    border-radius: 10px;
    background: linear-gradient(180deg, #edf2ff 0%, #dce7ff 100%);
    color: #26406d;
    font-weight: 700;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.nitro-emustats__sidebar-footer p {
    margin: 10px 0 0;
    font-size: 11px;
    text-align: center;
    color: #7b879b;
}

.nitro-emustats__main {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    padding: 22px 24px 20px;
    gap: 16px;
    background: linear-gradient(180deg, #fbfcff 0%, #f2f5fb 100%);
}

.nitro-emustats__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.nitro-emustats__header h1 {
    margin: 0;
    font-size: 24px;
    line-height: 1.05;
    font-weight: 800;
    color: #1e293b;
}

.nitro-emustats__header p {
    margin: 8px 0 0;
    font-size: 13px;
    color: #64748b;
}

.nitro-emustats__status-pill {
    padding: 7px 12px;
    border-radius: 999px;
    background: #def7e8;
    color: #166534;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    border: 1px solid #a7e0be;
}

.nitro-emustats__status-pill[data-status="attention-needed"] {
    background: #fff1d6;
    color: #92400e;
    border-color: #f3ce88;
}

.nitro-emustats__body,
.nitro-emustats__overview {
    min-height: 0;
    height: 100%;
}

.nitro-emustats__body {
    overflow: auto;
    padding-right: 4px;
}

.nitro-emustats__overview {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    height: auto;
}

.nitro-emustats__overview-cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    align-content: start;
}

.nitro-emustats__metric-card {
    display: flex;
    flex-direction: column;
    min-height: 92px;
    padding: 12px 13px;
    border: 1px solid #dbe2ef;
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff 0%, #f8faff 100%);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.nitro-emustats__metric-card::before {
    content: "";
    display: block;
    width: 24px;
    height: 3px;
    margin-bottom: 10px;
    border-radius: 999px;
    background: var(--emustats-accent, #6366f1);
}

.nitro-emustats__metric-card span {
    font-size: 11px;
    color: #64748b;
}

.nitro-emustats__metric-card strong {
    margin-top: auto;
    font-size: 14px;
    line-height: 1.2;
    font-weight: 800;
    color: #1e293b;
    word-break: break-word;
}

.nitro-emustats__metric-card small {
    margin-top: 6px;
    font-size: 10px;
    color: #94a3b8;
}

.nitro-emustats__chart-card {
    display: flex;
    flex-direction: column;
    min-height: 290px;
    padding: 16px;
    border: 1px solid #dbe2ef;
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #f8faff 100%);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

.nitro-emustats__section-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.nitro-emustats__section-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    color: #1e293b;
}

.nitro-emustats__section-header p {
    margin: 6px 0 0;
    font-size: 12px;
    color: #64748b;
}

.nitro-emustats__chart-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.nitro-emustats__chart-meta span {
    font-size: 12px;
    color: #64748b;
}

.nitro-emustats__chart-meta strong {
    font-size: 22px;
    color: #1e293b;
}

.nitro-emustats__chart-shell {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 10px;
    min-height: 220px;
    height: 220px;
}

.nitro-emustats__chart-axis {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 10px 0 10px 2px;
}

.nitro-emustats__chart-axis span {
    font-size: 11px;
    line-height: 1;
    color: #7b879b;
}

.nitro-emustats__chart-canvas {
    position: relative;
    min-height: 0;
    height: 100%;
    border-radius: 14px;
    background: #ffffff;
    border: 1px solid #dde5f0;
    overflow: hidden;
}

.nitro-emustats__chart {
    width: 100%;
    height: 100%;
}

.nitro-emustats__chart-grid {
    stroke: #dde5f0;
    stroke-width: 0.6;
}

.nitro-emustats__chart-line {
    fill: none;
    stroke: #5969d8;
    stroke-width: 1.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.nitro-emustats__chart-hover-line {
    stroke: rgba(89, 105, 216, 0.38);
    stroke-width: 0.55;
    stroke-dasharray: 2 2;
}

.nitro-emustats__chart-hover-point {
    fill: #ffffff;
    stroke: #5969d8;
    stroke-width: 0.9;
}

.nitro-emustats__chart-tooltip {
    position: absolute;
    transform: translate(-50%, -100%);
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 92px;
    padding: 8px 10px;
    border: 1px solid #d9e1ef;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
    pointer-events: none;
}

.nitro-emustats__chart-tooltip strong {
    font-size: 12px;
    line-height: 1.1;
    color: #1e293b;
}

.nitro-emustats__chart-tooltip span,
.nitro-emustats__chart-tooltip small {
    font-size: 10px;
    line-height: 1.2;
    color: #64748b;
}

.nitro-emustats__table-shell {
    min-height: 0;
    height: 100%;
    overflow: auto;
    border: 1px solid #dbe2ef;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.nitro-emustats__table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.nitro-emustats__table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 12px 12px;
    text-align: left;
    font-size: 12px;
    font-weight: 800;
    background: #eef3fb;
    color: #4b5d7a;
    border-bottom: 1px solid #dbe2ef;
}

.nitro-emustats__table tbody td {
    padding: 11px 12px;
    font-size: 12px;
    border-bottom: 1px solid #edf2f8;
    color: #1f2937;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nitro-emustats__table tbody tr:nth-child(even) td {
    background: #f8fbff;
}

.nitro-emustats__table-empty {
    padding: 24px 12px !important;
    text-align: center;
    color: #64748b !important;
}

.nitro-emustats__table .is-xs {
    width: 72px;
}

.nitro-emustats__table .is-sm {
    width: 96px;
}

.nitro-emustats__table .is-md {
    width: 130px;
}

.nitro-emustats__error,
.nitro-emustats__empty {
    padding: 16px 18px;
    border: 1px solid #dbe2ef;
    border-radius: 12px;
    background: #ffffff;
    color: #334155;
}

.nitro-emustats__error {
    border-color: #fecaca;
    color: #991b1b;
    background: #fff5f5;
}

.nitro-emustats__detail-layout {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    align-content: start;
}

.nitro-emustats__detail-panel {
    display: flex;
    flex-direction: column;
    min-height: 0;
    gap: 12px;
    padding: 16px;
    border: 1px solid #dbe2ef;
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff 0%, #f8faff 100%);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
}

.nitro-emustats__detail-panel-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 800;
    color: #1e293b;
}

.nitro-emustats__detail-panel-header p {
    margin: 6px 0 0;
    font-size: 12px;
    line-height: 1.4;
    color: #64748b;
}

.nitro-emustats__kv-grid {
    display: grid;
    gap: 10px;
}

.nitro-emustats__kv-grid.is-2col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.nitro-emustats__kv-grid.is-1col {
    grid-template-columns: minmax(0, 1fr);
}

.nitro-emustats__kv-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 12px;
    border: 1px solid #e5eaf4;
    border-radius: 12px;
    background: #ffffff;
}

.nitro-emustats__kv-item span {
    font-size: 11px;
    color: #64748b;
}

.nitro-emustats__kv-item strong {
    font-size: 14px;
    line-height: 1.25;
    color: #1e293b;
    word-break: break-word;
}

.nitro-emustats__detail-panel .nitro-emustats__table-shell {
    min-height: 220px;
    max-height: 220px;
}

.nitro-emustats__kv-item strong[data-tone="good"] {
    color: #15803d;
}

.nitro-emustats__kv-item strong[data-tone="warn"] {
    color: #b45309;
}
