* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: #111;
    color: #eee;
}

.header {
    background: #191919;
    padding: 22px 6%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #333;
}

.header h1 {
    font-size: 30px;
    color: #fff;
}

.header h1 span {
    color: #d4af37;
}

.header p {
    color: #999;
    font-size: 13px;
    margin-top: 4px;
}

.connection {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #aaa;
}

#connectionDot {
    width: 9px;
    height: 9px;
    background: #888;
    border-radius: 50%;
}

#connectionDot.online {
    background: #35c879;
}

#connectionDot.offline {
    background: #e74c3c;
}

.container {
    width: 88%;
    max-width: 1400px;
    margin: 35px auto;
}

.welcome {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.welcome h2 {
    font-size: 27px;
}

.welcome p {
    color: #999;
    margin-top: 8px;
}

.refresh-btn {
    background: #d4af37;
    color: #111;
    border: none;
    padding: 11px 20px;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
}

.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 40px;
}

.stat-card {
    background: #1c1c1c;
    border: 1px solid #333;
    padding: 23px;
    border-radius: 9px;
}

.stat-card p {
    color: #aaa;
    font-size: 14px;
}

.stat-card h2 {
    font-size: 32px;
    color: #d4af37;
    margin-top: 12px;
}

.orders-section {
    background: #191919;
    border: 1px solid #333;
    border-radius: 10px;
    padding: 25px;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
}

.section-heading h2 {
    font-size: 22px;
}

.section-heading span {
    color: #999;
    font-size: 13px;
}

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 25px;
}

.filter {
    background: #252525;
    border: 1px solid #444;
    color: #bbb;
    padding: 10px 17px;
    border-radius: 5px;
    cursor: pointer;
}

.filter.active {
    background: #d4af37;
    color: #111;
    border-color: #d4af37;
    font-weight: bold;
}

.orders-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.order-card {
    background: #222;
    border: 1px solid #383838;
    border-radius: 8px;
    padding: 20px;
}

.order-top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 15px;
}

.order-id {
    color: #d4af37;
    font-weight: bold;
    font-size: 15px;
}

.order-time {
    color: #999;
    font-size: 12px;
    margin-top: 6px;
}

.badge {
    height: fit-content;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 11px;
    text-transform: uppercase;
    font-weight: bold;
}

.badge.placed {
    background: #493c17;
    color: #f4cf54;
}

.badge.accepted {
    background: #183b52;
    color: #69c5f2;
}

.badge.preparing {
    background: #49301b;
    color: #f6a65c;
}

.badge.ready {
    background: #16432b;
    color: #62df92;
}

.badge.completed {
    background: #303030;
    color: #bbb;
}

.badge.cancelled {
    background: #4b2020;
    color: #ff7777;
}

.order-info {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 17px;
    font-size: 13px;
    color: #bbb;
}

.order-items {
    border-top: 1px solid #383838;
    border-bottom: 1px solid #383838;
    padding: 15px 0;
    margin-bottom: 15px;
}

.order-item {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 9px;
    font-size: 14px;
}

.order-item:last-child {
    margin-bottom: 0;
}

.order-total {
    display: flex;
    justify-content: space-between;
    font-weight: bold;
    font-size: 17px;
    margin-bottom: 14px;
}

.order-total span:last-child {
    color: #d4af37;
}

.instructions {
    background: #292929;
    border-left: 3px solid #d4af37;
    padding: 11px;
    margin-bottom: 15px;
    font-size: 13px;
    color: #ccc;
    border-radius: 3px;
}

.instructions strong {
    color: #d4af37;
}

.order-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.action-btn {
    padding: 10px 13px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 12px;
}

.accept-btn {
    background: #2878a5;
    color: white;
}

.prepare-btn {
    background: #bd762b;
    color: white;
}

.ready-btn {
    background: #23854d;
    color: white;
}

.complete-btn {
    background: #555;
    color: white;
}

.cancel-btn {
    background: #8d3030;
    color: white;
}

.action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.loading,
.empty {
    text-align: center;
    padding: 50px 15px;
    color: #999;
    grid-column: 1 / -1;
}

footer {
    text-align: center;
    padding: 25px;
    color: #777;
    font-size: 13px;
    border-top: 1px solid #292929;
}

@media (max-width: 900px) {
    .stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .orders-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .header {
        padding: 18px 5%;
    }

    .header h1 {
        font-size: 25px;
    }

    .container {
        width: 92%;
        margin: 25px auto;
    }

    .welcome {
        align-items: flex-start;
        gap: 15px;
    }

    .welcome h2 {
        font-size: 22px;
    }

    .refresh-btn {
        padding: 9px 12px;
    }

    .stats {
        gap: 10px;
    }

    .stat-card {
        padding: 16px;
    }

    .orders-section {
        padding: 15px;
    }
}