﻿/* ==========================================
ERP GLOBAL UI FRAMEWORK (Modern & Eye-Friendly)
========================================== */

:root {
    --primary: #1d4ed8; /* একটু ডিপ ও রয়্যাল ব্লু */
    --primary-light: #eff6ff; /* খুব সফট ব্লু ব্যাকগ্রাউন্ডের জন্য */
    --success: #059669; /* সফট ও রিলাক্সিং গ্রিন */
    --warning: #d97706; /* আই-ফ্রেন্ডলি ওয়ার্নিং কালার */
    --danger: #e11d48; /* মডার্ন রেড */
    --card-radius: 14px;
    --shadow: 0 4px 20px rgba(15, 23, 42, 0.05); /* আরও সফট এবং ডিপ শ্যাডো */
    --border-color: #e2e8f0; /* হালকা বর্ডার কালার */
}

/* ==========================================
PAGE BACKGROUND (Soft & Eye-Friendly)
========================================== */

body {
    background: #f1f5f9; /* আগের চেয়ে সামান্য ডিপ কিন্তু চোখে আরামদায়ক গ্রে-টোন */
    color: #334155; /* টেক্সট একদম কুচকুচে কালো না রেখে সফট চারকোল করা হয়েছে */
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* ==========================================
HEADER BANNER (Smooth Gradient)
========================================== */

.header-banner {
    background: linear-gradient(135deg, #115e59, #0d9488);
    padding: 24px;
    border-radius: var(--card-radius);
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    color: #fff;
}

.content-wrapper {
    margin-top: 20px;
}

/* ==========================================
SEARCH
========================================== */
.search-wrapper {
    position: relative;
    width: 100%;
    max-width: 500px;
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}

.global-search-input {
    width: 100%;
    height: 48px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding-left: 45px;
    color: #1e293b;
    transition: all .25s ease;
}

    .global-search-input:focus {
        outline: none;
        border-color: var(--primary);
        box-shadow: 0 0 0 4px rgba(29, 78, 216, 0.1); /* ফোকাস রিং আরও সফট করা হয়েছে */
        background: #ffffff;
    }

/* Mobile */
@media (max-width: 768px) {
    .search-wrapper {
        max-width: 100%;
    }
}

/* ==========================================
CARDS
========================================== */

.glass-card, .main-card {
    background: #ffffff;
    border-radius: var(--card-radius);
    box-shadow: var(--shadow);
    border: 1px solid rgba(226, 232, 240, 0.8); /* হালকা প্রিমিয়াম বর্ডার */
    transition: transform .25s ease, box-shadow .25s ease;
}

    .glass-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
    }

.main-card {
    overflow: hidden;
}

/* ==========================================
EXPAND BUTTON
========================================== */

.expand-btn {
    transition: all .3s ease;
    border: none;
    background: transparent;
}

    .expand-btn i {
        transition: transform .35s ease;
    }

    /* Open State */
    .expand-btn[aria-expanded="true"] i {
        transform: rotate(180deg);
    }

    /* Hover Effect */
    .expand-btn:hover {
        background: var(--primary-light);
        border-radius: 50%;
    }

/* ==========================================
TABLE
========================================== */

.table {
    margin-bottom: 0;
}

    .table thead {
        background: #f1f5f9;
    }

        .table thead th {
            font-weight: 600;
            color: #334155;
            white-space: nowrap;
        }

    .table td {
        vertical-align: middle;
    }

    .table tbody tr:hover {
        background: #f8fafc;
    }

/* ==========================================
BUTTON
========================================== */

.btn-white {
    background: #fff;
}

    .btn-white:hover {
        background: #f8fafc;
    }

/* ==========================================
BADGE
========================================== */

.badge {
    font-weight: 500;
}

/* ==========================================
DETAIL EXPAND
========================================== */

.expand-btn {
    transition: all .3s ease;
}

    .expand-btn i {
        transition: transform .35s ease, color .35s ease;
    }

    /* Open State */

    .expand-btn[aria-expanded="true"] i {
        transform: rotate(180deg);
        color: #16a34a !important;
    }

    /* Closed State */

    .expand-btn[aria-expanded="false"] i {
        color: #2563eb !important;
    }

/* ==========================================
DETAIL CARD
========================================== */

.stock-detail-card {
    background: #fff;
    border-left: 4px solid #2563eb;
    border-radius: 0 12px 12px 0;
    box-shadow: var(--shadow);
}

/* ==========================================
IMAGE
========================================== */

.product-image {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #ddd;
}

/* ==========================================
RESPONSIVE TABLE
========================================== */

@media (max-width:768px) {


    .custom-mobile-table,
    .custom-mobile-table thead,
    .custom-mobile-table tbody,
    .custom-mobile-table th,
    .custom-mobile-table td,
    .custom-mobile-table tr {
        display: block;
        width: 100%;
    }

        .custom-mobile-table thead {
            display: none;
        }

        .custom-mobile-table tr {
            margin-bottom: 15px;
            background: #fff;
            border: 1px solid #dee2e6;
            border-radius: 12px;
            overflow: hidden;
            box-shadow: 0 2px 8px rgba(0,0,0,.06);
        }

        .custom-mobile-table td {
            display: flex;
            justify-content: space-between;
            align-items: center;
            text-align: right !important;
            border: none;
            border-bottom: 1px solid #f1f5f9;
            padding: 12px;
        }

            .custom-mobile-table td:last-child {
                border-bottom: none;
            }

            .custom-mobile-table td::before {
                content: attr(data-label);
                font-weight: 600;
                color: #334155;
                text-align: left;
                margin-right: 15px;
            }

            /* Expand Button Cell */

            .custom-mobile-table td:first-child {
                justify-content: center;
            }

    .header-banner {
        padding: 18px;
    }

    .glass-card {
        margin-bottom: 10px;
    }

    .h4 {
        font-size: 1.2rem;
    }
}
/* ==========================
FORM SYSTEM
========================== */

.global-input {
    min-height: 46px;
    border-radius: 10px;
    border: 1px solid #dbe2ea;
    transition: .3s;
}

    .global-input:focus {
        border-color: var(--primary);
        box-shadow: 0 0 0 4px rgba(37,99,235,.15);
    }

/* ==========================
FORM CARD
========================== */

.product-info-card {
    top: 20px;
}

.form-label,
.small.fw-bold {
    color: #334155;
    margin-bottom: 6px;
}

/* ==========================
ITEM ROW
========================== */

.item-row {
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
    transition: .3s;
}

    .item-row:hover {
        border-color: #bfdbfe;
        box-shadow: 0 4px 14px rgba(37,99,235,.08);
    }

/* ==========================
IMAGE BOX
========================== */

.item-image-box {
    width: 100px;
    height: 100px;
    border-radius: 12px;
    border: 2px dashed #cbd5e1;
    background: #f8fafc;
    transition: .3s;
}

    .item-image-box:hover {
        border-color: var(--primary);
        background: #eff6ff;
    }

/* ==========================
TOTAL BOX
========================== */

.total-box {
    background: #f0fdf4;
    border: 1px dashed #22c55e;
    border-radius: 12px;
    padding: 10px 15px;
}

/* ==========================
GRAND TOTAL
========================== */

.grand-total-box {
    background: #f8fafc;
    border-radius: 14px;
    padding: 18px;
    text-align: right;
    border: 1px solid #e2e8f0;
}

/* ==========================
MOBILE
========================== */

@media(max-width:768px) {

    .sticky-top {
        position: relative !important;
        top: auto !important;
    }

    .item-image-box {
        width: 80px;
        height: 80px;
    }

    .main-card,
    .glass-card {
        margin-bottom: 15px;
    }

    .grand-total-box {
        text-align: center;
    }
}




.section-title {
    font-size: 16px;
    font-weight: 700;
    color: #334155;
    padding-bottom: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
}

.form-container .glass-card {
    border-radius: 16px;
    padding: 30px;
}

.global-input,
.form-control,
.form-select {
    min-height: 48px;
    border-radius: 10px;
}

    .form-control:focus,
    .form-select:focus {
        border-color: #2563eb;
        box-shadow: 0 0 0 4px rgba(37,99,235,.12);
    }



/* ==========================================
GLOBAL FORM CONTROLS
========================================== */

.global-input,
.form-control,
.form-select {
    min-height: 46px;
    border-radius: 10px;
    border: 1px solid #dbe2ea;
    transition: all .25s ease;
    box-shadow: none;
}

textarea.form-control {
    min-height: 110px;
    resize: vertical;
}

.global-input:focus,
.form-control:focus,
.form-select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37,99,235,.12);
}

/* Label */

.form-label,
label {
    font-weight: 600;
    margin-bottom: 6px;
    color: #334155;
}

/* Input Group */

.input-group-text {
    background: #f8fafc;
    border-color: #dbe2ea;
}

/* Placeholder */

.form-control::placeholder {
    color: #94a3b8;
}

/* Validation */

.field-validation-error,
.text-danger {
    font-size: .85rem;
}

/* Readonly */

.form-control[readonly] {
    background: #f8fafc;
}

/* Mobile */

@media (max-width:768px) {

    .form-control,
    .form-select,
    .global-input {
        min-height: 44px;
        font-size: 16px;
    }

    textarea.form-control {
        min-height: 100px;
    }
}
/*
ফুটারের জন্য সিএ্স্এস*/
@media(max-width:768px) {

    .custom-mobile-table tfoot {
        display: block;
        margin-top: 15px;
    }

        .custom-mobile-table tfoot tr {
            display: block;
            background: #eef2ff;
            border: 2px solid #c7d2fe;
            border-radius: 12px;
            padding: 10px;
        }

        .custom-mobile-table tfoot td {
            display: flex;
            justify-content: space-between;
            align-items: center;
            width: 100%;
            padding: 8px 10px;
            border: none;
            text-align: right !important;
        }

            .custom-mobile-table tfoot td::before {
                content: attr(data-label);
                font-weight: 700;
                color: #4f46e5;
                text-align: left;
            }
}
