/* BIOMID Intelligence – egységes, reszponzív dashboard stíluslap.
   A dashboard/static/ mockupok (dashboard.html + dashboard_mobile.html) alapján:
   azonos színpaletta, betűtípusok és komponensek. 768px felett desktop sidebar,
   alatta alsó (bottom) navigáció. */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,wght@0,300;0,400;0,500;0,600;1,300&family=DM+Serif+Display:ital@0;1&display=swap');

:root {
  --ink:     #1B3A4B;
  --ink-mid: #3A5F72;
  --ink-low: #7A9BAD;
  --paper:   #F7F4EF;
  --white:   #FFFFFF;
  --gold:    #C9A96E;
  --gold-lt: #F0E6D3;
  --rise:    #2A7D5F;
  --rise-bg: #E8F5F0;
  --fall:    #9B3A2A;
  --fall-bg: #FAECEA;
  --mid:     #5A6E7A;
  --border:  #DDD8CF;
  --shadow:  0 2px 12px rgba(27,58,75,0.08);
  --nav-h:   64px;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--paper);
  color: var(--ink);
  min-height: 100vh;
}

a { color: inherit; }

.app-shell { display: flex; min-height: 100vh; }

/* ===================== SIDEBAR (desktop) ===================== */
.sidebar {
  width: 220px;
  background: var(--ink);
  display: flex;
  flex-direction: column;
  padding: 28px 0;
  flex-shrink: 0;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
}

.logo { padding: 0 24px 28px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.logo-mark {
  font-family: 'DM Serif Display', serif;
  font-size: 15px; color: var(--gold);
  letter-spacing: 0.04em; text-transform: uppercase; line-height: 1.2;
}
.logo-sub {
  font-size: 10px; color: var(--ink-low);
  letter-spacing: 0.08em; text-transform: uppercase; margin-top: 3px;
}

.nav { padding: 20px 12px; flex: 1; }
.nav-label {
  font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-low); padding: 0 12px; margin: 16px 0 6px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 8px; font-size: 13.5px;
  color: rgba(255,255,255,0.55); cursor: pointer; transition: all 0.15s;
  text-decoration: none; margin-bottom: 2px;
}
.nav-item:hover { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.85); }
.nav-item.active { background: rgba(201,169,110,0.15); color: var(--gold); }
.nav-icon { font-size: 15px; width: 18px; text-align: center; }

.sidebar-footer { padding: 20px 24px 0; border-top: 1px solid rgba(255,255,255,0.08); }
.salon-badge { display: flex; align-items: center; gap: 10px; }
.salon-avatar {
  width: 34px; height: 34px; border-radius: 50%; background: var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 13px; color: var(--ink);
}
.salon-name { font-size: 12px; color: rgba(255,255,255,0.7); line-height: 1.3; }
.salon-plan { font-size: 10px; color: var(--gold); letter-spacing: 0.05em; }
.salon-logout { font-size: 11px; color: var(--ink-low); text-decoration: none; display: inline-block; margin-top: 8px; }
.salon-logout:hover { color: rgba(255,255,255,0.8); }

/* ===================== MAIN ===================== */
.main {
  margin-left: 220px;
  flex: 1;
  padding: 32px 36px;
  max-width: calc(100vw - 220px);
  padding-bottom: 60px;
}

.topbar {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; gap: 16px;
}
.page-title { font-family: 'DM Serif Display', serif; font-size: 24px; color: var(--ink); font-weight: 400; }
.page-sub { font-size: 13px; color: var(--ink-low); margin-top: 2px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.last-update { font-size: 12px; color: var(--ink-low); display: flex; align-items: center; gap: 6px; }
.dot-live { width: 7px; height: 7px; border-radius: 50%; background: var(--rise); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }

/* ===================== BUTTONS ===================== */
.btn {
  padding: 9px 18px; border-radius: 8px; font-size: 13px;
  font-family: 'DM Sans', sans-serif; font-weight: 500; cursor: pointer;
  border: none; transition: all 0.15s; text-decoration: none; display: inline-flex;
  align-items: center; gap: 6px;
}
.btn-primary { background: var(--ink); color: white; }
.btn-primary:hover { background: var(--ink-mid); }
.btn-ghost { background: transparent; color: var(--ink-mid); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--white); }
.btn-block { width: 100%; justify-content: center; }
.btn[disabled] { opacity: 0.6; cursor: default; }

/* ===================== STAT CARDS ===================== */
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 24px; }
.stat-card { background: var(--white); border-radius: 12px; padding: 18px 20px; box-shadow: var(--shadow); border: 1px solid var(--border); }
.stat-label { font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-low); margin-bottom: 10px; }
.stat-value { font-family: 'DM Serif Display', serif; font-size: 30px; color: var(--ink); line-height: 1; }
.stat-change { font-size: 12px; margin-top: 6px; display: flex; align-items: center; gap: 4px; }
.up { color: var(--rise); }
.down { color: var(--fall); }

/* ===================== GRID + CARDS ===================== */
.grid-2 { display: grid; grid-template-columns: 1fr 380px; gap: 20px; margin-bottom: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 20px; }
.col { display: flex; flex-direction: column; gap: 20px; }

.card { background: var(--white); border-radius: 14px; padding: 22px 24px; box-shadow: var(--shadow); border: 1px solid var(--border); }
.card + .card { margin-top: 0; }
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; gap: 10px; }
.card-title { font-size: 14px; font-weight: 600; color: var(--ink); }
.card-meta { font-size: 12px; color: var(--ink-low); }
.card-link { font-size: 12px; color: var(--ink-low); text-decoration: none; }
.card-link:hover { color: var(--ink); }

.section-eyebrow { font-size: 10px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); margin-bottom: 4px; }
.section-title { font-family: 'DM Serif Display', serif; font-size: 18px; color: var(--ink); margin-bottom: 14px; }

/* ===================== ALERT STRIP ===================== */
.alert-strip {
  display: flex; align-items: center; gap: 8px;
  background: var(--gold-lt); border: 1px solid #E0C98A; border-radius: 10px;
  padding: 12px 14px; font-size: 13px; color: #7A5C10; margin-bottom: 20px; line-height: 1.5;
}

/* ===================== TREND ITEMS ===================== */
.trend-item { display: flex; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--border); gap: 14px; }
.trend-item:last-child { border-bottom: none; padding-bottom: 0; }
.trend-item:first-child { padding-top: 0; }
.trend-rank { font-family: 'DM Serif Display', serif; font-size: 18px; color: var(--gold); width: 22px; flex-shrink: 0; text-align: center; }
.trend-body { flex: 1; min-width: 0; }
.trend-name { font-size: 14px; font-weight: 500; color: var(--ink); margin-bottom: 3px; }
.trend-desc { font-size: 12px; color: var(--ink-low); line-height: 1.4; overflow: hidden; text-overflow: ellipsis; }
.trend-right { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; flex-shrink: 0; }
.score-bar-wrap { width: 80px; height: 5px; background: var(--paper); border-radius: 99px; overflow: hidden; }
.score-bar { height: 100%; border-radius: 99px; background: var(--rise); }
.score-bar.fall { background: var(--fall); }
.trend-badge { font-size: 10.5px; font-weight: 500; padding: 3px 8px; border-radius: 99px; letter-spacing: 0.02em; white-space: nowrap; }
.badge-early { background: var(--rise-bg); color: var(--rise); }
.badge-peak  { background: var(--gold-lt); color: #8B6914; }
.badge-fall  { background: var(--fall-bg); color: var(--fall); }
.trend-pct { font-size: 13px; font-weight: 600; color: var(--rise); }
.trend-pct.neg { color: var(--fall); }

/* trend sor műveletgombok (kedvenc / tiltás) */
.trend-actions { display: flex; gap: 6px; flex-shrink: 0; }
.icon-btn {
  width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--paper); cursor: pointer; font-size: 15px; line-height: 1;
  display: flex; align-items: center; justify-content: center; transition: all 0.15s; color: var(--ink-mid);
}
.icon-btn:hover { background: var(--white); border-color: var(--ink-mid); }
.icon-btn.fav-on { color: var(--gold); border-color: var(--gold); background: var(--gold-lt); }
.icon-btn.block-on { color: var(--fall); border-color: var(--fall); background: var(--fall-bg); }

/* ===================== OPPORTUNITY ===================== */
.opp-item { padding: 13px 0; border-bottom: 1px solid var(--border); }
.opp-item:last-child { border-bottom: none; padding-bottom: 0; }
.opp-item:first-child { padding-top: 0; }
.opp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; gap: 10px; }
.opp-name { font-size: 14px; font-weight: 500; color: var(--ink); }
.opp-scores { display: flex; gap: 14px; }
.opp-score-item { text-align: center; }
.opp-score-val { font-family: 'DM Serif Display', serif; font-size: 20px; line-height: 1; }
.opp-score-label { font-size: 10px; color: var(--ink-low); letter-spacing: 0.04em; text-transform: uppercase; margin-top: 2px; }
.opp-rec { font-size: 12px; color: var(--ink-mid); line-height: 1.5; font-style: italic; }

/* ===================== CHAT ===================== */
.chat-area { display: flex; flex-direction: column; min-height: 320px; }
.chat-messages { flex: 1; overflow-y: auto; padding-right: 4px; display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; }
.chat-msg { max-width: 85%; font-size: 13px; line-height: 1.5; padding: 10px 13px; border-radius: 12px; white-space: pre-wrap; }
.chat-msg.user { background: var(--ink); color: white; align-self: flex-end; border-bottom-right-radius: 3px; }
.chat-msg.bot { background: var(--paper); color: var(--ink); align-self: flex-start; border-bottom-left-radius: 3px; border: 1px solid var(--border); }
.chat-input-row { display: flex; gap: 8px; }
.chat-input {
  flex: 1; padding: 10px 14px; border-radius: 8px; border: 1px solid var(--border);
  font-family: 'DM Sans', sans-serif; font-size: 13px; color: var(--ink);
  background: var(--paper); outline: none; transition: border-color 0.15s;
}
.chat-input:focus { border-color: var(--ink-mid); background: var(--white); }
.chat-send { width: 38px; height: 38px; border-radius: 8px; background: var(--ink); border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; color: white; font-size: 15px; flex-shrink: 0; transition: background 0.15s; }
.chat-send:hover { background: var(--ink-mid); }
.quick-qs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.quick-q { font-size: 11.5px; padding: 5px 11px; border-radius: 99px; border: 1px solid var(--border); color: var(--ink-mid); cursor: pointer; transition: all 0.15s; background: var(--paper); }
.quick-q:hover { border-color: var(--ink); color: var(--ink); background: var(--white); }

/* ===================== KEYWORD TAGS ===================== */
.kw-wrap { display: flex; flex-wrap: wrap; gap: 7px; }
.kw-tag { font-size: 12px; padding: 5px 11px; border-radius: 99px; border: 1px solid var(--border); color: var(--ink-mid); display: flex; align-items: center; gap: 6px; }
.kw-tag.active { background: var(--ink); color: white; border-color: var(--ink); }
.kw-tag span { font-size: 10px; opacity: 0.6; }
.kw-del { cursor: pointer; opacity: 0.55; font-weight: 600; }
.kw-del:hover { opacity: 1; color: var(--fall); }
.add-kw { font-size: 12px; padding: 5px 11px; border-radius: 99px; border: 1px dashed var(--border); color: var(--ink-low); cursor: pointer; background: transparent; font-family: 'DM Sans', sans-serif; }
.add-kw:hover { border-color: var(--ink-mid); color: var(--ink-mid); }

/* ===================== SCHEDULE / SETTING ROWS ===================== */
.schedule-item, .setting-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 13px; gap: 12px; }
.schedule-item:last-child, .setting-row:last-child { border-bottom: none; }
.schedule-label, .setting-label { color: var(--ink-mid); }
.schedule-val, .setting-val { font-weight: 500; color: var(--ink); }
select.inline-select { font-family: 'DM Sans', sans-serif; font-size: 13px; font-weight: 500; color: var(--ink); border: none; background: transparent; cursor: pointer; padding: 0; outline: none; text-align: right; }

/* ===================== FORMS ===================== */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12px; font-weight: 500; color: var(--ink-mid); margin-bottom: 6px; letter-spacing: 0.02em; }
.input, .select, textarea.input {
  width: 100%; padding: 11px 14px; border-radius: 8px; border: 1px solid var(--border);
  font-family: 'DM Sans', sans-serif; font-size: 14px; color: var(--ink);
  background: var(--white); outline: none; transition: border-color 0.15s;
}
.input:focus, .select:focus, textarea.input:focus { border-color: var(--ink-mid); }
.field-hint { font-size: 11.5px; color: var(--ink-low); margin-top: 5px; }

/* checkbox / choice chips */
.choice-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.choice {
  position: relative; display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 14px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--white); cursor: pointer; font-size: 13px; color: var(--ink-mid); transition: all 0.15s;
}
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice:hover { border-color: var(--ink-mid); }
.choice.checked { background: var(--ink); color: white; border-color: var(--ink); }

/* ===================== AUTH / ONBOARDING SHELL ===================== */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.auth-card { background: var(--white); border-radius: 16px; box-shadow: var(--shadow); border: 1px solid var(--border); padding: 36px 34px; width: 100%; max-width: 420px; }
.auth-card.wide { max-width: 560px; }
.auth-logo { font-family: 'DM Serif Display', serif; font-size: 20px; color: var(--ink); text-align: center; }
.auth-logo .accent { color: var(--gold); }
.auth-sub { font-size: 13px; color: var(--ink-low); text-align: center; margin: 6px 0 26px; }
.auth-alt { font-size: 13px; color: var(--ink-low); text-align: center; margin-top: 18px; }
.auth-alt a { color: var(--ink); font-weight: 500; text-decoration: none; }
.form-error { background: var(--fall-bg); border: 1px solid #E3B5AC; color: var(--fall); font-size: 13px; padding: 10px 13px; border-radius: 8px; margin-bottom: 18px; }

/* wizard */
.wizard-steps { display: flex; gap: 8px; margin-bottom: 26px; }
.wizard-dot { flex: 1; height: 4px; border-radius: 99px; background: var(--border); }
.wizard-dot.active { background: var(--gold); }
.wizard-step { display: none; }
.wizard-step.active { display: block; }
.wizard-step-title { font-family: 'DM Serif Display', serif; font-size: 20px; margin-bottom: 4px; }
.wizard-step-sub { font-size: 13px; color: var(--ink-low); margin-bottom: 22px; }
.wizard-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 26px; }
.preview-box { background: var(--paper); border: 1px solid var(--border); border-radius: 10px; padding: 16px; font-size: 13px; color: var(--ink-mid); line-height: 1.6; }
.preview-box strong { color: var(--ink); }

/* ===================== REPORTS ===================== */
.report-list { display: flex; flex-direction: column; }
.report-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--border); text-decoration: none; }
.report-row:last-child { border-bottom: none; }
.report-title { font-size: 14px; font-weight: 500; color: var(--ink); margin-bottom: 3px; }
.report-summary { font-size: 12px; color: var(--ink-low); line-height: 1.4; }
.report-date { font-size: 12px; color: var(--ink-low); white-space: nowrap; }
.report-frame { width: 100%; height: calc(100vh - 220px); min-height: 520px; border: 1px solid var(--border); border-radius: 12px; background: var(--white); }

.empty-state { text-align: center; padding: 40px 20px; color: var(--ink-low); font-size: 14px; }

/* ===================== FILTER PILLS ===================== */
.filter-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.filter-pill { font-size: 12.5px; padding: 7px 14px; border-radius: 99px; border: 1px solid var(--border); color: var(--ink-mid); text-decoration: none; background: var(--white); transition: all 0.15s; }
.filter-pill:hover { border-color: var(--ink-mid); }
.filter-pill.active { background: var(--ink); color: white; border-color: var(--ink); }

/* ===================== BOTTOM NAV (mobile) ===================== */
.bottom-nav { display: none; }

/* ===================== MOBILE HEADER ===================== */
.mobile-header { display: none; }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 768px) {
  .app-shell { display: block; }
  .sidebar { display: none; }
  .main { margin-left: 0; max-width: 100%; padding: 16px; padding-bottom: calc(var(--nav-h) + 20px); }

  .mobile-header {
    display: flex; align-items: center; justify-content: space-between;
    background: var(--ink); padding: 14px 16px; margin: -16px -16px 16px;
    position: sticky; top: 0; z-index: 90;
  }
  .mobile-header .brand-mark { font-family: 'DM Serif Display', serif; font-size: 14px; color: var(--gold); letter-spacing: 0.04em; text-transform: uppercase; }
  .mobile-header .avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--gold); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: var(--ink); }

  .topbar { flex-direction: column; align-items: flex-start; gap: 12px; }
  .topbar-actions { width: 100%; }
  .page-title { font-size: 21px; }

  .stat-row { grid-template-columns: 1fr 1fr; gap: 10px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .card { padding: 16px; border-radius: 14px; }

  .bottom-nav {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; height: var(--nav-h);
    background: var(--ink); align-items: stretch; z-index: 200; border-top: 1px solid rgba(255,255,255,0.08);
  }
  .nav-tab { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; cursor: pointer; text-decoration: none; transition: background 0.15s; }
  .nav-tab.active { background: rgba(201,169,110,0.12); }
  .nav-tab-icon { font-size: 19px; color: rgba(255,255,255,0.5); }
  .nav-tab-label { font-size: 10px; color: rgba(255,255,255,0.45); letter-spacing: 0.02em; }
  .nav-tab.active .nav-tab-icon, .nav-tab.active .nav-tab-label { color: var(--gold); }

  .auth-card { padding: 28px 22px; }
}
