/* =====================================================================
   pages.css — styles extracted from individual Blade views.
   Loaded after custom.css by the admin and distributor layouts.

   Grouped by the view(s) each block serves. Rules shared by an admin and
   a distributor twin of the same page are written once.
   ===================================================================== */


/* =====================================================================
   Auth / login layouts
   layouts/admin/focused.blade.php, layouts/distributor/focused.blade.php

   The poster image varies per install, so the view sets it through the
   --login-poster custom property and the URL stays out of this file.
   ===================================================================== */
.decoration-section {
    background-color: #f4e4c1;
    background-image: var(--login-poster);
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}


/* =====================================================================
   Benefits + rate chart: hide controls when printing
   admin/benefits/{index,details,profit_details}.blade.php
   distributor/benefits/{index,details,profit_details}.blade.php
   distributor/products/rate_chart.blade.php
   ===================================================================== */
@media print {

    #searchBenefit,
    #searchProduct,
    .benefits-page button,
    .rate-chart-page button {
        display: none !important;
    }
}


/* =====================================================================
   Bill create screen
   bills/create.blade.php, distributor/bills/create.blade.php
   ===================================================================== */
.product-item {
    border-radius: 12px;
    border: 1px solid #eee;
    transition: .2s;
    cursor: pointer;
}

.product-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}

.product-name {
    font-size: 13px;
    font-weight: 600;
    height: 36px;
    overflow: hidden;
}

.product-unit {
    font-size: 12px;
    color: #777;
}

.cart-table input {
    height: 35px;
}

#paidAmount {
    max-width: 180px;
    margin: auto;
}


/* =====================================================================
   Invoice preview screen (on-page, not the PDF template)
   bills/show.blade.php, distributor/bills/show.blade.php
   ===================================================================== */
.invoice-page {
    background: #eef1f5;
    font-family: 'Segoe UI', sans-serif;
}

.invoice-container {
    max-width: 900px;
    margin: 40px auto;
    background: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.invoice-header {
    background: #1f2937;
    color: #fff;
    padding: 25px 30px;
    position: relative;
}

.invoice-header::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: #a3e635;
}

.company-logo {
    height: 55px;
    margin-bottom: 10px;
}

.company-name {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.invoice-title {
    font-size: 34px;
    font-weight: bold;
    color: #a3e635;
    letter-spacing: 2px;
    text-align: right;
}

.invoice-meta {
    text-align: right;
    font-size: 14px;
    margin-top: 5px;
}

.invoice-body {
    padding: 30px;
}

.invoice-page .section-title {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 6px;
    color: #6b7280;
}

.invoice-table th {
    background: #a3e635;
    color: #000;
    font-weight: 600;
    font-size: 13px;
}

.invoice-table td {
    font-size: 14px;
    vertical-align: middle;
}

.totals-table td:first-child {
    font-weight: 500;
}

.grand-total {
    font-size: 18px;
    font-weight: bold;
}

.footer-note {
    margin-top: 30px;
    font-size: 13px;
    color: #555;
}

@media print {

    .print-btn {
        display: none;
    }

    .invoice-page {
        background: #fff;
    }
}


/* =====================================================================
   Settings — Select2 multi-select (supported currencies)
   admin/settings/settings.blade.php
   ===================================================================== */
.select2-container--default .select2-selection--multiple {
    min-height: 42px;
    border: 1px solid #e5e7eb;
    background-color: #f9fafb;
    padding: 6px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    border-radius: 6px;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: #6366f1;
    border: none;
    color: #fff;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 13px;
    margin: 3px 4px;
}

.select2-selection__choice__remove {
    color: #fff;
    margin-right: 6px;
    font-weight: bold;
    cursor: pointer;
}

.select2-search__field {
    min-width: 80px;
    font-size: 14px;
}


/* =====================================================================
   Distributor — create user
   distributor/users/create.blade.php
   ===================================================================== */
.user-create-page .select2-container {
    width: 100% !important;
}


/* =====================================================================
   Distributor dashboard cards
   distributor/dashboard.blade.php
   ===================================================================== */
.dashboard-card {
    border-radius: 12px;
    transition: 0.2s;
    cursor: pointer;
    border: 1px solid #eee;
}

.dashboard-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.dashboard-icon {
    font-size: 30px;
    margin-bottom: 10px;
}

.dashboard-title {
    font-weight: 600;
    font-size: 15px;
}


/* =====================================================================
   Distributor team tree
   distributor/tree/child.blade.php
   ===================================================================== */
.team-page {
    --accent: var(--pe-primary, #4f46e5);
    --accent-rgb: var(--pe-primary-rgb, 79, 70, 229);
}

.team-hero {
    background: linear-gradient(135deg, var(--accent) 0%, rgba(var(--accent-rgb), 0.82) 100%);
    color: #fff;
    border-radius: 16px;
    padding: 26px;
    display: flex;
    align-items: center;
    gap: 18px;
    box-shadow: 0 10px 24px rgba(var(--accent-rgb), 0.30);
}

.team-hero .avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    font-weight: 700;
    flex-shrink: 0;
}

.team-hero h4 {
    margin: 0 0 4px;
    font-weight: 700;
}

.team-hero .hero-block {
    opacity: 0.85;
    font-size: 14px;
}

.team-hero .hero-roles {
    margin-top: 8px;
}

.hero-role {
    display: inline-block;
    background: rgba(255, 255, 255, 0.20);
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    margin: 2px 4px 2px 0;
}

.team-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 15px;
    color: var(--pe-heading-color, #1f2937);
    margin: 26px 0 12px;
}

.team-count {
    background: rgba(var(--accent-rgb), 0.10);
    color: var(--accent);
    font-size: 12px;
    font-weight: 600;
    padding: 2px 9px;
    border-radius: 20px;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
    gap: 14px;
}

.member-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--pe-card-bg, #fff);
    border: 1px solid var(--pe-border-color, #eeeefb);
    border-radius: 12px;
    padding: 14px;
    box-shadow: 0 4px 14px rgba(49, 46, 129, 0.05);
    transition: transform .15s ease, box-shadow .15s ease;
    text-decoration: none;
    color: inherit;
}

a.member-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 22px rgba(var(--accent-rgb), 0.18);
    border-color: rgba(var(--accent-rgb), 0.45);
}

.member-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--accent), rgba(var(--accent-rgb), 0.7));
}

.member-info {
    min-width: 0;
    flex: 1;
}

.member-name {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.member-status {
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 2px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-active {
    color: #059669;
}

.status-active .status-dot {
    background: #10b981;
}

.status-inactive {
    color: #dc2626;
}

.status-inactive .status-dot {
    background: #ef4444;
}

.member-card .chev {
    color: #b6b9d6;
    font-size: 18px;
    flex-shrink: 0;
}

.team-empty {
    background: rgba(var(--accent-rgb), 0.04);
    border: 1px dashed rgba(var(--accent-rgb), 0.30);
    border-radius: 12px;
    padding: 22px;
    text-align: center;
    color: var(--pe-text-muted, #8b8fa6);
    font-size: 14px;
}

@media (max-width: 576px) {
    .team-hero {
        padding: 18px;
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }

    .team-hero .hero-roles {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }

    .team-grid {
        grid-template-columns: 1fr;
    }

    .team-section-title {
        margin: 20px 0 10px;
    }
}
