/* ================= GLOBAL ================= */

body {
    background: #f1f5f9;
    font-family: 'Segoe UI', sans-serif;
}

/* ================= LOGIN PAGE ================= */

.login-container {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #1e3a8a, #2563eb);
}

.login-box {
    width: 400px;
    padding: 45px 40px;
    background: rgba(255, 255, 255, 0.97);
    border-radius: 16px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
}

.login-box h3 {
    text-align: center;
    margin-bottom: 25px;
    font-weight: 600;
    color: #1e293b;
}

.login-box .mb-3 {
    margin-bottom: 18px;
}

.login-box label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #475569;
}

.login-box .form-control {
    height: 48px;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    padding: 10px 14px;
    font-size: 14px;
}

.login-box .form-control:focus {
    border-color: #2563eb;
    box-shadow: 0 0 6px rgba(37,99,235,0.3);
}

.login-box .btn {
    width: 100%;
    height: 48px;
    margin-top: 10px;
    border-radius: 10px;
    font-weight: 600;
    background: #2563eb;
    border: none;
}

.login-box .btn:hover {
    background: #1d4ed8;
}

/* ================= ADMIN LAYOUT ================= */

/* SIDEBAR */
.sidebar {
    width: 230px;
    height: 100vh;
    position: fixed;
    background: linear-gradient(180deg, #1e293b, #0f172a);
    color: #fff;
    padding-top: 20px;
}

.sidebar h2 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 22px;
    letter-spacing: 1px;
}

/* MENU LINKS */
.sidebar a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #cbd5e1;
    border-left: 3px solid transparent;
    transition: 0.3s;
    text-decoration: none;
    font-size: 15px;
}

.sidebar a i {
    width: 20px;
    text-align: center;
}

.sidebar a:hover {
    background: #334155;
    color: #fff;
    border-left: 3px solid #2563eb;
}

.sidebar a.active {
    background: #2563eb;
    color: #fff;
    border-left: 3px solid #2563eb;
}

/* ================= DROPDOWN SIDEBAR ================= */

/* MENU GROUP */
.menu-group {
    margin-bottom: 5px;
}

/* MENU TITLE */
.menu-title {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #cbd5e1;
    cursor: pointer;
    position: relative;
    transition: 0.3s;
    font-size: 15px;
}

.menu-title i:first-child {
    width: 20px;
    text-align: center;
}

.menu-title:hover {
    background: #334155;
    color: #fff;
}

/* ARROW */
.menu-title::after {
    content: "\f078";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    right: 15px;
    font-size: 12px;
    transition: 0.3s;
}

/* ROTATE ARROW */
.menu-title.active::after {
    transform: rotate(180deg);
}

/* SUBMENU */
.submenu {
    display: none;
    flex-direction: column;
    background: #0f172a;
}

.submenu.show {
    display: flex;
}

/* SUBMENU LINKS */
.submenu a {
    padding: 10px 40px;
    font-size: 14px;
    color: #94a3b8;
    border-left: 3px solid transparent;
}

.submenu a:hover {
    background: #1e293b;
    color: #fff;
    border-left: 3px solid #2563eb;
}

.submenu a.active {
    background: #2563eb;
    color: #fff;
}

/* ================= TOPBAR ================= */

.topbar {
    margin-left: 230px;
    background: #ffffff;
    padding: 18px 25px;
    border-bottom: 1px solid #e2e8f0;
}

/* ================= CONTENT ================= */

.content {
    margin-left: 230px;
    padding: 25px;
}

/* ================= CARDS ================= */

.card {
    border-radius: 12px;
    border: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.dashboard-card {
    border-radius: 14px;
    background: #ffffff;
    transition: 0.3s;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

.dashboard-card h6 {
    color: #64748b;
    font-size: 14px;
}

.dashboard-card h3 {
    margin-top: 5px;
    font-weight: 700;
}

.icon-box {
    width: 45px;
    height: 45px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

/* ================= RESPONSIVE ================= */

@media (max-width: 768px) {

    .sidebar {
        width: 200px;
    }

    .topbar,
    .content {
        margin-left: 200px;
    }

    .col-md-3 {
        width: 100%;
    }
}
/* MAIN CONTENT */
.main-content {
    margin-left:220px;
    padding:20px;
}

/* FORM CARD */
.form-card {
    width:400px;
    background:#fff;
    padding:25px;
    border-radius:8px;
    box-shadow:0 5px 15px rgba(0,0,0,0.1);
}

/* LABEL */
.form-card label {
    display:block;
    margin-top:10px;
    margin-bottom:5px;
    font-weight:600;
}

/* INPUT */
.form-card input {
    width:100%;
    padding:10px;
    border:1px solid #ccc;
    border-radius:4px;
    margin-bottom:10px;
}

/* BUTTON */
.btn {
    width:100%;
    padding:10px;
    background:#007bff;
    color:#fff;
    border:none;
    border-radius:4px;
    cursor:pointer;
}
/* TABLE */
.admin-table {
    width:100%;
    border-collapse:collapse;
    background:#fff;
    box-shadow:0 5px 15px rgba(0,0,0,0.1);
}

/* HEADER */
.admin-table th {
    background:#007bff;
    color:#fff;
    padding:12px;
    text-align:left;
}

/* ROWS */
.admin-table td {
    padding:10px;
    border-bottom:1px solid #eee;
}

/* IMAGE */
.table-img {
    width:120px;
    height:70px;
    object-fit:cover;
    border-radius:5px;
}

/* DELETE BUTTON */
.btn-delete {
    background:red;
    color:#fff;
    padding:6px 10px;
    text-decoration:none;
    border-radius:4px;
}

.btn-delete:hover {
    opacity:0.8;
}
.btn-sm {
    border-radius:6px;
    padding:6px 10px;
}
.supplier-slider {
    overflow: hidden;
    background: #fff;
    padding: 20px 0;
    border-radius: 12px;
}

.supplier-track {
    display: flex;
    width: max-content;
    animation: scrollSuppliers 20s linear infinite;
}

.supplier-item {
    width: 140px;
    margin: 0 20px;
}

.supplier-item img {
    max-height: 60px;
    object-fit: contain;
}

@keyframes scrollSuppliers {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
.mini-stock span {
    margin-right:5px;
}
.mini-stock.in {
    background:#e6f9f0;
    color:#0f5132;
}

.mini-stock.out {
    background:#fde8e8;
    color:#842029;
}
/* ================= FIX MINI PRODUCT STOCK (SAFE PATCH) ================= */

.mini-stock {
    margin-top: 6px;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* IN STOCK */
.mini-stock.in {
    background: #d1fae5 !important;
    color: #065f46 !important;
}

/* OUT OF STOCK */
.mini-stock.out {
    background: #fee2e2 !important;
    color: #991b1b !important;
}

/* ICON SPACE */
.mini-stock span {
    margin-right: 4px;
}