:root{--cp-bg:#f4eee7;--cp-card:#fffaf5;--cp-coffee:#6f4e37;--cp-dark:#2e211a;--cp-accent:#b97845;--cp-ok:#277a4b;--cp-danger:#a33a32;--cp-shadow:0 12px 30px rgba(66,42,27,.13)}
.coffeepay-root{font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--cp-dark);min-height:80vh;background:radial-gradient(circle at top right,#fff8ef,var(--cp-bg));border-radius:24px;overflow:hidden}
.cp-shell{min-height:80vh;display:flex;flex-direction:column}.cp-header{display:flex;align-items:center;justify-content:space-between;padding:22px 28px;background:rgba(255,250,245,.88);backdrop-filter:blur(12px);border-bottom:1px solid rgba(111,78,55,.12)}
.cp-brand{font-size:clamp(1.35rem,3vw,2rem);font-weight:850}.cp-subtitle{opacity:.7}.cp-status{padding:10px 16px;border-radius:999px;font-weight:750;background:#eee}.cp-status.is-ready{background:#dff5e8;color:var(--cp-ok)}.cp-status.is-offline{background:#fde3df;color:var(--cp-danger)}
.cp-main{padding:24px;flex:1}.cp-section-title{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:18px}.cp-section-title h1{margin:0;font-size:clamp(1.5rem,4vw,2.4rem)}.cp-search{width:min(360px,45vw);font-size:1.1rem;padding:14px 18px;border:2px solid #dcc9ba;border-radius:18px;background:white}
.cp-user-grid,.cp-product-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:18px}.cp-user-card,.cp-product-card{min-height:180px;border:0;border-radius:24px;background:var(--cp-card);box-shadow:var(--cp-shadow);padding:20px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;font-size:1.05rem;color:inherit;cursor:pointer;transition:transform .15s ease,box-shadow .15s ease}.cp-user-card:hover,.cp-user-card:focus,.cp-product-card:hover,.cp-product-card:focus{transform:translateY(-3px);box-shadow:0 16px 38px rgba(66,42,27,.18)}
.cp-user-card img,.cp-avatar{width:78px;height:78px;border-radius:50%;object-fit:cover}.cp-avatar{display:grid;place-items:center;background:linear-gradient(135deg,#dca875,#8a5c3d);color:white;font-size:1.5rem;font-weight:800}.cp-user-card small,.cp-product-card small{opacity:.68;text-align:center}.cp-product-icon{font-size:3.2rem}.cp-product-card b{font-size:1.15rem;color:var(--cp-coffee)}.cp-product-card:disabled{opacity:.45;cursor:not-allowed;transform:none}
.cp-pin-panel{max-width:440px;margin:0 auto;text-align:center}.cp-back{display:block;width:fit-content;appearance:none;border:0;border-radius:16px;padding:14px 20px;margin:0 0 20px;background:#f0efed;color:var(--cp-dark);box-shadow:var(--cp-shadow);font:inherit;font-weight:750;line-height:1.1;cursor:pointer;transition:transform .15s ease,box-shadow .15s ease,opacity .15s ease}.cp-back:hover,.cp-back:focus{transform:translateY(-1px)}.cp-back:disabled{cursor:not-allowed;opacity:.55;transform:none}.cp-pin-dots{font-size:2rem;letter-spacing:.35em;margin:22px}.cp-keypad{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}.cp-keypad button{aspect-ratio:1.2;border:0;border-radius:22px;background:white;box-shadow:var(--cp-shadow);font-size:2rem;font-weight:750;color:var(--cp-dark)}
.cp-accountbar{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:16px 20px;margin-bottom:22px;background:white;border-radius:20px;box-shadow:var(--cp-shadow)}.cp-account-details{display:flex;flex-direction:column;gap:3px}.cp-account-actions{display:flex;flex-direction:row;align-items:center;gap:10px}.cp-accountbar button,.cp-modal-actions button,.cp-order-actions button,.cp-primary,.cp-secondary{appearance:none;border:0;border-radius:16px;padding:14px 20px;font:inherit;font-weight:750;line-height:1.1;cursor:pointer;transition:transform .15s ease,box-shadow .15s ease,opacity .15s ease}.cp-accountbar button:hover,.cp-modal-actions button:hover,.cp-order-actions button:hover{transform:translateY(-1px)}.cp-accountbar button:disabled,.cp-modal-actions button:disabled,.cp-order-actions button:disabled{cursor:not-allowed;opacity:.55;transform:none}.cp-primary{background:var(--cp-coffee)!important;color:white!important;box-shadow:0 8px 18px rgba(65,41,27,.2)}.cp-secondary{background:#f0efed!important;color:var(--cp-dark)!important}
.cp-order-state{text-align:center;padding:6vh 20px}.cp-cup{font-size:6rem;animation:cpPulse 1.4s infinite}.cp-order-state h1{font-size:clamp(2rem,5vw,3.2rem)}@keyframes cpPulse{50%{transform:scale(1.06)}}
.cp-modal-backdrop{position:fixed;inset:0;background:rgba(24,16,12,.55);display:grid;place-items:center;padding:20px;z-index:99999}.cp-modal{width:min(430px,94vw);background:var(--cp-card);border-radius:28px;padding:28px;text-align:center;box-shadow:0 24px 70px rgba(0,0,0,.3)}.cp-modal-actions{display:flex;justify-content:center;gap:12px;margin-top:22px}.cp-message,.cp-notice,.cp-warning{margin:16px 24px 0;padding:14px 18px;border-radius:16px}.cp-message{background:#fde3df;color:var(--cp-danger)}.cp-notice{background:#dff5e8;color:var(--cp-ok);font-weight:700}.cp-warning{background:#fff0c7}.cp-loading{padding:60px;text-align:center}.coffeepay-leaderboard{background:var(--cp-card);padding:20px;border-radius:20px}.coffeepay-leaderboard li{display:flex;justify-content:space-between;padding:10px}
@media(max-width:680px){.cp-header{padding:16px}.cp-main{padding:16px}.cp-section-title{align-items:stretch;flex-direction:column}.cp-search{width:100%;box-sizing:border-box}.cp-user-grid,.cp-product-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.cp-user-card,.cp-product-card{min-height:155px;padding:14px}.cp-accountbar{position:sticky;top:0;z-index:10;align-items:stretch}.cp-account-actions{flex-direction:column}.cp-account-actions button{width:100%}.cp-status{font-size:.85rem}.cp-modal-actions{flex-direction:column}.cp-profile-modal{padding:22px}}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
@media(prefers-color-scheme:dark){:root{--cp-bg:#19130f;--cp-card:#2a2019;--cp-dark:#f7eadf;--cp-shadow:0 12px 30px rgba(0,0,0,.35)}.cp-header,.cp-user-card,.cp-product-card,.cp-accountbar,.cp-keypad button,.cp-search{background:#2a2019;color:#f7eadf}.cp-search{border-color:#604833}.cp-modal{background:#2a2019}.cp-secondary{background:#3a2e27!important;color:#f7eadf!important}.cp-field input{background:#211914;color:#f7eadf;border-color:#604833}}
.cp-status.is-busy{background:#fff0c7;color:#775400}.cp-machine-reason{display:block;color:var(--cp-danger);margin-top:6px}.cp-order-state{max-width:820px;margin:0 auto}.cp-order-product{font-size:1.25rem;font-weight:700}.cp-order-error{max-width:650px;margin:12px auto;padding:14px 18px;border-radius:16px;background:#fde3df;color:var(--cp-danger);font-weight:650}.cp-progress{width:min(760px,100%);display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px;margin:28px auto}.cp-progress-step{display:flex;flex-direction:column;align-items:center;gap:7px;opacity:.48}.cp-progress-step span{width:38px;height:38px;border-radius:50%;display:grid;place-items:center;background:rgba(111,78,55,.13);font-weight:800}.cp-progress-step.is-active,.cp-progress-step.is-done{opacity:1}.cp-progress-step.is-active span{background:var(--cp-accent);color:#fff;box-shadow:0 0 0 7px rgba(111,78,55,.13)}.cp-progress-step.is-done span{background:#16803c;color:#fff}.cp-progress-step small{font-size:.78rem}.cp-live-machine{width:min(600px,100%);margin:20px auto;padding:18px;border-radius:20px;background:rgba(111,78,55,.08)}.cp-signal-list{display:flex;gap:8px;justify-content:center;flex-wrap:wrap;margin-top:10px}.cp-signal{display:inline-flex;padding:7px 11px;border-radius:999px;background:#fff0c7;color:#775400;font-size:.88rem;font-weight:700}.cp-detail{font-size:.93rem;opacity:.82}.cp-uncertain-warning{max-width:650px;margin:18px auto;padding:16px 18px;border-radius:16px;background:#fff0c7;color:#684900;font-weight:700}.cp-order-actions{display:flex;justify-content:center;gap:12px;flex-wrap:wrap;margin-top:24px}.cp-confirm-note{font-size:.9rem;opacity:.78}.cp-order-completed .cp-cup{animation:none}.cp-order-failed .cp-cup,.cp-order-timed_out .cp-cup,.cp-order-uncertain .cp-cup{animation:none}
@media(max-width:680px){.cp-progress{grid-template-columns:repeat(3,minmax(0,1fr));row-gap:18px}.cp-progress-step small{font-size:.72rem}.cp-order-actions{flex-direction:column}.cp-order-actions button{width:100%}}

.cp-profile-modal{width:min(520px,94vw);text-align:left;max-height:min(88vh,760px);overflow:auto}.cp-profile-modal h2{text-align:center;margin-top:0}.cp-profile-hint{text-align:center;opacity:.78;margin-bottom:22px}.cp-field{display:flex;flex-direction:column;gap:7px;margin:14px 0;font-weight:700}.cp-field input{box-sizing:border-box;width:100%;border:2px solid #dcc9ba;border-radius:16px;padding:14px 16px;background:#fff;color:var(--cp-dark);font:inherit;font-size:1.05rem}.cp-field input:focus{outline:3px solid rgba(185,120,69,.2);border-color:var(--cp-accent)}.cp-profile-divider{display:flex;align-items:center;gap:12px;margin:24px 0 8px;font-weight:800;color:var(--cp-coffee)}.cp-profile-divider:before,.cp-profile-divider:after{content:"";height:1px;flex:1;background:rgba(111,78,55,.18)}.cp-profile-modal .cp-order-error{margin:16px 0}.cp-profile-modal .cp-modal-actions{position:sticky;bottom:-28px;background:var(--cp-card);padding:18px 0 2px}
@media(prefers-color-scheme:dark){.cp-field input{background:#211914;color:#f7eadf;border-color:#604833}.cp-profile-modal .cp-modal-actions{background:var(--cp-card)}}

.cp-statistics-modal{box-sizing:border-box;width:min(700px,calc(100vw - 48px));max-width:700px;max-height:min(90vh,900px);overflow-x:hidden;overflow-y:auto;text-align:left;padding:24px}.cp-statistics-header{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:20px}.cp-statistics-header h2{margin:0;font-size:clamp(1.7rem,4vw,2.35rem)}.cp-statistics-header p{margin:5px 0 0;opacity:.68}.cp-stats-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:8px 0 24px}.cp-stat-card{display:flex;min-width:0;flex-direction:column;gap:6px;padding:15px 10px;border-radius:18px;background:rgba(111,78,55,.08);text-align:center}.cp-stat-card strong{font-size:clamp(1.3rem,3vw,1.85rem);color:var(--cp-coffee);overflow-wrap:anywhere}.cp-stat-card span{font-size:.86rem;opacity:.72}.cp-order-log{display:flex;min-width:0;flex-direction:column;gap:8px}.cp-order-log-row{display:grid;min-width:0;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"product price" "time status";align-items:center;gap:8px 14px;padding:13px 15px;border-radius:16px;background:rgba(111,78,55,.06)}.cp-order-log-time{grid-area:time;min-width:0;font-size:.86rem;opacity:.78;overflow-wrap:anywhere}.cp-order-log-product{grid-area:product;display:flex;min-width:0;align-items:center;gap:10px}.cp-order-log-product>span{flex:0 0 auto;font-size:1.4rem}.cp-order-log-product div{display:flex;min-width:0;flex-direction:column}.cp-order-log-product strong,.cp-order-log-product small{overflow-wrap:anywhere}.cp-order-log-product small{opacity:.65}.cp-order-log-status{grid-area:status;justify-self:end;max-width:100%;padding:6px 10px;border-radius:999px;background:#eee;font-size:.8rem;font-weight:750;text-align:center;overflow-wrap:anywhere}.cp-order-log-status.is-completed,.cp-order-log-status.is-completed_unverified{background:#dff5e8;color:var(--cp-ok)}.cp-order-log-status.is-failed,.cp-order-log-status.is-timed_out{background:#fde3df;color:var(--cp-danger)}.cp-order-log-status.is-uncertain,.cp-order-log-status.is-manual_review{background:#fff0c7;color:#775400}.cp-order-log-price{grid-area:price;justify-self:end;text-align:right;font-weight:750;white-space:nowrap}.cp-empty-state{text-align:center;padding:30px;opacity:.7}
@media(max-width:620px){.cp-statistics-modal{width:calc(100vw - 24px);padding:18px;border-radius:22px}.cp-stats-summary{grid-template-columns:1fr;gap:8px}.cp-stat-card{padding:12px}.cp-statistics-header{flex-direction:column;gap:12px}.cp-statistics-header button{width:100%}.cp-order-log-row{grid-template-columns:minmax(0,1fr) auto;gap:7px 10px;padding:12px}.cp-order-log-status{font-size:.76rem;padding:5px 8px}}
@media(max-width:390px){.cp-order-log-row{grid-template-columns:1fr;grid-template-areas:"product" "time" "status" "price"}.cp-order-log-status,.cp-order-log-price{justify-self:start;text-align:left}.cp-order-log-price{white-space:normal}}
@media(prefers-color-scheme:dark){.cp-stat-card,.cp-order-log-row{background:rgba(255,255,255,.06)}}

.cp-header-actions{display:flex;align-items:center;justify-content:flex-end;gap:12px}.cp-language-switcher{display:inline-flex;align-items:center;padding:3px;border:1px solid rgba(111,78,55,.2);border-radius:999px;background:rgba(255,255,255,.72);box-shadow:0 4px 14px rgba(66,42,27,.08)}.cp-language-button{min-width:42px;min-height:36px;padding:6px 10px;border:0;border-radius:999px;background:transparent;color:var(--cp-dark);font:inherit;font-size:.8rem;font-weight:850;line-height:1;cursor:pointer;transition:background .15s ease,color .15s ease,transform .15s ease}.cp-language-button:hover,.cp-language-button:focus-visible{background:rgba(111,78,55,.1);outline:none}.cp-language-button:focus-visible{box-shadow:0 0 0 3px rgba(185,120,69,.24)}.cp-language-button.is-active{background:var(--cp-coffee);color:#fff;box-shadow:0 3px 9px rgba(66,42,27,.2)}.cp-language-button:active{transform:scale(.96)}
@media(max-width:620px){.cp-header{align-items:flex-start;gap:12px}.cp-header-actions{flex-direction:column-reverse;align-items:flex-end;gap:8px}.cp-language-switcher{padding:2px}.cp-language-button{min-width:38px;min-height:32px;padding:5px 8px;font-size:.74rem}.cp-status{padding:8px 13px}}
@media(prefers-color-scheme:dark){.cp-language-switcher{background:rgba(30,23,19,.78);border-color:rgba(255,255,255,.14)}.cp-language-button{color:#f7eadf}.cp-language-button:hover,.cp-language-button:focus-visible{background:rgba(255,255,255,.09)}.cp-language-button.is-active{background:#b97845;color:#fff}}

.cp-header-tools{display:flex;align-items:center;gap:9px}.cp-error-log-button{position:relative;display:grid;place-items:center;width:44px;height:44px;padding:0;border:1px solid rgba(111,78,55,.2);border-radius:50%;background:rgba(255,255,255,.72);color:var(--cp-dark);box-shadow:0 4px 14px rgba(66,42,27,.08);cursor:pointer;transition:transform .15s ease,background .15s ease,color .15s ease,box-shadow .15s ease}.cp-error-log-button:hover,.cp-error-log-button:focus-visible{transform:translateY(-1px);background:rgba(111,78,55,.1);outline:none;box-shadow:0 0 0 3px rgba(185,120,69,.2),0 5px 15px rgba(66,42,27,.1)}.cp-error-log-button.has-errors{background:#fde3df;color:var(--cp-danger);border-color:rgba(163,58,50,.28)}.cp-error-log-icon{font-size:1.25rem;font-weight:900;line-height:1}.cp-error-log-badge{position:absolute;top:-6px;right:-7px;min-width:20px;height:20px;padding:0 4px;display:grid;place-items:center;border:2px solid var(--cp-card);border-radius:999px;background:var(--cp-danger);color:#fff;font-size:.68rem;font-weight:900;line-height:1}.cp-error-log-modal{box-sizing:border-box;width:min(680px,calc(100vw - 32px));max-height:min(90vh,880px);overflow:auto;text-align:left;padding:24px}.cp-error-log-header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:18px}.cp-error-log-header h2{margin:0;font-size:clamp(1.65rem,4vw,2.3rem)}.cp-error-log-header p{margin:5px 0 0;opacity:.7}.cp-error-log-list{display:flex;flex-direction:column;gap:12px}.cp-error-entry{padding:16px;border:1px solid rgba(111,78,55,.13);border-left:5px solid #aaa;border-radius:18px;background:rgba(111,78,55,.045)}.cp-error-entry.is-active.severity-warning{border-left-color:#b87916}.cp-error-entry.is-active.severity-error{border-left-color:var(--cp-danger)}.cp-error-entry.is-active.severity-critical{border-left-color:#7d1e18;background:rgba(163,58,50,.07)}.cp-error-entry.is-resolved,.cp-error-entry.is-acknowledged{opacity:.72;border-left-color:var(--cp-ok)}.cp-error-entry-top{display:flex;align-items:flex-start;justify-content:space-between;gap:14px}.cp-error-entry-title{display:flex;align-items:flex-start;gap:10px;min-width:0}.cp-error-entry-title>span{font-size:1.2rem;flex:0 0 auto}.cp-error-entry-title div{display:flex;min-width:0;flex-direction:column;gap:3px}.cp-error-entry-title strong{overflow-wrap:anywhere}.cp-error-entry-title small{opacity:.65}.cp-error-entry p{margin:12px 0 8px;line-height:1.45}.cp-error-status{flex:0 0 auto;padding:6px 10px;border-radius:999px;background:#eee;font-size:.75rem;font-weight:800;text-align:center}.cp-error-status.is-active{background:#fde3df;color:var(--cp-danger)}.cp-error-status.is-resolved,.cp-error-status.is-acknowledged{background:#dff5e8;color:var(--cp-ok)}.cp-error-context{font-weight:700}.cp-error-occurrences{display:block;margin-top:7px;opacity:.68}.cp-auto-resolve-note,.cp-login-to-ack{margin-top:13px;padding:11px 13px;border-radius:13px;background:#fff0c7;color:#684900;font-size:.88rem;font-weight:700}.cp-error-ack-button{margin-top:13px;width:100%}.cp-error-log-modal .cp-loading{padding:28px 10px}
@media(max-width:620px){.cp-header-tools{gap:7px}.cp-error-log-button{width:39px;height:39px}.cp-error-log-modal{width:calc(100vw - 20px);padding:18px;border-radius:22px}.cp-error-log-header{flex-direction:column}.cp-error-log-header button{width:100%}.cp-error-entry-top{flex-direction:column}.cp-error-status{align-self:flex-start}}
@media(prefers-color-scheme:dark){.cp-error-log-button{background:rgba(30,23,19,.78);border-color:rgba(255,255,255,.14);color:#f7eadf}.cp-error-log-button:hover,.cp-error-log-button:focus-visible{background:rgba(255,255,255,.09)}.cp-error-entry{background:rgba(255,255,255,.045);border-color:rgba(255,255,255,.1)}.cp-error-log-badge{border-color:var(--cp-card)}.cp-auto-resolve-note,.cp-login-to-ack{background:rgba(255,190,50,.16);color:#ffe4a0}}

.cp-order-block-banner{box-sizing:border-box;width:calc(100% - 48px);margin:16px 24px 0;padding:14px 18px;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:14px;border:1px solid rgba(163,58,50,.28);border-radius:18px;background:#fde3df;color:var(--cp-danger);text-align:left;font:inherit;cursor:pointer;box-shadow:0 7px 18px rgba(163,58,50,.08)}.cp-order-block-banner:hover,.cp-order-block-banner:focus-visible{outline:none;transform:translateY(-1px);box-shadow:0 0 0 3px rgba(163,58,50,.14),0 9px 22px rgba(163,58,50,.12)}.cp-order-block-icon{font-size:1.45rem;font-weight:900}.cp-order-block-banner>span:nth-child(2){display:flex;min-width:0;flex-direction:column;gap:3px}.cp-order-block-banner strong{font-size:1rem}.cp-order-block-banner small{font-size:.88rem;line-height:1.35;overflow-wrap:anywhere}.cp-order-block-banner b{font-size:.84rem;white-space:nowrap}.cp-product-card:disabled{filter:saturate(.55)}
@media(max-width:680px){.cp-order-block-banner{width:calc(100% - 32px);margin:12px 16px 0;grid-template-columns:auto minmax(0,1fr);padding:13px 14px}.cp-order-block-banner b{grid-column:2;white-space:normal}}
@media(prefers-color-scheme:dark){.cp-order-block-banner{background:rgba(163,58,50,.2);color:#ffb9b3;border-color:rgba(255,150,140,.25)}}

.cp-nonblocking-error-note {
  margin-top: 10px;
  padding: 9px 12px;
  border-radius: 12px;
  background: rgba(35, 120, 75, .10);
  color: var(--cp-success, #23784b);
  font-size: .9rem;
  font-weight: 650;
}
