@import url('v05.css');
@import url('v06.css');

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Arial,
        sans-serif;
    background: #f4f5f7;
    color: #202124;
}

.topbar {
    background: #ffffff;
    border-bottom: 1px solid #ddd;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.topbar h1 {
    margin: 0;
    font-size: 20px;
}

.top-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.wrap {
    max-width: 1500px;
    margin: 0 auto;
    padding: 20px;
}

.summary-bar,
.history-toolbar {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.login-card,
.setup-card,
.order-card,
.history-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 24px;
}

.login-card,
.setup-card {
    max-width: 620px;
    margin: 40px auto;
}

.order-card {
    max-width: 900px;
    margin: 0 auto;
}

input,
select,
textarea,
button {
    font: inherit;
}

input,
textarea {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #bbb;
    border-radius: 8px;
    margin: 6px 0 14px;
}

button,
.button {
    display: inline-block;
    border: 0;
    border-radius: 8px;
    padding: 10px 14px;
    background: #222;
    color: #fff;
    text-decoration: none;
    cursor: pointer;
}

.button.secondary,
button.secondary {
    background: #666;
}

.button.danger,
button.danger,
.danger {
    background: #a33;
}

.columns {
    display: grid;
    grid-template-columns:
        repeat(
            4,
            minmax(230px, 1fr)
        );
    gap: 16px;
    align-items: start;
}

.column {
    background: #e9ebee;
    border-radius: 12px;
    padding: 12px;
    min-height: 300px;
}

.column-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 4px 4px 12px;
}

.column-heading h2 {
    margin: 0;
    font-size: 17px;
}

.count-badge {
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    border-radius: 14px;
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.ticket {
    background: #fff;
    border: 1px solid #d5d5d5;
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 12px;
    box-shadow:
        0 1px 2px
        rgba(0, 0, 0, .04);
}

.ticket-header {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    align-items: center;
}

.ticket-number {
    font-weight: 700;
    font-size: 18px;
}

.ticket-meta {
    color: #666;
    font-size: 13px;
    margin-top: 6px;
}

.ticket-total {
    margin-top: 10px;
    font-weight: 700;
    font-size: 18px;
}

.customer-note {
    margin-top: 10px;
    padding: 9px 10px;
    background: #f6f6f6;
    border-radius: 8px;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.actions form {
    margin: 0;
}

.status-badge {
    display: inline-block;
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 12px;
    font-weight: 700;
    background: #ececec;
}

.status-pending {
    background: #fff4cc;
}

.status-accepted {
    background: #e4efff;
}

.status-preparing {
    background: #f1e7ff;
}

.status-ready {
    background: #dff5e3;
}

.status-completed {
    background: #e5e5e5;
}

.status-cancelled {
    background: #f5dddd;
}

.notice {
    padding: 12px 14px;
    border-radius: 8px;
    background: #e7f4e8;
    margin-bottom: 16px;
}

.error {
    padding: 12px 14px;
    border-radius: 8px;
    background: #f8e5e5;
    margin-bottom: 16px;
}

.empty-state {
    padding: 25px 10px;
    text-align: center;
    color: #777;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

th,
td {
    text-align: left;
    padding: 10px;
    border-bottom: 1px solid #e5e5e5;
    white-space: nowrap;
}

th {
    font-size: 13px;
    color: #555;
}

.status {
    text-transform: capitalize;
    font-weight: 700;
}

.muted {
    color: #666;
}

@media (max-width: 1100px) {
    .columns {
        grid-template-columns:
            repeat(2, 1fr);
    }
}

@media (max-width: 650px) {

    .columns {
        grid-template-columns: 1fr;
    }

    .topbar,
    .summary-bar,
    .history-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .top-actions {
        width: 100%;
    }
}
