@font-face {
  font-family: 'OpenDyslexic';
  src: url('/ui/fonts/OpenDyslexic/OpenDyslexic-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'OpenDyslexic';
  src: url('/ui/fonts/OpenDyslexic/OpenDyslexic-Italic.otf') format('opentype');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'OpenDyslexic';
  src: url('/ui/fonts/OpenDyslexic/OpenDyslexic-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'OpenDyslexic';
  src: url('/ui/fonts/OpenDyslexic/OpenDyslexic-BoldItalic.otf') format('opentype');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'OpenDyslexicAlta';
  src: url('/ui/fonts/OpenDyslexic/OpenDyslexicAlta-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'OpenDyslexicAlta';
  src: url('/ui/fonts/OpenDyslexic/OpenDyslexicAlta-Italic.otf') format('opentype');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'OpenDyslexicAlta';
  src: url('/ui/fonts/OpenDyslexic/OpenDyslexicAlta-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'OpenDyslexicAlta';
  src: url('/ui/fonts/OpenDyslexic/OpenDyslexicAlta-BoldItalic.otf') format('opentype');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'JetBrainsMono';
  src:
    url('/ui/fonts/JetBrainsMono-1.0.3/web/woff2/JetBrainsMono-Regular.woff2') format('woff2'),
    url('/ui/fonts/JetBrainsMono-1.0.3/web/woff/JetBrainsMono-Regular.woff') format('woff'),
    url('/ui/fonts/JetBrainsMono-1.0.3/ttf/JetBrainsMono-Regular.ttf') format('truetype'),
    url('/ui/fonts/JetBrainsMono-1.0.3/web/eot/JetBrainsMono-Regular.eot');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --yellow: #f3b500;
  --yellow-dark: #e1a400;
  --blue: #1e88ff;
  --green: #1d8e4a;
  --red: #e04646;
  --ink: #2b2b2b;
  --muted: #7a7a7a;
  --bg: #f6f6f6;
  --card: #ffffff;
  --shadow: 0 6px 16px rgba(0,0,0,0.12);
  --font-base: 'OpenDyslexic', sans-serif;
  --font-title: 'OpenDyslexicAlta', 'OpenDyslexic', sans-serif;
  --font-number: 'JetBrainsMono', monospace;
}

* { box-sizing: border-box; }
.hidden { display: none !important; }

body {
  margin: 0;
  font-family: var(--font-base);
  background: var(--bg);
  color: var(--ink);
}

#app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

button,
input,
select,
textarea {
  font-family: var(--font-base);
}

input[type="number"],
input.numeric,
.number-text,
.price,
.badge-number,
.order-price,
.badge-value,
.time-total,
.cart-badge,
.money-count {
  font-family: var(--font-number);
}

h1,
h2,
h3,
h4,
.section-title,
.page-title,
.modal-title,
.brand {
  font-family: var(--font-title);
}

.topbar {
  background: var(--yellow);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 3px 0 rgba(0,0,0,0.1);
  gap: 16px;
  flex-wrap: nowrap;
  min-height: 72px;
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-refresh {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: rgba(0,0,0,0.18);
}

.header-refresh-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, rgba(255,255,255,0.0), rgba(255,255,255,0.85));
  transition: width 0.08s linear;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #fff;
  font-weight: 600;
  font-size: 20px;
  letter-spacing: 0.5px;
}

.brand-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-title {
  font-size: 20px;
  letter-spacing: 0.4px;
}

.brand-role {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding-left: 0;
}

.role-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.8);
  background: rgba(255,255,255,0.15);
  background-size: cover;
  background-position: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.role-icon.active {
  background-color: transparent;
}

.logout-btn {
  margin: 0 70px;
  width: 42px;
  height: 42px;
  
  font-size: 12px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.2);
  cursor: pointer;
  color: #fff;
  background: #ffffff;
}

.logout-icon {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.message-bar {
  display: flex;
  gap: 8px;
  align-items: center;
  flex: 1;
  justify-content: center;
}

.msg-icon {
  width: 60px;
  height: 60px;
  border-radius: 999px;
  border: 2px solid #fff;
  /*background: rgba(255,255,255,0.2);*/
  background: rgba(255,255,255, 1);
  color: #000;
  font-weight: 700;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  background-size: cover;
  background-position: center;
}

.msg-icon-img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  
}

.msg-icon-photo {
  color: transparent;
}

.msg-icon.more {
  background: rgba(0,0,0,0.2);
  border-color: rgba(0,0,0,0.25);
}

.msg-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #e53935;
  color: #fff;
  border-radius: 999px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-number);
}

.message-thread {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.message-list {
  max-height: 320px;
  overflow: auto;
  border: 1px solid #e6e6e6;
  border-radius: 12px;
  padding: 12px;
  background: #fff;
}

.message-row {
  display: flex;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #efefef;
  font-size: 14px;
}

.message-row:last-child {
  border-bottom: none;
}

.message-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f0f0f0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
  color: #666;
  flex: 0 0 32px;
}

.message-avatar.has-photo {
  background-size: cover;
  background-position: center;
  color: transparent;
}

.message-content {
  flex: 1;
}

.message-meta {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.message-text {
  margin-top: 4px;
}

.message-audio {
  margin-top: 6px;
}

.message-audio audio {
  width: 100%;
}

.message-modal-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.message-modal-title {
  font-size: 20px;
  font-weight: 700;
}

.message-archive {
  padding: 6px 12px;
  font-size: 12px;
}

.muted {
  color: var(--muted);
  font-size: 12px;
  margin-left: 6px;
}

.brand-icon {
  font-size: 24px;
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: nowrap;
}

.send-btn {
  display: none;
  width: 52px;
  height: 52px;
  padding: 0;
  border-radius: 14px;
  background: var(--green);
  border: none;
  box-shadow: 0 2px 0 rgba(0,0,0,0.2);
}

.send-btn img {
  width: 60px;
  height: 30px;
  object-fit: contain;
}

.btn {
  border: none;
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 16px;
  cursor: pointer;
  color: #fff;
  background: #333;
}

.btn.primary { background: var(--blue); }
.btn.green { background: #2f8f4e; }
.btn.red { background: #d54a4a; }
.btn.icon { padding: 10px 12px; background: #222; position: relative; }
.btn.muted {
  background: #9aa0a6;
  color: #fff;
  cursor: not-allowed;
  opacity: 0.7;
}
.cart-btn { position: relative; }
.cart-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #e53935;
  color: #fff;
  border-radius: 999px;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  border: 2px solid #111;
}
.btn.arrow-header {
  background: #fff;
  color: #111;
  border: 2px solid var(--yellow);
  width: 64px;
  height: 52px;
  font-size: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
}

.btn.secondary {
  background: rgba(0,0,0,0.12);
  color: #111;
  border: 2px solid rgba(0,0,0,0.1);
  box-shadow: none;
}

.btn.secondary:hover {
  background: rgba(0,0,0,0.18);
}

.login-screen {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.login-open #app {
  filter: blur(4px);
  pointer-events: none;
}

.login-open .login-screen {
  pointer-events: auto;
}

.login-card {
  background: #fff;
  padding: 24px;
  border-radius: 14px;
  min-width: 320px;
  max-width: 540px;
  width: 100%;
  box-shadow: var(--shadow);
}

.login-card h2 {
  margin: 0 0 12px;
}

.login-screen .form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.login-screen .error {
  color: #d84545;
  margin-top: 8px;
  font-size: 14px;
}

.login-profiles {
  display: flex;
  flex-wrap: nowrap;
  gap: 14px;
  margin: 12px 0 16px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
  min-height: 100px;
}

.login-profile {
  flex: 0 0 110px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 14px;
  border: 1px solid #e6e6e6;
  background: #fafafa;
  cursor: pointer;
  transition: transform 180ms ease, opacity 180ms ease, box-shadow 180ms ease;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.login-profile .avatar {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  border: 2px solid #fff;
  box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}

.login-profile .name {
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}

.login-profile.selected {
  transform: scale(1.04);
  box-shadow: 0 8px 18px rgba(0,0,0,0.18);
  border-color: rgba(0,0,0,0.12);
  background: #fff;
}

.password-field {
  position: relative;
  display: flex;
  align-items: center;
}

.password-field input {
  flex: 1;
  padding-right: 52px;
}

.login-enter-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 32px;
  border-radius: 10px;
  border: none;
  background: #2c7be5;
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.login-enter-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.main {
  padding: 20px 24px 86px;
  flex: 1;
}

.footer {
  height: 50px;
  background: var(--yellow);
  border-top: 1px solid rgba(0,0,0,0.12);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  min-width: 120px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px dashed rgba(255,255,255,0.65);
  color: #fff;
  font-size: 12px;
  letter-spacing: 0.4px;
  background: rgba(255,255,255,0.15);
}

.footer-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 1;
  gap: 12px;
}

.footer-meta {
  font-size: 12px;
  color: #fff;
}

.footer-link {
  color: #fff;
  font-size: 12px;
  text-decoration: none;
  border-bottom: 1px dashed rgba(255,255,255,0.5);
  padding-bottom: 1px;
}

.footer-link:hover {
  opacity: 0.85;
}

.footer-img {
  width: 32px;
  /*
  height: 32px;
  border-radius: 50%;
  background: #f0f0f0;
  */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
  color: #666;
}

.section-title {
  font-size: 28px;
  font-weight: 600;
  margin: 12px 0 18px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 16px;
}

.card {
  background: var(--card);
  border-radius: 10px;
  box-shadow: var(--shadow);
  overflow: hidden;
  cursor: pointer;
  border: 1px solid #e5e5e5;
  transition: transform 0.15s ease;
}

.card:hover { transform: translateY(-3px); }

.card-img {
  height: 150px;
  background: #ddd center/cover no-repeat;
}

.summary-client-card {
  width: 120px;
}

.summary-client-card .card-img {
  width: 100px;
  height: 100px;
  margin: 10px auto 0;
  border-radius: 50%;
}

.summary-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 6px 0 18px;
}

.summary-client {
  display: flex;
  align-items: center;
  gap: 12px;
}

.summary-client img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #fff;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.summary-client-name {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.4px;
}

.summary-total-badge {
  background: var(--yellow);
  color: #111;
  border-radius: 12px;
  padding: 8px 12px;
  min-width: 120px;
  text-align: center;
  box-shadow: 0 2px 0 rgba(0,0,0,0.15);
}

.summary-total-badge .badge-label {
  font-size: 11px;
  text-transform: lowercase;
  letter-spacing: 0.4px;
}

.summary-total-badge .badge-value {
  font-family: var(--font-number);
  font-size: 18px;
  font-weight: 700;
}

.summary-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 16px;
}

.summary-right {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.summary-send {
  height: 74px;
  border-radius: 16px;
  background: var(--green);
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  box-shadow: 0 2px 0 rgba(0,0,0,0.2);
  cursor: pointer;
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.4px;
}

.summary-send img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}
.summary-section {
  background: #fff;
  border-radius: 16px;
  border: 1px solid #e6e6e6;
  padding: 16px;
  box-shadow: 0 2px 0 rgba(0,0,0,0.04);
}

.summary-section-title {
  text-align: center;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 14px;
}

.summary-row {
  display: grid;
  grid-template-columns: 54px 80px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 14px;
  background: #f4f7f9;
  margin-bottom: 10px;
}

.summary-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #ddd center/cover no-repeat;
}

.summary-price {
  font-family: var(--font-number);
  font-weight: 700;
  font-size: 16px;
}

.summary-tag {
  display: inline-block;
  margin-top: 6px;
  padding: 4px 10px;
  background: #f0f0f0;
  border-radius: 999px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.summary-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.summary-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 14px;
  background: #f3f4f6;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
}

.summary-option.active {
  background: #f6a4aa;
  border-color: rgba(0,0,0,0.1);
}

.card-label {
  padding: 12px 10px;
  text-align: center;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 0.4px;
}

.card.yellow .card-label {
  background: #d9a300;
  color: #fff;
}

.card.blue .card-label {
  background: #0c2aa6;
  color: #fff;
}

.card.red .card-label {
  background: #e53935;
  color: #fff;
}

.card-pill {
  padding: 6px 10px;
  border-top: 1px solid #eee;
  text-align: center;
}

.ingredient-thumbs {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 6px 8px 0;
  flex-wrap: wrap;
}

.ingredient-thumb {
  width: 46px;
  height: 46px;
  border-radius: 6px;
  background: #ddd center/cover no-repeat;
  border: 1px solid #e6e6e6;
}

.ingredient-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

.ingredient-tag {
  background: #f2f2f2;
  border: 1px solid #e3e3e3;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: #444;
  white-space: nowrap;
}

.ingredient-tags.order-tags {
  justify-content: flex-start;
  gap: 6px 8px;
}

.remove-btn {
  margin: 10px auto 12px;
  display: block;
  border: none;
  background: #eee;
  color: #333;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
}

.empty {
  color: var(--muted);
  font-size: 16px;
}

.arrow-btn {
  width: 80px;
  height: 80px;
  border-radius: 12px;
  border: 2px solid var(--yellow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  background: #fff;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.arrow-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 16px 0;
}

.summary {
  display: grid;
  gap: 18px;
}

.summary-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.kitchen-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}

.kitchen-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 14px;
  border: 2px solid #e6e6e6;
  cursor: pointer;
}

.kitchen-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.kitchen-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  background: #ddd;
}

.kitchen-name {
  font-size: 18px;
  font-weight: 600;
}

.kitchen-card h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

.kitchen-card {
  display: flex;
  flex-direction: column;
}

.kitchen-meta {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 8px;
  display: flex;
  gap: 10px;
  align-items: center;
}

.kitchen-items > div {
  margin-bottom: 4px;
}

.time-badge {
  background: #f0b400;
  color: #222;
  padding: 6px 10px;
  border-radius: 10px;
  font-weight: 700;
  line-height: 1.1;
  text-align: center;
  min-width: 110px;
}

.time-total {
  font-weight: 600;
  color: #222;
}

.order-flags {
  display: inline-flex;
  gap: 8px;
  margin-left: 10px;
}

.order-flags.inline {
  margin-left: 0;
  margin-top: 6px;
}

.flag {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.4px;
}

.flag.small {
  padding: 2px 8px;
  font-size: 10px;
}

.flag.gel {
  background: #e9f5ff;
  color: #1677d2;
}

.flag.endur {
  background: #fff1e6;
  color: #c15a00;
}

.kitchen-items {
  font-size: 14px;
}

.kitchen-time-footer {
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid #eee;
  color: #4e3600;
  font-weight: 600;
  font-size: 12px;
}

.kitchen-thumbs {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.kitchen-thumb {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #ddd center/cover no-repeat;
  border: 1px solid #e6e6e6;
}

.kitchen-refresh {
  margin: 10px 0 18px;
}

.kitchen-refresh-text {
  text-align: right;
  font-size: 14px;
  color: #111;
  margin-bottom: 6px;
}

.kitchen-refresh-bar {
  height: 14px;
  border-radius: 999px;
  background: #2a2a2a;
  overflow: hidden;
}

.kitchen-refresh-fill {
  height: 100%;
  width: 0%;
  background: repeating-linear-gradient(
    45deg,
    #1e88ff,
    #1e88ff 10px,
    #5aa9ff 10px,
    #5aa9ff 20px
  );
  transition: width 0.2s linear;
}

.kitchen-refresh.slim {
  margin: 0;
}

.kitchen-refresh.slim .kitchen-refresh-text {
  display: none;
}

.kitchen-refresh.slim .kitchen-refresh-bar {
  height: 4px;
  background: rgba(0,0,0,0.18);
}

.kitchen-refresh.slim .kitchen-refresh-fill {
  transition: width 0.08s linear;
}

.pay-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}

.pay-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 14px;
  border: 2px solid #e6e6e6;
  cursor: pointer;
}

.pay-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.pay-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  background: #ddd;
}

.pay-name {
  font-size: 18px;
  font-weight: 600;
}

.pay-total {
  font-weight: 700;
}

.pay-summary {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-top: 0;
}

.pay-modal-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 18px;
  margin-top: 12px;
}

.pay-section {
  background: #fafafa;
  border: 1px solid #e6e6e6;
  border-radius: 12px;
  padding: 12px;
}

.pay-section-title {
  font-weight: 700;
  text-align: center;
  margin-bottom: 10px;
}

.pay-section-title {
  font-weight: 700;
  text-align: center;
  margin-bottom: 10px;
}

.order-row {
  display: grid;
  grid-template-columns: 48px 70px 1fr;
  gap: 10px;
  align-items: center;
  padding: 8px;
  background: #f1f4f7;
  border-radius: 10px;
  margin-bottom: 8px;
}

.order-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: #e5e5e5 center/cover no-repeat;
}

.order-price {
  font-weight: 700;
}

.badge {
  padding: 6px 10px;
  border-radius: 8px;
  font-weight: 700;
  color: #fff;
  min-width: 90px;
  text-align: center;
}

.badge-label {
  font-size: 12px;
  opacity: 0.9;
}

.badge-value {
  font-size: 18px;
  line-height: 1.1;
}

.badge.total { background: #f0b400; color: #222; }
.badge.rebut { background: #d84545; }
.badge.sobran { background: #1d8e4a; }

.money-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.money-grid.dimmed {
  opacity: 0.6;
}

.received-gap {
  padding-top: 12px;
}

.money-item {
  position: relative;
  cursor: pointer;
  border-radius: 10px;
  border: 1px solid #e6e6e6;
  background: #fff;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80px;
}

.money-item img {
  max-width: 100%;
  max-height: 70px;
}

.money-count {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #d84545;
  color: #fff;
  border-radius: 12px;
  padding: 2px 6px;
  font-size: 12px;
  font-weight: 700;
}

.change-box {
  margin-top: 14px;
  padding: 14px;
  border-radius: 12px;
  background: #fdebed;
  border: 1px solid #f1c9cf;
}

.change-title {
  font-weight: 700;
  text-align: center;
  margin-bottom: 10px;
}

.money-item.blocked {
  opacity: 0.4;
  filter: grayscale(1);
}

.pay-footer-note {
  text-align: center;
  color: #666;
  font-size: 13px;
  margin-top: 6px;
}

@media (max-width: 900px) {
  .pay-modal-grid {
    grid-template-columns: 1fr;
  }
}
.kitchen-done {
  filter: grayscale(1);
  opacity: 0.5;
  transform: scale(0.50);
  transition: transform 1800ms ease-in, opacity 1800ms ease-in, filter 1800ms ease-in;
}


.order-header {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: space-between;
}

.order-header img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
}

.order-pill {
  padding: 6px 10px;
  border-radius: 8px;
  font-weight: 600;
  color: #fff;
}

.pill-date { background: #d84545; }
.pill-time { background: #f0b400; color: #222; }

.toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #f1a1a9;
  padding: 20px;
  border-radius: 12px;
  cursor: pointer;
  border: 2px solid transparent;
}

.toggle.active {
  border-color: #d43b4c;
  background: #ef7f8a;
}

.toggle-label {
  font-weight: 600;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.modal.hidden { display: none; }

.modal-card {
  background: #fff;
  width: min(900px, 92vw);
  max-height: 90vh;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
  display: flex;
  flex-direction: column;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid #e9e9e9;
}

.message-compose .modal-header {
  gap: 12px;
}

.message-compose .modal-header::before {
  content: '';
  width: 34px;
  height: 34px;
  background: url('/ui/images/comanda.gif') center/contain no-repeat;
  flex: 0 0 34px;
}

.modal-card.no-title .modal-header {
  display: none;
}

.modal-card.no-title .modal-body {
  padding-top: 16px;
}

.modal-card.custom-header .modal-header {
  border-bottom: none;
  padding: 18px 20px 8px;
}

.modal-body {
  padding: 18px 20px;
  overflow: auto;
}

.modal-footer {
  padding: 14px 20px 18px;
  border-top: 1px solid #e9e9e9;
  display: flex;
  justify-content: center;
}

.message-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.icon-btn {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
}

.message-input {
  width: 100%;
  min-height: 180px;
  padding: 12px 14px;
  font-size: 16px;
  border-radius: 10px;
  border: 1px solid #d9d9d9;
  background: #f7f7f7;
  resize: vertical;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 20px;
  background: #f2f2f2;
  margin: 6px;
  cursor: pointer;
  border: 2px solid transparent;
}

.chip.selected {
  border-color: var(--yellow-dark);
  background: #ffe7a8;
}

.toast {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 200px;
  background: #490b91d8;
  color: #fff;
  padding: 50px 24px 50px;
  border-radius: 0;
  box-shadow: 0 -6px 16px rgba(0,0,0,0.18);
  font-size: 38px;
  font-weight: 600;
  text-align: center;
  height: 25%;
}

.toast.hidden { display: none; }

.card-selected {
  border: 3px solid #0d47a1;
}

@media (max-width: 900px) {
  .actions { flex-wrap: wrap; }
  .card-img { height: 140px; }
}

@media (max-width: 1024px) {
  .brand {
    font-size: 20px;
  }

  .btn {
    font-size: 15px;
    padding: 9px 14px;
  }

  .grid {
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  }

  .card-img {
    height: 135px;
  }
}

@media (max-width: 768px) {
  .topbar {
    padding: 12px 16px;
  }

  .main {
    padding: 16px 16px 28px;
  }

  .grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
}
