/* style.css */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    background: #f4f6f9;
    width: 100%;
    max-width: 1024px;
    margin: 0 auto;
    padding-bottom: 20px;
}

/* header */
.header {
    background: #198754;
    color: white;
    padding: 12px;
    text-align: center;
    font-size: 20px;
    font-weight: bold;
}

/* top bar */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2px 10px;
    background: #198754;
    color: white;
    position: relative;
    flex-wrap: wrap;
}

.topbar .logo {
    font-weight: bold;
    font-size: 16px;
}

/* sticky top area */
.sticky-wrap {
    position: sticky;
    top: 0;
    z-index: 2000;
    background: #f4f6f9;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
}

.btn {
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 13px;
    text-decoration: none;
    font-weight: bold;
    border: none;
    cursor: pointer;
    background: #fff;
    color: #0d6efd;
}

.btn-manage {
    background: #198754;
    color: white;
}

.btn-logout {
    background: #dc3545;
    color: white;
}

/* cards */
.card {
    background: white;
    padding: 12px;
    border-radius: 14px;
    margin-top: 12px;
    margin-bottom: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, .08);
}

.section-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
    text-align: center;
}

/* stats */
.stats {
    padding: 2px 10px;
}

.stats .card {
    padding: 6px;
    text-align: center;
}

.num {
    font-size: 25px;
    font-weight: bold;
    color: #dc3545;
}

/* list */
.list {
    padding: 10px;
}

.car {
    background: white;
    border-radius: 14px;
    padding: 14px;
    margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
}

/* dòng 1 */
.line1 {
    font-size: 20px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
}

/* dòng 2 */
.line2 {
    margin-top: 6px;
    font-size: 16px;
    color: #555;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.marketer {
    color: #dc3545;
    font-weight: bold;
}

.qty {
    color: #198754;
    font-weight: bold;
}

.date {
    color: #888;
    margin-top: 4px;
    text-align: right;
    font-size: 14px;
}

/* badge trạng thái */
.badge {
    padding: 4px 8px;
    border-radius: 8px;
    font-weight: bold;
    white-space: nowrap;
    color: #fff;
    font-size: 13px;
    display: inline-block;
}

.wait,
.status-cho_xep {
    background: #f39c12;
    color: #fff;
}

.loading,
.status-dang_boc {
    background: #2980b9;
    color: #fff;
}

.done,
.status-da_xong {
    background: #198754;
    color: #fff;
}

.price-card {
    margin-top: 10px;
    text-align: center;
}

.price-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(30px, 1fr));
    gap: 6px;
    margin-top: 6px;
}

.price-item {
    background: #f5f5f5;
    padding: 8px;
    border-radius: 8px;
    text-align: center;
}

.price-type {
    font-weight: 600;
    font-size: 14px;
}

.price-value {
    color: #2e7d32;
    font-weight: bold;
    font-size: 15px;
    margin-top: 4px;
}

/* Menu Dropdown */
.menu-wrapper {
    position: relative;
}

.nav-dropdown {
    position: relative;
    display: inline-block;
}

.btn-menu {
    background: #2c3e50;
    color: white;
    padding: 6px 14px;
    border: none;
    cursor: pointer;
    border-radius: 6px;
    font-weight: bold;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 40px;
    background-color: white;
    min-width: 200px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    overflow: hidden;
    z-index: 9999;
    text-align: left;
}

.dropdown-content a {
    display: block;
    padding: 10px 14px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    font-weight: normal;
}

.dropdown-content a:hover {
    background: #f2f2f2;
}

.dropdown-content hr {
    margin: 5px 0;
    border: none;
    border-top: 1px solid #ddd;
}

.logout {
    color: #c0392b !important;
    font-weight: bold !important;
}

.nav-dropdown:hover .dropdown-content,
.dropdown-content.show {
    display: block !important;
}

/* mobile */
@media (max-width: 600px) {
    .line1 {
        font-size: 20px;
    }

    .line2 {
        font-size: 15px;
    }
}

/* forms and inputs */
select,
button,
input:not([type="hidden"]) {
    padding: 9px;
    margin: 6px 0;
    border-radius: 8px;
    border: 1px solid #ddd;
    font-size: 16px;
    box-sizing: border-box;
}

button.primary {
    background: #0d6efd;
    color: #fff;
    font-weight: bold;
    border: none;
}

button:hover {
    opacity: 0.9;
}

/* table */
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

th,
td {
    padding: 8px;
    border-bottom: 1px solid #eee;
    text-align: left;
}

th {
    background: #f9fafb;
    font-weight: 600;
}

tr:last-child td {
    border-bottom: none;
}

/* helpers */
.text-center {
    text-align: center;
}

.success {
    color: green;
    margin-bottom: 10px;
}

.error {
    color: red;
    margin-bottom: 10px;
}

.green {
    color: #16a34a;
}

.red {
    color: #dc2626;
}

.blue {
    color: #2563eb;
}

.orange {
    color: #ea580c;
}

/* modal styles from warehouse.php */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal-box {
    background: #fff;
    width: 90%;
    max-width: 380px;
    border-radius: 16px;
    padding: 20px;
    animation: pop .2s ease-out;
}

.modal-message {
    font-size: 16px;
    white-space: pre-line;
    margin-bottom: 20px;
}

.modal-actions {
    display: flex;
    gap: 10px;
}

.modal-actions button {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: bold;
}

.btn-cancel {
    background: #e9ecef;
}

.btn-ok {
    background: #0d6efd;
    color: #fff;
}

@keyframes pop {
    from {
        transform: scale(.9);
        opacity: .5;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.status-select {
    border-radius: 8px;
    border: none;
    color: #fff;
}

select:disabled {
    opacity: 0.5;
    background: #ddd !important;
    color: #666 !important;
}

.row {
    display: flex;
    margin-top: 6px;
}

.row form {
    flex: 1;
}

.wrap {
    padding: 12px;
}