/* App UI shared by /account/, /admin/ and the order page. Builds on styles.css variables. */
.app-wrap { max-width: 1100px; margin: 0 auto; padding: 2rem 1.25rem 4rem; }
.app-hero { background: linear-gradient(135deg, var(--mint-light), var(--mint-primary)); padding: 2.5rem 1.25rem; text-align: center; }
.app-hero h1 { font-family: var(--font-display); font-weight: 400; font-size: clamp(2.2rem, 5vw, 3.2rem); color: var(--ink); margin: 0; }
.app-hero p { margin-top: .5rem; color: var(--forest-dark); }
.app-bar { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; }
.app-bar .who { font-family: var(--font-label); letter-spacing: .04em; color: var(--forest-dark); }
.btn-sm { display: inline-block; font-family: var(--font-label); font-size: .85rem; letter-spacing: .05em; text-transform: uppercase; padding: .55rem 1.1rem; border-radius: 999px; border: 2px solid var(--sage-medium); background: var(--white); color: var(--forest-dark); cursor: pointer; text-decoration: none; }
.btn-sm:hover, .btn-sm:focus-visible { background: var(--mint-light); }
.btn-sm.primary { background: var(--sage-medium); color: var(--white); }
.btn-sm.primary:hover { background: var(--forest-dark); }
.btn-sm.danger { border-color: #a33; color: #a33; }
.btn-sm[disabled] { opacity: .5; cursor: not-allowed; }
.panel { background: var(--white); border: 1px solid #dfeeda; border-radius: 12px; padding: 1.25rem 1.4rem; box-shadow: 0 2px 10px rgba(47, 79, 44, .06); margin-bottom: 1rem; }
.panel h2, .panel h3 { font-family: var(--font-label); margin: 0 0 .75rem; color: var(--forest-dark); }
.muted { color: #5b6b58; font-size: .92rem; }
.notice { padding: .8rem 1rem; border-radius: 8px; margin: .75rem 0; font-size: .95rem; }
.notice.ok { background: #e7f5e1; border-left: 4px solid var(--sage-medium); }
.notice.err { background: #fbeaea; border-left: 4px solid #a33; color: #5a1a1a; }
.notice.info { background: #fff7e0; border-left: 4px solid #e0a800; }
.pill { display: inline-block; padding: .2rem .7rem; border-radius: 999px; font-family: var(--font-label); font-size: .78rem; letter-spacing: .04em; background: var(--mint-light); color: var(--forest-dark); border: 1px solid #cfe3c6; }
.pill.received { background: #eef3ff; border-color: #c9d6f5; }
.pill.confirmed, .pill.paid { background: #e7f5e1; }
.pill.baking { background: #fff1db; border-color: #f2d39c; }
.pill.ready { background: #d9f3cc; border-color: var(--sage-medium); }
.pill.completed { background: #eee; color: #555; }
.pill.cancelled { background: #fbeaea; color: #7a2222; border-color: #eac2c2; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .9rem 1rem; }
.field { display: flex; flex-direction: column; gap: .3rem; }
.field label { font-family: var(--font-label); font-size: .82rem; letter-spacing: .04em; color: var(--forest-dark); }
.field input, .field select, .field textarea { font: inherit; padding: .6rem .7rem; border: 1px solid #c9d8c2; border-radius: 8px; background: var(--white); color: var(--ink); }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid rgba(79, 122, 74, .35); border-color: var(--sage-medium); }
.field.full { grid-column: 1 / -1; }
.check { display: flex; gap: .5rem; align-items: center; font-size: .95rem; }
table.data { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.data th, table.data td { padding: .55rem .6rem; border-bottom: 1px solid #e4efe0; text-align: left; vertical-align: top; }
table.data th { font-family: var(--font-label); font-size: .78rem; letter-spacing: .05em; text-transform: uppercase; color: var(--forest-dark); background: var(--mint-light); }
table.data tr.clickable { cursor: pointer; }
table.data tr.clickable:hover { background: #f6fbf3; }
.table-scroll { overflow-x: auto; }
/* status progress */
.progress { display: flex; gap: 0; margin: 1rem 0 1.25rem; list-style: none; padding: 0; counter-reset: s; }
.progress li { flex: 1; text-align: center; position: relative; font-family: var(--font-label); font-size: .72rem; letter-spacing: .03em; color: #8a9a86; padding-top: 30px; }
.progress li::before { counter-increment: s; content: counter(s); position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 24px; height: 24px; border-radius: 50%; background: #e4efe0; color: #5b6b58; line-height: 24px; font-size: .75rem; z-index: 1; }
.progress li::after { content: ""; position: absolute; top: 11px; left: -50%; width: 100%; height: 3px; background: #e4efe0; }
.progress li:first-child::after { display: none; }
.progress li.done { color: var(--forest-dark); }
.progress li.done::before { background: var(--sage-medium); color: #fff; content: "✓"; }
.progress li.done::after { background: var(--sage-medium); }
.progress li.current::before { background: var(--forest-dark); color: #fff; box-shadow: 0 0 0 4px var(--mint-primary); }
.timeline { list-style: none; padding: 0; margin: 0; border-left: 2px solid #dfeeda; }
.timeline li { padding: 0 0 .8rem 1rem; position: relative; font-size: .92rem; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: .35rem; width: 10px; height: 10px; border-radius: 50%; background: var(--sage-medium); }
.thread { display: flex; flex-direction: column; gap: .5rem; margin-bottom: .75rem; }
.bubble { max-width: 85%; padding: .6rem .85rem; border-radius: 12px; font-size: .94rem; white-space: pre-wrap; }
.bubble.customer { align-self: flex-end; background: var(--mint-light); border: 1px solid #cfe3c6; }
.bubble.bakery { align-self: flex-start; background: #fff; border: 1px solid #e4efe0; }
.bubble .meta { display: block; font-size: .75rem; color: #6b7a68; margin-top: .25rem; }
.order-card { cursor: pointer; transition: transform var(--transition-fast), box-shadow var(--transition-fast); }
.order-card:hover, .order-card:focus-visible { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(47, 79, 44, .12); }
.order-card .row { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: baseline; }
.tabs-app { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1.25rem; }
.tabs-app button { font-family: var(--font-label); font-size: .85rem; letter-spacing: .04em; padding: .5rem 1rem; border-radius: 999px; border: 1px solid #cfe3c6; background: var(--white); cursor: pointer; }
.tabs-app button[aria-selected="true"] { background: var(--sage-medium); color: #fff; border-color: var(--sage-medium); }
.spinner { display: inline-block; width: 18px; height: 18px; border: 3px solid #cfe3c6; border-top-color: var(--sage-medium); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
dialog.app-dialog { border: none; border-radius: 14px; padding: 0; max-width: 760px; width: calc(100% - 2rem); box-shadow: 0 20px 60px rgba(0,0,0,.25); }
dialog.app-dialog::backdrop { background: rgba(26, 26, 26, .45); }
dialog.app-dialog .dlg-head { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.25rem; background: var(--mint-light); border-bottom: 1px solid #dfeeda; }
dialog.app-dialog .dlg-body { padding: 1.25rem; max-height: 75vh; overflow-y: auto; }
@media (max-width: 640px) { .progress li { font-size: 0; } .progress li.current { font-size: .7rem; } }

/* ===== PUBLIC SITE ADDITIONS (menu, order, events) ===== */

/* Announcement banner */
.announcement-banner { background: var(--sage-medium); color: #fff; padding: .75rem 1rem; text-align: center; position: relative; }
.announcement-content { max-width: 1100px; margin: 0 auto; display: flex; align-items: center; justify-content: center; gap: 1rem; }
.announcement-close { background: none; border: none; color: #fff; font-size: 1.5rem; cursor: pointer; padding: 0 .5rem; line-height: 1; }
.announcement-close:hover { opacity: .8; }

/* Toast notifications */
.toast { position: fixed; bottom: 2rem; right: 2rem; background: var(--forest-dark); color: #fff; padding: .9rem 1.2rem; border-radius: 8px; box-shadow: 0 4px 16px rgba(0,0,0,.25); opacity: 0; transform: translateY(20px); transition: all .3s; z-index: 9999; max-width: 400px; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.toast-ok { background: var(--sage-medium); }
.toast.toast-err { background: #c53030; }
.toast.toast-info { background: #2b6cb0; }

/* Social icon links */
.social-icon-link { display: inline-flex; width: 32px; height: 32px; align-items: center; justify-content: center; border-radius: 50%; background: var(--mint-light); color: var(--forest-dark); transition: background .2s; }
.social-icon-link:hover { background: var(--sage-medium); color: #fff; }
.social-icon-link svg { width: 18px; height: 18px; }

/* Cart count badge */
#cart-count { display: inline-block; background: var(--sage-medium); color: #fff; font-size: .75rem; padding: .15rem .4rem; border-radius: 999px; margin-left: .3rem; font-family: var(--font-label); min-width: 18px; text-align: center; }

/* Menu page tabs */
.tab-btn { font-family: var(--font-label); font-size: .9rem; letter-spacing: .04em; padding: .6rem 1.2rem; border-radius: 999px; border: 1px solid #cfe3c6; background: var(--white); cursor: pointer; transition: all .2s; }
.tab-btn[aria-selected="true"] { background: var(--sage-medium); color: #fff; border-color: var(--sage-medium); }
.tab-btn:hover:not([aria-selected="true"]) { background: var(--mint-light); }

/* Product cards */
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; margin-top: 1.5rem; }
.product-card { position: relative; }
.product-img { width: 100%; height: 220px; object-fit: cover; border-radius: 8px; margin-bottom: .75rem; }
.product-illustration { width: 100%; height: 180px; display: flex; align-items: center; justify-content: center; margin-bottom: .75rem; }
.product-illustration svg { max-width: 150px; max-height: 150px; }
.product-icing { font-size: .9rem; color: var(--sage-medium); margin: .5rem 0; }
.allergen-tags { display: flex; flex-wrap: wrap; gap: .4rem; margin: .75rem 0; }
.allergen-tag { font-size: .75rem; padding: .2rem .5rem; border-radius: 4px; background: #fff7e0; border: 1px solid #f2d39c; }
.shelf-life { font-size: .85rem; color: #666; margin: .5rem 0; }
.product-price { font-weight: 600; font-size: 1.1rem; color: var(--forest-dark); margin: .75rem 0; }
.product-options { margin: .75rem 0; }
.product-options select { width: 100%; padding: .5rem; border: 1px solid #c9d8c2; border-radius: 6px; font-size: .95rem; }
.product-actions { display: flex; gap: .5rem; margin-top: 1rem; align-items: center; }
.product-qty { width: 60px; padding: .5rem; border: 1px solid #c9d8c2; border-radius: 6px; text-align: center; }
.product-actions .btn { flex: 1; }

/* Order page cart */
.cart-line { display: grid; grid-template-columns: 1fr auto auto auto; gap: 1rem; align-items: center; padding: 1rem; border-bottom: 1px solid #e4efe0; }
.cart-line:last-of-type { border-bottom: none; }
.cart-line-info h3 { margin: 0; font-size: 1rem; }
.cart-line-option { font-size: .85rem; color: #666; margin: .25rem 0 0; }
.cart-line-price { font-size: .85rem; color: var(--sage-medium); margin: .25rem 0 0; }
.cart-line-qty { display: flex; gap: .5rem; align-items: center; }
.qty-btn { background: var(--mint-light); border: 1px solid #cfe3c6; width: 28px; height: 28px; border-radius: 4px; cursor: pointer; font-size: 1.1rem; line-height: 1; }
.qty-btn:hover { background: var(--sage-medium); color: #fff; }
.qty-display { min-width: 30px; text-align: center; font-weight: 600; }
.cart-line-total { font-weight: 600; font-size: 1.05rem; }
.cart-line-remove { background: none; border: none; font-size: 1.8rem; color: #999; cursor: pointer; width: 32px; height: 32px; line-height: 1; }
.cart-line-remove:hover { color: #c53030; }
.cart-subtotal { display: flex; justify-content: space-between; padding: 1rem; font-size: 1.2rem; font-weight: 600; background: var(--mint-light); border-radius: 8px; margin-top: 1rem; }

/* Event cards */
.event-card { margin-bottom: 1.5rem; }
.event-date { font-family: var(--font-label); color: var(--sage-medium); font-weight: 600; margin-bottom: .5rem; }
.event-title { margin: 0 0 .5rem; }
.event-location { font-weight: 600; margin: .5rem 0; }
.event-address, .event-time { font-size: .9rem; color: #666; margin: .25rem 0; }
.event-description { margin: .75rem 0; }

/* Responsive adjustments */
@media (max-width: 640px) {
  .cart-line { grid-template-columns: 1fr auto; gap: .75rem; }
  .cart-line-qty { grid-column: 1; }
  .cart-line-total { grid-column: 1; text-align: left; }
  .cart-line-remove { grid-column: 2; grid-row: 1 / span 3; }
  .toast { bottom: 1rem; right: 1rem; left: 1rem; max-width: none; }
}

/* Contact page */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
.custom-request-note { background: var(--mint-light); border-left: 4px solid var(--sage-medium); border-radius: 8px; padding: 1rem 1.25rem; margin-bottom: 1.5rem; }
.custom-request-note h3 { margin: 0 0 .4rem; font-size: 1.1rem; color: var(--forest-dark); }
.custom-request-note p { margin: 0; line-height: 1.6; }
@media (max-width: 768px) { .contact-grid { grid-template-columns: 1fr; gap: 2rem; } }

/* Mobile cart button (phones only; desktop shows the count next to "Order") */
.mobile-cart { display: none; position: relative; color: var(--forest-dark); margin-left: auto; margin-right: 1rem; padding: .35rem; border-radius: 50%; }
.mobile-cart .cart-badge { position: absolute; top: -4px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--sage-medium); color: #fff; font: 700 .72rem/20px var(--font-label); text-align: center; box-shadow: 0 0 0 2px #fff; }
.mobile-cart .cart-badge[hidden] { display: none; }
.mobile-cart.bump { animation: cart-bump .5s ease; }
@keyframes cart-bump { 30% { transform: scale(1.25); } 60% { transform: scale(.95); } }
@media (max-width: 768px) { .mobile-cart { display: inline-flex; } }
@media (prefers-reduced-motion: reduce) { .mobile-cart.bump { animation: none; } }

/* Promotions */
.promo-banner { background: #fff1db; border-bottom: 1px solid #f2d39c; color: var(--forest-dark); padding: .6rem 1rem; display: flex; justify-content: center; align-items: center; gap: .75rem; font-size: .95rem; text-align: center; }
.promo-banner-x { background: none; border: none; font-size: 1.4rem; line-height: 1; cursor: pointer; color: #7a5a1a; }
.promo-ribbon { display: inline-block; background: #fff1db; border: 1px solid #f2d39c; color: #7a4b00; font-family: var(--font-label); font-size: .78rem; letter-spacing: .03em; padding: .25rem .6rem; border-radius: 999px; margin: .25rem 0; }
.promo-box { display: flex; gap: .5rem; flex-wrap: wrap; align-items: flex-end; margin-top: 1rem; }
.promo-box .field { flex: 1; min-width: 180px; }
.promo-msg { width: 100%; margin: .25rem 0 0; font-size: .9rem; }
.cart-summary { margin-top: 1rem; background: var(--mint-light); border-radius: 8px; padding: .75rem 1rem; }
.cart-summary .row { display: flex; justify-content: space-between; padding: .25rem 0; }
.cart-summary .row.total { font-size: 1.2rem; font-weight: 700; border-top: 1px solid #cfe3c6; margin-top: .35rem; padding-top: .5rem; }
.cart-summary .row.discount { color: var(--sage-medium); font-weight: 600; }
.cart-summary .hint { font-size: .88rem; color: #5b6b58; margin: .25rem 0 0; }

/* Custom cake form */
.cake-fieldset { border: 1px solid #dfeeda; border-radius: 12px; padding: 1rem 1.25rem .5rem; margin: 0 0 1.25rem; }
.cake-fieldset legend { font-family: var(--font-label); letter-spacing: .05em; text-transform: uppercase; font-size: .85rem; color: var(--forest-dark); padding: 0 .4rem; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .4rem .75rem; }
.check-grid .check { font-size: .92rem; }
.check-grid input { width: auto; }
.cake-details th { width: 32%; background: #f6fbf3; text-transform: none; font-size: .85rem; }
.order-quick { background: #f6fbf3; border: 1px solid #dfeeda; border-radius: 10px; padding: .9rem 1rem; margin-bottom: 1rem; }
.order-quick-status { font-family: var(--font-label); margin-bottom: .6rem; display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.order-quick-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.cat-row { display: grid; grid-template-columns: auto 1fr auto auto auto; gap: .6rem; align-items: center; padding: .5rem 0; border-bottom: 1px solid #e4efe0; }
.cat-row input[type=text], .cat-add input { font: inherit; padding: .45rem .6rem; border: 1px solid #c9d8c2; border-radius: 8px; }
.cat-move { display: flex; gap: .25rem; }
.cat-move .btn-sm { padding: .25rem .55rem; }
.cat-add { display: flex; gap: .5rem; }
.cat-add input { flex: 1; }
.dlg-x { background: none; border: none; font-size: 1.5rem; cursor: pointer; }
@media (max-width: 640px) { .cat-row { grid-template-columns: auto 1fr; } }
.promo-card-head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; flex-wrap: wrap; }
.promo-code-big { font-family: var(--font-label); font-size: 1.2rem; letter-spacing: .08em; background: #fff1db; border: 1px dashed #e0a800; padding: .3rem .75rem; border-radius: 8px; }
.promo-link-row { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.promo-link-row input { flex: 1; min-width: 220px; font: inherit; font-size: .85rem; padding: .45rem .6rem; border: 1px solid #c9d8c2; border-radius: 8px; background: #f6fbf3; }
.promo-item-row { display: flex; gap: .75rem; align-items: center; justify-content: space-between; padding: .35rem 0; border-bottom: 1px solid #e4efe0; }
.promo-item-row input { width: 4.5rem; padding: .3rem; }
#pr-add-item { flex: 1; font: inherit; padding: .45rem; border: 1px solid #c9d8c2; border-radius: 8px; }
.qty-stepper { display: inline-flex; align-items: center; gap: .35rem; border: 1px solid #c9d8c2; border-radius: 8px; padding: .25rem; }
.qty-stepper .qty-btn { width: 34px; height: 34px; }
.qty-btn[disabled] { opacity: .4; cursor: not-allowed; }
.qty-btn:focus-visible, .mobile-cart:focus-visible { outline: 3px solid rgba(79, 122, 74, .5); outline-offset: 2px; }
.soon-badge { display: inline-block; vertical-align: middle; font-family: var(--font-label); font-size: .7rem; letter-spacing: .05em; text-transform: uppercase; background: #fff1db; border: 1px solid #f2d39c; color: #7a4b00; padding: .15rem .5rem; border-radius: 999px; }
.category-card.coming-soon { opacity: .85; }
.check-grid .check span { font-family: inherit; letter-spacing: 0; text-transform: none; font-weight: 400; }
.form-group small.muted { display: block; margin-top: .3rem; font-size: .85rem; }
.check-grid label.check { display: flex; gap: .5rem; align-items: center; margin: 0; }

/* Calendar date picker */
.cal { max-width: 360px; background: var(--white); border: 1px solid #dfeeda; border-radius: 12px; padding: .75rem; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .25rem; }
.cal-title { margin: 0; font-family: var(--font-label); font-size: 1rem; color: var(--forest-dark); }
.cal-nav { background: var(--mint-light); border: 1px solid #cfe3c6; width: 36px; height: 36px; border-radius: 50%; font-size: 1.3rem; line-height: 1; cursor: pointer; color: var(--forest-dark); }
.cal-nav[disabled] { opacity: .35; cursor: not-allowed; }
.cal-grid { width: 100%; border-collapse: collapse; table-layout: fixed; }
.cal-grid th { font-family: var(--font-label); font-size: .75rem; color: #5b6b58; padding: .3rem 0; font-weight: 400; }
.cal-grid td { padding: 2px; text-align: center; }
.cal-day { width: 100%; aspect-ratio: 1; max-width: 44px; min-height: 36px; border-radius: 50%; border: 1px solid transparent; background: #e7f5e1; color: var(--forest-dark); font: 600 .95rem var(--font-label); cursor: pointer; }
.cal-day:hover:not(.off) { border-color: var(--sage-medium); }
.cal-day:focus-visible { outline: 3px solid rgba(79, 122, 74, .55); outline-offset: 1px; }
.cal-day.selected { background: var(--forest-dark); color: #fff; }
.cal-day.off { background: transparent; color: #a8b3a5; cursor: not-allowed; font-weight: 400; }
.cal-day.off.full, .cal-day.off.no-cakes, .cal-day.off.closed { text-decoration: line-through; color: #b98b8b; }
.cal-legend { font-size: .8rem; color: #5b6b58; margin: .4rem 0 0; display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.cal-key { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-left: .3rem; }
.cal-key.open { background: #e7f5e1; border: 1px solid #cfe3c6; }
.cal-key.booked { background: #fff; border: 1px solid #b98b8b; }
.cal-picked { margin: .5rem 0 0; font-size: .92rem; }
.cal-error { outline: 2px solid #a33; }
.field-label { font-family: var(--font-label); font-size: .82rem; letter-spacing: .04em; color: var(--forest-dark); }
.photo-list { list-style: none; padding: 0; margin: .5rem 0 0; display: grid; gap: .5rem; }
.photo-item { display: grid; grid-template-columns: 56px 1fr auto; gap: .6rem; align-items: center; background: #f6fbf3; border: 1px solid #dfeeda; border-radius: 8px; padding: .4rem; font-size: .9rem; }
.photo-item img, .photo-ph { width: 56px; height: 56px; object-fit: cover; border-radius: 6px; display: flex; align-items: center; justify-content: center; background: #fff; }
.photo-item.error { border-color: #eac2c2; background: #fbeaea; }
.photo-name { overflow-wrap: anywhere; }
.inq-photos { display: flex; gap: .5rem; flex-wrap: wrap; }
.inq-photos a img { width: 110px; height: 110px; object-fit: cover; border-radius: 8px; border: 1px solid #dfeeda; }
