/* Eximious Tech ERP — mobile pie-chart visibility repair.
   The original mobile grid allowed the conic-gradient element to shrink-wrap
   around its centre label. Give the chart a real responsive diameter and
   render the centre as a separate layer so every segment remains visible. */

@media (max-width: 900px) {
  .statistics-pie-layout {
    grid-template-columns: minmax(0, 1fr) !important;
    justify-items: stretch;
    gap: 18px !important;
  }

  .statistics-pie {
    position: relative;
    isolation: isolate;
    width: clamp(220px, 72vw, 300px) !important;
    min-width: 220px !important;
    max-width: 300px !important;
    height: auto !important;
    aspect-ratio: 1 / 1 !important;
    margin: 4px auto 10px !important;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--line, #dce4ee) 72%, transparent);
    border-radius: 50%;
    box-shadow: 0 16px 34px rgba(13, 29, 51, .14) !important;
  }

  .statistics-pie::after {
    position: absolute;
    z-index: 1;
    width: 52%;
    aspect-ratio: 1 / 1;
    border: 1px solid color-mix(in srgb, var(--line, #dce4ee) 78%, transparent);
    border-radius: 50%;
    background: var(--surface, #fff);
    box-shadow: 0 8px 22px rgba(13, 29, 51, .09);
    content: "";
  }

  .statistics-pie > span {
    position: relative;
    z-index: 2;
    display: grid;
    min-width: 82px;
    min-height: 82px;
    padding: 0 !important;
    place-content: center;
    border-radius: 50%;
    background: transparent !important;
    color: var(--text, #182230);
    font-size: 20px;
    line-height: 1.05;
  }

  .statistics-pie > span small {
    margin-top: 5px;
    font-size: 11px;
    line-height: 1.2;
  }

  .statistics-legend {
    width: 100%;
    gap: 8px !important;
  }

  .statistics-legend > div {
    grid-template-columns: 14px minmax(0, 1fr) auto !important;
    gap: 9px !important;
    min-width: 0;
    padding: 10px 11px;
    border: 1px solid var(--line, #dce4ee);
    border-radius: 10px;
    background: var(--surface-2, #f0f4f9);
  }

  .statistics-legend i {
    width: 14px !important;
    height: 14px !important;
    border-radius: 4px !important;
  }

  .statistics-legend span {
    min-width: 0;
    overflow: hidden;
    color: var(--text, #182230);
    font-size: 12px;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .statistics-legend strong {
    color: var(--text, #182230);
    font-size: 12px;
    white-space: nowrap;
  }
}

@media (max-width: 360px) {
  .statistics-pie {
    width: min(76vw, 250px) !important;
    min-width: 200px !important;
  }
}
