/* FireGuardian Demo — App shell, components, panels */

/* ===== LOGIN ===== */
.login-screen {
  position: fixed; inset: 0; z-index: 20000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(220, 38, 38, 0.25), transparent 50%),
    radial-gradient(ellipse 60% 50% at 80% 90%, rgba(15, 23, 42, 0.5), transparent 50%),
    linear-gradient(160deg, #0f172a 0%, #1e293b 45%, #450a0a 100%);
  overflow: auto;
}
.login-card {
  width: 100%; max-width: 420px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  backdrop-filter: blur(24px);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  animation: loginIn 0.5s var(--ease);
}
@keyframes loginIn {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to { opacity: 1; transform: none; }
}
.login-top {
  padding: 36px 28px 28px;
  text-align: center;
  background: linear-gradient(180deg, rgba(220, 38, 38, 0.2) 0%, transparent 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.login-logo {
  width: 72px; height: 72px; margin: 0 auto 16px;
  border-radius: 20px;
  background: linear-gradient(135deg, #dc2626, #7f1d1d);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 12px 32px rgba(220, 38, 38, 0.4), inset 0 1px 0 rgba(255,255,255,0.2);
}
.login-logo i { font-size: 1.85rem; color: #fff; }
.login-top h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.55rem; font-weight: 700; color: #fff;
  letter-spacing: -0.02em;
}
.login-top p { margin-top: 6px; font-size: 0.84rem; color: rgba(255,255,255,0.65); }
.login-badge {
  display: inline-block; margin-top: 12px;
  padding: 4px 12px; border-radius: 99px;
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.04em;
  color: rgba(255,255,255,0.85);
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.12);
  text-transform: uppercase;
}
.login-body { padding: 24px 28px 28px; }
.login-tabs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
  padding: 4px; margin-bottom: 20px;
  background: rgba(0,0,0,0.25); border-radius: 12px;
}
.login-tab {
  border: none; background: transparent; color: rgba(255,255,255,0.55);
  padding: 10px; border-radius: 9px; font-size: 0.82rem; font-weight: 600;
  cursor: pointer; transition: 0.2s var(--ease);
}
.login-tab.active {
  background: rgba(255,255,255,0.12); color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.field { margin-bottom: 14px; }
.field label {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.78rem; font-weight: 600; color: rgba(255,255,255,0.7);
  margin-bottom: 7px;
}
.field input {
  width: 100%; padding: 12px 14px;
  background: rgba(255,255,255,0.06);
  border: 1.5px solid rgba(255,255,255,0.12);
  border-radius: 12px; color: #fff; font-size: 0.95rem;
  transition: 0.2s;
}
.field input::placeholder { color: rgba(255,255,255,0.3); }
.field input:focus {
  border-color: rgba(239, 68, 68, 0.6);
  background: rgba(255,255,255,0.09);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
  outline: none;
}
.remember {
  display: flex; align-items: center; gap: 8px;
  margin: 4px 0 18px; color: rgba(255,255,255,0.65); font-size: 0.8rem;
}
.remember input { width: 16px; height: 16px; accent-color: var(--p); }
.btn-primary {
  width: 100%; padding: 13px 16px; border: none; border-radius: 12px;
  background: linear-gradient(135deg, #dc2626, #991b1b);
  color: #fff; font-weight: 700; font-size: 0.95rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: 0 8px 24px rgba(220, 38, 38, 0.35);
  transition: 0.2s var(--ease);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(220, 38, 38, 0.45); }
.btn-primary:active { transform: none; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.login-foot {
  text-align: center; margin-top: 16px;
  font-size: 0.72rem; color: rgba(255,255,255,0.4);
}

/* ===== APP HEADER ===== */
.app-header {
  background: var(--header-grad);
  color: #fff;
  padding: 20px 18px 26px;
  border-radius: 0 0 28px 28px;
  box-shadow: 0 12px 40px rgba(127, 29, 29, 0.35);
  position: relative; overflow: hidden; z-index: 20;
}
.app-header::before {
  content: ''; position: absolute; top: -40%; right: -20%;
  width: 60%; height: 180%;
  background: radial-gradient(ellipse, rgba(255,255,255,0.08), transparent 70%);
  pointer-events: none;
}
.header-meta {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px; position: relative; z-index: 1;
}
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 99px;
  font-size: 0.7rem; font-weight: 700;
  background: rgba(0,0,0,0.22); border: 1px solid rgba(255,255,255,0.12);
}
.online-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #4ade80; box-shadow: 0 0 8px #4ade80;
}
.online-dot.off { background: #94a3b8; box-shadow: none; }
.app-header h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em;
  text-align: center; position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: center; gap: 10px;
}
.app-header .sub {
  text-align: center; margin-top: 4px;
  font-size: 0.8rem; color: rgba(255,255,255,0.8);
  position: relative; z-index: 1;
}
.ver-tag {
  display: inline-block; margin: 10px auto 0;
  padding: 3px 11px; border-radius: 99px;
  font-size: 0.66rem; font-weight: 600;
  background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.15);
  position: relative; z-index: 1;
}

/* ===== NAV ===== */
.nav-wrap {
  background: var(--glass);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 1px 8px rgba(15,23,42,0.04);
}
.nav {
  display: flex; gap: 4px; overflow-x: auto; padding: 10px 12px;
  max-width: 1100px; margin: 0 auto;
  scrollbar-width: none;
}
.nav::-webkit-scrollbar { display: none; }
.nav-btn {
  flex: 0 0 auto; min-width: 70px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 9px 12px; border: none; border-radius: 12px;
  background: transparent; color: var(--muted);
  font-size: 0.7rem; font-weight: 600; cursor: pointer;
  transition: 0.2s var(--ease);
}
.nav-btn i { font-size: 1.25rem; }
.nav-btn:hover { background: var(--p-soft); color: var(--p); }
.nav-btn.active {
  background: linear-gradient(135deg, var(--p), var(--p-d));
  color: #fff; box-shadow: 0 6px 16px rgba(198, 40, 40, 0.3);
}

/* ===== LAYOUT ===== */
.container { max-width: 1100px; margin: 0 auto; padding: 18px 14px 40px; }
.tab { display: none; animation: fadeUp 0.3s var(--ease); }
.tab.active { display: block; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.section-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.1rem; font-weight: 700; color: var(--p);
  margin: 0 0 16px; padding-bottom: 12px;
  border-bottom: 2px solid #fecaca;
  display: flex; align-items: center; gap: 8px;
}

/* ===== STATS ===== */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 10px; margin-bottom: 8px;
}
.stat {
  border-radius: 14px; padding: 16px 12px; color: #fff;
  text-align: center; min-height: 96px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
  position: relative; overflow: hidden;
}
.stat::after {
  content: ''; position: absolute; top: -30%; right: -20%;
  width: 70%; height: 100%;
  background: radial-gradient(ellipse, rgba(255,255,255,0.14), transparent 70%);
  pointer-events: none;
}
.stat strong {
  font-family: 'Outfit', sans-serif;
  font-size: 1.85rem; font-weight: 700; line-height: 1.1;
}
.stat span { font-size: 0.74rem; opacity: 0.92; margin-top: 4px; }
.s-blue { background: linear-gradient(135deg, #2563eb, #1e3a8a); }
.s-green { background: linear-gradient(135deg, #16a34a, #14532d); }
.s-orange { background: linear-gradient(135deg, #ea580c, #9a3412); }
.s-red { background: linear-gradient(135deg, #dc2626, #7f1d1d); }
.s-slate { background: linear-gradient(135deg, #475569, #1e293b); }
.s-teal { background: linear-gradient(135deg, #0d9488, #115e59); }
.s-violet { background: linear-gradient(135deg, #7c3aed, #4c1d95); }

/* ===== ALERTS / BOXES ===== */
.box {
  border-radius: 12px; padding: 12px 14px; margin-bottom: 12px;
  font-size: 0.84rem; line-height: 1.45;
  display: flex; gap: 10px; align-items: flex-start;
}
.box i { margin-top: 2px; flex-shrink: 0; }
.box-info { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }
.box-warn { background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; }
.box-ok { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.box-danger { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }

/* ===== SEARCH & FILTERS ===== */
.search { position: relative; margin-bottom: 12px; }
.search i {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--muted); font-size: 0.9rem;
}
.search input {
  width: 100%; padding: 12px 14px 12px 40px;
  border: 1.5px solid var(--line); border-radius: 12px;
  background: #f8fafc; font-size: 0.92rem; transition: 0.2s;
}
.search input:focus {
  outline: none; border-color: var(--p); background: #fff;
  box-shadow: 0 0 0 3px var(--p-soft);
}
.filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.chip {
  padding: 6px 12px; border-radius: 99px;
  border: 1.5px solid var(--line); background: #fff;
  font-size: 0.74rem; font-weight: 600; color: var(--ink-2);
  cursor: pointer; transition: 0.15s; user-select: none;
}
.chip:hover { border-color: var(--p); color: var(--p); }
.chip.active { background: var(--p); border-color: var(--p); color: #fff; }
.chip.locked.active { background: #64748b; border-color: #64748b; }
.chip.new.active { background: var(--ok); border-color: var(--ok); }
.list-meta { font-size: 0.78rem; color: var(--muted); margin-bottom: 10px; }

/* ===== ITEM CARDS ===== */
.item-list { display: flex; flex-direction: column; gap: 8px; }
.item {
  background: #fff; border: 1.5px solid var(--line);
  border-radius: 14px; padding: 14px 14px 14px 16px;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  cursor: pointer; transition: 0.2s var(--ease);
  position: relative; overflow: hidden;
}
.item::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: #94a3b8;
}
.item.ok::before { background: var(--ok); }
.item.warning::before { background: var(--warn); }
.item.expired::before { background: var(--danger); }
.item.locked { background: #f8fafc; }
.item.new-item { background: #f0fdf4; border-color: #bbf7d0; }
.item.new-item::before { background: var(--ok); }
.item:hover { transform: translateX(3px); box-shadow: var(--shadow); }
.item-body h4 {
  font-size: 0.92rem; font-weight: 700; margin-bottom: 4px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
}
.item-body p {
  font-size: 0.78rem; color: var(--muted); margin: 2px 0;
  display: flex; align-items: center; gap: 5px;
}
.badge {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 8px; border-radius: 99px;
  font-size: 0.65rem; font-weight: 700; color: #fff;
}
.b-locked { background: #64748b; }
.b-new { background: var(--ok); }
.b-ok { background: var(--ok); }
.b-warn { background: var(--warn); }
.b-exp { background: var(--danger); }
.item-actions { display: flex; gap: 6px; flex-shrink: 0; }
.icon-btn {
  width: 34px; height: 34px; border-radius: 50%; border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 0.8rem; transition: 0.15s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.icon-btn.view { background: #f3e8ff; color: #7c3aed; }
.icon-btn.edit { background: #dbeafe; color: #1d4ed8; }
.icon-btn.del { background: #fee2e2; color: #b91c1c; }
.icon-btn:hover { transform: scale(1.08); }

/* ===== FORMS ===== */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .grid-2 { grid-template-columns: 1fr; } }
.fg { margin-bottom: 14px; }
.fg label {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.8rem; font-weight: 600; color: var(--ink);
  margin-bottom: 6px;
}
.fg label i { color: var(--p); font-size: 0.82rem; }
.fg input, .fg select, .fg textarea {
  width: 100%; padding: 11px 13px;
  border: 1.5px solid var(--line); border-radius: 11px;
  font-size: 0.9rem; background: #fff; color: var(--ink);
  transition: 0.2s;
}
.fg input:focus, .fg select:focus, .fg textarea:focus {
  outline: none; border-color: var(--p);
  box-shadow: 0 0 0 3px var(--p-soft);
}
.fg input:disabled, .fg select:disabled { background: #f1f5f9; cursor: not-allowed; }
.status-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.st-btn {
  flex: 1; min-width: 100px; padding: 10px;
  border: 2px solid transparent; border-radius: 11px;
  background: #f1f5f9; font-size: 0.76rem; font-weight: 600;
  cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px;
  transition: 0.15s;
}
.st-btn.aprovado { background: #dcfce7; color: #166534; border-color: #86efac; }
.st-btn.ressalvas { background: #ffedd5; color: #9a3412; border-color: #fdba74; }
.st-btn.reprovado { background: #fee2e2; color: #991b1b; border-color: #fca5a5; }
.st-btn.active { border-width: 2.5px; filter: brightness(0.95); transform: scale(1.02); }
.btn-block {
  width: 100%; padding: 13px; margin-top: 8px;
  border: none; border-radius: 12px; font-weight: 700; font-size: 0.92rem;
  cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: 0.2s;
}
.btn-save {
  background: linear-gradient(135deg, var(--p), var(--p-d));
  color: #fff; box-shadow: 0 6px 18px rgba(198, 40, 40, 0.28);
}
.btn-save:hover { transform: translateY(-1px); }
.btn-ghost {
  background: #f1f5f9; color: var(--ink-2); margin-top: 8px;
}
.btn-ghost:hover { background: #e2e8f0; }

/* ===== UPLOAD ZONE ===== */
.upload-zone {
  border: 2px dashed #cbd5e1; border-radius: 16px;
  padding: 28px 20px; text-align: center;
  background: #f8fafc; transition: 0.2s; cursor: pointer;
}
.upload-zone:hover, .upload-zone.drag {
  border-color: var(--p); background: var(--p-soft);
}
.upload-zone i { font-size: 2rem; color: var(--p); margin-bottom: 10px; }
.upload-zone h4 { font-size: 0.95rem; margin-bottom: 4px; }
.upload-zone p { font-size: 0.78rem; color: var(--muted); }
.progress-wrap {
  display: none; margin-top: 14px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px;
}
.progress-wrap.on { display: block; }
.progress-label {
  font-size: 0.8rem; font-weight: 600; margin-bottom: 8px;
  display: flex; justify-content: space-between;
}
.progress-track {
  height: 10px; background: #e2e8f0; border-radius: 99px; overflow: hidden;
}
.progress-bar {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--p), var(--p-l));
  border-radius: 99px; transition: width 0.25s;
  font-size: 0; color: transparent;
}

/* ===== USER / ACCESS CARDS ===== */
.user-card {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 14px; border-radius: 12px; border: 1.5px solid var(--line);
  background: #f8fafc; margin-bottom: 10px;
}
.user-card.blocked { opacity: 0.65; background: #fef2f2; border-color: #fecaca; }
.user-card strong { display: block; font-size: 0.9rem; }
.user-card span { display: block; font-size: 0.74rem; color: var(--muted); }
.user-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.btn-sm {
  padding: 6px 11px; border: none; border-radius: 8px;
  font-size: 0.72rem; font-weight: 600; cursor: pointer;
}
.btn-sm.block { background: #fee2e2; color: #b91c1c; }
.btn-sm.unblock { background: #dcfce7; color: #166534; }
.btn-sm.kill { background: #fce7f3; color: #9d174d; }

/* ===== MODAL ===== */
.modal-bg {
  position: fixed; inset: 0; z-index: 10000;
  background: rgba(15, 23, 42, 0.7); backdrop-filter: blur(4px);
  display: none; align-items: center; justify-content: center; padding: 16px;
}
.modal-bg.on { display: flex; }
.modal {
  background: #fff; width: 100%; max-width: 480px; max-height: 88vh;
  border-radius: 18px; overflow: hidden; display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg); animation: loginIn 0.3s var(--ease);
}
.modal-head {
  padding: 16px 18px; border-bottom: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center;
  position: sticky; top: 0; background: #fff;
}
.modal-head h3 {
  font-family: 'Outfit', sans-serif; font-size: 1.1rem; color: var(--p);
  display: flex; align-items: center; gap: 8px;
}
.modal-x {
  width: 34px; height: 34px; border: none; border-radius: 50%;
  background: #f1f5f9; color: var(--muted); font-size: 1.2rem; cursor: pointer;
}
.modal-body { padding: 16px 18px; overflow-y: auto; }
.photo-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 8px; margin-top: 12px;
}
.photo-grid img {
  width: 100%; aspect-ratio: 1; object-fit: cover;
  border-radius: 10px; border: 1px solid var(--line); cursor: pointer;
}

/* ===== TOAST ===== */
.toast-host {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  z-index: 12000; display: flex; flex-direction: column; gap: 8px;
  pointer-events: none; align-items: center;
}
.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 18px; border-radius: 12px; color: #fff;
  font-size: 0.85rem; font-weight: 500;
  box-shadow: 0 8px 28px rgba(0,0,0,0.25);
  animation: toastIn 0.35s var(--ease);
  max-width: min(400px, 92vw);
}
@keyframes toastIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}
.t-ok { background: linear-gradient(135deg, #16a34a, #15803d); }
.t-warn { background: linear-gradient(135deg, #ea580c, #c2410c); }
.t-err { background: linear-gradient(135deg, #dc2626, #b91c1c); }
.t-info { background: linear-gradient(135deg, #2563eb, #1d4ed8); }

/* ===== EMPTY ===== */
.empty {
  text-align: center; padding: 36px 16px; color: var(--muted);
}
.empty i { font-size: 2.2rem; opacity: 0.3; display: block; margin-bottom: 10px; }

/* ===== FOOTER ===== */
.foot-note {
  text-align: center; font-size: 0.7rem; color: var(--muted);
  padding: 8px 16px 24px; opacity: 0.75;
}

/* ===== PHOTO LIGHTBOX ===== */
.lightbox {
  position: fixed; inset: 0; z-index: 15000;
  background: rgba(0,0,0,0.92); display: none;
  align-items: center; justify-content: center; padding: 20px;
}
.lightbox.on { display: flex; }
.lightbox img { max-width: 100%; max-height: 90vh; border-radius: 8px; }
.lightbox-close {
  position: absolute; top: 16px; right: 16px;
  width: 40px; height: 40px; border: none; border-radius: 50%;
  background: rgba(255,255,255,0.15); color: #fff; font-size: 1.3rem; cursor: pointer;
}
