/* ==========================================================================
   FalconIQ – alkalmazás felület (ügyfélportál + admin)
   ========================================================================== */
body { background: var(--paper-2); }
.app { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.app > div { min-width: 0; }
.two > * { min-width: 0; }
.sidebar {
  background: var(--navy-950); color: #fff; padding: 22px 16px; display: flex; flex-direction: column; gap: 6px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar .brand { padding: 4px 8px 18px; font-size: 1rem; }
.sidebar .brand img { width: 40px; height: 40px; }
.sidebar .group { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.4); padding: 14px 12px 6px; }
.sidebar a.item {
  display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 10px; color: rgba(255,255,255,.8); font-weight: 500; font-size: .95rem;
  transition: .15s;
}
.sidebar a.item:hover { background: rgba(255,255,255,.07); color: #fff; }
.sidebar a.item.active { background: rgba(201,162,77,.16); color: var(--gold-300); }
.sidebar a.item svg { width: 20px; height: 20px; flex: none; }
.sidebar a.item .pill { margin-left: auto; }
.sidebar .spacer { flex: 1; }
.sidebar .user { padding: 12px; border-top: 1px solid rgba(255,255,255,.1); font-size: .85rem; color: rgba(255,255,255,.7); }
.sidebar .user b { display: block; color: #fff; font-size: .95rem; }
.sidebar .user a { color: var(--gold-300); font-weight: 600; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 16px 28px; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.topbar h1 { font-size: 1.35rem; margin: 0; font-weight: 700; letter-spacing: -.01em; }
.topbar .right { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.bell { position: relative; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); background: #fff; cursor: pointer; }
.bell .dot { position: absolute; top: 7px; right: 7px; width: 9px; height: 9px; border-radius: 50%; background: var(--danger); border: 2px solid #fff; display: none; }
.bell.has .dot { display: block; }
.content { padding: 28px; max-width: 1240px; width: 100%; }
.menu-btn { display: none; }
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 280px; transform: translateX(-100%); transition: transform .2s; z-index: 40; }
  .app.nav-open .sidebar { transform: none; box-shadow: 0 0 0 100vw rgba(0,0,0,.4); }
  .menu-btn { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; }
  .content { padding: 18px 16px; }
  .topbar { padding: 12px 16px; }
}

/* Panelek, táblák */
.panel { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 22px; }
.panel + .panel { margin-top: 18px; }
.panel h2 { font-size: 1.15rem; margin: 0 0 14px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.panel-head h2 { margin: 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 18px; }
@media (max-width: 480px) { .stats { grid-template-columns: 1fr 1fr; gap: 10px; } .stat { padding: 14px; } .stat .v { font-size: 1.35rem; } }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.stat .v { font-size: 1.7rem; font-weight: 800; letter-spacing: -.02em; color: var(--navy-950); }
.stat .l { font-size: .82rem; color: var(--ink-3); font-weight: 600; }
.stat.accent { background: var(--navy-950); border-color: transparent; }
.stat.accent .v { color: var(--gold-300); } .stat.accent .l { color: rgba(255,255,255,.6); }
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: .92rem; }
.tbl th { text-align: left; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 13px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr.click { cursor: pointer; } .tbl tr.click:hover td { background: var(--paper-2); }
.tbl .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .75rem; font-weight: 700; background: var(--paper-2); color: var(--ink-2); white-space: nowrap; }
.pill i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; display: inline-block; }
.pill.ok { background: #ecfdf5; color: #047857; } .pill.warn { background: #fffbeb; color: #b45309; } .pill.bad { background: #fef2f2; color: #b91c1c; } .pill.info { background: #eff6ff; color: #1d4ed8; }
.pill.count { background: var(--danger); color: #fff; padding: 1px 7px; }
.empty { text-align: center; color: var(--ink-3); padding: 40px 12px; }
.empty b { display: block; color: var(--ink); margin-bottom: 4px; }
.two { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; align-items: start; }
@media (max-width: 1000px) { .two { grid-template-columns: 1fr; } }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar input, .toolbar select { font: inherit; padding: 9px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 8px 14px; font-size: .93rem; }
.kv dt { color: var(--ink-3); font-weight: 600; } .kv dd { margin: 0; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 2px solid var(--line); display: grid; gap: 16px; }
.timeline li { position: relative; font-size: .93rem; }
.timeline li::before { content: ""; position: absolute; left: -25px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--c, var(--gold)); border: 2px solid #fff; box-shadow: 0 0 0 2px var(--c, var(--gold)); }
.timeline .t { font-size: .78rem; color: var(--ink-3); }
.doc { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.doc:last-child { border-bottom: 0; }
.doc .ic { width: 42px; height: 42px; border-radius: 10px; background: var(--paper-2); display: grid; place-items: center; font-weight: 800; font-size: .7rem; color: var(--navy-950); flex: none; }
.doc .n { font-weight: 600; } .doc .m { font-size: .8rem; color: var(--ink-3); }
.doc .btn { margin-left: auto; }
.chat { display: flex; flex-direction: column; gap: 12px; max-height: 60vh; overflow-y: auto; padding: 4px; }
.msg { max-width: 78%; padding: 12px 16px; border-radius: 16px; font-size: .95rem; background: var(--paper-2); align-self: flex-start; border-bottom-left-radius: 4px; }
.msg.me { background: var(--navy-950); color: #fff; align-self: flex-end; border-bottom-left-radius: 16px; border-bottom-right-radius: 4px; }
.msg .meta { display: block; font-size: .72rem; opacity: .65; margin-top: 6px; }
.msg .ref { display: inline-block; font-size: .72rem; font-weight: 700; opacity: .8; margin-bottom: 4px; }
.composer { display: flex; gap: 10px; margin-top: 14px; align-items: flex-end; }
.composer textarea { flex: 1; min-height: 56px; }
.feed-item { padding: 18px 0; border-bottom: 1px solid var(--line); }
.feed-item:last-child { border-bottom: 0; }
.feed-item h3 { margin: 4px 0 6px; font-size: 1.05rem; }
.feed-item .t { font-size: .78rem; color: var(--ink-3); }
.feed-item p { color: var(--ink-2); margin: 0; white-space: pre-line; }
.notif { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.notif:last-child { border-bottom: 0; }
.notif.unread { background: linear-gradient(90deg, rgba(201,162,77,.08), transparent); margin: 0 -12px; padding-inline: 12px; border-radius: 8px; }
.notif .b { flex: 1; } .notif .b b { display: block; } .notif .b span { font-size: .9rem; color: var(--ink-2); white-space: pre-line; } .notif .t { font-size: .75rem; color: var(--ink-3); white-space: nowrap; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.slot { border: 1.5px solid var(--line); border-radius: 10px; padding: 10px; text-align: center; cursor: pointer; font-size: .88rem; background: #fff; font-family: inherit; }
.slot b { display: block; }
.slot.sel { border-color: var(--gold); background: rgba(201,162,77,.1); }
.slot:hover { border-color: var(--gold); }
.color-dot { width: 14px; height: 14px; border-radius: 50%; display: inline-block; vertical-align: middle; margin-right: 6px; }
.modal-bg { position: fixed; inset: 0; background: rgba(1,7,55,.5); display: none; align-items: center; justify-content: center; z-index: 80; padding: 16px; }
.modal-bg.show { display: flex; }
.modal { background: #fff; border-radius: 16px; padding: 24px; width: min(560px, 100%); max-height: 90vh; overflow-y: auto; }
.modal h2 { margin-top: 0; }
.toast { position: fixed; bottom: 20px; right: 20px; background: var(--navy-950); color: #fff; padding: 12px 18px; border-radius: 12px; font-size: .92rem; z-index: 90; box-shadow: var(--shadow); opacity: 0; transform: translateY(10px); transition: .2s; pointer-events: none; }
.toast.show { opacity: 1; transform: none; }
.toast.err { background: #b91c1c; }
.loading { text-align: center; padding: 40px; color: var(--ink-3); }
.loading::after { content: ""; display: block; width: 28px; height: 28px; margin: 12px auto 0; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--gold); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-side { background: var(--navy-950); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-side::before { content: ""; position: absolute; inset: 0; background: radial-gradient(600px 400px at 80% 20%, rgba(201,162,77,.25), transparent 60%); }
.auth-side > * { position: relative; }
.auth-side h2 { font-size: 2rem; max-width: 18ch; }
.auth-side ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; color: rgba(255,255,255,.85); }
.auth-side li::before { content: "✓ "; color: var(--gold); font-weight: 800; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 32px 20px; }
.auth-form .form { width: min(440px, 100%); }
.auth-form h1 { font-size: 1.8rem; margin-bottom: 4px; }
.auth-form .switch { font-size: .9rem; color: var(--ink-3); }
.auth-form .switch a { color: var(--gold-600); font-weight: 700; }
@media (max-width: 860px) { .auth { grid-template-columns: 1fr; } .auth-side { display: none; } }
.help { font-size: .85rem; color: var(--ink-3); }
.badge-status { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: .82rem; padding: 4px 10px; border-radius: 999px; background: color-mix(in srgb, var(--c) 14%, white); color: var(--c); }
.badge-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.package-detail .price { font-size: 2rem; font-weight: 800; letter-spacing: -.02em; }
.link { color: var(--gold-600); font-weight: 600; cursor: pointer; background: none; border: 0; font: inherit; padding: 0; }
.link:hover { text-decoration: underline; }
.danger { color: var(--danger); }
