/* ==========================
   Global Styles
   ========================== */
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;
}

/* Navigation links */
.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;
}

/* Hover effect on links */
.sidebar a:hover {
    background-color: #291a29; /* Slightly darker purple */
}

/* Active tab highlight */
.sidebar a.active {
    background: linear-gradient(to right, #50c878, #008080); /* Emerald to teal gradient */
    color: #fff;
}

/* ==========================
   Sidebar Divider Line
   ========================== */
.sidebar .divider {
    height: 1px;
    background-color: #f2f1f2; /* Slightly lighter/darker purple line */
    margin: 15px 0; /* Space above and below */
    border-radius: 2px;
}

/* ==========================
   Logout Button
   ========================== */
.sidebar .logout-btn {
    margin-top: auto; /* Push to bottom of sidebar */
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    color: #fff;
    font-weight: bold;
    text-decoration: none;
    background-color: #300830; /* Matches hover color */
    transition: background 0.3s, transform 0.2s;
}

.sidebar .logout-btn i {
    font-size: 1.1rem;
}

/* Hover effect for logout */
.sidebar .logout-btn:hover {
    background: rgb(13, 2, 25); /* Emerald to teal */
    transform: translateY(-2px);
}
/* ==========================
   Main Content Layout
   ========================== */
.main-content {
    padding: 25px;
    width: 100%;
    overflow-y: auto;
}

.main-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.main-header-left h1 {
    margin: 0;
    color: #140222;
}

.main-header-right {
    font-size: 0.9rem;
}

/* ==========================
   Cards
   ========================== */
.card {
    background: #fff;
    padding: 18px;
    border-radius: 14px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

/* ==========================
   Grid Layouts
   ========================== */
.orders-top-grid {
    display: grid;
    grid-template-columns: 350px auto;
    gap: 20px;
    margin-bottom: 20px;
}

.orders-form-grid {
    display: grid;
    grid-template-columns: 400px auto;
    gap: 20px;
    margin-bottom: 25px;
}

/* ==========================
   Supplier + Stats
   ========================== */
.field-label {
    font-weight: bold;
    margin-top: 10px;
    display: block;
}

.muted {
    color: #6b6b6b;
}

.or-sep {
    text-align: center;
    margin: 12px 0;
    font-weight: bold;
    color: #555;
}

.ghost-btn {
    padding: 8px 14px;
    border: 1px solid #008080;
    background: transparent;
    color: #008080;
    border-radius: 6px;
    cursor: pointer;
}

.stats-row {
    display: flex;
    justify-content: space-between;
}

.stat-num {
    font-size: 1.4rem;
    font-weight: bold;
}

.stat-num.highlight {
    color: #f39c12;
}

/* ==========================
   Form Styling
   ========================== */
input, select, textarea {
    width: 100%;
    padding: 8px;
    margin-top: 4px;
    border-radius: 6px;
    border: 1px solid #ccc;
}

.row {
    display: flex;
    gap: 10px;
}

.col {
    flex: 1;
}

.payment-row {
    display: flex;
    gap: 12px;
    margin: 10px 0;
}

/* Buttons */
.btn {
    padding: 9px 14px;
    border-radius: 6px;
    cursor: pointer;
    border: none;
}

.btn.primary {
    background-color: #140222;
    color: white;
}

.btn.ghost {
    background: transparent;
    border: 1px solid #140222;
    color: #140222;
}

.form-actions {
    margin-top: 15px;
    display: flex;
    gap: 10px;
}

/* ==========================
   Order Preview
   ========================== */
.preview-actions {
    margin-top: 15px;
    display: flex;
    gap: 10px;
}

/* ==========================
   Table
   ========================== */
.orders-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.orders-table th {
    text-align: left;
    padding: 10px;
    background: #140222;
    color: white;
}

.orders-table td {
    padding: 10px;
    border-bottom: 1px solid #ddd;
}

/* Status Pills */
.status,
.pill {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: bold;
    display: inline-block;
    margin-top: 6px; /* ✔ brings status DOWN slightly */
}

/* Colors */
.status.pending,
.pill.pending {
    background: #f39c12;
    color: white;
}

.status.paid,
.pill.done {
    background: #2ecc71;
    color: white;
}

.pill.active {
    background: #3498db;
}

/* Track / Reorder Buttons */
.view-supplies-btn,
.reorder-btn {
    padding: 6px 12px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
}

.view-supplies-btn {
    background: rgb(201, 201, 201);
    color: #140222;
}

.reorder-btn {
    background: #140222;
    color: white;
    margin-top: 10px;
}

/* ==========================
   Tracking Row
   ========================== */
.details-row {
    background: #fafafa;
    display: none;
    color: white;
}

.order-trace {
    display: flex;
    justify-content: space-between;
    padding: 10px 5px;
}

.trace-step {
    width: 18%;
    text-align: center;
    padding: 10px;
    border-radius: 8px;
    background: #140222;
}

.trace-step.done {
    background: #2ecc71;
    color: white;
}

.trace-step.active {
    background: #2ecc71;
    color: white;
}

/* ==========================
   Modal
   ========================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.55);
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-inner {
    background: #fff;
    padding: 20px;
    width: 350px;
    border-radius: 14px;
}

/* =============== SUPPLIER STYLING UPDATES =============== */

/* Same color as active navbar tab */
.add-supplier-btn {
    padding: 9px 14px;
    border-radius: 6px;
    cursor: pointer;
    border: none;
    color: white;
    background: linear-gradient(to right, #50c878, #008080);
    font-weight: bold;
    width: 100%;
    margin-top: 10px;
}

/* Existing supplier box using navbar color */
.existing-supplier-box {
    background-color: #140222;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 12px;
}

.existing-supplier-box label {
    color: white;
}

.existing-supplier-box select {
    width: 100%;
    background: white;
    color: #140222;
    border: none;
    padding: 8px;
    border-radius: 6px;
    margin-top: 8px;
    font-weight: bold;
}

/* ============ NEW HORIZONTAL STATS CARDS ============ */

.stats-row {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.stat-card {
    flex: 1;
    background: #140222;
    padding: 18px;
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    text-align: center;
}

.stat-icon {
    font-size: 1.7rem;
    color: #008080;
}

.stat-label {
    font-size: 1.2rem;
    font-weight: 600;
    color: #fdfdfd;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(to right, #50c878, #05e2e2);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    margin: 8px 0;
}

.quick-stats-label {
    margin-top: 10px;
    margin-bottom: 12px;
    margin-left: 10px;
    font-size: 2rem;
    font-weight: bold;
    color: #140222;
}

.track-btn {
    margin-top: 20px;
    margin-right:10px;
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    float: right;
    font-size: 0.9rem;
    color: white;
    background: linear-gradient(to right, #50c878, #008080);
}

.stat-title {
    font-size: 1.9rem;
    color: #555;
    font-weight: 500;
}

/* Modern select dropdown */
.modern-select {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #d2d2d2;
    background: #fff;
    font-size: 0.95rem;
    transition: 0.25s;
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg fill='%23008080' height='20' viewBox='0 0 20 20' width='20' xmlns='http://www.w3.org/2000/svg'><polygon points='0,0 20,0 10,12'/></svg>");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

.modern-select:focus {
    border-color: #008080;
    box-shadow: 0 0 8px rgba(0,128,128,0.3);
}

/* Modern date input */
.date-input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #d2d2d2;
    background: #fff;
    font-size: 0.95rem;
    transition: 0.25s;
    outline: none;
}

.date-input:focus {
    border-color: #008080;
    box-shadow: 0 0 8px rgba(0,128,128,0.3);
}

/* Quantity selector */
.quantity-box {
    display: flex;
    align-items: center;
    gap: 6px;
}

.qty-input {
    width: 65px;
    text-align: center;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ccc;
}

.qty-btn {
    padding: 10px 14px;
    background: #140222;
    border: none;
    color: rgb(247, 245, 245);
    border-radius: 8px;
    cursor: pointer;
}

/* Modern payment cards */
.payment-methods {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 10px;
}

.payment-option input {
    display: none;
}

.payment-option label {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 14px;
    background: #140222;
    border-radius: 14px;
    border: 1px solid #ccc;
    cursor: pointer;
    transition: 0.25s;
    font-weight: 600;
    text-align: center;
    color: #f7f5f8;
}

.payment-option label i {
    font-size: 1.8rem;
    margin-bottom: 6px;
    color: #f5f9f9;
}

.payment-option input:checked + label i {
    font-size: 1.8rem;
    margin-bottom: 6px;
    color: #140222;
}

.payment-option input:checked + label  {
    border-color: #008080;
    background: linear-gradient(to right, #50c8781a, #0080801a);
    box-shadow: 0 0 8px rgba(243, 247, 247, 0.3);
    color: #140222;
}

.modern-input {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.form-group {
    width: 100%;
    max-width: 100%;
}

input[type="date"] {
    min-width: 0;
}

.date-wrapper {
    width: 100%;
    display: flex;
    align-items: center;
}

.date-wrapper input {
    flex: 1;
    max-width: 100%;
}

