﻿/* ===== ROOT COLORS ===== */

:root {
    --ril-primary: #63AEB8;
    --ril-secondary: #5C63A8;
    --ril-dark: #1f2937;
}

/* ===== LAYOUT ===== */

.dealer-layout {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== HEADER ===== */

.dealer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 18px;
    background: linear-gradient(90deg, var(--ril-primary), var(--ril-secondary));
    color: white;
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* LEFT */

.dealer-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dealer-logo {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.dealer-title {
    font-weight: 600;
    font-size: 16px;
}

/* ===== MENU ===== */

.dealer-menu a {
    color: white;
    text-decoration: none;
    margin: 0 14px;
    font-weight: 500;
    position: relative;
}

    .dealer-menu a.active {
        font-weight: 700;
    }

/* ===== RIGHT ===== */

.dealer-logout {
    background: rgba(255,255,255,0.15);
    padding: 6px 14px;
    border-radius: 6px;
    color: white;
    text-decoration: none;
    font-weight: 500;
}

/* ===== HAMBURGER ===== */

.dealer-hamburger {
    display: none;
    background: transparent;
    border: none;
    font-size: 22px;
    color: white;
    cursor: pointer;
}

/* ===== MOBILE MENU ===== */

.dealer-mobile-menu {
    display: none;
    flex-direction: column;
    background: white;
    border-bottom: 1px solid #e5e7eb;
    padding: 12px 16px;
}

    .dealer-mobile-menu a {
        padding: 10px 0;
        text-decoration: none;
        color: #374151;
        font-weight: 500;
    }

    .dealer-mobile-menu.open {
        display: flex;
    }

.dealer-logout-mobile {
    color: #dc2626 !important;
}

/* ===== CONTENT ===== */

.dealer-content {
    flex: 1;
    padding: 20px;
    background: #f5f7fb;
}

/* ===== FOOTER ===== */

.dealer-footer {
    text-align: center;
    padding: 14px;
    font-size: 13px;
    color: #6b7280;
    background: #ffffff;
    border-top: 1px solid #e5e7eb;
}

/* ===== Sales History page css ===== */

:root {
    --ril-primary: #63AEB8;
    --ril-secondary: #5C63A8;
    --ril-bg: #f5f7fb;
    --ril-card-bg: #ffffff;
    --ril-border: #e5e7eb;
    --ril-text: #1f2937;
    --ril-muted: #6b7280;
    --ril-success: #16a34a;
    --ril-warning: #b45309;
    --ril-danger: #dc2626;
}

/* PAGE */
.ril-page {
    padding: 20px;
    background: var(--ril-bg);
}

/* HEADER */
.ril-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    flex-wrap: wrap;
    gap: 12px;
}

.ril-title {
    margin: 0;
    font-weight: 600;
    font-size: 20px;
    color: var(--ril-text);
}

/* BUTTONS */
.ril-primary-btn {
    background: linear-gradient(90deg, var(--ril-primary), var(--ril-secondary));
    color: white !important;
    font-weight: 600;
    border-radius: 8px;
    padding: 8px 16px;
}

.ril-search-btn {
    background: linear-gradient(90deg, var(--ril-primary), var(--ril-secondary));
    color: white !important;
    font-weight: 600;
    border-radius: 8px;
    padding: 8px 16px;
}

.ril-clear-btn {
    background: linear-gradient(90deg, #f87171, #b91c1c);
    color: white !important;
    font-weight: 600;
    border-radius: 8px;
    padding: 8px 16px;
}

/* FILTER CARD */
.ril-filter-card {
    padding: 18px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    border: 1px solid var(--ril-border);
}

/* TABLE CARD */
.ril-table-card {
    margin-top: 18px;
    padding: 14px;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
    border: 1px solid var(--ril-border);
}

/* TABLE */
.ril-table .mud-table-head th {
    font-weight: 600;
    background: #f8fafc;
    color: var(--ril-text);
}

.ril-table td {
    border-bottom: 1px solid #eef1f6;
}

/* STATUS */
.ril-status {
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

    .ril-status.Completed {
        background: #dcfce7;
        color: var(--ril-success);
    }

    .ril-status.Unassigned {
        background: #fef3c7;
        color: var(--ril-warning);
    }

    .ril-status.Assigned {
        background: #e0e7ff;
        color: #4338ca;
    }

    .ril-status.Not {
        background: #f7d4d4;
        color: #ff0000;
    }
/* MOBILE */
@media (max-width: 900px) {

    .ril-page {
        padding: 14px;
    }

    .ril-page-header {
        align-items: flex-start;
    }

    .ril-search-btn,
    .ril-clear-btn {
        width: 100%;
    }
}

/*Sales History Dialog Css*/

/* ================================
   INVOICE MODAL
================================ */

.invoice-header {
    margin-bottom: 18px;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 12px;
}

    .invoice-header h3 {
        margin: 0;
        font-weight: 600;
    }

    .invoice-header p {
        margin: 4px 0 0;
        font-size: 13px;
        color: #6b7280;
    }

/* CARD GRID */

.product-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

/* CARD */

.product-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border-radius: 14px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 10px rgba(0,0,0,0.04);
    transition: all 0.2s ease;
}

    .product-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    }

/* ICON */

.product-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(90deg, var(--ril-primary), var(--ril-secondary));
    color: white;
    font-size: 22px;
}

/* INFO */

.product-info h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
}

.product-info p {
    margin: 2px 0;
    font-size: 13px;
    color: #6b7280;
}

/* Invoice clickable */

.invoice-link {
    color: var(--ril-primary);
    font-weight: 600;
    cursor: pointer;
}

    .invoice-link:hover {
        text-decoration: underline;
    }

/* Responsive */

@media (max-width: 768px) {
    .product-card-grid {
        grid-template-columns: 1fr;
    }
}


/* SALES MODE CARD */
.sales-mode-card h4 {
    margin-bottom: 16px;
}

.sales-mode-option {
    cursor: pointer;
}

    .sales-mode-option:hover {
        transform: translateY(-4px);
    }

/* Selected product section */
.selected-products-section {
    margin-top: 20px;
}

.create-sales-btn-wrapper {
    margin-top: 24px;
    text-align: right;
}

.sales-mode-wrapper {
    padding: 20px;
}

.mode-header {
    margin-bottom: 16px;
}

.mode-grid {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.mode-card {
    flex: 1;
    min-width: 220px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border-radius: 10px;
    background: #f8fafc;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid #e5e7eb;
}

    .mode-card:hover {
        background: #eef2ff;
        transform: translateY(-2px);
    }

.mode-icon {
    font-size: 28px;
    color: var(--ril-primary);
}

.mode-text {
    display: flex;
    flex-direction: column;
    font-size: 14px;
}


