:root {
    --cinnamon: #6f351d;
    --cinnamon-dark: #3b1d12;
    --caramel: #b86b32;
    --cream: #fff5e8;
    --glaze: #fffaf1;
    --chocolate: #2b1710;
    --muted: #806f64;
    --line: rgba(76, 39, 22, 0.13);
    --good: #27784a;
    --warn: #a65f00;
    --bad: #9f2c22;
    --safe-top: max(env(safe-area-inset-top, 0px), 28px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

*,
*::before,
*::after {
    box-sizing: border-box;
    min-width: 0;
}

html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--chocolate);
    background: #24120c;
    font-family: Arial, Helvetica, sans-serif;
}

body,
button,
input,
select,
textarea,
a {
    -webkit-tap-highlight-color: transparent;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
    font-size: 16px;
}

.phone-shell {
    width: 100%;
    max-width: min(430px, 100vw);
    min-height: 100vh;
    margin: 0 auto;
    background: var(--cream);
    overflow-x: hidden;
    position: relative;
}

.customer-shell {
    background:
        radial-gradient(circle at 50% 32%, rgba(255, 255, 255, 0.92), transparent 32%),
        linear-gradient(180deg, #fff7ea 0%, #fff0df 58%, #f9e3c8 100%);
}

.hero {
    min-height: 430px;
    padding: calc(18px + var(--safe-top)) 18px 28px;
    color: #fff;
    background:
        linear-gradient(180deg, rgba(255, 245, 232, 0.12), rgba(255, 245, 232, 0.02) 58%, rgba(255, 245, 232, 0.96) 100%),
        url("cinnamon-hero.png") center top / cover no-repeat;
    display: grid;
    align-content: end;
    gap: 12px;
}

.brand-row {
    position: absolute;
    left: 18px;
    top: calc(12px + var(--safe-top));
    right: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.hero-logo {
    width: 156px;
    height: auto;
    max-height: 86px;
    filter: drop-shadow(0 4px 0 rgba(255,255,255,0.92)) drop-shadow(0 12px 20px rgba(59, 29, 18, 0.28));
}

.round-action {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(145deg, #9a4f10, #6f3000);
    color: #fff;
    box-shadow: 0 16px 30px rgba(79, 35, 0, 0.25);
    font-size: 1.8rem;
    font-weight: 900;
}

.cart-action {
    background: rgba(255, 250, 241, 0.82);
    color: var(--cinnamon);
    font-size: 1.5rem;
}

.admin-link,
.logout-link {
    min-height: 38px;
    display: inline-grid;
    place-items: center;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(255, 250, 241, 0.18);
    color: #fff;
    font-weight: 800;
    font-size: 0.82rem;
    backdrop-filter: blur(10px);
}

.eyebrow {
    margin: 0;
    color: #ffd8a5;
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

.hero h1 {
    margin: 0;
    font-size: clamp(2.1rem, 13vw, 3.15rem);
    line-height: 0.96;
}

.hero-copy {
    max-width: 330px;
    margin: 0;
    color: rgba(255, 255, 255, 0.84);
    font-size: 1rem;
    line-height: 1.28;
}

.order-panel,
.admin-card,
.login-card,
.success-card {
    margin: -18px 14px 22px;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.88);
    border-radius: 8px;
    background: var(--glaze);
    box-shadow: 0 18px 38px rgba(59, 29, 18, 0.15);
}

.order-panel {
    position: relative;
    margin: -96px 18px 22px;
    padding: 24px 18px calc(156px + var(--safe-bottom));
    border: 0;
    border-radius: 34px 34px 0 0;
    background:
        radial-gradient(circle at 50% -20px, rgba(255, 255, 255, 0.96), transparent 68px),
        linear-gradient(180deg, rgba(255, 253, 247, 0.98), #fff8ed 56%, #fff0dc 100%);
    box-shadow: 0 -16px 32px rgba(59, 29, 18, 0.12);
}

.order-panel::before,
.order-panel::after {
    position: absolute;
    top: 30px;
    width: 48px;
    height: 48px;
    content: "";
    border-radius: 50%;
    background: rgba(255, 245, 232, 0.98);
}

.order-panel::before {
    left: -24px;
}

.order-panel::after {
    right: -24px;
}

.product-head {
    display: grid;
    justify-items: center;
    text-align: center;
    gap: 3px;
    margin-bottom: 24px;
}

.product-head h2 {
    margin: 0 0 4px;
    font-size: 1.45rem;
}

.product-head h1 {
    margin: 0;
    color: #5f2b12;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.2rem, 12vw, 3.25rem);
    line-height: 0.98;
}

.script-title {
    margin: -4px 0 6px;
    color: #c99054;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2rem, 10vw, 2.75rem);
    font-style: italic;
    font-weight: 900;
    line-height: 0.9;
}

.big-price {
    display: grid;
    justify-items: center;
    margin-top: 14px;
    color: #673016;
}

.big-price strong {
    font-size: 3.1rem;
    line-height: 0.95;
}

.big-price span {
    color: var(--muted);
    font-weight: 800;
}

.price-pill {
    flex: 0 0 auto;
    padding: 10px 12px;
    border-radius: 8px;
    background: #f2dcc3;
    color: var(--cinnamon-dark);
    font-weight: 900;
}

.muted {
    margin: 0;
    color: var(--muted);
    line-height: 1.35;
}

form {
    display: grid;
    gap: 20px;
}

label,
.field-label {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 800;
}

input,
select,
textarea {
    width: 100%;
    min-height: 50px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--chocolate);
    padding: 0 13px;
    outline: none;
}

textarea {
    min-height: 84px;
    padding-top: 12px;
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    border-color: rgba(184, 107, 50, 0.62);
    box-shadow: 0 0 0 3px rgba(184, 107, 50, 0.14);
}

.qty-control {
    display: grid;
    grid-template-columns: 68px 1fr 68px;
    align-items: center;
    width: min(260px, 100%);
    min-height: 74px;
    margin: 0 auto;
    border: 1px solid var(--line);
    border-radius: 999px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 8px 22px rgba(80, 40, 15, 0.13);
}

.qty-control button {
    height: 74px;
    border: 0;
    background: #f7ebdd;
    color: var(--cinnamon-dark);
    font-size: 2rem;
    font-weight: 900;
}

.qty-control button:last-child {
    margin: 8px;
    height: 58px;
    border-radius: 50%;
    background: linear-gradient(145deg, #9a4f10, #6f3000);
    color: #fff;
}

.qty-control input {
    border: 0;
    text-align: center;
    font-weight: 900;
    font-size: 3rem;
    color: #6b310f;
    background: #fff;
}

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

.topping-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.topping-option span {
    display: grid;
    min-height: 158px;
    place-items: center;
    align-content: start;
    gap: 4px;
    padding: 10px 8px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255,255,255,0.72);
    color: var(--cinnamon-dark);
    text-align: center;
    font-weight: 900;
}

.topping-option input:checked + span {
    border-color: var(--caramel);
    background: #fff8ef;
    box-shadow: inset 0 0 0 2px rgba(184, 107, 50, 0.18);
}

.roll-thumb {
    width: 82px;
    height: 72px;
    display: block;
    border-radius: 42% 45% 46% 44%;
    background:
        radial-gradient(circle at 50% 48%, #fff7e9 0 8px, transparent 9px),
        repeating-radial-gradient(circle at 50% 48%, #fff7e9 0 8px, #c97833 9px 15px, #fff7e9 16px 22px);
    box-shadow: inset 0 -10px 18px rgba(104, 49, 18, 0.22), 0 8px 12px rgba(83, 39, 15, 0.16);
}

.thumb-oreo {
    background:
        radial-gradient(circle at 28% 20%, #21150f 0 5px, transparent 6px),
        radial-gradient(circle at 70% 28%, #21150f 0 6px, transparent 7px),
        radial-gradient(circle at 50% 48%, #fff7e9 0 8px, transparent 9px),
        repeating-radial-gradient(circle at 50% 48%, #fff7e9 0 8px, #c97833 9px 15px, #fff7e9 16px 22px);
}

.thumb-nutella,
.thumb-brownie {
    background:
        repeating-radial-gradient(circle at 50% 48%, rgba(63, 28, 13, 0.94) 0 6px, #d99250 7px 12px, #fff0df 13px 18px);
}

.topping-option small {
    color: var(--muted);
    font-weight: 700;
    line-height: 1.1;
}

.section-step {
    color: #3b1d12;
    font-size: 1.12rem;
    font-weight: 900;
}

.field-title {
    display: block;
    margin-bottom: 10px;
    color: #3b1d12;
    font-size: 1.12rem;
    font-weight: 900;
}

.icon-field {
    position: relative;
    margin-bottom: 10px;
}

.icon-field span {
    position: absolute;
    left: 16px;
    top: 15px;
    z-index: 1;
    width: 22px;
    color: #7e421c;
    text-align: center;
    font-weight: 900;
}

.icon-field input,
.icon-field textarea {
    padding-left: 54px;
    border-radius: 16px;
    background: rgba(255,255,255,0.72);
    box-shadow: 0 8px 16px rgba(80, 40, 15, 0.06);
}

.icon-field textarea {
    min-height: 62px;
}

.optional {
    display: block;
    margin-top: -4px;
    color: var(--muted);
    font-weight: 700;
}

.sticky-total {
    position: fixed;
    left: 50%;
    bottom: 0;
    z-index: 10;
    width: 100%;
    max-width: min(430px, 100vw);
    transform: translateX(-50%);
    padding: 15px 18px calc(15px + var(--safe-bottom));
    border-top: 1px solid rgba(76, 39, 22, 0.12);
    border-radius: 34px 34px 0 0;
    background: linear-gradient(145deg, #9a4f10, #6f3000 68%, #4a1e00);
    backdrop-filter: blur(16px);
    display: grid;
    grid-template-columns: 46px 1fr 1.75fr;
    gap: 10px;
    align-items: center;
    color: #fff;
}

.sticky-total strong {
    display: block;
    font-size: 1.25rem;
}

.sticky-total small {
    color: rgba(255, 255, 255, 0.78);
    font-weight: 800;
}

.bag-icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 2px solid rgba(255,255,255,0.85);
    border-radius: 14px;
    font-size: 1.3rem;
}

.primary-btn,
.secondary-btn,
.status-select,
.danger-btn {
    min-height: 50px;
    border: 0;
    border-radius: 8px;
    display: inline-grid;
    place-items: center;
    padding: 0 14px;
    font-weight: 900;
    text-align: center;
}

.primary-btn {
    background: linear-gradient(145deg, #ffe1a6, #f7c874);
    color: #5f2b12;
    box-shadow: 0 8px 22px rgba(42, 17, 0, 0.18);
}

.sticky-total .primary-btn {
    border-radius: 999px;
    min-height: 62px;
    font-size: 1.05rem;
}

.sticky-total .primary-btn span {
    margin-left: 8px;
}

.secure-note {
    grid-column: 1 / -1;
    text-align: center;
}

.secondary-btn {
    border: 1px solid var(--line);
    background: #fff;
    color: var(--cinnamon-dark);
}

.danger-btn {
    background: #ffe4df;
    color: var(--bad);
}

.notice,
.alert {
    margin: 0 0 14px;
    padding: 12px;
    border-radius: 8px;
    font-weight: 800;
}

.notice {
    background: #e8f7ee;
    color: var(--good);
}

.alert {
    background: #ffe7e0;
    color: var(--bad);
}

.success-page,
.login-page,
.admin-page {
    background:
        linear-gradient(180deg, rgba(59, 29, 18, 0.72), rgba(111, 53, 29, 0.2)),
        var(--cream);
}

.simple-header,
.admin-header {
    padding: calc(18px + var(--safe-top)) 16px 22px;
    color: #fff;
    background:
        linear-gradient(135deg, var(--cinnamon-dark), var(--cinnamon));
}

.simple-header h1,
.admin-header h1 {
    margin: 5px 0 0;
    font-size: 2rem;
    line-height: 1;
}

.success-card,
.login-card,
.admin-card {
    margin-top: -12px;
}

.success-actions {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

.admin-nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 12px 14px;
    background: #fff8ef;
}

.admin-nav a {
    flex: 0 0 auto;
    min-height: 38px;
    display: grid;
    place-items: center;
    padding: 0 12px;
    border-radius: 999px;
    background: #f2dcc3;
    color: var(--cinnamon-dark);
    font-weight: 900;
    font-size: 0.85rem;
}

.admin-nav a.active {
    background: var(--cinnamon);
    color: #fff;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.stat {
    min-height: 86px;
    padding: 12px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid var(--line);
}

.stat span {
    display: block;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 900;
}

.stat strong {
    display: block;
    margin-top: 8px;
    font-size: 1.5rem;
}

.profit-good strong,
.amount-income {
    color: var(--good);
}

.profit-bad strong,
.amount-expense {
    color: var(--bad);
}

.badge-income {
    background: #e8f7ee;
    color: var(--good);
}

.badge-expense {
    background: #ffe4df;
    color: var(--bad);
}

.finance-row > strong {
    display: block;
    margin-top: 10px;
    font-size: 1.25rem;
}

.settings-block {
    display: grid;
    gap: 12px;
    margin-top: 4px;
}

.settings-block h3 {
    margin: 0;
}

.topping-admin-row {
    display: grid;
    grid-template-columns: 1fr 92px;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.toggle-row {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 34px;
}

.toggle-row input {
    width: 22px;
    min-height: 22px;
}

.admin-card .primary-btn,
.login-card .primary-btn,
.success-card .primary-btn {
    background: var(--cinnamon);
    color: #fff;
}

.toolbar {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    margin-bottom: 14px;
}

.order-list {
    display: grid;
    gap: 12px;
}

.order-card {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.order-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.order-top h3 {
    margin: 0 0 4px;
    font-size: 1.05rem;
}

.badge {
    border-radius: 999px;
    padding: 6px 9px;
    background: #f2dcc3;
    color: var(--cinnamon-dark);
    font-size: 0.74rem;
    font-weight: 900;
}

.order-meta {
    display: grid;
    gap: 6px;
    margin: 12px 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.order-meta strong {
    color: var(--chocolate);
}

.order-actions {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    align-items: center;
}

.status-select {
    width: 100%;
    border: 1px solid var(--line);
    background: var(--glaze);
    color: var(--cinnamon-dark);
}

.empty {
    padding: 22px 14px;
    border: 1px dashed rgba(111, 53, 29, 0.25);
    border-radius: 8px;
    color: var(--muted);
    text-align: center;
    font-weight: 800;
}

@media (min-width: 700px) {
    body {
        background:
            radial-gradient(circle at top, rgba(184, 107, 50, 0.36), transparent 36%),
            #24120c;
    }
}
