/* ==========================================================================
   LOGINPAGE 17 - CAFE EDITORIAL (Thermal Receipt Ticket + Menu Board Split)
   ========================================================================== */
:root {
  --bg-cream: #f6f1e9;
  --bg-card: #ffffff;
  --bg-soft: #fcfaf7;
  --border-warm: #e6ddd0;
  --ink-primary: #1c1917;
  --ink-secondary: #57534e;
  --ink-muted: #78716c;
  --accent-roast: #92400e;
  --accent-caramel: #b45309;
  --accent-sage: #15803d;
  --accent-rose: #be123c;
  --font-serif: Georgia, "Times New Roman", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { overflow-x: hidden; max-width: 100%; }
body {
  font-family: var(--font-sans); background-color: var(--bg-cream);
  background-image: radial-gradient(#dfd5c6 1px, transparent 1px); background-size: 22px 22px;
  color: var(--ink-primary); min-height: 100vh; min-height: 100dvh; line-height: 1.5;
}
#app-loader { position: fixed; inset: 0; z-index: 9999; background: var(--bg-cream); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; transition: opacity 0.35s, visibility 0.35s; }
#app-loader.fade-out { opacity: 0; visibility: hidden; }
.cafe-spinner { width: 36px; height: 36px; border-radius: 50%; border: 3px solid rgba(180,83,9,0.18); border-top-color: var(--accent-caramel); animation: spin 0.75s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.cafe-shell { width: 100%; max-width: 880px; margin: 0 auto; padding: 20px 16px 40px; }
.cafe-shell.centered { max-width: 440px; min-height: 100vh; display: flex; flex-direction: column; justify-content: center; }

.cafe-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 14px; margin-bottom: 18px; border-bottom: 1px solid var(--border-warm); }
.cafe-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cafe-logo-box { width: 42px; height: 42px; border-radius: 12px; background: #fff; border: 1px solid var(--border-warm); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.cafe-logo-box img { width: 26px; height: 26px; object-fit: contain; }
.cafe-title { font-family: var(--font-serif); font-size: 16px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cafe-sub { font-size: 11px; color: var(--ink-secondary); }
.cafe-badge-online { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 9999px; background: rgba(21,128,61,0.1); border: 1px solid rgba(21,128,61,0.25); color: var(--accent-sage); font-size: 11px; font-weight: 700; flex-shrink: 0; }
.cafe-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-sage); }

/* 2-Column Receipt & Menu Board Split */
.cafe-split { display: grid; grid-template-columns: 1fr; gap: 18px; }
@media (min-width: 780px) { .cafe-split { grid-template-columns: 390px 1fr; align-items: start; } }

/* Thermal Receipt Ticket Card */
.receipt-card {
  position: relative; background: #fff; border: 1px solid var(--border-warm);
  border-radius: 18px; padding: 22px 20px; box-shadow: 0 18px 40px -16px rgba(68,48,28,0.14);
}
.receipt-divider {
  border: none; border-top: 2px dashed var(--border-warm); margin: 16px 0;
}
.cafe-eyebrow { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 9999px; background: rgba(180,83,9,0.1); color: var(--accent-roast); font-size: 10.5px; font-weight: 700; text-transform: uppercase; margin-bottom: 8px; }
.cafe-hero-title { font-family: var(--font-serif); font-size: 21px; font-weight: 700; line-height: 1.25; margin-bottom: 4px; }
.cafe-hero-sub { font-size: 12.5px; color: var(--ink-secondary); margin-bottom: 14px; }

.cafe-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; background: var(--bg-cream); border: 1px solid var(--border-warm); border-radius: 12px; margin-bottom: 14px; }
.cafe-tab-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 6px; border: none; border-radius: 9px; background: transparent; color: var(--ink-secondary); font-family: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.cafe-tab-btn.active { background: #fff; color: var(--accent-roast); box-shadow: 0 2px 8px rgba(68,48,28,0.1); }

.cafe-field { margin-bottom: 12px; }
.cafe-label { display: block; font-size: 11.5px; font-weight: 600; color: var(--ink-secondary); margin-bottom: 5px; }
.cafe-input-wrap { position: relative; display: flex; align-items: center; }
.cafe-input-icon { position: absolute; left: 14px; color: var(--ink-muted); font-size: 14px; pointer-events: none; }
.cafe-input { width: 100%; height: 44px; padding: 0 42px 0 40px; border-radius: 10px; background: var(--bg-soft); border: 1px solid var(--border-warm); color: var(--ink-primary); font-family: inherit; font-size: 14px; font-weight: 600; outline: none; }
.cafe-input:focus { background: #fff; border-color: var(--accent-caramel); }
.cafe-eye-btn { position: absolute; right: 10px; background: none; border: none; color: var(--ink-muted); cursor: pointer; padding: 6px; }

.btn-cafe-primary { width: 100%; height: 44px; border: none; border-radius: 10px; background: #1c1917; color: #fff; font-family: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.btn-cafe-secondary { width: 100%; height: 40px; border-radius: 10px; background: var(--bg-soft); border: 1px solid var(--border-warm); color: var(--ink-primary); font-family: inherit; font-size: 12px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.btn-cafe-danger { width: 100%; height: 44px; border-radius: 10px; background: rgba(190,18,60,0.08); border: 1px solid rgba(190,18,60,0.28); color: var(--accent-rose); font-family: inherit; font-size: 13px; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }

.cafe-scanner { background: var(--bg-soft); border: 1px dashed #cbbba4; border-radius: 14px; padding: 16px; text-align: center; margin-bottom: 12px; }
.cafe-viewfinder { position: relative; width: 60px; height: 60px; margin: 0 auto 10px; border-radius: 14px; background: rgba(180,83,9,0.1); border: 1px solid rgba(180,83,9,0.3); display: flex; align-items: center; justify-content: center; color: var(--accent-caramel); font-size: 24px; overflow: hidden; }
.cafe-laser { position: absolute; left: 6px; right: 6px; height: 2px; background: var(--accent-caramel); animation: scanLine 2s infinite; }
@keyframes scanLine { 0%, 100% { top: 8px; } 50% { top: 50px; } }
.cafe-error { display: flex; align-items: center; gap: 8px; padding: 10px 12px; margin-bottom: 12px; border-radius: 10px; background: #fff1f2; border: 1px solid #fecdd3; color: var(--accent-rose); font-size: 12px; font-weight: 600; }
.cafe-divider { display: flex; align-items: center; gap: 10px; margin: 12px 0 10px; font-size: 11px; color: var(--ink-muted); }
.cafe-divider::before, .cafe-divider::after { content: ""; flex: 1; height: 1px; background: var(--border-warm); }

/* Right Column: Cafe Menu Board */
.menu-board { background: #1c1917; color: #f6f1e9; border-radius: 20px; padding: 20px; margin-bottom: 16px; box-shadow: 0 18px 36px -14px rgba(28,25,23,0.35); }
.menu-board-head { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px dashed rgba(246,241,233,0.22); padding-bottom: 12px; margin-bottom: 14px; }
.menu-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 11px 0; border-bottom: 1px dashed rgba(246,241,233,0.14);
}
.menu-row:last-child { border-bottom: none; padding-bottom: 0; }
.menu-row-btn {
  padding: 6px 12px; border-radius: 8px; border: 1px solid #d97706; background: rgba(217,119,6,0.18);
  color: #fde68a; font-family: inherit; font-size: 11.5px; font-weight: 700; cursor: pointer; flex-shrink: 0;
}

.cafe-faq-item { background: #fff; border: 1px solid var(--border-warm); border-radius: 12px; margin-bottom: 8px; overflow: hidden; }
.cafe-faq-btn { width: 100%; background: none; border: none; padding: 11px 14px; color: var(--ink-primary); font-family: inherit; font-size: 12px; font-weight: 600; text-align: left; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.cafe-faq-item.open .cafe-faq-btn i { transform: rotate(180deg); }
.cafe-faq-ans { display: none; padding: 0 14px 12px; font-size: 11.5px; color: var(--ink-secondary); }
.cafe-faq-item.open .cafe-faq-ans { display: block; }

.cafe-meta-box { background: var(--bg-soft); border: 1px solid var(--border-warm); border-radius: 12px; padding: 10px 12px; font-size: 11px; display: flex; flex-direction: column; gap: 5px; }
.cafe-meta-row { display: flex; justify-content: space-between; align-items: center; }
.cafe-meta-row span:first-child { color: var(--ink-secondary); }
.cafe-meta-row span:last-child { font-family: var(--font-mono); font-weight: 700; }
.cafe-card { background: var(--bg-card); border: 1px solid var(--border-warm); border-radius: 20px; padding: 22px 20px; }

.wa-fab { position: fixed; right: 18px; bottom: 18px; z-index: 40; width: 50px; height: 50px; border-radius: 50%; background: #15803d; color: #fff; border: none; display: flex; align-items: center; justify-content: center; font-size: 24px; cursor: pointer; box-shadow: 0 10px 24px rgba(21,128,61,0.35); }
.modal-backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(28,25,23,0.65); backdrop-filter: blur(6px); display: none; align-items: center; justify-content: center; padding: 16px; }
.modal-backdrop.open { display: flex; }
.modal-card { width: 100%; max-width: 360px; background: #fff; border: 1px solid var(--border-warm); border-radius: 20px; padding: 20px; }
.qris-box { background: var(--bg-soft); border: 1px solid var(--border-warm); border-radius: 12px; padding: 12px; text-align: center; margin: 12px 0; }
.qris-box img { width: 145px; height: 145px; object-fit: contain; margin: 6px auto; display: block; }
.cafe-footer { text-align: center; font-size: 11px; color: var(--ink-muted); margin-top: 14px; }
