/* style-r4-base.css - design round 4, area 1: BUTTONS, POP-UPS (sheets), CARDS, CHIPS, FORM CONTROLS, EMPTY STATES. Same colours and layout as before - only depth, rounding, states and small touches.
   Loaded after style-uno.css. Pure CSS. Every animation is switched off under prefers-reduced-motion at the bottom of this file. */
:root { --r4-ease: cubic-bezier(.2, .8, .2, 1); --r4-shadow: 0 6px 18px rgba(0, 0, 0, .3); --r4-line: #2C2C2E; --r4-green-hi: #1BDB6D; }

/* ---------- buttons: one clear primary, a quiet secondary, an outlined danger ---------- */
button { border-radius: 12px; letter-spacing: .005em; transition: transform .12s var(--r4-ease), filter .15s, box-shadow .15s, background-color .15s; }
button:not([class]):not([data-v]):not([data-t]):not(.bar-tabs *):not(.bar-admin-nav *), .bar-pay-big, .bar-cart button, #btn-send, #btn-login, #btn-register, .game-grid button:not(.secondary), .bar-file-btn:not(.secondary), .game-card-top button {
  background: linear-gradient(180deg, var(--r4-green-hi) 0%, #06C755 100%); box-shadow: 0 1px 0 rgba(255, 255, 255, .28) inset, 0 3px 10px rgba(6, 199, 85, .28); }
button:not([class]):not([data-v]):not([data-t]):hover:not(:disabled), .bar-pay-big:hover:not(:disabled) { filter: brightness(1.06); }
button:not([class]):not([data-v]):not([data-t]):active:not(:disabled), .bar-pay-big:active:not(:disabled), .game-grid button:active:not(:disabled) { transform: scale(.97); box-shadow: 0 1px 0 rgba(255, 255, 255, .2) inset, 0 1px 4px rgba(6, 199, 85, .3); }
button.secondary { background: #2C2C2E; border: 1px solid #3A3A3C; box-shadow: 0 1px 0 rgba(255, 255, 255, .05) inset; }
button.secondary:hover:not(:disabled) { background: #343437; }
button.danger { border-width: 1.5px; background: rgba(255, 107, 96, .08); }
button.danger:hover:not(:disabled) { background: rgba(255, 107, 96, .16); }
button:disabled { filter: saturate(.5); box-shadow: none; }
button.small { border-radius: 10px; }
.topbar button.small, #btn-bar-tab { border-radius: 18px; padding-left: 14px; padding-right: 14px; }
.icon-btn { border-radius: 50%; } .icon-btn:active { background: rgba(255, 255, 255, .1); }
/* the round shortcut icons on the home bar */
.top-icon { transition: transform .12s var(--r4-ease); } .top-icon:active { transform: scale(.92); }
.ti-circle { box-shadow: 0 2px 6px rgba(0, 0, 0, .35); transition: border-color .15s, background-color .15s; }

/* ---------- pop-ups / sheets: slide up, soft backdrop, grabber, bold title ---------- */
.panel { backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); background: rgba(0, 0, 0, .55); animation: r4Fade .2s ease-out; }
.panel-inner { border-radius: 22px 22px 0 0; border-top: 1px solid #3A3A3C; box-shadow: 0 -10px 40px rgba(0, 0, 0, .55); animation: r4Up .3s var(--r4-ease); }
.panel-inner::before { content: ""; flex: none; align-self: center; width: 42px; height: 5px; border-radius: 3px; background: #48484A; margin: -10px 0 8px; }
.panel-inner h2 { font-size: 22px; font-weight: 800; line-height: 1.2; letter-spacing: -.005em; }
.panel-inner h3 { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.panel-x { box-shadow: 0 2px 8px rgba(0, 0, 0, .4); } .panel-x:hover { background: rgba(90, 90, 96, .95); }
@media (min-width: 700px) { .panel { align-items: center; justify-content: center; } .panel-inner { border-radius: 22px; border: 1px solid #3A3A3C; animation-name: r4Pop; } .panel-inner::before { display: none; } }
@keyframes r4Up { from { transform: translateY(40px); opacity: .6; } }
@keyframes r4Pop { from { transform: scale(.94); opacity: 0; } }
@keyframes r4Fade { from { opacity: 0; } }
/* sheets that take money get an amber edge so nobody mistakes them for a normal pop-up */
#bar-sheet-inner:has(.pf-code), #bar-sheet-inner:has(#pf-pay), #bar-sheet-inner:has(.bar-paypay-amount), #bar-sheet-inner:has(#btn-bar-pay) { border-top: 3px solid #FFB547; }

/* ---------- cards: depth + hairline border ---------- */
.place-list li, .grp-card, .game-card, .bar-stats > div, .pf-list li, .bar-rule-form, .hist-row, .bar-people li, .auth-card {
  border: 1px solid var(--r4-line); box-shadow: var(--r4-shadow); }
.place-list li, .grp-card, .game-card { transition: transform .15s var(--r4-ease), border-color .15s; }
.place-list li:active, .grp-card:active { transform: scale(.985); }
@media (hover: hover) { .place-list li:hover, .grp-card:hover { border-color: #3F3F44; transform: translateY(-1px); } }
.bar-card { border-radius: 16px; box-shadow: var(--r4-shadow); }
.bar-people li { border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; border-bottom: 1px solid var(--r4-line); background: #1C1C1E; }
.place-list li { border-radius: 16px; padding: 12px; }
.place-photo { border-radius: 14px; box-shadow: 0 2px 8px rgba(0, 0, 0, .4); }

/* ---------- chips / badges ---------- */
.bar-chip, .badge { border-radius: 99px; padding: 3px 10px; font-weight: 700; letter-spacing: .02em; }
.bar-chip.st-ready { box-shadow: 0 0 0 1px rgba(47, 222, 118, .35) inset; } .bar-chip.st-pending { box-shadow: 0 0 0 1px rgba(255, 181, 71, .4) inset; }
.pf-tag { background: linear-gradient(180deg, #FFC766, #FFB547); box-shadow: 0 1px 0 rgba(255, 255, 255, .35) inset, 0 1px 4px rgba(0, 0, 0, .35); border-radius: 99px; padding: 2px 9px; }
.badge-count, .bar-count { box-shadow: 0 1px 4px rgba(0, 0, 0, .4); }

/* ---------- form controls ---------- */
input[type=checkbox], input[type=radio] { accent-color: #06C755; width: 22px; height: 22px; flex: none; }
label input[type=checkbox] { margin-right: 10px; }
.toggle-row { display: flex; flex-direction: row; align-items: center; gap: 4px; min-height: 44px; font-size: 14px; color: #D8D8DC; }
input[type=text], input[type=password], input[type=number], input[type=email], input[type=tel], input[type=time], input[type=date], select, textarea { border-radius: 12px; background-color: #232326; color: #EDEDED; color-scheme: dark; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; }
select { appearance: none; -webkit-appearance: none; padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%239A9A9A' stroke-width='2'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
.error { font-weight: 600; }

/* ---------- empty states: a friendly emoji above the quiet text ---------- */
.bar-board > .bar-note:only-child::before, .bar-pad > .bar-note:only-child::before, .hist-list + .bar-note::before, .bar-people > li.bar-note::before, .pf-list > .bar-note:only-child::before, .game-cards + .bar-note::before {
  content: "\1FAE7"; display: block; font-size: 34px; margin-bottom: 6px; opacity: .85; }
.bar-note:empty { display: none; }

/* ---------- notes / banners ---------- */
.bar-note.ok { background: rgba(47, 222, 118, .08); border-left: 3px solid #2FDE76; padding: 6px 10px; border-radius: 0 8px 8px 0; }
.bar-note.error { background: rgba(255, 107, 96, .08); border-left: 3px solid #FF6B60; padding: 6px 10px; border-radius: 0 8px 8px 0; }

@media (prefers-reduced-motion: reduce) { .panel, .panel-inner, .top-icon, button, .place-list li, .grp-card, .bar-card { animation: none !important; transition: none !important; transform: none !important; } }
