/* BeautyHills Partner-Portal — Frontend */

.bh-partner-portal {
    box-sizing: border-box;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
    overflow-x: hidden;
    font-family: "Mulish", system-ui, sans-serif;
    color: #333;
}

.bh-partner-portal *,
.bh-partner-portal *::before,
.bh-partner-portal *::after {
    box-sizing: border-box;
}

/* Eingebettet in WooCommerce Mein Konto */
.bh-account-studio .bh-partner-portal {
    padding: 0;
    max-width: none;
    margin: 0;
}

.bh-account-content .bh-partner-portal a {
    text-decoration: none;
}

.bh-account-content .bh-partner-portal a:hover {
    text-decoration: underline;
}

.bh-account-content .bh-partner-portal .bh-nav-item,
.bh-account-content .bh-partner-portal .bh-btn {
    text-decoration: none;
}

.bh-account-content .bh-partner-portal h2,
.bh-account-content .bh-partner-portal h3 {
    margin: 0;
}

/* —— Portal-Tabs —— */
.bh-portal-nav {
    display: flex;
    flex-wrap: nowrap;
    gap: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin: 0 0 1.75rem;
    padding: 0;
    border-bottom: 1px solid #eee;
}

.bh-portal-nav::-webkit-scrollbar {
    display: none;
}

.bh-nav-item {
    flex-shrink: 0;
    display: inline-block;
    padding: 0.75rem 1rem;
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none !important;
    color: #888;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    white-space: nowrap;
    transition: color 0.2s, border-color 0.2s;
}

.bh-nav-item:hover {
    color: #000;
}

.bh-nav-item.active {
    color: #000;
    border-bottom-color: #000;
}

/* —— Section labels —— */
.bh-section-label,
.bh-partner-portal .bh-section-label {
    font-size: 12px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.08em !important;
    color: #E6503E !important;
    margin: 0 0 0.875rem !important;
}

.bh-portal-greeting {
    font-size: 22px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #000;
    margin: 0 0 1.5rem;
}

.bh-stats-section,
.bh-recent-section {
    margin-bottom: 2rem;
}

/* —— Stats —— */
.bh-stats-grid {
    display: grid;
    gap: 0.75rem;
    margin: 0;
}

.bh-stats-grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.bh-stats-grid--5 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.bh-stat-box {
    background: #fafafa;
    border: 1px solid #eee;
    padding: 1.25rem 1rem;
    text-align: center;
    width: auto;
    max-width: none;
}

.bh-stat-box.bh-stat-highlight {
    background: #fff;
    border-color: #000;
}

.bh-stat-value {
    font-size: 1.35rem;
    font-weight: 700;
    color: #000;
    line-height: 1.2;
    margin-bottom: 0.35rem;
    word-break: break-word;
}

.bh-stat-label {
    font-size: 11px;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* —— Tables —— */
.bh-table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid #eee;
}

.bh-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    margin: 0;
}

.bh-table th,
.bh-table td {
    padding: 0.875rem 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

.bh-table th {
    background: #f8f8f8;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #000;
}

.bh-table tbody tr:last-child td {
    border-bottom: none;
}

.bh-table tbody tr:hover {
    background: #fafafa;
}

/* Customers */
.bh-customers-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.bh-customers-header h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.bh-count {
    font-weight: 500;
    color: #888;
}

.bh-expand-cell {
    width: 50px;
    text-align: center;
}

.bh-expand-btn {
    background: #f8f8f8;
    border: 1px solid #eee;
    cursor: pointer;
    padding: 0.4rem 0.65rem;
    color: #333;
    font-size: 12px;
    transition: background 0.2s;
}

.bh-expand-btn:hover {
    background: #eee;
}

.bh-expand-icon {
    display: inline-block;
    transition: transform 0.2s;
}

.bh-expand-btn.expanded .bh-expand-icon {
    transform: rotate(90deg);
}

.bh-sale-detail-row td {
    padding: 0;
    background: #fafafa;
    border-bottom: 1px solid #eee;
}

.bh-sale-products-container {
    padding: 0.85rem 1.25rem 1rem 3.25rem;
}

.bh-sale-products-title {
    margin: 0 0 0.65rem;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #666;
}

.bh-sale-products-table {
    width: 100%;
    max-width: 36rem;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid #eee;
}

.bh-sale-products-table th,
.bh-sale-products-table td {
    padding: 0.55rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid #eee;
    font-size: 13px;
}

.bh-sale-products-table th {
    background: #f8f8f8;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.bh-sale-products-table tbody tr:last-child td {
    border-bottom: none;
}

.bh-sale-products-empty {
    margin: 0;
    font-size: 13px;
    color: #666;
}

.bh-orders-row td {
    padding: 0;
    background: #fafafa;
}

.bh-orders-container {
    padding: 1rem 1.25rem 1rem 3.5rem;
}

.bh-orders-table {
    width: 100%;
    font-size: 13px;
}

.bh-orders-table th,
.bh-orders-table td {
    padding: 0.5rem 0.75rem;
}

.bh-commission {
    font-weight: 600;
    color: #000;
}

/* Status */
.bh-status {
    display: inline-block;
    padding: 0.25rem 0.65rem;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border: 1px solid #eee;
    background: #f8f8f8;
    color: #333;
}

.status-success,
.bh-status.status-success {
    background: #f0f7f0;
    border-color: #c8e0c8;
    color: #1a5c1a;
}

.status-warning,
.bh-status.status-warning {
    background: #fff8e8;
    border-color: #f0e0b8;
    color: #7a5c10;
}

.status-error,
.bh-status.status-error {
    background: #fdf2f1;
    border-color: #f0c8c4;
    color: #8b2e24;
}

.status-pending,
.bh-status.status-pending {
    background: #f5f5f5;
    border-color: #e0e0e0;
    color: #555;
}

/* Buttons — BeautyHills pill */
.bh-btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none !important;
    transition: background 0.2s, color 0.2s;
}

.bh-btn-primary {
    background: #000;
    color: #fff;
}

.bh-btn-primary:hover {
    background: #333;
    color: #fff;
}

.bh-btn-success {
    background: #000;
    color: #fff;
}

.bh-btn-success:hover {
    background: #333;
    color: #fff;
}

.bh-btn-warning {
    background: #f5f5f5;
    color: #000;
    border: 1px solid #eee;
}

.bh-btn-warning:hover {
    background: #eee;
}

/* Links page */
.bh-links-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.bh-link-box {
    background: #fff;
    border: 1px solid #eee;
    padding: 1.25rem;
    width: 100%;
    overflow: hidden;
}

.bh-link-box h3 {
    margin: 0 0 0.75rem;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #E6503E;
}

.bh-link-input-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    width: 100%;
}

.bh-link-input-group input {
    flex: 1;
    min-width: 0;
    padding: 0.75rem 1rem;
    border: 1px solid #eee;
    font-size: 14px;
    background: #fafafa;
}

.bh-qr-code {
    text-align: center;
    margin: 1.25rem 0;
}

.bh-qr-code img {
    max-width: 180px;
    border: 1px solid #eee;
}

.bh-qr-actions {
    text-align: center;
}

.bh-coupon-display {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.bh-coupon-display span {
    font-size: 1.25rem;
    font-weight: 700;
    color: #000;
    letter-spacing: 0.12em;
    padding: 0.75rem 1.25rem;
    background: #fafafa;
    border: 1px solid #eee;
}

.bh-links-info {
    background: #fafafa;
    border: 1px solid #eee;
    padding: 1.5rem;
}

.bh-links-info h3 {
    margin-top: 0;
}

.bh-links-info ol {
    margin: 0;
    padding-left: 1.25rem;
}

.bh-links-info li {
    margin-bottom: 0.5rem;
}

/* Modal */
.bh-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.bh-modal-content {
    background: #fff;
    padding: 2rem;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.bh-modal-close {
    position: absolute;
    top: 0.75rem;
    right: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: #888;
    line-height: 1;
}

.bh-modal-close:hover {
    color: #000;
}

/* Forms */
.bh-form-group {
    margin-bottom: 1.25rem;
}

.bh-form-group label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #000;
}

.bh-form-group input,
.bh-form-group textarea,
.bh-form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #eee;
    font-size: 14px;
    background: #fff;
}

.bh-form-group input:focus,
.bh-form-group textarea:focus,
.bh-form-group select:focus {
    outline: none;
    border-color: #000;
}

.bh-form-group textarea {
    resize: vertical;
}

.bh-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.bh-form-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.25rem;
    flex-wrap: wrap;
}

/* Notices */
.bh-notice {
    padding: 1rem 1.25rem;
    margin: 0 0 1.5rem;
    border-left: 3px solid #000;
    background: #fafafa;
    font-size: 14px;
    line-height: 1.55;
}

.bh-notice a {
    font-weight: 700;
    text-decoration: underline !important;
}

.bh-notice-info {
    border-left-color: #666;
    background: #f5f5f5;
}

.bh-notice-success {
    border-left-color: #2d6a2d;
    background: #f0f7f0;
}

.bh-notice-error {
    border-left-color: #E6503E;
    background: #fdf2f1;
}

.bh-notice-warning {
    border-left-color: #E6503E;
    background: #fdf6f5;
}

/* Empty */
.bh-empty-state {
    text-align: left;
    padding: 1.5rem 1.25rem;
    background: #fafafa;
    border: 1px solid #eee;
    font-size: 14px;
    color: #555;
}

.bh-empty-state p {
    margin: 0 0 0.5rem;
}

.bh-empty-state p:last-child {
    margin-bottom: 0;
}

/* Pagination */
.bh-pagination {
    display: flex;
    gap: 0.35rem;
    justify-content: center;
    margin-top: 1.25rem;
    flex-wrap: wrap;
}

.bh-page {
    display: inline-block;
    padding: 0.5rem 0.75rem;
    border: 1px solid #eee;
    text-decoration: none !important;
    color: #333;
    font-size: 13px;
}

.bh-page:hover {
    background: #f8f8f8;
}

.bh-page.current {
    background: #000;
    color: #fff;
    border-color: #000;
}

.bh-loading {
    text-align: center;
    padding: 1.25rem;
    color: #888;
}

.bh-payout-summary {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.75rem;
    flex-wrap: wrap;
}

.bh-admin-notice {
    background: #1a1a1a;
    color: #fff;
    padding: 0.75rem 1.25rem;
    margin-bottom: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Responsive */
@media (max-width: 1024px) {
    .bh-stats-grid--5 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .bh-nav-item {
        padding: 0.65rem 0.75rem;
        font-size: 11px;
    }

    .bh-stats-grid--3,
    .bh-stats-grid--5 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .bh-stat-value {
        font-size: 1.15rem;
    }

    .bh-customers-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .bh-table th,
    .bh-table td {
        padding: 0.65rem 0.75rem;
        font-size: 13px;
    }

    .bh-form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .bh-stats-grid--3 {
        grid-template-columns: 1fr;
    }
}
