* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; font-family: system-ui, -apple-system, Segoe UI, sans-serif; }

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1c1917;
    color: #fff;
}
.login-card {
    width: min(400px, 92vw);
    padding: 2rem;
    background: #292524;
    border-radius: 16px;
}
.login-card h1 { margin: 0 0 0.5rem; font-size: 1.5rem; }
.login-sub { opacity: 0.75; font-size: 0.9rem; margin-bottom: 1.5rem; }
.login-input {
    width: 100%;
    padding: 0.75rem;
    margin: 0.35rem 0 1rem;
    border-radius: 8px;
    border: 1px solid #44403c;
    background: #1c1917;
    color: #fff;
    font-size: 1.1rem;
}
.login-btn {
    width: 100%;
    padding: 0.85rem;
    border: none;
    border-radius: 10px;
    background: #ea580c;
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
}
.login-error { color: #fca5a5; margin-bottom: 1rem; font-size: 0.9rem; }

.kitchen-board {
    min-height: 100vh;
    background: #1c1917;
    color: #e7e5e4;
    display: flex;
    flex-direction: column;
}

.kitchen-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: #292524;
    border-bottom: 1px solid #44403c;
    flex-shrink: 0;
}
.kitchen-header h1 { margin: 0; font-size: 1.15rem; }
.kitchen-header__sub { margin: 0.15rem 0 0; font-size: 0.8rem; opacity: 0.7; }
.kitchen-header__right { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.conn-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    font-weight: 600;
}
.conn-badge--ok { background: #166534; color: #bbf7d0; }
.conn-badge--warn { background: #854d0e; color: #fef08a; }
.conn-badge--error { background: #991b1b; color: #fecaca; }
.conn-badge--connecting { background: #1e40af; color: #bfdbfe; }
.sync-time { font-size: 0.75rem; opacity: 0.6; }
.btn-logout {
    background: transparent;
    border: 1px solid #57534e;
    color: #d6d3d1;
    padding: 0.35rem 0.75rem;
    border-radius: 8px;
    cursor: pointer;
}

.kitchen-columns {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    padding: 0.5rem;
    overflow: hidden;
}
@media (max-width: 900px) {
    .kitchen-columns { grid-template-columns: 1fr; }
}

.kitchen-col {
    background: #292524;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}
.kitchen-col h2 {
    margin: 0;
    padding: 0.65rem 0.75rem;
    font-size: 0.9rem;
    border-bottom: 1px solid #44403c;
    display: flex;
    justify-content: space-between;
    gap: 0.35rem;
}
.col-count {
    background: #44403c;
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    font-size: 0.8rem;
    flex-shrink: 0;
}
.kitchen-col__list {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
}

.order-card {
    background: #1c1917;
    border: 2px solid #44403c;
    border-radius: 10px;
    padding: 0.65rem;
    margin-bottom: 0.5rem;
}
.order-card--alert {
    border-color: #f97316;
    animation: order-blink 1s ease-in-out infinite;
    box-shadow: 0 0 20px rgba(249, 115, 22, 0.45);
}
@keyframes order-blink {
    0%, 100% { background: #1c1917; }
    50% { background: #431407; }
}
.order-card__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}
.order-card__table { font-weight: 700; font-size: 1rem; }
.order-card__no { font-size: 0.75rem; opacity: 0.7; }
.order-card__time { font-size: 0.8rem; color: #fb923c; }
.order-card__items {
    margin: 0.35rem 0;
    padding-left: 1rem;
    font-size: 0.85rem;
    line-height: 1.4;
}
.order-card__total { font-weight: 600; font-size: 0.9rem; margin-bottom: 0.5rem; }
.order-card__actions { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.order-btn {
    flex: 1;
    min-width: 100%;
    padding: 0.55rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    touch-action: manipulation;
}
.order-btn--prep { background: #7c3aed; color: #fff; }
.order-btn--ready { background: #16a34a; color: #fff; }
