@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Bengali:wght@400;500;600;700;800&display=swap');

:root {
    --primary: #4F46E5;
    --secondary: #10B981;
    --accent: #F59E0B;
    --danger: #EF4444;

    --dark: #1F2937;
    --text-main: #374151;
    --text-light: #6B7280;

    --bg-body: #F3F4F6;
    --surface: #ffffff;

    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 10px;

    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 6px 15px rgba(0,0,0,0.12);
    --shadow-lg: 0 15px 30px rgba(0,0,0,0.15);
}

/* RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Noto Sans Bengali', system-ui, sans-serif;
    background: linear-gradient(to bottom, #eef2ff, var(--bg-body));
    color: var(--text-main);
    min-height: 100vh;
    line-height: 1.5;
}

/* ================= HEADER ================= */
.app-header {
    background: var(--surface);
    padding: 24px 32px;
    border-bottom-left-radius: 28px;
    border-bottom-right-radius: 28px;
    box-shadow: var(--shadow-md);
    margin-bottom: 32px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand h1 {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand h1 i {
    color: var(--primary);
}

.brand p {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* ================= CONTAINER ================= */
.container {
    max-width: 100%;
    padding: 0 40px 60px;
}

/* ================= WORKSPACE LINKS ================= */
.workspace-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.workspace-link {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 28px 20px;
    text-align: center;
    text-decoration: none;
    color: var(--text-main);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    position: relative;
}

.workspace-link::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    height: 4px;
    width: 100%;
    background: currentColor;
    opacity: 0.7;
}

.workspace-link:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.workspace-link i {
    font-size: 2.4rem;
    margin-bottom: 12px;
}

.workspace-link span {
    display: block;
    font-weight: 700;
    font-size: 0.95rem;
}

.workspace-link.dokan { color: var(--primary); }
.workspace-link.farm { color: var(--secondary); }
.workspace-link.sonali { color: var(--accent); }

/* ================= SECTION TITLE ================= */
.section-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 18px;
    padding-left: 12px;
    border-left: 4px solid var(--primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ================= VISIBILITY ================= */
.desktop-only { display: none; }
.mobile-only { display: block; }

/* ================= DESKTOP TABLE ================= */
@media (min-width: 1024px) {

    .desktop-only { display: block; }
    .mobile-only { display: none; }

    .custom-table {
        width: 100%;
        border-collapse: separate;
        border-spacing: 0;
        background: var(--surface);
        border-radius: var(--radius-md);
        overflow: hidden;
        box-shadow: var(--shadow-md);
    }

    .custom-table th {
        background: #EEF2FF;
        padding: 18px 22px;
        text-align: left;
        font-weight: 700;
        font-size: 0.85rem;
        color: var(--text-light);
        border-bottom: 1px solid #E5E7EB;
    }

    .custom-table td {
        padding: 18px 22px;
        border-bottom: 1px solid #F3F4F6;
        font-size: 0.95rem;
    }

    /* NORMAL ROW HOVER ONLY */
    .custom-table tr:not(.summary-row):hover td {
        background: #F9FAFB;
    }

    .text-right {
        text-align: right;
    }

    /* SUMMARY ROW – FIXED */
    .summary-row td {
        background: linear-gradient(135deg, var(--dark), #374151);
        color: #ffffff;
        font-weight: 800;
    }

    .custom-table tr.summary-row:hover td {
        background: linear-gradient(135deg, var(--dark), #374151);
        color: #ffffff;
    }
}

/* ================= MOBILE CARD ================= */
.customer-card-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.customer-card {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.customer-card-left {
    display: flex;
    gap: 14px;
    align-items: center;
}

.customer-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #818cf8);
    color: white;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}

.customer-info h3 {
    font-size: 1rem;
    font-weight: 800;
    color: var(--dark);
}

.meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.meta-badge {
    padding: 4px 10px;
    font-size: 0.75rem;
    border-radius: 8px;
    font-weight: 700;
}

.meta-badge.dokan {
    background: #EEF2FF;
    color: var(--primary);
}

.meta-badge.sonali {
    background: #FFF7ED;
    color: var(--accent);
}

.customer-card-right {
    text-align: right;
}

.total-badge {
    font-size: 1.05rem;
    font-weight: 900;
    background: #FEF2F2;
    color: var(--danger);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
}

/* ================= MOBILE RESPONSIVE ================= */
@media (max-width: 768px) {

    .container {
        padding: 0 16px 40px;
    }

    .workspace-links {
        gap: 12px;
    }

    .workspace-link {
        padding: 16px 8px;
    }

    .workspace-link i {
        font-size: 1.8rem;
    }

    .workspace-link span {
        font-size: 0.8rem;
    }

    .customer-card {
        flex-direction: column;
    }

    .customer-card-right {
        width: 100%;
        padding-top: 12px;
        border-top: 1px solid #E5E7EB;
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: left;
    }
}
