﻿
/* MASTER CONTAINER */
.master-container {
    display: flex;
    height: 100vh;
    background: #f8f9fa;
    overflow: hidden;
}

/* SIDEBAR */
.sidebar {
    width: 250px;
    background: linear-gradient(180deg, #2c3e50, #34495e);
    color: #ecf0f1;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    transition: width 0.3s ease;
}

    .sidebar.collapsed {
        width: 70px;
    }

/* Brand */
.brand-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
}

.brand-logo {
    font-size: 28px;
    color: #1abc9c;
}

.brand-name {
    font-size: 18px;
    font-weight: bold;
    transition: opacity 0.3s;
}

.sidebar.collapsed .brand-name {
    opacity: 0;
}

/* Menu items */
.menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 20px;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    color: #ecf0f1;
    text-decoration: none;
    font-size: 16px;
    transition: background 0.2s;
}

    .menu-item:hover {
        background: rgba(255,255,255,0.15);
    }

.sidebar.collapsed .menu-item .text {
    display: none;
}

.menu-item .icon {
    font-size: 20px;
}

/* MAIN AREA */
.main-area {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

/* HEADER */
.top-header {
    height: 60px;
    background: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.top-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.h-logo {
    font-size: 26px;
    color: #1abc9c;
}

.h-title {
    font-size: 20px;
    font-weight: 700;
    color: #34495e;
}

.toggle-btn {
    background: #1abc9c;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
}

    .toggle-btn:hover {
        background: #16a085;
    }

/* PROFILE MENU */
.profile-menu {
    position: relative;
}

.profile-btn {
    background: #3498db;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 18px;
    color: #fff;
}

    .profile-btn:hover {
        background: #2980b9;
    }

.profile-dropdown {
    position: absolute;
    right: 0;
    top: 45px;
    background: #fff;
    width: 180px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: none;
    padding: 10px;
    z-index: 999;
}

.profile-menu:hover .profile-dropdown {
    display: block;
}

.profile-dropdown a {
    display: block;
    padding: 8px;
    color: #34495e;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
}

    .profile-dropdown a:hover {
        background: #ecf0f1;
    }

.logout-link {
    color: #e74c3c !important;
    font-weight: 600;
}

    .logout-link:hover {
        background: #fdecea !important;
    }

/* CONTENT */
.content-body {
    padding: 25px;
    overflow-y: auto;
    flex-grow: 1;
    background: #f8f9fa;
}

/* FOOTER */
.footer {
    padding: 12px;
    text-align: center;
    background: #ecf0f1;
    color: #7f8c8d;
    font-size: 14px;
    font-weight: 600;
    border-top: 1px solid #d1d5db;
}

/* RESPONSIVE */
@media(max-width: 768px) {
    .sidebar {
        position: absolute;
        z-index: 1000;
        height: 100%;
        left: -250px;
    }

        .sidebar.collapsed {
            left: 0;
            width: 250px;
        }
}


/* Overlay */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(4px);
}

/* Modal Box */
.modal-content {
    background: #ffffff;
    width: 95%;
    max-width: 1200px;
    max-height: 85vh;
    border-radius: 14px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.25);
    overflow: hidden;
    animation: slideUp 0.25s ease;
}

/* Header */
.modal-header {
    background: linear-gradient(135deg, #0ea5e9, #38bdf8);
    color: #ffffff;
    padding: 14px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .modal-header h4 {
        margin: 0;
        font-size: 18px;
        font-weight: 600;
    }

    .modal-header button {
        background: rgba(255,255,255,0.2);
        border: none;
        color: #fff;
        font-size: 18px;
        padding: 6px 10px;
        border-radius: 6px;
        cursor: pointer;
    }

        .modal-header button:hover {
            background: rgba(255,255,255,0.35);
        }

/* Search Box */
.modal-content > input[type="text"] {
    width: calc(100% - 40px);
    margin: 16px 20px;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    font-size: 14px;
    outline: none;
}

    .modal-content > input[type="text"]:focus {
        border-color: #0ea5e9;
        box-shadow: 0 0 0 3px rgba(14,165,233,0.15);
    }

/* Table Wrapper */
.modal-content table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}

/* Table Header */
.modal-content thead th {
    position: sticky;
    top: 0;
    background: #e0f2fe;
    color: #0f172a;
    text-align: left;
    padding: 10px;
    border-bottom: 2px solid #bae6fd;
    font-weight: 600;
    white-space: nowrap;
}

/* Table Body */
.modal-content tbody td {
    padding: 9px 10px;
    border-bottom: 1px solid #e5e7eb;
    white-space: nowrap;
}

.modal-content tbody tr:hover {
    background: #f0f9ff;
}

/* Select Button */
.modal-content tbody button {
    background: #0ea5e9;
    color: #fff;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .modal-content tbody button:hover {
        background: #0284c7;
        transform: scale(1.05);
    }

/* No Data Row */
.modal-content tbody tr td[colspan] {
    text-align: center;
    padding: 20px;
    color: #64748b;
}

/* Scroll Body */
.modal-content {
    overflow-y: auto;
}

/* Animation */
@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}


.modal-search {
    padding: 14px 20px;
    border-bottom: 1px solid #e5e7eb;
}

.modal-table-wrapper {
    max-height: 60vh;
    overflow-y: auto;
}

.product-table {
    width: 100%;
}

.product-name {
    font-weight: 500;
    color: #0f172a;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.no-data {
    text-align: center;
    padding: 20px;
    color: #64748b;
}

.btn-select {
    background: #0ea5e9;
    color: white;
    border: none;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
}

    .btn-select:hover {
        background: #0284c7;
    }


.dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(180px,1fr));
    gap: 12px;
    margin-bottom: 15px;
}

.card {
    padding: 12px;
    border-radius: 6px;
    color: #fff;
}

    .card.total {
        background: #0d6efd;
    }

    .card.low {
        background: #ffc107;
        color: #000;
    }

    .card.expired {
        background: #dc3545;
    }

.header-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.sup-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

    .sup-table th, .sup-table td {
        border: 1px solid #ddd;
        padding: 6px;
    }

.group-row {
    background: #f1f3f5;
    cursor: pointer;
}

.low-stock {
    background: #fff3cd;
}

.out-stock {
    background: #f8d7da;
}

.expired {
    background: #dc3545;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

@media(max-width:768px) {
    .sup-table {
        font-size: 12px;
    }
}




.page-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 10px
}

.top-bar {
    display: flex;
    flex-direction: column;
    gap: 12px
}

.dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(160px,1fr));
    gap: 12px
}

.card {
    padding: 14px;
    border-radius: 8px;
    color: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,.08)
}

    .card span {
        font-size: 13px;
        opacity: .9
    }

    .card h3 {
        margin: 4px 0 0;
        font-size: 22px
    }

    .card.total {
        background: linear-gradient(135deg,#0d6efd,#3d8bfd)
    }

    .card.low {
        background: linear-gradient(135deg,#ffc107,#ffcd39);
        color: #000
    }

    .card.expired {
        background: linear-gradient(135deg,#dc3545,#f36)
    }

.header-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap
}

    .header-actions input {
        padding: 8px 10px;
        min-width: 220px;
        border-radius: 6px;
        border: 1px solid #ccc
    }

.export-btn {
    background: #198754;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 14px;
    cursor: pointer
}

.sup-table {
    width: 100%;
    margin-top: 10px;
    border-collapse: collapse;
    background: #fff;
    font-size: 14px
}

    .sup-table th, .sup-table td {
        border: 1px solid #e5e5e5;
        padding: 8px
    }

    .sup-table th {
        background: #f1f3f5
    }

.group-row {
    background: #eef2f7;
    cursor: pointer
}

.expand-icon {
    text-align: center;
    width: 30px
}

.low-stock {
    background: #fff3cd
}

.out-stock {
    background: #f8d7da
}

.expired {
    background: #dc3545;
    color:white;
    
}

.pagination {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px
}

    .pagination button {
        padding: 6px 12px;
        border-radius: 6px;
        border: 1px solid #ccc;
        background: #fff
    }

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    display: flex;
    align-items: center;
    justify-content: center
}

.modal-box {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    width: 300px
}

@media(max - width:768px) {
    .sup-table {
        font-size: 12px
    }

    .header-actions input {
        width: 100%
    }
}


