/* ==========================
   Global Styles (from Home Page)
   ========================== */
body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f6f8; /* Page background */
}

.dashboard {
    display: flex; /* Sidebar + main content side by side */
    height: 100vh; /* Full height viewport */
}

/* ==========================
   Sidebar company logo & alignment
   ========================== */
.company-logo {
    width: 250px;       /* Bigger logo */
    height: auto;       /* Maintain aspect ratio */
    object-fit: contain;
    display: block;
    margin-top: -60px;
    margin-bottom: -75px;
    margin-left:-25px;
}

/* ==========================
   Sidebar Styles
   ========================== */
.sidebar {
    width: 200px; /* Sidebar width */
    background-color: #140222; /* Purple primary color */
    color: #fff;
    display: flex;
    flex-direction: column; /* Stack links vertically */
    padding: 20px;
}

.sidebar a {
    text-decoration: none; /* Remove underline */
    color: #fff; /* White text */
    padding: 10px 12px;
    margin-bottom: 8px;
    border-radius: 8px; /* Rounded edges */
    transition: all 0.3s; /* Smooth hover/active transitions */
    font-size: 0.9rem; /* Slightly smaller font size */
    display: flex;
    align-items: center;
}

.sidebar a i {
    margin-right: 10px; /* Space between icon and text */
    width: 20px;
    text-align: center;
    font-size: 1rem;
}

.sidebar a:hover {
    background-color: #291a29; /* Slightly darker purple */
}

.sidebar a.active {
    background: linear-gradient(to right, #50c878, #008080); /* Emerald to teal gradient */
    color: #fff;
}

.sidebar .divider {
    height: 1px;
    background-color: #f2f1f2; 
    margin: 15px 0; 
    border-radius: 2px;
}

.sidebar .logout-btn {
    margin-top: auto; 
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    color: #fff;
    font-weight: bold;
    text-decoration: none;
    background-color: #300830;
    transition: background 0.3s, transform 0.2s;
}

.sidebar .logout-btn i {
    font-size: 1.1rem;
}

.sidebar .logout-btn:hover {
    background: rgb(13, 2, 25);
    transform: translateY(-2px);
}

/* ==========================
   Main Content Styles
   ========================== */
.main-content {
    flex: 1; /* Take remaining space */
    background-color: #fff;
    padding: 30px;
    overflow-y: auto;
}

/* ==========================
   Main Content Styles (Same as Home Page)
   ========================== */
.main-content {
    flex: 1; /* Take remaining space */
    background-color: #fff; /* White background for content */
    padding: 30px;
    overflow-y: auto; /* Scroll if content overflows */
}

.main-header {
    margin-top: 20px;
    display: flex;
    justify-content: space-between; /* Left title/welcome, right date */
    align-items: flex-start;
    flex-wrap: wrap; /* For responsiveness on smaller screens */
    margin-bottom: 20px;
}

.main-header-left {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.main-header-left h1 {
    font-size: 2.7rem; /* Big title */
    font-weight: bold;
    color: #090a0c;
    margin: 0;
}

.main-header-left p {
    font-size: 1rem;
    font-weight: 480;
    color: #555;
    margin: 0;
}

/* Date / last updated on the right */
.main-header-right {
    font-size: 0.9rem;
    color: #777;
    white-space: nowrap; /* Prevent wrapping */
    margin-bottom: 10px;
}

/*------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/

/* ============================
   PAGE TOP ACTION BAR
=============================== */

.supplier-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    margin-top: 25px;
}

.supplier-search {
    width: 260px;
    padding: 10px 15px;
    border: 1px solid #ccc;
    border-radius: 10px;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s;
}

.supplier-search:focus {
    border-color: #50c878; /* Emerald */
    box-shadow: 0 0 0 3px rgba(80, 200, 120, 0.25);
}

.add-supplier-btn {
    background: linear-gradient(to right, #50c878, #008080);
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 0.95rem;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    transition: transform 0.2s, box-shadow 0.3s;
}

.add-supplier-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}

/* ============================
   SUPPLIER TABLE
=============================== */

.rating {
    color: #ffb400;
    font-size: 1rem;
    margin-top: 4px;
}

.contact-buttons {
    margin-top: 8px;
    display: flex;
    gap: 10px;
}

.contact-buttons a {
    background: #cccccc;
    color: rgb(11, 11, 11);
    padding: 6px 8px;
    border-radius: 8px;
    font-size: 0.8rem;
    transition: 0.3s;
}

.contact-buttons a:hover {
    background: #130024;
    color: white;
}


.supplier-table-container {
    background: #ffffff;
    margin-top:20px;
    padding: 20px;
    border-radius: 18px;
    box-shadow: 0px 3px 10px rgba(0,0,0,0.08);
}

.supplier-table {
    width: 100%;
    border-collapse: collapse;
}

.supplier-table th {
    background-color: #f5f5f5;
    padding: 12px;
    font-weight: 700;
    text-align: left;
    font-size: 0.95rem;
    border-bottom: 2px solid #e0e0e0;
}

.supplier-table td {
    padding: 14px 12px;
    border-bottom: 1px solid #e0e0e0;
    vertical-align: top;
    font-size: 1rem;
    margin-top:15px;
}

/* View Details Button */
.view-supplies-btn {
    background: #140222;
    border: none;
    color: #fff;
    padding: 7px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.3s;
    margin-top:15px;
    font-weight:bold;
}


.view-supplies-btn:hover {
    background: #e6e6e6;
    color: black;
}

/* Payment Status Tags */
.status {
    padding: 6px 20px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
    color: #fff;
}





.status.paid { background-color: #28a745; }
.status.pending { background-color: #dddddd; color: #000; }
.status.partial { background-color: #ff5722; }

/* Reorder button */
.reorder-btn {
    background:#140222;
    border: none;
    padding: 7px 14px;
    font-size: 0.85rem;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: transform 0.2s;
    margin-top:10px;
}

.reorder-btn:hover {
    transform: translateY(-2px);
}

.reorder-btn.small {
    padding: 6px 12px;
    font-size: 1rem;
}

/* ============================
   EXPANDABLE ROW (DETAILS)
=============================== */
.details-row {
    display: none;
    background: #fafafa;
}

.supply-details-box {
    padding: 20px;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.06);
}

.supply-details-box h3 {
    margin-bottom: 18px;
    color: #140222;
    font-size: 1.2rem;
}

/* Grid for supply cards */
.supply-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

/* Supply Card */
.supply-card {
    padding: 20px;
    background: #ffffff;
    border-radius: 15px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.07);
    transition: transform 0.2s;
}

.supply-card:hover {
    transform: translateY(-5px);
    background-color: rgb(232, 230, 230);
}

.supply-card h4 {
    margin: 0 0 10px;
    color: #323333;
    font-size: 1.6rem;
    font-weight: bold;
}

.supply-card p {
    margin: 10px 0;
    font-size: 0.9rem;
    color: #060606;
}

/* ============================
   MOBILE RESPONSIVE
=============================== */
@media (max-width: 600px) {
    .supplier-top-bar {
        flex-direction: column;
        gap: 15px;
    }

    .supplier-search {
        width: 100%;
    }

    .add-supplier-btn {
        width: 100%;
    }
}

/*----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/

/* ============================
   SUPPLIER SUMMARY CARDS
=============================== */

.divider2 {
    height: 5px;
    background-color: #1d011d; 
    margin: 15px 0; 
    border-radius: 2px;
}

.supplier-summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.summary-card {
    background: #ffffff;
    padding: 25px;
    border-radius: 18px;
    box-shadow: 0px 3px 8px rgba(0,0,0,0.08);
    transition: transform 0.2s;
}

.summary-card:hover {
    transform: translateY(-4px);
}

.summary-card h3 {
    margin: 0 0 8px;
    font-size: 1.1rem;
    color: #140222;
}

.summary-card .value {
    font-size: 2.5rem;
    font-weight: bold;
    margin-top: 5px;
    color: #140222;
}

.summary-card .value.success {
    color: #28a745;
}

.summary-card .value.warning {
    color: #ff9800;
}
