*{box-sizing:border-box}

body{
    margin:0;
    font-family:Arial,sans-serif;
    background:#f4f5f7;
    color:#171717;
}

header{
    height:58px;
    background:#fff;
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:0 16px;
    position:sticky;
    top:0;
    z-index:5;
    box-shadow:0 1px 6px rgba(0,0,0,.08);
}

header a{
    color:#d22;
    text-decoration:none;
}

main{
    width:min(720px,100%);
    margin:auto;
    padding:14px;
}

.panel,.card{
    background:#fff;
    border-radius:16px;
    padding:16px;
    margin:12px 0;
    box-shadow:0 2px 12px rgba(0,0,0,.06);
}

.tables{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:10px;
}

.table{
    border:0;
    border-radius:14px;
    min-height:82px;
    padding:12px 6px;
    font-size:20px;
    font-weight:bold;
    background:#c9f3d2;
    color:#111;
}

.table.busy{
    background:#ffd2d2;
}

.table.free{
    background:#c9f3d2;
}

.table small{
    display:block;
    font-size:12px;
    margin-top:6px;
    font-weight:normal;
}

button{
    border:0;
    border-radius:11px;
    padding:12px 15px;
    background:#222;
    color:#fff;
    font-weight:bold;
    cursor:pointer;
}

.full{
    width:100%;
    margin-top:6px;
    font-size:18px;
}

input,select{
    width:100%;
    padding:12px;
    border:1px solid #ddd;
    border-radius:10px;
    font-size:16px;
    background:#fff;
}

.menuitem{
    width:100%;
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:13px 10px;
    border:1px solid #eee;
    border-radius:12px;
    background:#fff;
    margin:7px 0;
}

.qty{
    display:flex;
    align-items:center;
    gap:8px;
}

.qty button{
    width:38px;
    height:38px;
    padding:0;
}

.line{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:10px;
    padding:10px 0;
    border-bottom:1px solid #eee;
}

.total{
    font-size:22px;
    font-weight:bold;
    text-align:right;
    margin:16px 0;
}

.pay{
    width:100%;
    background:#13833c;
    font-size:18px;
    padding:15px;
}

.hidden{
    display:none;
}

.error{
    color:#c22;
}

.muted{
    color:#777;
}

.login{
    min-height:100vh;
    display:flex;
    justify-content:center;
    align-items:center;
    padding:20px;
}

.login-card{
    width:min(380px,100%);
}

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

.dark-red{
    background:#9e2020;
}

.form-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:7px;
    margin-top:12px;
}

.form-grid button{
    grid-column:1/-1;
}

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

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

    .form-grid button{
        grid-column:auto;
    }
}


.table-management {
    margin-top: 15px;
}

.hint {
    font-size: 13px;
    opacity: .7;
    margin-top: 10px;
}

.admin-table-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    margin-bottom: 8px;
    align-items: stretch;
}

.admin-table-row .table {
    margin: 0;
}

.delete-table {
    min-width: 90px;
    background: #8b1e1e;
    color: white;
    border: 0;
    border-radius: 10px;
    padding: 8px 12px;
    font-weight: 600;
}
