/* RESET & BASE */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f6f8;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* HEADER */
header {
    background: #1f2937;
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1rem;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    z-index: 1001;
}

/* HAMBURGER */
.hamburger {
    display: none;
    font-size: 1.8rem;
    margin-right: 12px;
    cursor: pointer;
}

/* SIDEBAR */
.sidebar {
    width: 220px;
    background: #111827;
    color: white;
    position: fixed;
    top: 60px;
    bottom: 0;
    left: 0;
    padding: 2rem 1rem 1rem;
    overflow-y: auto;
    transition: transform 0.3s ease;
    z-index: 1000;
}

.sidebar a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: #d1d5db;
    font-size: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    margin-bottom: 0.5rem;
    transition: background 0.2s ease;
}

.sidebar a:hover,
.sidebar a.active {
    background: #374151;
    color: #fff;
}

/* SIDEBAR TOGGLE STATES */
.sidebar.show {
    transform: translateX(0);
}
.sidebar.hidden {
    transform: translateX(-100%);
}

/* MAIN CONTENT */
.main-content {
    margin-left: 220px;
    padding: 2rem;
    margin-top: 60px;
    flex-grow: 1;
}

/* TABLE */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 2rem;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

th, td {
    padding: 14px;
    text-align: left;
    font-size: 0.95rem;
}

th {
    background: #f3f4f6;
    font-weight: 600;
}

tr:nth-child(even) {
    background: #f9fafb;
}

tr.pending {
    background-color: #fcf0d8;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

tr.pending td {
    background: none !important; /* removes harsh yellow blocks inside cells */
    padding-top: 14px;
    padding-bottom: 14px;
}

/* BADGES */
.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
}
.status-pending { background-color: #fbbf24; color: #1f2937; }
.status-delivered { background-color: #10b981; }
.status-failed { background-color: #ef4444; }

/* ASSIGN FORM */

.assign-form {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: stretch;
}

.assign-form select {
    width: 100%;
    font-size: 0.95rem;
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 0.9rem;
}

.assign-form button {
    width: 100%;
    font-size: 0.95rem;
    padding: 10px 12px;
    margin-left: 6px;
    padding: 6px 12px;
    background: #10b981;
    border: none;
    color: white;
    border-radius: 6px;
    cursor: pointer;
}
.assign-form button:hover {
    background: #059669;
}

/* DASHBOARD CARDS */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
    text-align: center;
    transition: transform 0.2s ease;
    text-decoration: none;
    color: inherit;
}
.card:hover {
    transform: translateY(-4px);
}
.card h3 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}
.card span {
    color: #6b7280;
    font-size: 1rem;
}

/* LOGIN PAGE */
.login-body {
    margin: 0;
    min-height: 100vh;
    background: linear-gradient(135deg, #f0f4f8, #d9e2ec);
}

.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.login-container {
    background: #ffffff;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    width: 100%;
    max-width: 400px;
}
.login-container h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #333;
}
.login-container input[type="email"],
.login-container input[type="password"] {
    width: 100%;
    padding: 12px;
    margin-top: 8px;
    margin-bottom: 16px;
    border: 1px solid #ccc;
    border-radius: 8px;
    transition: border-color 0.3s;
}
.login-container input:focus {
    border-color: #007BFF;
    outline: none;
}
.login-container button {
    width: 100%;
    padding: 12px;
    background-color: #007BFF;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}
.login-container button:hover {
    background-color: #0056b3;
}
.error {
    color: #d9534f;
    text-align: center;
    margin-bottom: 1rem;
}

/* FOOTER */
footer {
    background: #e5e7eb;
    color: #374151;
    text-align: center;
    padding: 1rem;
    margin-top: auto;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .hamburger {
        display: inline-block;
    }

    .sidebar {
        transform: translateX(-100%);
        position: fixed;
        top: 0;
        left: 0;
        height: 100%;
        padding-top: 60px;
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        padding: 1.5rem;
    }
}

.main-content table th,
.main-content table td {
    font-size: 0.75rem;
    padding: 10px 12px;
}



/* Card-like table rows */
table {
    border-collapse: separate;
    border-spacing: 0 12px; /* space between rows */
    width: 100%;
}

thead th {
    background-color: #f3f4f6;
    font-weight: 600;
    padding: 12px;
}

tbody tr {
    background-color: #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    border-radius: 8px;
}

tbody tr td {
    padding: 14px 16px;
    background-color: transparent; /* important to avoid overriding the card bg */
}

tbody tr:first-child td:first-child {
    border-top-left-radius: 8px;
}
tbody tr:first-child td:last-child {
    border-top-right-radius: 8px;
}
tbody tr:last-child td:first-child {
    border-bottom-left-radius: 8px;
}
tbody tr:last-child td:last-child {
    border-bottom-right-radius: 8px;
}


.user-create-card {
    background-color: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    max-width: 600px;
    margin: 0 auto 2rem;
}

.user-create-card h2 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    color: #333;
    font-weight: 600;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 0.5rem;
}

.user-form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.user-form label {
    font-weight: 500;
    color: #555;
}

.user-form input,
.user-form select {
    padding: 10px 14px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
    width: 50%;
    transition: border-color 0.2s;
}

.user-form input:focus,
.user-form select:focus {
    border-color: #007bff;
    outline: none;
}

.user-form button {
    background-color: #007bff;
    color: white;
    padding: 12px;
    font-size: 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s;
    width: 50%;
}

.user-form button:hover {
    background-color: #0056b3;
}

.success {
    background-color: #e6ffed;
    color: #2b7a5b;
    border: 1px solid #42ba96;
    padding: 0.8rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-weight: 500;
}


table {
    width: 100%;
    table-layout: auto;
}

table th, table td {
    text-align: center;
    vertical-align: middle;
    padding: 8px;
}
