/* =========================
   GOOGLE FONT
========================= */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #008BD0;
    --primary-dark: #0072AA;
    --secondary: #0f172a;
    --light: #f8fafc;
    --white: #ffffff;
    --gray: #94a3b8;
    --border: #e2e8f0;
    --success: #22c55e;
    --danger: #ef4444;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --radius: 18px;
}

/* =========================
   GLOBAL
========================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background: #eef2ff;
    overflow-x: hidden;
}

/* =========================
   LAYOUT
========================= */

.wrapper {
    display: flex;
    min-height: 100vh;
}

/* =========================
   SIDEBAR
========================= */

.sidebar {
    width: 280px;
    background-color: var(--primary);
    position: fixed;
    height: 100%;
    left: 0;
    top: 0;
    overflow: auto;
    box-shadow: 5px 0 25px rgba(0, 0, 0, 0.1);
}

.sidebar h2 {
    margin-bottom: 20px;
}

.logo {
    color: white;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 40px;
    text-align: center;
    letter-spacing: 1px;
}

.sidebar ul {
    list-style: none;    
    padding: 30px 20px;
}

.sidebar ul li {
    margin-bottom: 10px;
}

.sidebar ul li a {
    text-decoration: none;
    color: #cbd5e1;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 15px;
    border-radius: 14px;
    transition: 0.35s;
    font-size: 15px;
    font-weight: 500;
}

.sidebar ul li a:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
    transform: translateX(5px);
}

.sidebar ul li a.active {
    background: linear-gradient(90deg, var(--primary), #8b5cf6);
    color: white;
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

/* =========================
   MAIN CONTENT
========================= */

.main {
    margin-left: 280px;
    width: calc(100% - 280px);
    padding: 30px;
}

/* =========================
   TOPBAR
========================= */

.topbar {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    padding: 22px 28px;
    border-radius: 20px;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.page-title {
    font-size: 30px;
    font-weight: 700;
    color: var(--secondary);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.profile {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
}

/* =========================
   BUTTONS
========================= */

.btn {
    border: none;
    padding: 13px 22px;
    border-radius: 14px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: 0.3s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.add-btn {
    display: flex;
    align-items: center;
    outline: none;
    border: none;
    border-radius: 50px;
    gap: 5px;
    font-size: 1rem;
    background-color: var(--primary);
    cursor: pointer;
    color: #ffffff;
    transition: 200ms ease;
    padding: 10px 15px;
}
#shellingModal .add-btn{ min-width: 53px;}
.add-btn:hover {
    background-color: var(--primary-dark);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    color: white;
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(99, 102, 241, 0.4);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

/* =========================
   DASHBOARD CARDS
========================= */

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 50px;
}

.card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    padding: 30px;
    border-radius: 25px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: 0.4s;
}

.card:hover {
    transform: translateY(-5px);
}

.card::before {
    content: '';
    position: absolute;
    right: -40px;
    top: -40px;
    width: 140px;
    height: 140px;
    background: rgba(0, 139, 208, 0.08);
    border-radius: 50%;
}

.card h3 {
    color: var(--gray);
    margin-bottom: 15px;
    font-size: 16px;
}

.card h1 {
    font-size: 42px;
    color: var(--secondary);
    font-weight: 700;
}

/* =========================
   TABLE SECTION
========================= */

.table-box {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    border-radius: 25px;
    padding: 28px;
    margin-top: 30px;
    box-shadow: var(--shadow);

}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.table-header h2 {
    color: var(--secondary);
    font-size: 24px;
}

.search_box {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.table {
    width: 100%;
    border-collapse: collapse;
    white-space: nowrap;
}

.responsive-table {
    overflow: auto;
}

.table thead {
    background: #f1f5f9;
}

.table th {
    padding: 18px;
    text-align: left;
    color: #334155;
    font-size: 14px;
    text-transform: uppercase;
}

.table td {
    padding: 18px;
    border-bottom: 1px solid var(--border);
    color: #475569;
    font-size: 15px;
}

.table tbody tr {
    transition: 0.3s;
}

.table tbody tr:hover {
    background: #f8fafc;
}

/* =========================
   ACTION BUTTONS
========================= */

.action-btns {
    display: flex;
}

.edit-btn {
    background: #22c55e;
    color: white;
    padding: 10px 14px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

.delete-btn {
    background: #ef4444;
    color: white;
    padding: 10px 14px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

/* =========================
   MODAL
========================= */

.modal {
    display: none;
    position: fixed;
    z-index: 999;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(5px);
    overflow: auto;
}

.modal-content {
    width: 450px;
    background: white;
    margin: 5% auto;
    border-radius: 30px;
    padding: 35px;
    position: relative;
    animation: popup 0.35s ease;
}

@keyframes popup {
    from {
        transform: translateY(-40px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close {
    position: absolute;
    right: 22px;
    top: 18px;
    font-size: 28px;
    cursor: pointer;
    color: #64748b;
}

/* =========================
   FORM
========================= */

.form-group {
    margin-bottom: 22px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    color: #334155;
    font-size: 14px;
    font-weight: 600;
}

.form-control {
    width: 100%;
    border: 1px solid #dbeafe;
    background: #f8fafc;
    border-radius: 45px;
    padding: 10px 16px;
    font-size: 15px;
    box-shadow: none !important;
    transition: 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

textarea.form-control {
    height: 120px;
    resize: none;
}

/* =========================
   SEARCH BOX
========================= */

.search-box {
    position: relative;
    width: 300px;
}

.search-box input {
    width: 100%;
    padding: 14px 18px;
    border: none;
    border-radius: 14px;
    background: white;
    box-shadow: var(--shadow);
}

/* =========================
   SCROLLBAR
========================= */

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

/* =========================
   Edit Button
========================= */
.edit-btn,
.download-btn,
.delete-btn {
    padding: 6px 14px;
    border-radius: 50px;
    border: none;
    font-size: 0.85rem;
    font-family: "Poppins", sans-serif;
    cursor: pointer;
    transition: 200ms ease;
    text-decoration: none;
    font-weight: 600;
}

/* PDF */
.download-btn {
    background-color: rgba(0, 139, 208, 0.12);
    color: var(--primary);
    margin-left: 6px;
}

.download-btn:hover {
    background-color: var(--primary);
    color: #fff;
}

/* Edit */
.edit-btn {
    background-color: rgba(0, 139, 208, 0.12);
    color: var(--primary);
}

.edit-btn:hover {
    background-color: var(--primary);
    color: #fff;
}

/* Delete */
.delete-btn {
    background-color: rgba(220, 53, 69, 0.12);
    color: #dc3545;
    margin-left: 6px;
}

.delete-btn:hover {
    background-color: #dc3545;
    color: #fff;
}

/* =========================
   RESPONSIVE
========================= */

@media(max-width:992px) {

    .sidebar {
        width: 100px;
    }

    .sidebar h2 {
        margin-bottom: 0;
    }

    .sidebar .logo {
        font-size: 18px;
    }

    .sidebar ul{
        padding: 20px 10px;
    }

    .main {
        margin-left: 100px;
        width: calc(100% - 100px);
    }
}

@media(max-width:992px) {

    .wrapper {
        flex-direction: column;
    }

    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
    }

    .main {
        margin-left: 0;
        width: 100%;
        padding: 18px;
    }

    .topbar {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .table-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .modal-content {
        width: 92%;
        margin-top: 20%;
    }

    .search-box {
        width: 100%;
    }
}

@media(max-width:600px) {

    .table-box,
    .topbar {
        padding: 15px;
    }

    .table-header h2,
    .page-title {
        font-size: 20px;
    }
}








/* MOBILE TOPBAR */

.mobile-topbar {
    display: none;
    padding: 15px;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.menu-btn {
    border: none;
    background: #6366f1;
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 10px;
    font-size: 22px;
    cursor: pointer;
}

/* SIDEBAR TOP */

.sidebar-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--white);
    padding: 10px;
}

.sidebar-top a {
    display: inline-flex;
}

.sidebar-top img {
    width: 260px;
}

.close-btn {
    display: none;
    border: none;
    background: red;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
}


/* MOBILE */

@media(max-width:992px) {

    .mobile-topbar {
        display: block;
    }

    .sidebar {

        position: fixed;
        left: -280px;
        top: 0;
        width: 280px;
        height: 100%;
        z-index: 999;
        transition: 0.4s;
    }

    .sidebar.active {
        left: 0;
    }

    .close-btn {
        display: block;
    }

    .sidebar-top img {
        width: 210px;
    }

    .main {
        margin-left: 0 !important;
        width: 100% !important;
    }
}



/* ==================
        Login
================== */
.login-page {
    height: 100vh;
    display: flex;
}

.login-box {
    width: 400px;
    margin: auto;
    background: #fff;
    padding: 50px;
    border-radius: 30px;
}

.login-box h2 {
    margin-bottom: 20px;
    text-align: center;
    font-size: 32px;
    font-weight: 500;
}

.login-box .add-btn {
    width: 100%;
}

.login-box label {
    font-size: 14px;
}

.login-box input {
    margin-bottom: 20px;
}

.login-box h2 small {
    display: block;
    font-size: 18px;
}

@media(max-width:992px) {
    .login-box {
        width: 330px;
        padding: 30px;
    }

    .login-box h2 {
        font-size: 28px;
    }

    .login-box h2 small {
        font-size: 16px;
    }
}

.users-container .header-right {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.users-container .header-right input {
    width: auto;
}



/* POPUP */

.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.popup-box {
    width: 420px;
    background: white;
    border-radius: 25px;
    padding: 25px;
    animation: popupShow 0.3s ease;
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.popup-header h2 {
    font-size: 28px;
}

.popup-header button {
    border: none;
    background: #ff4b4b;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 15px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 14px;
    border: 1px solid #ddd;
    border-radius: 12px;
    outline: none;
    font-size: 15px;
}

.save-btn {
    width: 100%;
    border: none;
    background: #4c6fff;
    color: white;
    padding: 15px;
    border-radius: 14px;
    font-size: 16px;
    cursor: pointer;
}

@keyframes popupShow {

    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }

}



.stock-summary {
    display: flex;
    gap: 50px;
    justify-content: space-between;
    width: 100%;
}

.stock-card h1 {
    color: var(--primary);
}