:root{
  font-family: Inter, ui-rounded, "SF Pro Rounded", "SF Pro Display", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color:#171717;
  background:#f7f7f5;
  font-synthesis:none;
  --surface:#ffffff;
  --surface-soft:#f1f1ee;
  --ink:#171717;
  --muted:#70706c;
  --border:#e4e4df;
  --coffee:#6f4e37;
  --coffee-soft:#f3e9e2;
  --water:#2674d9;
  --water-soft:#e8f2ff;
  --snacks:#d86a24;
  --snacks-soft:#fff0e6;
  --success:#1f7a4c;
  --success-soft:#e8f6ee;
  --waiting:#a26414;
  --waiting-soft:#fff5db;
  --shadow:0 18px 50px rgba(20,20,18,.07);
}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{
  margin:0;
  min-height:100%;
  background:
    radial-gradient(circle at 90% 0%, rgba(38,116,217,.055), transparent 28rem),
    radial-gradient(circle at 0% 20%, rgba(216,106,36,.045), transparent 26rem),
    #f7f7f5;
}
button{font:inherit;-webkit-tap-highlight-color:transparent}
button:focus-visible{outline:4px solid rgba(38,116,217,.28);outline-offset:3px}
button:active{transform:translateY(1px)}
.app-shell{
  max-width:1040px;
  margin:0 auto;
  padding:clamp(20px,4vw,42px) clamp(18px,4vw,42px) 44px;
}
.topbar,.brand-block,.bottom-actions,.section-heading{
  display:flex;align-items:center;justify-content:space-between;gap:16px;
}
.topbar{margin-bottom:28px}
.brand-block{justify-content:flex-start}
.brand-mark{
  width:52px;height:52px;border-radius:17px;display:grid;place-items:center;
  background:#171717;color:#fff;font-weight:900;letter-spacing:-.03em;
  box-shadow:0 8px 24px rgba(17,17,17,.14)
}
.eyebrow{
  margin:0 0 5px;
  font-size:.76rem;
  font-weight:850;
  letter-spacing:.16em;
  color:var(--muted);
}
h1,h2,p{margin-top:0}
h1{margin-bottom:0;font-size:clamp(1.65rem,4vw,2.7rem);letter-spacing:-.045em}
h2{margin-bottom:0;font-size:clamp(1.65rem,3.2vw,2.3rem);letter-spacing:-.04em}
.hero-panel,.receiver-summary{
  display:flex;align-items:flex-end;justify-content:space-between;gap:24px;
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:28px;
  padding:clamp(22px,4vw,34px);
  box-shadow:var(--shadow);
  margin-bottom:20px;
}
.hero-kicker{font-weight:800;color:var(--muted);margin-bottom:5px}
.hero-copy,.receiver-summary p{color:var(--muted);max-width:590px;margin:9px 0 0;line-height:1.5}
.ready-pill{
  flex:0 0 auto;display:flex;align-items:center;gap:9px;
  background:var(--success-soft);color:var(--success);
  border-radius:999px;padding:10px 14px;font-weight:800;font-size:.92rem;
}
.ready-dot{width:9px;height:9px;border-radius:50%;background:currentColor;box-shadow:0 0 0 5px rgba(31,122,76,.10)}
.request-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}
.request-button{
  position:relative;
  border:1px solid transparent;
  border-radius:28px;
  min-height:250px;
  padding:28px 20px;
  display:flex;flex-direction:column;justify-content:space-between;align-items:flex-start;
  text-align:left;
  overflow:hidden;
  box-shadow:var(--shadow);
  transition:transform .14s ease,box-shadow .14s ease,opacity .18s ease;
}
.request-button::after{
  content:"";
  position:absolute;right:-40px;top:-38px;width:150px;height:150px;border-radius:50%;
  background:rgba(255,255,255,.24)
}
.request-button .icon{
  position:relative;z-index:1;
  width:78px;height:78px;border-radius:23px;display:grid;place-items:center;
  font-size:2.85rem;background:rgba(255,255,255,.78);backdrop-filter:blur(8px)
}
.request-button .button-copy{position:relative;z-index:1;display:grid;gap:4px}
.request-button .button-title{font-size:clamp(1.45rem,2.7vw,2rem);font-weight:900;letter-spacing:-.04em}
.request-button .button-subtitle{font-size:.94rem;font-weight:750;opacity:.72}
.request-button.coffee{background:var(--coffee-soft);color:var(--coffee);border-color:#ead7ca}
.request-button.water{background:var(--water-soft);color:var(--water);border-color:#d5e8ff}
.request-button.snacks{background:var(--snacks-soft);color:var(--snacks);border-color:#ffe0cc}
.request-button[disabled]{opacity:.48;filter:saturate(.55)}
@media(hover:hover) and (pointer:fine){
  .request-button:not([disabled]):hover{transform:translateY(-4px);box-shadow:0 24px 58px rgba(20,20,18,.11)}
}
.status-card{
  margin-top:20px;background:var(--surface);border-radius:24px;padding:20px;
  display:flex;gap:16px;align-items:center;border:1px solid var(--border);box-shadow:var(--shadow)
}
.status-icon{
  flex:0 0 auto;width:52px;height:52px;border-radius:17px;display:grid;place-items:center;
  background:var(--success-soft);color:var(--success);font-size:1.5rem;font-weight:900
}
.status-icon.waiting{background:var(--waiting-soft);color:var(--waiting)}
.status-copy{display:grid;gap:3px;min-width:0}
.status-label{font-size:.72rem;font-weight:850;letter-spacing:.14em;color:var(--muted)}
#senderStatus{font-size:1.22rem}
#senderDetail{color:var(--muted);line-height:1.42}
.secondary,.primary,.text-button,.action-button{
  min-height:48px;border-radius:15px;padding:10px 16px;font-weight:800;border:1px solid var(--border);
  transition:background .14s ease,transform .12s ease,opacity .14s ease
}
.secondary{background:rgba(255,255,255,.88);color:var(--ink)}
.primary{background:var(--ink);color:#fff;border-color:var(--ink);min-width:120px}
.small{min-height:44px}
.text-button{background:transparent;border:0;color:var(--water);padding-inline:8px}
.bottom-actions{margin-top:22px;justify-content:flex-start;flex-wrap:wrap}
.receiver-summary{align-items:center}
.count-card{
  min-width:108px;min-height:108px;border-radius:26px;background:#171717;color:#fff;
  display:grid;place-items:center;align-content:center;box-shadow:0 12px 34px rgba(17,17,17,.14)
}
.count-card span{font-size:2.35rem;font-weight:900;line-height:1}
.count-card small{margin-top:4px;color:#d4d4d4;font-weight:750}
.receiver-list,.history-list{display:grid;gap:14px;margin-top:16px}
.request-card,.history-card{
  background:var(--surface);border:1px solid var(--border);border-radius:22px;padding:20px;box-shadow:0 10px 30px rgba(20,20,18,.045)
}
.request-card{display:grid;grid-template-columns:1fr auto;gap:18px;align-items:center}
.request-title{display:flex;gap:12px;align-items:center;font-size:1.22rem;font-weight:900}
.request-title .item-icon{
  width:46px;height:46px;border-radius:14px;background:var(--surface-soft);display:grid;place-items:center;font-size:1.6rem
}
.request-meta{margin:7px 0 0;color:var(--muted);line-height:1.45}
.status-badge{
  display:inline-flex;align-items:center;gap:7px;border-radius:999px;padding:7px 10px;
  font-size:.79rem;font-weight:850;margin-top:11px
}
.status-badge.pending{background:var(--waiting-soft);color:var(--waiting)}
.status-badge.accepted{background:var(--success-soft);color:var(--success)}
.card-actions{display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-end}
.accept{background:var(--success);color:white;border-color:var(--success)}
.delivered{background:var(--ink);color:white;border-color:var(--ink)}
.history{margin-top:34px}
.history-card{display:flex;justify-content:space-between;gap:16px;align-items:center}
.history-card strong{font-size:1.02rem}
.empty{
  color:var(--muted);background:rgba(255,255,255,.62);border:1px dashed #cfcfc8;
  border-radius:22px;padding:34px;text-align:center
}
dialog{
  border:0;border-radius:26px;padding:30px;max-width:430px;width:calc(100% - 36px);
  box-shadow:0 28px 90px rgba(0,0,0,.22);text-align:center
}
dialog::backdrop{background:rgba(17,17,17,.43);backdrop-filter:blur(2px)}
.dialog-icon{
  width:66px;height:66px;border-radius:22px;display:grid;place-items:center;
  margin:0 auto 18px;background:var(--success-soft);color:var(--success);font-size:2rem;font-weight:950
}
.dialog-icon.neutral{background:var(--surface-soft);color:var(--ink)}
dialog h2{margin-bottom:8px}
dialog p:not(.eyebrow){color:var(--muted);line-height:1.5}
.dialog-note{font-size:.9rem}
@media(max-width:760px){
  .app-shell{padding:18px 15px 30px}
  .topbar{align-items:flex-start}
  .brand-mark{width:46px;height:46px;border-radius:15px}
  .hero-panel,.receiver-summary{align-items:flex-start;flex-direction:column}
  .request-grid{grid-template-columns:1fr}
  .request-button{min-height:150px;flex-direction:row;align-items:center}
  .request-button .icon{width:66px;height:66px;font-size:2.35rem}
  .request-card{grid-template-columns:1fr}
  .card-actions{justify-content:flex-start}
  .count-card{min-width:92px;min-height:92px}
}
@media(max-width:460px){
  .topbar{gap:10px}
  .brand-block{gap:10px}
  .brand-mark{display:none}
  .secondary.small{padding-inline:11px;font-size:.9rem}
  .bottom-actions{display:grid;grid-template-columns:1fr}
}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}


.topbar-actions{display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-end}
.admin-summary{
  display:flex;align-items:center;justify-content:space-between;gap:20px;
  background:var(--surface);border:1px solid var(--border);border-radius:28px;
  padding:clamp(22px,4vw,32px);box-shadow:var(--shadow);margin-bottom:18px
}
.admin-summary p{color:var(--muted);margin:8px 0 0;line-height:1.5;max-width:620px}
.admin-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
.admin-card{
  background:var(--surface);border:1px solid var(--border);border-radius:24px;
  padding:22px;box-shadow:0 10px 30px rgba(20,20,18,.045)
}
.admin-card h3{margin:0;font-size:1.25rem;letter-spacing:-.025em}
.admin-card-heading{margin-bottom:18px}
.field{display:grid;gap:8px;margin-top:14px}
.field>span{font-size:.9rem;font-weight:800;color:#40403d}
.field input,.field select{
  width:100%;min-height:50px;border-radius:14px;border:1px solid #d8d8d2;
  background:#fafaf8;color:var(--ink);padding:10px 13px;font:inherit;font-size:1rem
}
.field input:focus,.field select:focus{outline:3px solid rgba(38,116,217,.16);border-color:#8cb9ef}
.switch-row{
  display:flex;align-items:center;justify-content:space-between;gap:18px;
  padding:16px 0;border-top:1px solid var(--border)
}
.switch-row:first-of-type{border-top:0;padding-top:0}
.switch-row div{display:grid;gap:4px}
.switch-row span{font-size:.9rem;line-height:1.4;color:var(--muted)}
.switch-row input{
  appearance:none;-webkit-appearance:none;width:52px;height:31px;border-radius:999px;
  background:#d7d7d2;position:relative;flex:0 0 auto;transition:background .16s ease
}
.switch-row input::after{
  content:"";position:absolute;width:25px;height:25px;border-radius:50%;background:white;
  left:3px;top:3px;box-shadow:0 2px 6px rgba(0,0,0,.18);transition:left .16s ease
}
.switch-row input:checked{background:var(--success)}
.switch-row input:checked::after{left:24px}
.admin-note{color:var(--muted);line-height:1.5}
.danger-card{border-color:#ead7d7}
.danger-button{color:#a23a3a;border-color:#e6c9c9;background:#fffafa}
.save-bar{
  position:sticky;bottom:12px;margin-top:18px;background:rgba(255,255,255,.94);
  backdrop-filter:blur(12px);border:1px solid var(--border);border-radius:20px;
  padding:14px 16px;display:flex;align-items:center;justify-content:space-between;gap:18px;
  box-shadow:0 16px 50px rgba(20,20,18,.12)
}
#adminSaveStatus{color:var(--muted);font-weight:700}
@media(max-width:760px){
  .admin-grid{grid-template-columns:1fr}
  .admin-summary{align-items:flex-start;flex-direction:column}
  .save-bar{align-items:stretch;flex-direction:column}
  .save-bar .primary{width:100%}
}

.pin-input{
  display:block;width:180px;max-width:100%;margin:18px auto 8px;
  min-height:62px;border:1px solid #d8d8d2;border-radius:16px;background:#fafaf8;
  text-align:center;font-size:2rem;font-weight:900;letter-spacing:.28em;padding:8px 10px 8px 18px
}
.pin-input:focus{outline:3px solid rgba(38,116,217,.16);border-color:#8cb9ef}
.pin-error{min-height:22px;color:#a23a3a!important;font-weight:750;font-size:.9rem}
.dialog-actions{display:flex;gap:10px;justify-content:center;margin-top:8px}

.language-switch{
  display:flex;align-items:center;padding:3px;background:#e9e9e5;border-radius:14px;
  border:1px solid #deded8
}
.language-option{
  min-height:38px;border:0;border-radius:11px;background:transparent;color:var(--muted);
  padding:7px 11px;font-weight:850;font-size:.86rem
}
.language-option.active{background:white;color:var(--ink);box-shadow:0 2px 8px rgba(20,20,18,.08)}
@media(max-width:560px){
  .topbar-actions{width:100%;justify-content:flex-end}
  .language-option{padding-inline:9px}
}

.bilingual-label-group{
  padding:16px 0;border-top:1px solid var(--border)
}
.bilingual-label-group:first-of-type{border-top:0;padding-top:0}
.bilingual-label-group>strong{
  display:block;font-size:1rem;margin-bottom:6px
}

.cloud-status{display:flex;align-items:center;gap:7px;min-height:38px;padding:7px 11px;border-radius:12px;background:#f0f0ec;color:var(--muted);font-size:.8rem;font-weight:800;border:1px solid #dfdfd9}
.cloud-status.connected{background:var(--success-soft);color:var(--success);border-color:#cce9d8}
.cloud-status.error{background:#fff1f1;color:#a23a3a;border-color:#efd0d0}
.cloud-dot{width:8px;height:8px;border-radius:50%;background:currentColor}
@media(max-width:680px){.cloud-status{order:3;width:100%;justify-content:center}}
