/* =========================================================================
   MachiYou wireframes — DESKTOP components (panel restauratora / operatora)

   Używa tokenów z wireframe.css (--bg-*, --text*, --border*, --cta*).
   Komponenty fakeują browser viewport 1440×900 zamiast phone 375×812.
   ========================================================================= */

/* =========================================================================
   BROWSER FRAME — wf-browser (zamiast wf-phone)
   ========================================================================= */

.wf-browser {
  width: 1100px;
  max-width: 100%;
  background: var(--bg-frame);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
}

.wf-browser-bar {
  background: var(--bg-block);
  border-bottom: 1px solid var(--border);
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.wf-browser-dots {
  display: flex;
  gap: 6px;
}

.wf-browser-dots span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--border-dark);
}

.wf-browser-dots span:nth-child(1) { background: #ed6a5e; }
.wf-browser-dots span:nth-child(2) { background: #f4bf4f; }
.wf-browser-dots span:nth-child(3) { background: #61c554; }

.wf-browser-url {
  flex: 1;
  background: var(--bg-frame);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 12px;
  font-size: 11px;
  color: var(--text-muted);
  font-family: ui-monospace, SFMono-Regular, monospace;
}

.wf-browser .wf-app {
  display: flex;
  min-height: 720px;
  background: var(--bg-page);
}

/* =========================================================================
   SIDEBAR — wf-sidebar (collapsible, persistent left)
   ========================================================================= */

.wf-sidebar {
  width: 220px;
  background: var(--text);
  color: var(--bg-frame);
  display: flex;
  flex-direction: column;
  padding: 16px 0;
  flex-shrink: 0;
}

.wf-sidebar--collapsed {
  width: 56px;
}

.wf-sidebar-brand {
  padding: 0 16px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.wf-sidebar-brand-logo {
  width: 28px;
  height: 28px;
  background: var(--bg-frame);
  color: var(--text);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}

.wf-sidebar-brand-name {
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.02em;
}

.wf-sidebar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 16px;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  border-left: 2px solid transparent;
}

.wf-sidebar-item:hover {
  color: var(--bg-frame);
  background: rgba(255, 255, 255, 0.05);
}

.wf-sidebar-item--active {
  color: var(--bg-frame);
  background: rgba(255, 255, 255, 0.08);
  border-left-color: var(--bg-frame);
  font-weight: 700;
}

.wf-sidebar-item-icon {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}

.wf-sidebar-section-title {
  padding: 14px 16px 6px;
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  font-weight: 700;
}

.wf-sidebar-footer {
  margin-top: auto;
  padding: 16px 16px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
}

.wf-sidebar-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-frame);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 11px;
  flex-shrink: 0;
}

/* =========================================================================
   MAIN — content area to the right of sidebar
   ========================================================================= */

.wf-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.wf-topbar {
  background: var(--bg-frame);
  border-bottom: 1px solid var(--border);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.wf-topbar-title {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.wf-topbar-kicker {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
}

.wf-topbar-h1 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.wf-topbar-venue {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--bg-block-dim);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.wf-topbar-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.wf-content {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.wf-content-narrow {
  max-width: 880px;
  margin: 0 auto;
  width: 100%;
}

/* =========================================================================
   STAT CARD — wf-stat-card (KPI dashboard tile)
   ========================================================================= */

.wf-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.wf-stat-card {
  background: var(--bg-frame);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.wf-stat-card-label {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
}

.wf-stat-card-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.1;
}

.wf-stat-card-delta {
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.wf-stat-card-delta--up { color: #2e7d32; }
.wf-stat-card-delta--down { color: #c62828; }
.wf-stat-card-delta--flat { color: var(--text-muted); }

/* =========================================================================
   TABLE — wf-table
   ========================================================================= */

.wf-table {
  width: 100%;
  background: var(--bg-frame);
  border: 1px solid var(--border);
  border-radius: 8px;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
}

.wf-table thead {
  background: var(--bg-block);
}

.wf-table th {
  text-align: left;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
}

.wf-table td {
  padding: 10px 14px;
  font-size: 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.wf-table tbody tr:last-child td {
  border-bottom: none;
}

.wf-table tbody tr:hover {
  background: var(--bg-block-dim);
}

.wf-table-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

/* =========================================================================
   STATUS PILL — wf-status-pill
   ========================================================================= */

.wf-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--bg-block);
  color: var(--text);
}

.wf-status-pill--success { background: #e8f5e9; color: #1b5e20; }
.wf-status-pill--warning { background: #fff8e1; color: #ef6c00; }
.wf-status-pill--danger { background: #ffebee; color: #b71c1c; }
.wf-status-pill--info { background: #e3f2fd; color: #0d47a1; }
.wf-status-pill--neutral { background: var(--bg-block); color: var(--text-muted); }

.wf-status-pill::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

/* =========================================================================
   HORIZONTAL TABS — wf-tabs-h (np. venue detail tabs)
   ========================================================================= */

.wf-tabs-h {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  background: var(--bg-frame);
}

.wf-tabs-h-item {
  padding: 12px 18px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  text-decoration: none;
}

.wf-tabs-h-item:hover {
  color: var(--text);
}

.wf-tabs-h-item--active {
  color: var(--text);
  border-bottom-color: var(--text);
}

/* =========================================================================
   MODAL — wf-modal
   ========================================================================= */

.wf-modal-backdrop {
  position: relative;
  background: rgba(0, 0, 0, 0.4);
  padding: 60px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 720px;
  border-radius: 10px;
}

.wf-modal-shell {
  width: 560px;
  max-width: 100%;
  background: var(--bg-frame);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
}

.wf-modal-shell--lg {
  width: 760px;
}

.wf-modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.wf-modal-header h2 {
  font-size: 15px;
  font-weight: 700;
  margin: 0;
  flex: 1;
}

.wf-modal-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 60vh;
  overflow-y: auto;
}

.wf-modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* =========================================================================
   TOAST — wf-toast (preview state, non-functional)
   ========================================================================= */

.wf-toast {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--text);
  color: var(--bg-frame);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.wf-toast--success::before { content: '✓'; font-weight: 700; }
.wf-toast--error::before { content: '✗'; font-weight: 700; }
.wf-toast--info::before { content: 'ⓘ'; font-weight: 700; }

/* =========================================================================
   SEARCH BAR — wf-search-bar
   ========================================================================= */

.wf-search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-frame);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  color: var(--text-muted);
}

.wf-search-bar input {
  border: none;
  outline: none;
  background: transparent;
  flex: 1;
  font-size: 12px;
  color: var(--text);
}

/* =========================================================================
   KANBAN — wf-kanban-column (orders live queue)
   ========================================================================= */

.wf-kanban {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  min-height: 480px;
}

.wf-kanban-column {
  background: var(--bg-block-dim);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  padding: 10px;
  gap: 8px;
  min-height: 100%;
}

.wf-kanban-column-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 6px 8px;
  border-bottom: 1px solid var(--border);
}

.wf-kanban-column-title {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text);
}

.wf-kanban-card {
  background: var(--bg-frame);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 11px;
  cursor: pointer;
}

.wf-kanban-card:hover {
  border-color: var(--text);
}

/* =========================================================================
   FLOOR PLAN — wf-floor-plan (stoliki grid editor)
   ========================================================================= */

.wf-floor-plan {
  background: var(--bg-frame);
  border: 2px dashed var(--border);
  border-radius: 8px;
  padding: 24px;
  min-height: 360px;
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fill, 90px);
  gap: 14px;
  align-content: start;
}

.wf-floor-table {
  width: 90px;
  height: 90px;
  background: var(--bg-block);
  border: 2px solid var(--text);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  font-size: 11px;
  color: var(--text);
  font-weight: 700;
}

.wf-floor-table--round {
  border-radius: 50%;
}

.wf-floor-table--occupied {
  background: #ffebee;
  border-color: #b71c1c;
  color: #b71c1c;
}

.wf-floor-table--reserved {
  background: #fff8e1;
  border-color: #ef6c00;
  color: #ef6c00;
}

/* =========================================================================
   CALENDAR — wf-calendar-month
   ========================================================================= */

.wf-calendar-month {
  background: var(--bg-frame);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.wf-calendar-month-head {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: var(--bg-block);
  border-bottom: 1px solid var(--border);
}

.wf-calendar-month-day-name {
  padding: 8px 6px;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: center;
  font-weight: 700;
}

.wf-calendar-month-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.wf-calendar-month-cell {
  min-height: 84px;
  padding: 6px 8px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  cursor: pointer;
}

.wf-calendar-month-cell:nth-child(7n) {
  border-right: none;
}

.wf-calendar-month-cell--muted { color: var(--text-muted); background: var(--bg-block-dim); }
.wf-calendar-month-cell--today { background: var(--bg-block); font-weight: 700; }

.wf-calendar-event {
  background: var(--text);
  color: var(--bg-frame);
  border-radius: 3px;
  padding: 2px 5px;
  font-size: 9px;
  font-weight: 600;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wf-calendar-event--pending { background: #ef6c00; }
.wf-calendar-event--cancelled { background: var(--border-dark); text-decoration: line-through; }

/* =========================================================================
   FORM GRID — wf-form-grid (panel restauratora ma dużo formularzy)
   ========================================================================= */

.wf-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.wf-form-grid--full {
  grid-template-columns: 1fr;
}

.wf-form-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wf-form-section-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border);
}

/* =========================================================================
   EMPTY STATE — wf-empty
   ========================================================================= */

.wf-empty {
  background: var(--bg-frame);
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 60px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  color: var(--text-muted);
}

.wf-empty-icon {
  font-size: 36px;
  opacity: 0.5;
}
