/* ============================================================
   resteye.ai Cloud — app.css
   Dark theme: sidebar + main layout
   ============================================================ */

:root {
  --sidebar-width: 220px;
  --topbar-height: 56px;
  --bg-dark:    #0f1117;
  --bg-sidebar: #161b27;
  --bg-card:    #1c2333;
  --border:     rgba(255,255,255,.08);
  --text-muted: #6c757d;

  /* Brand tokens (resteye.ai) */
  --brand-primary:      #1656D5;  /* logo "eye", primary actions */
  --brand-primary-dark: #0F44B0;  /* hover/active */
  --brand-bg-deep:      #0A0F1F;  /* deep dark — login bg, mark on-dark */

  /* Override Bootstrap primary so .text-primary, .btn-primary, .bg-primary use brand color */
  --bs-primary:     #1656D5;
  --bs-primary-rgb: 22, 86, 213;
}

/* ── Body ─────────────────────────────────────────────────── */
body {
  background-color: var(--bg-dark);
  color: #e0e0e0;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: .9rem;
}

/* ── Layout shell ─────────────────────────────────────────── */
.foodai-body {
  display: flex;
  min-height: 100vh;
}

.foodai-sidebar {
  width: var(--sidebar-width);
  min-height: 100vh;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
}

.foodai-main {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── Brand ────────────────────────────────────────────────── */
.foodai-brand {
  border-bottom: 1px solid var(--border);
  min-height: var(--topbar-height);
}

/* ── Sidebar nav ──────────────────────────────────────────── */
.foodai-nav-link {
  color: #adb5bd;
  border-radius: 6px;
  padding: .45rem .75rem;
  display: flex;
  align-items: center;
  gap: .55rem;
  font-size: .875rem;
  transition: background .15s, color .15s;
}

.foodai-nav-link:hover {
  background: rgba(255,255,255,.06);
  color: #fff;
}

.foodai-nav-link.active {
  background: rgba(13,110,253,.2);
  color: #6ea8fe;
  font-weight: 500;
}

.foodai-nav-link i {
  font-size: 1rem;
  width: 1.2rem;
  text-align: center;
}

.foodai-nav-divider {
  border-top: 1px solid var(--border);
}

/* ── User panel ───────────────────────────────────────────── */
.foodai-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #0d6efd;
  color: #fff;
  font-size: .8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ── Top bar ──────────────────────────────────────────────── */
.foodai-topbar {
  height: var(--topbar-height);
  background: var(--bg-sidebar);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  overflow: visible;   /* Bootstrap dropdown menu musí přesahovat topbar */
}

/* ── Content ──────────────────────────────────────────────── */
.foodai-content {
  flex: 1;
}

/* ── Cards ────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.card-header {
  background: transparent;
  border-bottom: 1px solid var(--border);
}

/* ── Tables ───────────────────────────────────────────────── */
.table {
  --bs-table-bg: transparent;
  --bs-table-striped-bg: rgba(255,255,255,.03);
  --bs-table-hover-bg: rgba(255,255,255,.05);
  --bs-table-color: #dee2e6;
  --bs-table-border-color: var(--border);
}

/* ── Stat cards ───────────────────────────────────────────── */
.foodai-stat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
}

.foodai-stat .stat-value {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  color: #fff;
}

.foodai-stat .stat-label {
  font-size: .78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-top: .25rem;
}

.foodai-stat-highlight {
  border-color: rgba(255, 193, 7, .2);
  background: linear-gradient(135deg, var(--bg-card) 60%, rgba(255,193,7,.04));
}

.foodai-stat-locked {
  opacity: .65;
  border-style: dashed;
}

/* ── Badge overrides ──────────────────────────────────────── */
.badge {
  font-weight: 500;
}

/* ── Forms (dark) ─────────────────────────────────────────── */
.foodai-input {
  background: #0f1117;
  border-color: rgba(255,255,255,.15);
  color: #e0e0e0;
}

.foodai-input:focus {
  background: #0f1117;
  border-color: #0d6efd;
  color: #fff;
  box-shadow: 0 0 0 .2rem rgba(13,110,253,.25);
}

.foodai-input::placeholder {
  color: #555;
}

/* ── Login page ───────────────────────────────────────────── */
.foodai-login-body {
  background: var(--bg-dark);
  min-height: 100vh;
}

.foodai-login-card {
  width: 100%;
  max-width: 380px;
  background: var(--bg-sidebar);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2.5rem 2rem;
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
}

.foodai-login-logo {
  width: 56px;
  height: 56px;
  background: rgba(13,110,253,.15);
  border: 1px solid rgba(13,110,253,.3);
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #6ea8fe;
}

/* Input groups in login form — keep dark */
.input-group-text {
  background: #0f1117;
  border-color: rgba(255,255,255,.15);
}

/* ── Device status dot ───────────────────────────────────── */
.foodai-status-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  display: inline-block; flex-shrink: 0;
}
.foodai-status-dot.online  { background: #198754; box-shadow: 0 0 6px rgba(25,135,84,.6); }
.foodai-status-dot.idle    { background: #ffc107; box-shadow: 0 0 6px rgba(255,193,7,.5); }
.foodai-status-dot.offline { background: #6c757d; }

/* ── Scrollbar (subtle) ───────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.22); }
