.wrap {
    font-family: Arial, sans-serif;
}

.wrap h1 {
    margin-bottom: 30px;
}

.hugeprofit-stats-container {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.hugeprofit-stat-card {
    flex: 1;
    min-width: 250px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 8px #0001;
    padding: 20px;
}

.hugeprofit-stat-title {
    color: #6c757d;
    font-size: 15px;
    font-weight: 600;
}

.hugeprofit-stat-link {
    margin: 8px 0 4px;
    font-size: 14px;
}

.hugeprofit-stat-link a {
    color: #2a7cff;
    text-decoration: underline;
}

.hugeprofit-stat-expenses {
    font-size: 14px;
    color: #6c757d;
}

.hugeprofit-stat-values {
    display: flex;
    justify-content: space-between;
    margin-top: 16px;
}

.hugeprofit-stat-value {
    text-align: center;
}

.hugeprofit-stat-value-label {
    font-size: 13px;
    color: #6c757d;
}

.hugeprofit-stat-value-amount {
    font-size: 20px;
}

.hugeprofit-stat-value-amount.positive {
    color: #49c78f;
}

.hugeprofit-stat-value-amount.negative {
    color: #e53935;
}

.hugeprofit-stat-value-currency {
    font-size: 13px;
    color: #6c757d;
}

.hugeprofit-chart-container {
    display: flex;
    gap: 20px;
}

.hugeprofit-chart-card {
    flex: 1;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 8px #0001;
    padding: 24px;
}

.hugeprofit-chart-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 16px;
}

.hugeprofit-chart-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.hugeprofit-chart-select {
    padding: 4px 12px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.hugeprofit-chart-total {
    font-size: 32px;
    color: #49c78f;
    font-weight: 700;
    padding-bottom: 20px;
}

.hugeprofit-chart-description {
    color: #6c757d;
    font-size: 14px;
    margin-bottom: 18px;
}

.hugeprofit-chart-item {
    margin-bottom: 10px;
    font-size: 18px;
    font-weight: 500;
}

.hugeprofit-chart-item-label {
    color: #6c757d;
    font-size: 14px;
}

.hugeprofit-chart-total.is-negative {
    color: #f44336;
}

/* Справочные строки «Прибылей и убытков» — в чистую прибыль не входят */
.hugeprofit-chart-item-muted {
    font-size: 15px;
    color: #6c757d;
}

.hugeprofit-chart-progress {
    background: #e0f7fa;
    height: 10px;
    border-radius: 6px;
    margin-bottom: 12px;
    width: 100%;
}

.hugeprofit-chart-progress-bar {
    background: #49c78f;
    height: 100%;
    border-radius: 6px;
}

.hugeprofit-chart-progress-empty {
    background: #f0f0f0;
    height: 10px;
    border-radius: 6px;
    margin-bottom: 12px;
    width: 100%;
}

.hugeprofit-chart-progress-negative {
    background: #ffebee;
    height: 10px;
    border-radius: 6px;
    margin-bottom: 12px;
    width: 100%;
}

.hugeprofit-chart-progress-bar-negative {
    background: #e53935;
    height: 100%;
    border-radius: 6px;
}

/* Стили для логотипа HugeProfit */
.hugeprofit-logo {
    max-width: 200px;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* Логотип в заголовке h1 */
h1 .hugeprofit-logo {
    max-width: 120px;
    margin: 0;
}

/* Настройки страницы - центрированный логотип */
.hugeprofit-settings-header {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Главная страница - горизонтальный flex */
.hugeprofit-main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Подпись под логотипом на странице настроек */
.hugeprofit-settings-subtitle {
    display: block;
    font-size: 18px;
    margin-top: 10px;
    color: #666;
    font-weight: 400;
}

@media (max-width: 768px) {
    .hugeprofit-logo {
        max-width: 150px;
    }
    
    h1 .hugeprofit-logo {
        max-width: 120px;
    }
    
    .hugeprofit-main-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .hugeprofit-settings-subtitle {
        font-size: 16px;
        margin-top: 8px;
    }
} 
/* === Прибыль HugeProfit в заказах WooCommerce === */

.column-hugeprofit_profit {
    width: 12ch;
}

.hugeprofit-profit {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 6px;
    cursor: default;
}

.hugeprofit-profit.is-loading .hugeprofit-profit-placeholder {
    display: inline-block;
    width: 72px;
    height: 20px;
    border-radius: 10px;
    background: linear-gradient(90deg, #f0f0f1 25%, #e2e4e7 50%, #f0f0f1 75%);
    background-size: 200% 100%;
    animation: hugeprofit-shimmer 1.2s infinite linear;
}

@keyframes hugeprofit-shimmer {
    from { background-position: 200% 0; }
    to { background-position: -200% 0; }
}

@media (prefers-reduced-motion: reduce) {
    .hugeprofit-profit.is-loading .hugeprofit-profit-placeholder {
        animation: none;
    }
}

.hugeprofit-profit-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    line-height: 1.5;
}

.hugeprofit-profit-badge.is-positive {
    background: #e6f4ea;
    color: #1e7e34;
}

.hugeprofit-profit-badge.is-negative {
    background: #fcebea;
    color: #b32d2e;
}

.hugeprofit-profit-badge.is-zero {
    background: #f0f0f1;
    color: #50575e;
}

.hugeprofit-profit-margin {
    color: #646970;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}

.hugeprofit-profit-muted {
    color: #8c8f94;
    font-size: 12px;
}

.hugeprofit-profit .hugeprofit-add-expense.button-link {
    font-size: 12px;
    color: #2271b1;
    text-decoration: none;
    white-space: nowrap;
}

.hugeprofit-profit .hugeprofit-add-expense.button-link:hover,
.hugeprofit-profit .hugeprofit-add-expense.button-link:focus {
    color: #135e96;
    text-decoration: underline;
}

.hugeprofit-profit.is-updated .hugeprofit-profit-badge {
    box-shadow: 0 0 0 3px rgba(30, 126, 52, .25);
    transition: box-shadow .3s;
}

/* Блок на странице заказа */
.hugeprofit-profit-detailed {
    display: block;
}

.hugeprofit-profit-detailed .hugeprofit-profit-total {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
    font-size: 14px;
}

.hugeprofit-profit-detailed .hugeprofit-profit-badge {
    font-size: 15px;
}

.hugeprofit-profit-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 10px;
}

.hugeprofit-profit-table th,
.hugeprofit-profit-table td {
    padding: 3px 0;
    border-bottom: 1px solid #f0f0f1;
    font-weight: normal;
    text-align: left;
}

.hugeprofit-profit-table td {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.hugeprofit-profit-sale {
    margin: 0 0 10px;
    color: #646970;
}

.hugeprofit-profit-detailed .hugeprofit-add-expense.button {
    width: 100%;
    text-align: center;
}

/* Модалка расхода к заказу */
.hugeprofit-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 80px 16px 16px;
    background: rgba(0, 0, 0, .55);
    overflow-y: auto;
}

.hugeprofit-modal[hidden] {
    display: none;
}

.hugeprofit-modal-dialog {
    position: relative;
    width: 440px;
    max-width: 100%;
    padding: 24px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, .2);
}

.hugeprofit-modal-dialog h2 {
    margin: 0 24px 6px 0;
    font-size: 18px;
}

.hugeprofit-modal-intro {
    margin: 0 0 16px;
    color: #646970;
}

.hugeprofit-modal-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    border: 0;
    background: none;
    font-size: 24px;
    line-height: 1;
    color: #646970;
    cursor: pointer;
}

.hugeprofit-modal-dialog label {
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
}

.hugeprofit-modal-dialog input[type="text"],
.hugeprofit-modal-dialog input[type="number"],
.hugeprofit-modal-dialog select {
    width: 100%;
    max-width: none;
}

.hugeprofit-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 4px;
}

.hugeprofit-preset {
    padding: 3px 10px;
    border: 1px solid #c3c4c7;
    border-radius: 14px;
    background: #f6f7f7;
    color: #2c3338;
    cursor: pointer;
}

.hugeprofit-preset:hover,
.hugeprofit-preset.is-active {
    border-color: #1e7e34;
    background: #e6f4ea;
    color: #1e7e34;
}

.hugeprofit-modal-error {
    margin: 0 0 12px;
    padding: 8px 10px;
    border-left: 4px solid #d63638;
    background: #fcf0f1;
}

.hugeprofit-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}
