/* ============================================================
   MasFlow — components.css
   Ortak UI bileşenleri: butonlar, kartlar, toast, badge
   ============================================================ */

/* ── TOAST ── */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: #1e2530;
  border: 1px solid #2d3748;
  color: #e6edf3;
  border-radius: 50px;
  padding: 10px 20px;
  font-size: 13px;
  z-index: 9999;
  transition: transform .3s cubic-bezier(.32,1.6,.6,1);
  white-space: nowrap;
  pointer-events: none;
}
.toast.show        { transform: translateX(-50%) translateY(0); }
.toast.success     { border-color: var(--status-available); color: var(--status-available); }
.toast.error       { border-color: var(--status-occupied);  color: var(--status-occupied); }
.toast.info        { border-color: #58a6ff; color: #58a6ff; }

/* ── STATUS BADGES ── */
.badge {
  display: inline-block;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 600;
  letter-spacing: .3px;
}
.badge-open      { background: rgba(63,185,80,.15);  color: var(--status-available); }
.badge-printed   { background: rgba(88,166,255,.15); color: #58a6ff; }
.badge-paid      { background: rgba(139,148,158,.15);color: #8b949e; }
.badge-cancelled { background: rgba(248,81,73,.15);  color: var(--status-occupied); }
.badge-pending   { background: rgba(210,153,34,.15); color: var(--status-pending); }
.badge-preparing { background: rgba(88,166,255,.15); color: #58a6ff; }
.badge-ready     { background: rgba(63,185,80,.15);  color: var(--status-available); }
.badge-served    { background: rgba(139,148,158,.15);color: #8b949e; }

/* ── BUTONLAR ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 500;
  transition: all .2s;
  white-space: nowrap;
}
.btn:disabled { opacity: .4; cursor: not-allowed; }

.btn-primary {
  background: var(--a-gold);
  color: #0d1117;
  border-color: var(--a-gold);
}
.btn-primary:hover { background: var(--a-gold-l); }

.btn-secondary {
  background: #1e2530;
  color: #e6edf3;
  border-color: #2d3748;
}
.btn-secondary:hover { border-color: var(--a-gold); color: var(--a-gold); }

.btn-danger {
  background: none;
  color: var(--status-occupied);
  border-color: var(--status-occupied);
}
.btn-danger:hover { background: rgba(248,81,73,.1); }

.btn-ghost {
  background: none;
  color: #8b949e;
  border-color: transparent;
}
.btn-ghost:hover { color: #e6edf3; background: rgba(255,255,255,.06); }

.btn-sm { padding: 5px 12px; font-size: 12px; border-radius: var(--radius-xs); }
.btn-lg { padding: 13px 24px; font-size: 15px; }
.btn-full { width: 100%; }

/* ── INPUTS ── */
.input {
  width: 100%;
  background: #1e2530;
  border: 1px solid #2d3748;
  color: #e6edf3;
  font-size: 13px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color .2s;
}
.input:focus     { border-color: var(--a-gold); }
.input::placeholder { color: #8b949e; }

.input-light {
  background: #f3ede4;
  border: 1px solid #e8ddd0;
  color: #1a1208;
}
.input-light:focus { border-color: var(--c-gold); }
.input-light::placeholder { color: #8a7660; }

/* ── KART ── */
.card {
  background: #1e2530;
  border: 1px solid #2d3748;
  border-radius: var(--radius);
  padding: 16px;
}
.card-light {
  background: #ffffff;
  border: 1px solid #e8ddd0;
  border-radius: var(--radius);
  padding: 16px;
}

/* ── DIVIDER ── */
.divider {
  width: 100%;
  height: 1px;
  background: #2d3748;
  margin: 12px 0;
}
.divider-light { background: #e8ddd0; }

/* ── OVERLAY ── */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
  backdrop-filter: blur(4px);
}
.overlay.open { opacity: 1; pointer-events: all; }

/* ── DRAWER ── */
.drawer {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: #161b22;
  border-radius: 24px 24px 0 0;
  z-index: 201;
  transform: translateY(100%);
  transition: transform .35s cubic-bezier(.32,1,.6,1);
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -8px 40px rgba(0,0,0,.4);
}
.drawer.open { transform: translateY(0); }
.drawer-handle {
  width: 40px; height: 4px;
  background: #2d3748;
  border-radius: 2px;
  margin: 12px auto 0;
  flex-shrink: 0;
}
.drawer-header {
  padding: 16px 20px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #2d3748;
  flex-shrink: 0;
}
.drawer-body { overflow-y: auto; flex: 1; padding: 8px 16px; }
.drawer-footer {
  padding: 16px 20px;
  border-top: 1px solid #2d3748;
  flex-shrink: 0;
}
.drawer-close {
  background: none;
  border: none;
  color: #8b949e;
  font-size: 24px;
  line-height: 1;
  padding: 4px;
}

/* ── TABLO ── */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  text-align: left;
  font-size: 11px;
  color: #8b949e;
  font-weight: 600;
  padding: 8px 12px;
  border-bottom: 1px solid #2d3748;
  letter-spacing: .5px;
  text-transform: uppercase;
}
.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,.04);
  font-size: 13px;
  color: #e6edf3;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(255,255,255,.02); }

/* ── EMPTY STATE ── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: #8b949e;
  text-align: center;
  gap: 12px;
}
.empty-state .icon { font-size: 48px; opacity: .4; }
.empty-state p     { font-size: 14px; line-height: 1.6; }
