/* Blakely separate apps: the slim app bar, the standalone pages (install, register a device, offline, no access),
   the Apps list and the Devices page. Self-contained: works on pages that don't load app.css (the Team app). */
.bkapp-top { position: sticky; top: 0; z-index: 60; }
.bkapp-bar { box-sizing: border-box; display: flex; align-items: center; gap: 10px;
  height: calc(44px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 12px 0 12px; background: #0b0b0c; color: #fff;
  font: 500 14px/1.2 -apple-system, "Segoe UI", Inter, Roboto, Arial, sans-serif; white-space: nowrap; }
.bkapp-bar * { box-sizing: border-box; }
.bkapp-id { display: flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; min-width: 0; }
.bkapp-id img { flex: none; }

.bkapp-where, .bkapp-who { opacity: .85; font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
.bkapp-where { padding-left: 10px; border-left: 1px solid rgba(255,255,255,.35); }
.bkapp-sp { flex: 1 1 auto; }
.bkapp-net { background: #fff; color: #b3261e; font-weight: 700; font-size: 12px; padding: 3px 8px; border-radius: 99px; }
.bkapp-btn { appearance: none; border: 0; cursor: pointer; background: #fff; color: #111; font: 600 13px/1 -apple-system, "Segoe UI", Inter, Roboto, Arial, sans-serif; padding: 8px 11px; border-radius: 8px; text-decoration: none; flex: none; }
.bkapp-btn.ghost { background: rgba(255,255,255,.16); color: #fff; }
.bkapp-btn[hidden], .bkapp-net[hidden] { display: none; }
.bkapp-note { background: #fff; color: #0b0b0c; border-bottom: 1px solid #d5d5da; padding: 9px 14px; font: 600 14px/1.35 -apple-system, "Segoe UI", Inter, Roboto, Arial, sans-serif; text-align: center; }
@media (max-width: 560px) { .bkapp-who, [data-bkapp-help] { display: none; } .bkapp-id b { font-size: 14px; } .bkapp-where { font-size: 12px; } }
@media (display-mode: standalone), (display-mode: fullscreen) { [data-bkapp-help] { display: none; } }

/* single-app layout: the main menu, top bar and bottom tabs give way to the app bar */
html.bk-single { --topbar-h: 44px; --tabbar-h: 0px; }
html.bk-single:not(.bk-app-manager) .sb, html.bk-single:not(.bk-app-manager) .topbar,
html.bk-single:not(.bk-app-manager) .tabbar, html.bk-single:not(.bk-app-manager) .more-sheet { display: none !important; }
html.bk-single:not(.bk-app-manager) .app-main { margin-left: 0 !important; }
html.bk-single:not(.bk-app-manager) body { --bottom-clear: env(safe-area-inset-bottom); }
html.bk-app-manager { --topbar-h: 56px; }
html.bk-app-manager .bkapp-top { display: none; }
html.bk-app-manager .sb-brand a::after { content: "Manager"; margin-left: 8px; font: 700 11px/1 -apple-system, "Segoe UI", Inter, Arial, sans-serif; letter-spacing: .06em; text-transform: uppercase; padding: 4px 7px; border-radius: 6px; background: #111; color: #fff; }
html.bk-app-manager.sb-mini .sb-brand a::after { display: none; }
@media (max-width: 900px) { html.bk-app-manager .tb-brand::after { content: "Manager"; margin-left: 6px; font: 700 10px/1 -apple-system, "Segoe UI", Inter, Arial, sans-serif; letter-spacing: .06em; text-transform: uppercase; padding: 3px 6px; border-radius: 6px; background: #111; color: #fff; } }
@media (max-width: 900px) { html.bk-app-manager { --topbar-h: 54px; --tabbar-h: 62px; } }
html.bk-app-kitchen { --topbar-h: 36px; }
html.bk-app-kitchen .bkapp-bar { height: calc(36px + env(safe-area-inset-top)); border-bottom: 1px solid #2c2c2e; }
html.bk-app-kitchen .kds { font-size: 112%; }
html.bk-app-team .bkapp-top { position: static; }
.bkapp-wake { position: fixed; right: 10px; bottom: 10px; z-index: 70; background: rgba(0,0,0,.7); color: #fff; font: 600 12px/1 -apple-system, "Segoe UI", Arial, sans-serif; padding: 7px 10px; border-radius: 99px; pointer-events: none; opacity: .0; transition: opacity .3s; }
.bkapp-wake.show { opacity: 1; }
.bkapp-kiosk { position: fixed; left: 0; right: 0; bottom: 0; z-index: 80; background: #111; color: #fff; text-align: center; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); font: 600 14px/1.3 -apple-system, "Segoe UI", Arial, sans-serif; }
.bkapp-tip { position: fixed; left: 12px; right: 12px; bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 90; max-width: 460px; margin: 0 auto; background: #111; color: #fff; border-radius: 14px; padding: 12px 14px; display: flex; gap: 10px; align-items: center; font: 500 14px/1.35 -apple-system, "Segoe UI", Arial, sans-serif; box-shadow: 0 10px 30px rgba(0,0,0,.3); }
.bkapp-tip span { flex: 1; } .bkapp-tip button { appearance: none; border: 0; border-radius: 8px; padding: 8px 12px; font: 600 13px/1 -apple-system, "Segoe UI", Inter, Roboto, Arial, sans-serif; cursor: pointer; background: #fff; color: #111; }
.bkapp-tip button.x { background: transparent; color: #bbb; padding: 8px 4px; }

/* standalone pages: black, white type, one primary action */
body.bkapp-page { margin: 0; min-height: 100vh; min-height: 100dvh; background: #0b0b0c; color: #f5f5f7; display: flex; align-items: flex-start; justify-content: center;
  font: 17px/1.5 -apple-system, "Segoe UI", Inter, Roboto, Arial, sans-serif; padding: calc(44px + env(safe-area-inset-top)) 22px calc(36px + env(safe-area-inset-bottom)); box-sizing: border-box; -webkit-font-smoothing: antialiased; }
.bkapp-card { width: 100%; max-width: 480px; box-sizing: border-box; }
.bkapp-head { display: flex; flex-direction: column; gap: 18px; align-items: flex-start; margin-bottom: 34px; }
.bkapp-head img { width: 88px; height: 88px; border-radius: 22px; box-shadow: 0 0 0 1px rgba(255,255,255,.16); }
.bkapp-head h1 { font-size: 34px; line-height: 1.1; margin: 0; letter-spacing: -.03em; font-weight: 700; color: #fff; }
.bkapp-head p { margin: 8px 0 0; color: #a1a1a8; font-size: 16px; }
.bkapp-card h2 { font-size: 24px; line-height: 1.2; margin: 0 0 12px; letter-spacing: -.02em; color: #fff; } .bkapp-card h3 { font-size: 16px; margin: 0 0 8px; color: #fff; }
.bkapp-card p { margin: 0 0 14px; color: #d6d6db; } .bkapp-card p b { color: #fff; } .bkapp-card a { color: #fff; }
.bkapp-card label { display: block; font-size: 14px; color: #a1a1a8; margin: 22px 0 8px; }
.bkapp-code { width: 100%; box-sizing: border-box; font: 700 32px/1.2 ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .14em; text-align: center; text-transform: uppercase; padding: 18px 10px; border-radius: 16px; border: 2px solid #3a3a3f; background: #161618; color: #fff; }
.bkapp-code::placeholder { color: #55555c; }
.bkapp-code:focus { outline: none; border-color: #fff; }
.bkapp-go { display: block; width: 100%; box-sizing: border-box; margin-top: 16px; appearance: none; border: 0; cursor: pointer; background: #fff; color: #0b0b0c !important; font: 700 18px/1 -apple-system, "Segoe UI", Inter, Roboto, Arial, sans-serif; padding: 19px; border-radius: 16px; text-align: center; text-decoration: none; }
.bkapp-go.ghost { background: transparent; color: #fff !important; box-shadow: inset 0 0 0 1.5px #55555c; } .bkapp-go[hidden] { display: none; }
.bkapp-small { font-size: 14px; color: #a1a1a8 !important; margin-top: 18px !important; } .bkapp-small b { color: #fff; }
.bkapp-err, .bkapp-warn, .bkapp-ok { border-radius: 14px; padding: 13px 15px; font-size: 15px; margin: 0 0 14px; background: #161618; color: #fff; border-left: 4px solid #fff; }
.bkapp-err { border-left-color: #ff6b61; } .bkapp-warn { border-left-color: #ffcf5c; } .bkapp-ok { border-left-color: #5fd38a; }
.bkapp-steps { background: #161618; border-radius: 16px; padding: 18px 20px; margin: 0 0 12px; } .bkapp-steps ol { margin: 0; padding-left: 22px; color: #d6d6db; } .bkapp-steps li { margin-bottom: 7px; font-size: 16px; } .bkapp-steps li b { color: #fff; word-break: break-word; }
.bkapp-steps.me { box-shadow: inset 0 0 0 1.5px #fff; }
.bkapp-qr { text-align: center; margin: 22px 0 6px; } .bkapp-qrbox { display: inline-block; background: #fff; border-radius: 14px; padding: 8px; line-height: 0; } .bkapp-qr svg { width: 180px; height: 180px; }

/* in-app sign-in (the app's start screen when signed out): the same black shell */
html.bk-single:not(.bk-app-manager) body.simple:has(.login-wrap) { background: #0b0b0c; color: #f5f5f7; }
html.bk-single:not(.bk-app-manager) body.simple:has(.login-wrap) .login-logo { filter: invert(1); }
html.bk-single:not(.bk-app-manager) body.simple:has(.login-wrap) .login h1 { color: #fff; font-size: 32px; letter-spacing: -.03em; }
html.bk-single:not(.bk-app-manager) body.simple:has(.login-wrap) .login .muted, html.bk-single:not(.bk-app-manager) body.simple:has(.login-wrap) .login .small { color: #a1a1a8; }
html.bk-single:not(.bk-app-manager) body.simple:has(.login-wrap) .login a { color: #fff; }
html.bk-single:not(.bk-app-manager) body.simple:has(.login-wrap) .login .card { background: transparent; border: 0; box-shadow: none; padding: 0; }
html.bk-single:not(.bk-app-manager) body.simple:has(.login-wrap) .login label.f > span:first-child { color: #a1a1a8; }
html.bk-single:not(.bk-app-manager) body.simple:has(.login-wrap) .login input { background: #161618; border: 2px solid #3a3a3f; color: #fff; border-radius: 14px; min-height: 54px; }
html.bk-single:not(.bk-app-manager) body.simple:has(.login-wrap) .login input:focus { border-color: #fff; outline: none; box-shadow: none; }
html.bk-single:not(.bk-app-manager) body.simple:has(.login-wrap) .login .btn.lg { background: #fff; color: #0b0b0c; border-color: #fff; border-radius: 14px; min-height: 56px; font-weight: 700; }
html.bk-single:not(.bk-app-manager) body.simple:has(.login-wrap) .login p:has(a[href="/install"]), html.bk-single:not(.bk-app-manager) body.simple:has(.login-wrap) .login p:has(a[href="/apps"]) { display: none; }

/* Finance app start screen */
.fin-home { max-width: 760px; margin: 0 auto; } .fin-home h1 { font-size: 32px; letter-spacing: -.03em; margin: 6px 0 2px; }
.fin-sec { margin-top: 26px; } .fin-sec h2 { font-size: 19px; margin: 0 0 2px; letter-spacing: -.01em; }
.fin-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.fin-links a { position: relative; display: block; background: #fff; border: 1px solid #e3e3e8; border-radius: 16px; padding: 16px 40px 16px 18px; text-decoration: none !important; color: #111; }
.fin-links a:hover, .fin-links a:focus-visible { border-color: #111; }
.fin-links b { display: block; font-size: 17px; font-weight: 650; } .fin-links small { display: block; color: #6b6b73; font-size: 13.5px; margin-top: 2px; }
.fin-links .ico { position: absolute; right: 14px; top: 50%; width: 18px; height: 18px; margin-top: -9px; stroke: #111; fill: none; stroke-width: 2; }
@media (max-width: 640px) { .fin-links { grid-template-columns: 1fr; } }

/* Apps list: large icons on a dark panel, always with the name */
.apps-panel { background: #0b0b0c; border-radius: 24px; padding: 30px; color: #f5f5f7; }
.apps-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 34px 26px; }
@media (max-width: 1250px) { .apps-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) { .apps-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .apps-grid { grid-template-columns: 1fr; } .apps-panel { padding: 22px 18px; border-radius: 20px; } .apps-how { grid-template-columns: 1fr !important; } }
.apps-item { display: flex; flex-direction: column; min-width: 0; }
.apps-id { display: block; color: #fff !important; text-decoration: none !important; }
.apps-id img { width: 112px; height: 112px; border-radius: 26px; box-shadow: 0 0 0 1px rgba(255,255,255,.18); display: block; }
.apps-id h2 { font-size: 22px; letter-spacing: -.02em; margin: 14px 0 4px; color: #fff; font-weight: 700; }
.apps-line { margin: 0 0 4px; font-size: 15px; color: #d6d6db; } .apps-for { margin: 0 0 14px; font-size: 13px; color: #a1a1a8; }
.apps-no { border: 1px solid #55555c; border-radius: 99px; padding: 1px 8px; white-space: nowrap; }
.apps-qr { margin-top: auto; align-self: flex-start; background: #fff; border-radius: 14px; padding: 8px 8px 6px; text-align: center; } .apps-qr svg { width: 124px; height: 124px; display: block; }
.apps-qr span { display: block; color: #0b0b0c; font-size: 12.5px; font-weight: 700; margin-top: 4px; }
.apps-act { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.apps-btn { background: #fff; color: #0b0b0c !important; font-weight: 700; font-size: 14px; padding: 10px 16px; border-radius: 11px; text-decoration: none !important; }
.apps-btn.ghost { background: transparent; color: #fff !important; box-shadow: inset 0 0 0 1.5px #55555c; }
.apps-url { margin-top: 10px; font-size: 12px; color: #8a8a92; word-break: break-all; }

/* Devices */
.dv-sw { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; cursor: pointer; } .dv-sw input { width: 20px; height: 20px; margin-top: 1px; flex: none; }
.dv-code { font: 800 40px/1.1 ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .12em; text-align: center; padding: 16px 8px; border-radius: 14px; background: #f3f4f6; margin: 10px 0; user-select: all; }
.dv-qr { text-align: center; } .dv-qr svg { width: 190px; height: 190px; }
.dv-acts { white-space: nowrap; text-align: right; } .dv-acts .btn { margin-left: 4px; }
tr.dv-off td { opacity: .55; }
@media (max-width: 700px) { .dv-code { font-size: 30px; } .dv-acts { white-space: normal; } .dv-acts .btn { margin: 2px; } }
html.bk-app-kitchen .kds .pos-top { top: calc(var(--topbar-h) + env(safe-area-inset-top)); }
html.bk-app-kitchen .kds { min-height: calc(100vh - var(--topbar-h) - env(safe-area-inset-top)); min-height: calc(100dvh - var(--topbar-h) - env(safe-area-inset-top)); }
html.bk-app-kitchen .kds-side { min-height: calc(100vh - var(--topbar-h) - 130px); }
.dv-app { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; } .dv-app img { border-radius: 7px; } .dv-app.big { font-size: 18px; margin: 4px 0 0; } .dv-app.big img { border-radius: 10px; }
td .dv-app { white-space: nowrap; margin-right: 14px; }

/* The BLAKELY wordmark (the same asset as the main header) followed by the app's name as a label */
.bk-wm { display: inline-block; height: 20px; width: auto; vertical-align: middle; filter: invert(1); }
.bk-wm-tag { display: inline-block; vertical-align: middle; margin-left: 10px; font: 500 12px/1 -apple-system, "Segoe UI", Inter, Roboto, Arial, sans-serif; letter-spacing: .16em; text-transform: uppercase; color: #fff; opacity: .92; white-space: nowrap; }
.bkapp-id { gap: 12px; } .bkapp-id .bk-wm { height: 21px; } .bkapp-id .bk-wm-tag { margin-left: 0; font-size: 13px; }
html.bk-app-kitchen .bkapp-id .bk-wm { height: 17px; }
.bkapp-head h1 { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; } .bkapp-head h1 .bk-wm { height: 34px; } .bkapp-head h1 .bk-wm-tag { margin-left: 0; font-size: 17px; letter-spacing: .2em; }
.apps-id h2 { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; } .apps-id h2 .bk-wm { height: 19px; } .apps-id h2 .bk-wm-tag { margin-left: 0; font-size: 13px; }
.apps-h1 .bk-wm { filter: none; height: 26px; } .apps-h1 .bk-wm-tag { color: inherit; font-size: 15px; letter-spacing: .2em; margin-right: 12px; }
@media (max-width: 560px) { .bkapp-id .bk-wm { height: 20px; } .bkapp-id .bk-wm-tag { font-size: 12px; letter-spacing: .14em; } .bkapp-where { display: none; } }
@media (max-width: 640px) { html.bk-app-reservations #addForm.fields { grid-template-columns: 1fr 1fr; } html.bk-app-reservations #addForm.fields > * { min-width: 0; } }
@media (max-width: 640px) { html.bk-app-reservations #addForm > label.f[style*="span"] { grid-column: 1 / -1 !important; } }
@media (min-width: 700px) { html.bk-app-team nav.tabs { left: 50%; right: auto; width: 520px; transform: translateX(-50%); bottom: 16px; border: 1px solid #e5e0d8; border-radius: 18px; box-shadow: 0 8px 24px rgba(0,0,0,.08); } }
