/* =============================================================================
   FINEART Shop Manager — Admin Styles
   ============================================================================= */

/* ---- Shared layout ---- */
.fineart-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.fineart-stat-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 18px 20px;
    position: relative;
}

.fineart-stat-card .fineart-stat-icon {
    font-size: 28px;
    margin-bottom: 8px;
}

.fineart-stat-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #888;
    font-weight: 600;
    margin-bottom: 6px;
}

.fineart-stat-value {
    font-size: 26px;
    font-weight: 800;
    color: #111;
    line-height: 1;
}

.fineart-stat-meta {
    font-size: 12px;
    color: #aaa;
    margin-top: 6px;
}

.fineart-card-link {
    display: block;
    margin-top: 12px;
    font-size: 12px;
    color: #2271b1;
    text-decoration: none;
}

.fineart-card-link:hover {
    text-decoration: underline;
}

/* -- Stat card accent colours -- */
.fineart-stat-overdue  { border-left: 4px solid #7b241c; }
.fineart-stat-pending  { border-left: 4px solid #e67e22; }
.fineart-stat-unpaid   { border-left: 4px solid #e74c3c; }
.fineart-stat-paid     { border-left: 4px solid #27ae60; }
.fineart-card-primary  { border-left: 4px solid #2271b1; }

/* ---- Status Badges ---- */
.fineart-status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.6;
    white-space: nowrap;
}

.fineart-status-unpaid   { background: #e74c3c; color: #fff; }
.fineart-status-pending  { background: #e67e22; color: #fff; }
.fineart-status-paid     { background: #27ae60; color: #fff; }
.fineart-status-overdue  { background: #7b241c; color: #fff; }
.fineart-status-unknown  { background: #888;    color: #fff; }

/* ---- Alert Banners ---- */
.fineart-alert {
    padding: 14px 18px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 13px;
    line-height: 1.7;
    border-left: 5px solid transparent;
}

.fineart-alert-overdue {
    background: #fdf2f2;
    border-color: #7b241c;
    color: #5b1a14;
}

.fineart-alert-pending {
    background: #fef9ef;
    border-color: #e67e22;
    color: #7d4e0a;
}

.fineart-alert-ok {
    background: #edfaed;
    border-color: #27ae60;
    color: #1a6635;
}

.fineart-alert-info {
    background: #f0f6ff;
    border-color: #2271b1;
    color: #14355a;
}

.fineart-alert-item {
    display: block;
    margin-top: 6px;
    padding-left: 12px;
}

.fineart-alert-item a {
    font-weight: 700;
    color: inherit;
}

/* ---- Invoice Tables ---- */
.fineart-invoices-table th,
.fineart-invoices-table td {
    vertical-align: middle !important;
    padding: 10px 12px !important;
}

.fineart-invoices-table td small {
    color: #888;
    font-size: 11px;
}

/* ---- Card container ---- */
.fineart-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 24px 28px;
}

/* ---- Generate Invoice section ---- */
.fineart-generate-form {
    background: #f8f8f8;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    padding: 18px 20px;
}

.fineart-preview-box {
    background: #f9f9f9;
    border: 1px dashed #ccc;
    border-radius: 6px;
    padding: 20px;
}

.fineart-preview-totals {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 14px 18px;
    margin-top: 16px;
}

.fineart-preview-total-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 13px;
    color: #444;
    border-bottom: 1px solid #f0f0f0;
}

.fineart-preview-total-row:last-child {
    border-bottom: none;
}

.fineart-preview-grand-total {
    font-size: 16px !important;
    font-weight: 800 !important;
    color: #c0392b !important;
    padding-top: 10px !important;
    margin-top: 6px;
    border-top: 2px solid #ccc !important;
}

/* ---- Payment Banner (Shop Side) ---- */
.fineart-payment-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    padding: 20px 24px;
    border-radius: 8px;
    margin-top: 16px;
    border: 1px solid transparent;
}

.fineart-banner-unpaid {
    background: #fdf2f2;
    border-color: #e74c3c;
}

.fineart-banner-overdue {
    background: #f9e6e5;
    border-color: #7b241c;
}

.fineart-banner-pending {
    background: #fef9ef;
    border-color: #e67e22;
}

.fineart-banner-clear {
    background: #edfaed;
    border-color: #27ae60;
}

.fineart-banner-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #555;
    margin-bottom: 4px;
}

.fineart-banner-amount {
    font-size: 36px;
    font-weight: 900;
    color: #c0392b;
    line-height: 1;
    margin-bottom: 4px;
}

.fineart-banner-clear .fineart-banner-label,
.fineart-banner-clear .fineart-banner-meta {
    color: #1a6635;
}

.fineart-banner-meta {
    font-size: 13px;
    color: #555;
    line-height: 1.6;
}

.fineart-banner-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 200px;
}

.fineart-banner-actions .button-hero {
    text-align: center;
    padding: 10px 18px;
    font-size: 13px;
}

/* ---- Info Box ---- */
.fineart-info-box {
    background: #f0f6ff;
    border: 1px solid #b8d4f5;
    border-radius: 6px;
    padding: 16px 20px;
}

.fineart-info-box h3 {
    margin-bottom: 10px;
    font-size: 14px;
    color: #14355a;
}

/* ---- Quick Actions ---- */
.fineart-quick-actions {
    margin: 24px 0;
}

.fineart-action-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 12px;
}

/* ---- Empty state ---- */
.fineart-empty-state {
    text-align: center;
    padding: 40px;
    color: #888;
}

.fineart-empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.fineart-empty-state h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: #444;
}

/* ---- Shop Financials breadcrumb ---- */
.fineart-shop-financials h1 {
    margin-bottom: 4px;
}

/* ---- Recent Sales table ---- */
.fineart-recent-sales {
    margin-top: 28px;
}

.fineart-shop-info {
    margin-top: 28px;
    background: #f8f8f8;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    padding: 16px 20px;
}

/* ---- Responsive ---- */
@media (max-width: 782px) {
    .fineart-stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .fineart-payment-banner {
        flex-direction: column;
        align-items: flex-start;
    }

    .fineart-banner-actions {
        width: 100%;
    }
}

@media (max-width: 500px) {
    .fineart-stats-grid {
        grid-template-columns: 1fr;
    }
}
