/* =====================================================
   PAINEL ADMINISTRATIVO
===================================================== */
.admin-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

/* =====================================================
   PAINEL GERAL
===================================================== */
.dashboard-panel {
    padding: 15px;
    background: #fff;
    border: 1px solid #e8e4eb;
    border-radius: 10px;
}

.dashboard-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.dashboard-panel-header h2 {
    margin: 0;
    color: #24142d;
    font-size: 11px;
}

.dashboard-panel-header span {
    color: #7a2db8;
    font-size: 8px;
    font-weight: 700;
}

.dashboard-chart-box {
    position: relative;
    width: 100%;
}

.dashboard-chart-box-line {
    height: 220px;
}

.dashboard-chart-box-doughnut {
    width: min(220px, 100%);
    height: 220px;
    margin: 0 auto;
}

.dashboard-status-legend {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 7px 12px;
    margin-top: 10px;
}

.dashboard-status-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #68616c;
    font-size: 7px;
}

.dashboard-orders-panel {
    margin-bottom: 18px;
}

.dashboard-link-button {
    border: 0;
    background: transparent;
    color: #6d1c8c;
    font-family: inherit;
    font-size: 8px;
    font-weight: 700;
    cursor: pointer;
}

.dashboard-table-wrapper {
    overflow-x: auto;
}

.dashboard-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 8px;
}

.dashboard-table th,
.dashboard-table td {
    padding: 9px 7px;
    text-align: left;
    border-bottom: 1px solid #ece9ee;
}

.dashboard-table th {
    color: #6c6670;
    font-weight: 700;
}

.dashboard-table td {
    color: #57515c;
}

.dashboard-table td:first-child {
    color: #67218c;
    font-weight: 700;
}

.dashboard-order-status {
    display: inline-flex;
    padding: 4px 7px;
    border-radius: 999px;
    font-size: 7px;
    font-weight: 700;
}

.dashboard-order-status.novo { background: #f3e7ff; color: #862bc2; }
.dashboard-order-status.preparando { background: #fff0df; color: #d66f13; }
.dashboard-order-status.entrega { background: #e3f1ff; color: #3276b6; }
.dashboard-order-status.entregue { background: #e1f5e5; color: #318747; }
.dashboard-order-status.cancelado { background: #fde9eb; color: #c8404c; }

.menu-count:empty {
    display: none;
}

@media (max-width: 1100px) {
    .catalog-products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .admin-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
    .catalog-toolbar,
    .catalog-form-row,
    .catalog-summary,
    .catalog-products,
    .admin-stats {
        grid-template-columns: 1fr;
    }

    .catalog-header,
    .admin-header {
        flex-direction: column;
    }
}


/* =====================================================
   ADMINISTRAÇÃO UNIFICADA + LEGIBILIDADE RESPONSIVA
===================================================== */

.main {
    width: 100%;
    min-width: 0;
}

.main > div {
    width: min(100%, var(--content-max-width));
    margin-inline: auto;
}

.admin-unified-header {
    align-items: center;
    gap: 18px;
}

.admin-header-tools {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
}

.ui-size-control {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 6px;
    border: 1px solid #e5e0e8;
    border-radius: 10px;
    background: #fff;
}

.ui-size-control > span {
    padding: 0 4px;
    font-size: 11px;
    font-weight: 700;
    color: #6e6672;
}

.ui-size-button {
    border: 1px solid transparent;
    border-radius: 7px;
    background: transparent;
    padding: 7px 10px;
    font: inherit;
    font-size: 11px;
    font-weight: 700;
    color: #625969;
    cursor: pointer;
}

.ui-size-button:hover,
.ui-size-button.active {
    background: #f2e8f8;
    color: #6d1c8c;
    border-color: #dfc9eb;
}

.admin-primary-stats,
.admin-business-stats {
    margin-bottom: 14px;
}

.admin-stat-card small {
    display: block;
    margin-top: 6px;
    font-size: 11px;
    color: #8a838d;
}

.admin-latest-orders {
    margin: 14px 0;
}

/* Fontes maiores e mais confortáveis */
.sidebar .menu-item,
.logout-button,
.header-right,
.catalog-header p,
.history-header p,
.admin-header p,
.updated,
.dashboard-table,
.dashboard-link-button,
.dashboard-status-legend-item {
    font-size: clamp(11px, 0.72vw, 14px);
}

.sidebar .logo-text strong,
.header h1,
.catalog-header h1,
.history-header h1,
.admin-header h1 {
    font-size: clamp(20px, 1.35vw, 28px);
}

.stat-card span,
.history-stat-card span,
.catalog-summary-card span,
.admin-stat-card span {
    font-size: clamp(11px, 0.72vw, 14px);
}

.stat-card strong,
.history-stat-card strong,
.catalog-summary-card strong,
.admin-stat-card strong,
.admin-status-item strong,
.dashboard-panel-header h2,
.delivery-header h2,
.history-list-header h2 {
    font-size: clamp(15px, 1vw, 20px);
}

.dashboard-table th,
.dashboard-table td {
    font-size: clamp(11px, 0.72vw, 14px);
    padding: 12px 10px;
}

.dashboard-order-status {
    font-size: clamp(10px, 0.66vw, 13px);
    padding: 5px 8px;
}

.dashboard-chart-box-line {
    height: clamp(220px, 26vw, 360px);
}

.dashboard-chart-box-doughnut {
    height: clamp(210px, 22vw, 320px);
}

