:root {
    --o: #f58220;
    --g: #0e9f6e;
    --gd: #07694a;
    --bg: #fbf7f1;
    --card: rgba(255, 255, 255, .72);
    --ink: #1b2a24;
    --mute: #66756e;
    --line: rgba(27, 42, 36, .1);
    --sh: 0 10px 40px -14px rgba(14, 80, 55, .28);
    --r: 22px
}

[data-theme=dark] {
    --bg: #0b1511;
    --card: rgba(22, 38, 31, .7);
    --ink: #e9f3ee;
    --mute: #8fa59b;
    --line: rgba(255, 255, 255, .09);
    --sh: 0 10px 40px -14px #000
}

* {
    box-sizing: border-box;
    margin: 0
}

body {
    font: 15px/1.5 'DM Sans', system-ui, sans-serif;
    color: var(--ink);
    background: var(--bg);
    display: flex;
    min-height: 100vh;
    transition: background .4s
}

h1,
h2,
h3,
.big {
    font-family: 'Bricolage Grotesque', sans-serif;
    letter-spacing: -.02em
}

button {
    font: inherit;
    color: inherit;
    cursor: pointer;
    border: 0;
    background: none
}

:focus-visible {
    outline: 3px solid var(--o);
    outline-offset: 2px
}

.bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden
}

.bg i {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: .38;
    animation: drift 22s ease-in-out infinite alternate
}

.bg i:nth-child(1) {
    width: 48vw;
    height: 48vw;
    background: var(--o);
    top: -18%;
    right: -10%
}

.bg i:nth-child(2) {
    width: 42vw;
    height: 42vw;
    background: var(--g);
    bottom: -20%;
    left: 8%;
    animation-delay: -8s
}

.bg i:nth-child(3) {
    width: 26vw;
    height: 26vw;
    background: #ffd08a;
    top: 40%;
    left: 45%;
    opacity: .2;
    animation-delay: -14s
}

[data-theme=dark] .bg i {
    opacity: .2
}

@keyframes drift {
    to {
        transform: translate(-6vw, 5vh) scale(1.15)
    }
}

.side {
    width: 250px;
    flex: none;
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 22px 16px;
    display: flex;
    flex-direction: column;
    gap: 22px;
    background: var(--card);
    backdrop-filter: blur(22px);
    border-right: 1px solid var(--line)
}

.brand {
    display: flex;
    gap: 12px;
    align-items: center
}

.badge {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    background: #fff;
    display: grid;
    place-items: center;
    box-shadow: var(--sh);
    flex: none
}

.badge img {
    width: 42px
}

.brand b {
    font: 800 20px 'Bricolage Grotesque'
}

.brand small,
.who small {
    display: block;
    color: var(--mute);
    font-size: 12px
}

nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1
}

nav button {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 12px 14px;
    border-radius: 14px;
    text-align: left;
    font-weight: 500;
    color: var(--mute);
    transition: .25s
}

nav button:hover {
    background: var(--line);
    color: var(--ink);
    transform: translateX(3px)
}

nav button.on {
    background: linear-gradient(120deg, var(--g), #18b383);
    color: #fff;
    box-shadow: 0 8px 20px -8px var(--g)
}

nav .adm {
    display: none
}

body.admin nav .adm {
    display: flex
}

.who {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 10px;
    border-radius: 16px;
    background: var(--line)
}

.av {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--o), #ffb25e);
    display: grid;
    place-items: center;
    font-weight: 700;
    color: #fff
}

main {
    flex: 1;
    padding: 28px clamp(16px, 3vw, 44px) 60px;
    min-width: 0
}

.top {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 22px
}

.top h1 {
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 800
}

.top p {
    color: var(--mute)
}

.tools {
    display: flex;
    gap: 10px;
    align-items: center
}

.seg {
    display: flex;
    padding: 4px;
    border-radius: 999px;
    background: var(--card);
    border: 1px solid var(--line)
}

.seg button {
    padding: 7px 14px;
    border-radius: 999px;
    font-weight: 500;
    font-size: 13px;
    transition: .25s
}

.seg button.on {
    background: var(--ink);
    color: var(--bg)
}

.ic {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--card);
    border: 1px solid var(--line);
    font-size: 18px;
    transition: .4s
}

.ic:hover {
    transform: rotate(180deg)
}

.notice {
    padding: 12px 18px;
    border-radius: 16px;
    margin-bottom: 20px;
    background: linear-gradient(100deg, rgba(245, 130, 32, .18), rgba(14, 159, 110, .14));
    border: 1px solid rgba(245, 130, 32, .35)
}

.view {
    display: none
}

.view.on {
    display: block;
    animation: in .5s cubic-bezier(.2, .8, .2, 1)
}

@keyframes in {
    from {
        opacity: 0;
        transform: translateY(14px)
    }
}

.grid {
    display: grid;
    gap: 18px
}

.g4 {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr))
}

.g2 {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr))
}

.card {
    background: var(--card);
    backdrop-filter: blur(18px);
    border: 1px solid var(--line);
    border-radius: var(--r);
    padding: 22px;
    box-shadow: var(--sh)
}

.card h3 {
    font-size: 18px;
    margin-bottom: 12px
}

.stat small {
    color: var(--mute)
}

.stat .big {
    font-size: 34px;
    font-weight: 800;
    display: block;
    margin-top: 2px
}

.stat.o .big {
    color: var(--o)
}

.stat.g .big {
    color: var(--g)
}

/* hero: plate clock */
.hero {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 34px;
    align-items: center;
    padding: 30px;
    margin-bottom: 18px;
    background: linear-gradient(135deg, var(--card), rgba(14, 159, 110, .12))
}

.ring {
    --p: 0;
    width: 210px;
    height: 210px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    position: relative;
    background: conic-gradient(var(--o) calc(var(--p)*1%), var(--line) 0);
    transition: .8s
}

.ring::before {
    content: "";
    position: absolute;
    inset: 13px;
    border-radius: 50%;
    background: var(--bg);
    box-shadow: inset 0 4px 18px rgba(0, 0, 0, .1)
}

.ring>div {
    position: relative;
    text-align: center
}

.ring .ico {
    font-size: 38px;
    display: block;
    animation: bob 3s ease-in-out infinite
}

@keyframes bob {
    50% {
        transform: translateY(-6px) rotate(6deg)
    }
}

.ring b {
    font: 800 26px 'Bricolage Grotesque'
}

.ring small {
    display: block;
    color: var(--mute)
}

.hero h2 {
    font-size: clamp(24px, 3vw, 34px);
    margin: 4px 0 12px
}

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

.chip {
    padding: 6px 13px;
    border-radius: 999px;
    background: var(--line);
    font-size: 13px;
    font-weight: 500
}

.chip.hl {
    background: rgba(14, 159, 110, .16);
    color: var(--g)
}

.live {
    display: inline-flex;
    gap: 7px;
    align-items: center;
    font-weight: 700;
    color: var(--g);
    font-size: 13px
}

.live::before {
    content: "";
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--g);
    animation: pulse 1.4s infinite
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(14, 159, 110, .6)
    }

    100% {
        box-shadow: 0 0 0 12px transparent
    }
}

.btn {
    padding: 11px 20px;
    border-radius: 14px;
    font-weight: 700;
    background: linear-gradient(120deg, var(--o), #ff9d42);
    color: #fff;
    box-shadow: 0 8px 20px -8px var(--o);
    transition: .25s
}

.btn:hover {
    transform: translateY(-2px)
}

.btn.g {
    background: linear-gradient(120deg, var(--g), #18b383);
    box-shadow: 0 8px 20px -8px var(--g)
}

.btn.ghost {
    background: var(--line);
    color: var(--ink);
    box-shadow: none
}

.pass {
    display: flex;
    gap: 18px;
    align-items: center
}

canvas {
    border-radius: 14px;
    background: #fff;
    padding: 8px;
    box-shadow: var(--sh);
    flex: none
}

/* menu */
.tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 6px;
    margin-bottom: 16px
}

.tab {
    padding: 9px 18px;
    border-radius: 14px;
    background: var(--card);
    border: 1px solid var(--line);
    font-weight: 500;
    white-space: nowrap;
    transition: .2s
}

.tab.on {
    background: var(--o);
    color: #fff;
    border-color: var(--o)
}

.tab.today {
    box-shadow: inset 0 -3px var(--g)
}

.meal h3 {
    display: flex;
    gap: 10px;
    align-items: center
}

.meal .time {
    margin-left: auto;
    font: 500 12px 'DM Sans';
    color: var(--mute)
}

.meal ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 7px
}

.meal li {
    padding: 9px 12px;
    border-radius: 12px;
    background: var(--line);
    transition: .2s
}

.meal li:hover {
    background: rgba(245, 130, 32, .18);
    transform: translateX(4px)
}

/* booking */
.week {
    display: grid;
    gap: 10px
}

.row {
    display: grid;
    grid-template-columns: 90px repeat(4, 1fr);
    gap: 10px;
    align-items: center
}

.row>b {
    font-family: 'Bricolage Grotesque'
}

.slot {
    padding: 12px 8px;
    border-radius: 14px;
    text-align: center;
    font-weight: 500;
    font-size: 13px;
    background: rgba(14, 159, 110, .16);
    color: var(--g);
    border: 1px solid rgba(14, 159, 110, .3);
    transition: .25s
}

.slot:hover:not(:disabled) {
    transform: scale(1.04)
}

.slot.skip {
    background: var(--line);
    color: var(--mute);
    border-color: transparent;
    text-decoration: line-through
}

.slot:disabled {
    opacity: .45;
    cursor: not-allowed
}

.legend {
    color: var(--mute);
    font-size: 13px;
    margin-bottom: 14px
}

/* feedback */
.stars {
    display: flex;
    gap: 4px;
    font-size: 34px
}

.stars button {
    filter: grayscale(1) opacity(.4);
    transition: .2s
}

.stars button.on {
    filter: none;
    transform: scale(1.12)
}

select,
textarea,
input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: var(--card);
    color: var(--ink);
    font: inherit;
    margin: 6px 0 14px
}

textarea {
    min-height: 90px;
    resize: vertical
}

.fbi {
    padding: 12px 0;
    border-bottom: 1px solid var(--line)
}

.fbi:last-child {
    border: 0
}

.fbi small {
    color: var(--mute)
}

.bars {
    display: flex;
    flex-direction: column;
    gap: 12px
}

.bar {
    display: grid;
    grid-template-columns: 90px 1fr 40px;
    gap: 10px;
    align-items: center;
    font-size: 13px
}

.bar i {
    display: block;
    height: 12px;
    border-radius: 99px;
    background: var(--line);
    overflow: hidden
}

.bar i::after {
    content: "";
    display: block;
    height: 100%;
    width: var(--w);
    border-radius: 99px;
    background: linear-gradient(90deg, var(--g), var(--o));
    animation: grow 1s cubic-bezier(.2, .8, .2, 1)
}

@keyframes grow {
    from {
        width: 0
    }
}

.tx {
    display: flex;
    justify-content: space-between;
    padding: 11px 0;
    border-bottom: 1px solid var(--line)
}

.pos {
    color: var(--g);
    font-weight: 700
}

.neg {
    color: #d9480f;
    font-weight: 700
}

.amts {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px
}

#toasts {
    position: fixed;
    bottom: 22px;
    right: 22px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 50
}

.toast {
    padding: 13px 20px;
    border-radius: 14px;
    background: var(--ink);
    color: var(--bg);
    font-weight: 500;
    box-shadow: var(--sh);
    animation: in .35s, out .4s 2.6s forwards
}

@keyframes out {
    to {
        opacity: 0;
        transform: translateX(30px)
    }
}

.load {
    opacity: .5;
    pointer-events: none
}

@media(max-width:860px) {
    body {
        flex-direction: column
    }

    .side {
        position: fixed;
        bottom: 0;
        top: auto;
        width: 100%;
        height: auto;
        flex-direction: row;
        padding: 6px;
        z-index: 40;
        border: 0;
        border-top: 1px solid var(--line)
    }

    .brand,
    .who {
        display: none
    }

    nav {
        flex-direction: row;
        justify-content: space-around
    }

    nav button {
        flex-direction: column;
        gap: 0;
        padding: 6px 8px;
        font-size: 11px
    }

    nav button:hover {
        transform: none
    }

    main {
        padding-bottom: 100px
    }

    .hero {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center
    }

    .chips {
        justify-content: center
    }

    .row {
        grid-template-columns: 60px repeat(4, 1fr);
        gap: 5px
    }

    .slot {
        font-size: 11px;
        padding: 10px 2px
    }
}

@media(prefers-reduced-motion:reduce) {
    * {
        animation: none !important;
        transition: none !important
    }
}

/* auth + admin extras */
body:not(.in) .side,
body:not(.in) main {
    display: none
}

body.admin nav .stu {
    display: none
}

#login {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: grid;
    place-items: center;
    padding: 18px;
    overflow: auto
}

#login[hidden] {
    display: none
}

.lcard {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: min(900px, 100%);
    border-radius: 30px;
    overflow: hidden;
    background: var(--card);
    backdrop-filter: blur(24px);
    border: 1px solid var(--line);
    box-shadow: 0 30px 80px -30px rgba(7, 105, 74, .5);
    animation: in .7s
}

.lart {
    padding: 44px;
    background: linear-gradient(150deg, var(--g), var(--gd));
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 14px;
    position: relative;
    overflow: hidden
}

.lart::after {
    content: "";
    position: absolute;
    width: 340px;
    height: 340px;
    border: 34px solid var(--o);
    border-radius: 50%;
    right: -150px;
    bottom: -150px
}

.lart h2 {
    font-size: 40px
}

.lart p {
    opacity: .92;
    max-width: 26ch
}

.badge.big {
    width: 84px;
    height: 84px;
    border-radius: 24px
}

.badge.big img {
    width: 68px
}

#lf {
    padding: 40px;
    display: flex;
    flex-direction: column;
    gap: 4px
}

#lf h2 {
    font-size: 28px;
    margin-bottom: 10px
}

#lf label {
    font-weight: 500;
    font-size: 13px;
    color: var(--mute)
}

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

.pw input {
    margin: 6px 0 14px
}

.ic.sm {
    width: 40px;
    height: 40px;
    font-size: 15px;
    flex: none;
    margin-bottom: 8px
}

.rem {
    display: flex;
    align-items: center;
    margin-bottom: 6px
}

.rem input {
    width: auto;
    margin: 0 8px 0 0
}

#lerr {
    color: #d9480f;
    min-height: 22px;
    font-weight: 500
}

.demo {
    font-size: 12px;
    color: var(--mute);
    margin-top: 8px
}

.link {
    color: var(--g);
    font-weight: 700;
    text-align: left;
    padding: 8px 0
}

.btn.sm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 10px
}

.pill {
    padding: 2px 10px;
    border-radius: 99px;
    font-size: 12px;
    font-weight: 700
}

.pill.open {
    background: rgba(245, 130, 32, .2);
    color: var(--o)
}

.pill.resolved {
    background: rgba(14, 159, 110, .18);
    color: var(--g)
}

.tbl {
    overflow-x: auto
}

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

th {
    text-align: left;
    color: var(--mute);
    font-weight: 500
}

th,
td {
    padding: 10px 8px;
    border-bottom: 1px solid var(--line);
    white-space: nowrap
}

@media(max-width:860px) {
    .lcard {
        grid-template-columns: 1fr
    }

    .lart {
        display: none
    }
}

/* extras */
.bellw {
    position: relative
}

.ic {
    position: relative
}

#bell:hover {
    transform: none
}

#bc {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    background: var(--o);
    color: #fff;
    font: 700 11px/18px 'DM Sans';
    padding: 0 4px
}

.np {
    position: absolute;
    right: 0;
    top: 52px;
    width: min(330px, 86vw);
    padding: 8px;
    border-radius: 18px;
    background: var(--bg);
    border: 1px solid var(--line);
    box-shadow: var(--sh);
    z-index: 30
}

.np[hidden] {
    display: none
}

.np p {
    padding: 10px 12px;
    font-size: 14px
}

.np p+p {
    border-top: 1px solid var(--line)
}

.pbtn {
    display: grid;
    grid-template-columns: 1fr 36px;
    position: relative;
    width: 100%;
    padding: 11px 14px;
    border-radius: 12px;
    background: var(--line);
    overflow: hidden;
    text-align: left
}

.pbtn i {
    position: absolute;
    inset: 0 auto 0 0;
    width: var(--w);
    background: rgba(14, 159, 110, .24);
    transition: width .6s
}

.pbtn span,
.pbtn b {
    position: relative
}

.pbtn.mine {
    outline: 2px solid var(--g)
}

.pbtn:disabled {
    cursor: default
}

@media(max-width:860px) {
    nav {
        overflow-x: auto
    }

    nav button {
        flex: none
    }
}

/* demo payment */
.modal {
    position: fixed;
    inset: 0;
    z-index: 70;
    display: grid;
    place-items: center;
    background: rgba(5, 20, 14, .55);
    backdrop-filter: blur(6px);
    padding: 18px
}

.modal[hidden] {
    display: none
}

.mbox {
    width: min(380px, 100%);
    text-align: center;
    padding: 28px;
    border-radius: 26px;
    background: var(--bg);
    border: 1px solid var(--line);
    box-shadow: 0 30px 80px -20px #000;
    animation: in .35s
}

.mbox canvas {
    display: block;
    margin: 14px auto;
    width: 210px;
    height: 210px
}

.amt {
    font: 800 40px 'Bricolage Grotesque';
    color: var(--g)
}

.spin {
    width: 54px;
    height: 54px;
    margin: 10px auto 18px;
    border-radius: 50%;
    border: 5px solid var(--line);
    border-top-color: var(--o);
    animation: sp 1s linear infinite
}

@keyframes sp {
    to {
        transform: rotate(360deg)
    }
}

.ok {
    width: 68px;
    height: 68px;
    margin: 6px auto 12px;
    border-radius: 50%;
    background: var(--g);
    color: #fff;
    font-size: 36px;
    line-height: 68px;
    animation: pop .5s
}

@keyframes pop {
    from {
        transform: scale(0)
    }
}

/* v6: charts, diet, bill, print */
.bar {
    grid-template-columns: 90px 1fr 58px !important
}

.cols {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    height: 160px
}

.col {
    flex: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    gap: 4px;
    font-size: 11px
}

.col i {
    width: 100%;
    min-height: 3px;
    border-radius: 8px 8px 0 0;
    background: linear-gradient(var(--o), var(--g));
    transition: height .6s
}

.col small {
    color: var(--mute)
}

.meal li.no,
.chip.no {
    opacity: .4;
    text-decoration: line-through
}

.mbox.bill {
    text-align: left;
    width: min(480px, 100%);
    max-height: 92vh;
    overflow: auto
}

@media print {
    body>*:not(#pay) {
        display: none !important
    }

    .modal {
        position: static;
        background: none;
        backdrop-filter: none;
        padding: 0
    }

    .mbox {
        box-shadow: none;
        border: 0;
        max-height: none
    }

    .mbox button {
        display: none
    }
}