/* ============================================================================
   Broccoli Console — Master Stylesheet
   Sherif UX: dashboard layout, gradient KPIs, zebra tables, RTL-aware
   ============================================================================ */

:root {
  /* Brand */
  --brand-50:  #eef7ed;
  --brand-100: #d0ead0;
  --brand-200: #a8d6a8;
  --brand-400: #4f8a4f;
  --brand-600: #2d5016;
  --brand-700: #1f3a0e;
  --brand-800: #14260a;
  --brand-grad: linear-gradient(135deg, #2d5016 0%, #4f8a4f 100%);

  /* Status colors */
  --status-pending:   #f59e0b;
  --status-accepted:  #3b82f6;
  --status-preparing: #8b5cf6;
  --status-ready:     #10b981;
  --status-out:       #06b6d4;
  --status-delivered: #22c55e;
  --status-declined:  #ef4444;
  --status-cancelled: #6b7280;

  /* Semantic */
  --success: #16a34a;
  --warning: #d97706;
  --danger:  #dc3545;
  --info:    #2563eb;

  /* Surfaces */
  --bg:        #f4f6f5;
  --surface:   #ffffff;
  --surface-2: #f9fafb;
  --border:    #e5e7eb;
  --border-2:  #d1d5db;
  --hover:     #f3f4f6;

  /* Text */
  --text:       #111827;
  --text-2:     #4b5563;
  --text-3:     #6b7280;
  --text-light: #ffffff;

  /* Shadows */
  --shadow-sm:  0 1px 2px rgba(0,0,0,0.04);
  --shadow:     0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-lg:  0 8px 16px rgba(0,0,0,0.08), 0 4px 8px rgba(0,0,0,0.04);
  --shadow-xl:  0 20px 40px rgba(0,0,0,0.12);

  /* Geometry */
  --radius-sm: 6px;
  --radius:    10px;
  --radius-lg: 14px;
  --radius-xl: 20px;

  /* Type */
  --font-en: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-ar: 'Cairo', system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-en);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

[dir="rtl"] html,
[dir="rtl"] body,
body[data-locale="ar"] {
  font-family: var(--font-ar);
}

a { color: var(--brand-600); text-decoration: none; }
a:hover { text-decoration: underline; }

button { font-family: inherit; cursor: pointer; }

/* ============================================================================
   Topbar
   ============================================================================ */
.topbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 10px 24px;
  background: var(--brand-grad);
  color: var(--text-light);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text-light);
  text-decoration: none;
}
.brand:hover { text-decoration: none; }

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: rgba(255,255,255,0.16);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.22);
  flex: 0 0 auto;
}
.brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.brand-text strong { font-size: 16px; font-weight: 700; }
.brand-text small  { font-size: 11px; opacity: 0.85; font-weight: 400; }

.topnav {
  display: flex;
  gap: 4px;
  justify-self: center;
  flex-wrap: wrap;
}

.topnav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  border-radius: 8px;
  font-weight: 500;
  font-size: 14px;
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.topnav-link:hover {
  background: rgba(255,255,255,0.1);
  color: var(--text-light);
  text-decoration: none;
}
.topnav-link.is-active {
  background: rgba(255,255,255,0.18);
  color: var(--text-light);
}
.topnav-icon {
  display: inline-block;
  width: 8px; height: 8px;
  background: var(--status-pending);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

.topbar-right {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border-radius: 8px;
  background: rgba(255,255,255,0.1);
  color: var(--text-light);
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
  transition: background .15s;
}
.lang-toggle:hover { background: rgba(255,255,255,0.18); text-decoration: none; }

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(255,255,255,0.1);
  border-radius: 20px;
  font-size: 13px;
}
.user-chip-name { font-weight: 600; }
.user-chip-role {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.85;
  background: rgba(0,0,0,0.15);
  padding: 2px 8px;
  border-radius: 10px;
}
.user-chip-role.is-owner { background: rgba(255,193,7,0.3); }

.btn-logout {
  padding: 7px 14px;
  background: rgba(0,0,0,0.18);
  color: var(--text-light);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: background .15s;
}
.btn-logout:hover { background: rgba(0,0,0,0.32); text-decoration: none; }

/* ============================================================================
   Page chrome
   ============================================================================ */
.page {
  max-width: 1500px;
  margin: 0 auto;
  padding: 24px;
}

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
}

.page-title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.page-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* ============================================================================
   Buttons
   ============================================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all .15s ease;
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
  background: var(--brand-600);
  color: var(--text-light);
  border-color: var(--brand-600);
}
.btn-primary:hover { background: var(--brand-700); border-color: var(--brand-700); color: var(--text-light); }

.btn-success {
  background: var(--success);
  color: var(--text-light);
  border-color: var(--success);
}
.btn-success:hover { background: #15803d; color: var(--text-light); }

.btn-danger {
  background: var(--danger);
  color: var(--text-light);
  border-color: var(--danger);
}
.btn-danger:hover { background: #b91c1c; color: var(--text-light); }

.btn-warning {
  background: var(--warning);
  color: var(--text-light);
  border-color: var(--warning);
}
.btn-warning:hover { background: #b45309; color: var(--text-light); }

.btn-info {
  background: var(--info);
  color: var(--text-light);
  border-color: var(--info);
}
.btn-info:hover { background: #1d4ed8; color: var(--text-light); }

.btn-ghost {
  background: transparent;
  color: var(--text-2);
  border-color: var(--border);
}
.btn-ghost:hover { background: var(--hover); }

.btn-sm { padding: 6px 12px; font-size: 13px; }

/* ============================================================================
   Filter bar
   ============================================================================ */
.filterbar {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.filter-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-3);
}

.filter-select,
.filter-input {
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: border .15s, box-shadow .15s;
}
.filter-select:focus,
.filter-input:focus {
  border-color: var(--brand-400);
  box-shadow: 0 0 0 3px rgba(79,138,79,0.15);
}

.filter-applied-badge {
  padding: 3px 9px;
  background: var(--brand-50);
  color: var(--brand-700);
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

/* ============================================================================
   KPI cards (centered grid at top)
   ============================================================================ */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.kpi-card {
  position: relative;
  padding: 18px 20px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.kpi-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--brand-grad);
}
.kpi-card.kpi-warning::before { background: linear-gradient(135deg, #f59e0b, #fbbf24); }
.kpi-card.kpi-danger::before  { background: linear-gradient(135deg, #ef4444, #f87171); }
.kpi-card.kpi-info::before    { background: linear-gradient(135deg, #2563eb, #60a5fa); }
.kpi-card.kpi-success::before { background: linear-gradient(135deg, #16a34a, #4ade80); }

.kpi-card-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-3);
  margin-bottom: 8px;
}
.kpi-card-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.1;
}
.kpi-card-meta {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 6px;
}
.kpi-card-meta.is-up { color: var(--success); }
.kpi-card-meta.is-down { color: var(--danger); }

/* ============================================================================
   Generic card
   ============================================================================ */
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card-head {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.card-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.card-body { padding: 20px; }

/* ============================================================================
   Tables (zebra, no horizontal scroll)
   ============================================================================ */
.table-wrap {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}
table.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.table thead th {
  text-align: start;
  padding: 12px 16px;
  background: var(--surface-2);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-3);
  border-bottom: 1px solid var(--border);
  white-space: normal;
  word-wrap: break-word;
}
.table tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  word-wrap: break-word;
}
.table tbody tr:nth-child(even) { background: var(--surface-2); }
.table tbody tr:hover { background: var(--hover); }
.table tbody tr:last-child td { border-bottom: none; }

.text-end   { text-align: end; }
.text-center{ text-align: center; }
.muted      { color: var(--text-3); }
.danger     { color: var(--danger); }
.success    { color: var(--success); }
.warning    { color: var(--warning); }
.nowrap     { white-space: nowrap; }

/* ============================================================================
   Badges
   ============================================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  background: var(--surface-2);
  color: var(--text-2);
  border: 1px solid var(--border);
}
.badge-status {
  color: var(--text-light);
  border: none;
}
.badge-status[data-status="pending"]          { background: var(--status-pending); }
.badge-status[data-status="accepted"]         { background: var(--status-accepted); }
.badge-status[data-status="preparing"]        { background: var(--status-preparing); }
.badge-status[data-status="ready"]            { background: var(--status-ready); }
.badge-status[data-status="out_for_delivery"] { background: var(--status-out); }
.badge-status[data-status="delivered"]        { background: var(--status-delivered); }
.badge-status[data-status="declined"]         { background: var(--status-declined); }
.badge-status[data-status="cancelled"]        { background: var(--status-cancelled); }

/* ============================================================================
   Live orders board
   ============================================================================ */
.live-board {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 16px;
}

.order-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 2px solid transparent;
  transition: border-color .2s, box-shadow .2s, transform .2s;
  display: flex;
  flex-direction: column;
}
.order-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

.order-card.is-new {
  border-color: var(--status-pending);
  animation: order-pulse 1.4s ease-in-out infinite;
}
@keyframes order-pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(245,158,11,0.4); }
  50%     { box-shadow: 0 0 0 10px rgba(245,158,11,0); }
}

.order-card.is-urgent {
  border-color: var(--warning);
  animation: order-flash 1s ease-in-out infinite;
}
.order-card.is-critical {
  border-color: var(--danger);
  animation: order-flash 0.6s ease-in-out infinite;
  background: linear-gradient(0deg, #fff 80%, #fee2e2 100%);
}
@keyframes order-flash {
  0%,100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.5); }
  50%     { box-shadow: 0 0 0 12px rgba(239,68,68,0); }
}

.order-card-head {
  padding: 12px 16px;
  background: var(--brand-grad);
  color: var(--text-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.order-code {
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.5px;
}
.order-time {
  font-size: 12px;
  opacity: 0.92;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.order-card-body {
  padding: 14px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.order-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-size: 13px;
}
.order-meta-row > div { display: inline-flex; align-items: center; gap: 4px; }
.order-meta-label { color: var(--text-3); font-size: 11px; text-transform: uppercase; letter-spacing: 0.3px; }
.order-meta-value { color: var(--text); font-weight: 500; }

.order-customer {
  padding: 10px 12px;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 1.4;
}
.order-customer-name { font-weight: 600; color: var(--text); }
.order-customer-phone { color: var(--text-2); font-family: monospace; }
.order-customer-phone a { color: var(--brand-600); }
.order-customer-address { color: var(--text-2); margin-top: 4px; font-size: 12px; }

.order-items-list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 13px;
}
.order-items-list li {
  padding: 6px 0;
  border-bottom: 1px dashed var(--border);
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.order-items-list li:last-child { border-bottom: none; }
.order-item-name { flex: 1; }
.order-item-qty { font-weight: 700; color: var(--brand-700); }
.order-item-options {
  display: block;
  font-size: 11px;
  color: var(--text-3);
  margin-top: 2px;
}

.order-totals {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 10px;
  border-top: 2px solid var(--brand-50);
}
.order-totals-label { font-size: 12px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.4px; }
.order-totals-value { font-size: 18px; font-weight: 700; color: var(--brand-700); }

.order-card-actions {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  background: var(--surface-2);
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.order-card-actions .btn { flex: 1; min-width: 110px; }

/* Empty state */
.empty-state {
  padding: 60px 20px;
  text-align: center;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.empty-state-icon {
  font-size: 56px;
  margin-bottom: 16px;
  opacity: 0.6;
}
.empty-state-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 6px 0;
}
.empty-state-sub {
  font-size: 14px;
  color: var(--text-3);
  margin: 0;
}

/* ============================================================================
   Toasts
   ============================================================================ */
.toast-stack {
  position: fixed;
  bottom: 20px;
  inset-inline-end: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 1000;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  padding: 10px 16px;
  background: var(--text);
  color: var(--text-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 240px;
  max-width: 360px;
  font-size: 14px;
  animation: toast-in .3s ease both;
}
.toast.is-success { background: var(--success); }
.toast.is-error   { background: var(--danger); }
.toast.is-warning { background: var(--warning); }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================================
   Modal
   ============================================================================ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 800;
  padding: 20px;
}
.modal-backdrop.is-open { display: flex; }
.modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 460px;
  overflow: hidden;
  animation: modal-in .2s ease;
}
@keyframes modal-in {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}
.modal-head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 16px;
  font-weight: 600;
}
.modal-body { padding: 20px; }
.modal-foot {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.modal-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  outline: none;
}
.modal-input:focus { border-color: var(--brand-400); box-shadow: 0 0 0 3px rgba(79,138,79,0.15); }
.modal-label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
}

/* ============================================================================
   Login screen
   ============================================================================ */
body.is-login {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--brand-grad);
}
.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 36px 32px 32px;
  box-shadow: var(--shadow-xl);
}
.login-brand {
  text-align: center;
  margin-bottom: 28px;
}
.login-brand-mark { font-size: 48px; }
.login-brand-name { font-size: 22px; font-weight: 700; color: var(--brand-700); margin-top: 6px; }
.login-brand-sub  { font-size: 13px; color: var(--text-3); }

.login-field { margin-bottom: 14px; }
.login-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 15px;
  outline: none;
  transition: border .15s, box-shadow .15s;
}
.login-input:focus {
  border-color: var(--brand-400);
  box-shadow: 0 0 0 3px rgba(79,138,79,0.15);
}
.login-error {
  background: #fef2f2;
  color: #b91c1c;
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 14px;
  border: 1px solid #fecaca;
}
.login-submit {
  width: 100%;
  padding: 12px;
  background: var(--brand-600);
  color: var(--text-light);
  border: none;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}
.login-submit:hover { background: var(--brand-700); }

/* ============================================================================
   Footer
   ============================================================================ */
.console-footer {
  text-align: center;
  padding: 20px 12px 30px;
  font-size: 12px;
  color: var(--text-3);
}

/* ============================================================================
   Sound indicator
   ============================================================================ */
.sound-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s;
}
.sound-toggle:hover { background: var(--hover); }
.sound-toggle.is-off { color: var(--text-3); border-color: var(--border); }
.sound-toggle.is-on  { color: var(--brand-700); border-color: var(--brand-200); background: var(--brand-50); }

/* ============================================================================
   Mobile responsive
   ============================================================================ */
@media (max-width: 900px) {
  .topbar {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 8px;
    padding: 10px 14px;
  }
  .topnav {
    grid-column: 1 / -1;
    justify-self: stretch;
    overflow-x: auto;
    padding: 4px 0;
    -webkit-overflow-scrolling: touch;
  }
  .topnav::-webkit-scrollbar { display: none; }
  .brand-text small { display: none; }
  .user-chip { display: none; }
  .page { padding: 14px; }
  .live-board { grid-template-columns: 1fr; gap: 12px; }
  .order-card-actions { flex-direction: column; }
  .order-card-actions .btn { flex: none; min-width: 0; }
}

/* RTL adjustments */
[dir="rtl"] .order-code   { letter-spacing: 0; }
[dir="rtl"] .topbar       { direction: rtl; }

/* Visible focus rings for keyboard users */
*:focus-visible {
  outline: 2px solid var(--brand-400);
  outline-offset: 2px;
}


/* ============================================================================
   Android APK WebView Mode
   URL: /orders/live.php?app=1
   Purpose: Android handles native notifications; web console only displays orders.
   ============================================================================ */

body.is-android-app-mode {
  background: #f6f7f9 !important;
  overflow-x: hidden !important;
}

body.is-android-app-mode .topbar,
body.is-android-app-mode .console-footer,
body.is-android-app-mode .footer,
body.is-android-app-mode footer.app-footer,
body.is-android-app-mode .toast-stack,
body.is-android-app-mode #enableAlertsBtn,
body.is-android-app-mode #testPushBtn,
body.is-android-app-mode #soundToggle,
body.is-android-app-mode #alertsNote {
  display: none !important;
}

body.is-android-app-mode .page {
  padding: 10px !important;
  margin: 0 !important;
  max-width: 100% !important;
  overflow-x: hidden !important;
}

body.is-android-app-mode .page-head {
  margin: 0 0 10px 0 !important;
  padding: 0 !important;
  display: block !important;
}

body.is-android-app-mode .page-title {
  font-size: 28px !important;
  line-height: 1.1 !important;
  margin: 0 0 10px 0 !important;
}

body.is-android-app-mode .page-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  margin-bottom: 10px !important;
}

body.is-android-app-mode .filter-select {
  width: 100% !important;
  min-height: 42px !important;
  border-radius: 12px !important;
}

body.is-android-app-mode .live-board {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 12px !important;
  width: 100% !important;
  max-width: 100% !important;
}

body.is-android-app-mode .order-card {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  border-radius: 18px !important;
  overflow: hidden !important;
}

body.is-android-app-mode .order-card-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  padding: 14px !important;
}

body.is-android-app-mode .order-code {
  font-size: 22px !important;
  line-height: 1.15 !important;
  word-break: break-word !important;
}

body.is-android-app-mode .order-time {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-shrink: 0 !important;
}

body.is-android-app-mode .badge-status,
body.is-android-app-mode .status-badge {
  font-size: 13px !important;
  padding: 8px 10px !important;
  border-radius: 12px !important;
}

body.is-android-app-mode .order-card-body {
  padding: 14px !important;
}

body.is-android-app-mode .order-meta-row {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 8px !important;
  margin-bottom: 12px !important;
}

body.is-android-app-mode .order-customer {
  padding: 12px !important;
  border-radius: 14px !important;
  margin-bottom: 12px !important;
}

body.is-android-app-mode .order-items-list li {
  display: grid !important;
  grid-template-columns: 1fr auto !important;
  gap: 10px !important;
  align-items: start !important;
  padding: 10px 0 !important;
}

body.is-android-app-mode .order-totals {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  gap: 12px !important;
}

body.is-android-app-mode .order-totals-value {
  font-size: 22px !important;
  white-space: nowrap !important;
}

body.is-android-app-mode .order-card-actions {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 8px !important;
  padding: 12px !important;
  background: #f7f8fa !important;
}

body.is-android-app-mode .order-card-actions .btn,
body.is-android-app-mode .order-actions .btn,
body.is-android-app-mode .card-actions .btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 0 !important;
  width: 100% !important;
  min-height: 44px !important;
  border-radius: 14px !important;
  font-size: 14px !important;
  white-space: normal !important;
}

body.is-android-app-mode .order-card-actions .btn:last-child:nth-child(odd) {
  grid-column: 1 / -1 !important;
}

body.is-android-app-mode table {
  width: 100% !important;
  max-width: 100% !important;
}

body.is-android-app-mode .table-responsive,
body.is-android-app-mode .table-wrap,
body.is-android-app-mode .order-details,
body.is-android-app-mode .details,
body.is-android-app-mode .summary,
body.is-android-app-mode .totals {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
}

body.is-android-app-mode .modal {
  width: calc(100vw - 24px) !important;
  max-width: calc(100vw - 24px) !important;
}
