/* ================================================================
   🌊 LYTO THEME - OCEAN BLUE EDITION
   Fonte: Inter + JetBrains Mono
   ================================================================ */

/* --- IMPORTAÇÃO DE FONTES --- */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;600;700&display=swap");

/* --- VARIÁVEIS GLOBAIS --- */
:root {
  /* Cores Base */
  --bg-app: #08080a;
  --bg-sidebar: #0c0d10;
  --bg-card: #111318;
  --bg-input: #0a0b0e;

  /* Textos */
  --text-primary: #eef2f7;
  --text-secondary: #8899b0;
  --text-muted: #5a6a80;
  --text-inverse: #0c0d10;

  /* Bordas */
  --border: #1a2030;
  --border-light: #253040;
  --border-hover: #354560;

  /* 🌀 AZUL OCEANO */
  --ocean: #0066cc;
  --ocean-light: #0088ee;
  --ocean-dark: #004d99;
  --ocean-deep: #003366;
  --ocean-glow: rgba(0, 102, 204, 0.25);
  --ocean-dim: rgba(0, 102, 204, 0.08);

  --accent: var(--ocean);
  --accent-glow: var(--ocean-glow);
  --accent-dim: var(--ocean-dim);

  /* Status */
  --online: var(--ocean-light);
  --online-glow: rgba(0, 136, 238, 0.3);
  --offline: #3a404a;
  --blocked: #5a6a80;

  /* Botões */
  --btn-bg: var(--ocean);
  --btn-text: #ffffff;
  --btn-hover: var(--ocean-light);
  --btn-danger: #e06060;
  --btn-success: #40c080;

  /* Cards */
  --card-shadow: rgba(0, 0, 0, 0.6);
  --card-glow: rgba(0, 102, 204, 0.03);

  /* Tipografia */
  --font-primary:
    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", monospace;

  /* Transições */
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);

  /* Bordas */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;
}

/* --- TEMA CLARO --- */
[data-theme="light"] {
  --bg-app: #f0f4fa;
  --bg-sidebar: #ffffff;
  --bg-card: #ffffff;
  --bg-input: #f5f8fc;

  --text-primary: #0c1220;
  --text-secondary: #4a5a70;
  --text-muted: #7a8aa0;
  --text-inverse: #f0f4fa;

  --border: #dce4ee;
  --border-light: #c8d4e2;
  --border-hover: #a8b8cc;

  --ocean: #0066cc;
  --ocean-light: #0088ee;
  --ocean-dark: #004d99;
  --ocean-deep: #003366;
  --ocean-glow: rgba(0, 102, 204, 0.15);
  --ocean-dim: rgba(0, 102, 204, 0.05);

  --online: var(--ocean);
  --online-glow: rgba(0, 102, 204, 0.2);
  --offline: #aab8c8;
  --blocked: #8a9aaa;

  --btn-bg: var(--ocean);
  --btn-text: #ffffff;
  --btn-hover: var(--ocean-light);
  --btn-danger: #cc5555;
  --btn-success: #38b870;

  --card-shadow: rgba(0, 0, 0, 0.06);
  --card-glow: rgba(0, 102, 204, 0.03);
}

/* --- RESET E BASE --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-primary);
  background: var(--bg-app);
  color: var(--text-primary);
  transition: var(--transition);
  height: 100vh;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- SCROLLBAR --- */
::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--border-hover);
}

/* --- TIPOGRAFIA --- */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  letter-spacing: -0.02em;
}

h1 {
  font-size: 1.5rem;
}
h2 {
  font-size: 1.25rem;
}
h3 {
  font-size: 1.1rem;
}
h4 {
  font-size: 1rem;
}

p,
span,
a,
li,
label {
  font-weight: 400;
  letter-spacing: -0.01em;
}

code,
.mono {
  font-family: var(--font-mono);
  font-weight: 600;
}

/* --- LAYOUT --- */
.dashboard-container {
  display: flex;
  height: 100vh;
  width: 100%;
  background: var(--bg-app);
}

/* --- SIDEBAR --- */
.sidebar {
  width: 260px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 2rem 1.5rem;
  flex-shrink: 0;
  transition: var(--transition);
}

/* --- AVATAR --- */
.bot-profile {
  text-align: center;
  margin-bottom: 2rem;
}

.avatar-wrapper {
  position: relative;
  width: 90px;
  height: 90px;
  margin: 0 auto 1rem;
}

.avatar-img {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-lg);
  background-size: cover;
  background-position: center;
  border: 2px solid var(--border);
  transition: var(--transition);
  box-shadow: 0 8px 24px var(--card-shadow);
}

.avatar-img:hover {
  border-color: var(--ocean);
  box-shadow: 0 8px 32px var(--ocean-glow);
  transform: scale(1.02);
}

#status-dot {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 16px;
  height: 16px;
  border-radius: var(--radius-full);
  border: 2.5px solid var(--bg-sidebar);
  background: var(--offline);
  transition: var(--transition);
}

#status-dot.online-pulse {
  background: var(--online);
  box-shadow: 0 0 20px var(--online-glow);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.15);
    opacity: 0.7;
  }
}

.identity-info h1 {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0;
  letter-spacing: -0.03em;
}

.identity-info span {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 400;
}

/* --- NAVEGAÇÃO --- */
.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
}

.nav-category {
  font-size: 0.55rem;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  padding: 0.5rem 0.75rem 0.25rem;
  font-weight: 700;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  background: transparent;
  width: 100%;
}

.nav-item:hover {
  background: var(--ocean-dim);
  color: var(--text-primary);
}

.nav-item.active {
  background: var(--ocean-dim);
  color: var(--ocean-light);
  font-weight: 600;
}

.nav-item.active .nav-icon {
  stroke: var(--ocean-light);
}

.nav-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  stroke: currentColor;
  transition: var(--transition);
}

.nav-item:hover .nav-icon {
  transform: scale(1.05);
}

/* --- BOTÃO TEMA --- */
.theme-switch {
  margin-top: auto;
  padding: 0.6rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 1rem;
  color: var(--text-primary);
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.theme-switch:hover {
  border-color: var(--ocean);
  background: var(--ocean-dim);
}

/* --- CONTEÚDO --- */
.main-content {
  flex: 1;
  overflow-y: auto;
  padding: 2rem 2.5rem;
}

/* --- HEADER --- */
.content-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.breadcrumb {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 500;
  letter-spacing: 0.04em;
}

.breadcrumb strong {
  color: var(--ocean-light);
  font-weight: 700;
}

/* --- STATS --- */
.top-stats {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: var(--bg-card);
  padding: 0.4rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.top-stats:hover {
  border-color: var(--ocean);
}

.stat-group {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-label {
  font-size: 0.45rem;
  font-weight: 800;
  color: var(--ocean-light);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.stat-value {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
}

.stat-divider {
  width: 1px;
  height: 24px;
  background: var(--border);
}

/* --- CARDS --- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  transition: var(--transition);
  box-shadow: 0 4px 16px var(--card-shadow);
}

.card:hover {
  border-color: var(--ocean);
  box-shadow:
    0 8px 32px var(--card-shadow),
    0 0 40px var(--ocean-glow);
}

.card h2 {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--ocean-light);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 1.25rem;
}

/* --- FORMULÁRIOS --- */
.form-group {
  margin-bottom: 1.25rem;
}

label {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.4rem;
}

input,
textarea,
select {
  width: 100%;
  padding: 0.7rem 1rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 400;
  font-family: var(--font-primary);
  transition: var(--transition);
  outline: none;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--ocean);
  box-shadow: 0 0 0 3px var(--ocean-dim);
}

input::placeholder,
textarea::placeholder {
  color: var(--text-muted);
}

select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238899b0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 12px;
}

[data-theme="light"] select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%234a5a70' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

input[type="checkbox"] {
  width: 18px;
  height: 18px;
  padding: 0;
  accent-color: var(--ocean);
  cursor: pointer;
}

/* --- BOTÕES --- */
.btn-primary,
.btn-explore,
.lyto-btn-confirm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.5rem;
  background: var(--ocean);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-primary);
}

.btn-primary:hover,
.btn-explore:hover,
.lyto-btn-confirm:hover {
  background: var(--ocean-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--ocean-glow);
}

.btn-primary:active,
.btn-explore:active,
.lyto-btn-confirm:active {
  transform: translateY(0);
}

/* --- TOGGLES --- */
.toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 1rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 0.5rem;
  transition: var(--transition);
}

.toggle-row:hover {
  border-color: var(--ocean);
  background: var(--ocean-dim);
}

.toggle-row label {
  margin: 0;
  font-size: 0.6rem;
  cursor: pointer;
  color: var(--text-secondary);
}

.toggle-row input[type="checkbox"]:checked {
  accent-color: var(--ocean);
}

/* --- GRID --- */
.grid-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 1.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.profile-flex-row {
  display: flex;
  gap: 1rem;
}

.profile-flex-row .form-group {
  flex: 1;
  margin-bottom: 0;
}

.visibility-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

/* --- SELECT OPTIONS --- */
select option {
  background: var(--bg-card);
  color: var(--text-primary);
  padding: 8px;
}

/* --- RESPONSIVIDADE --- */
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    left: 0;
    bottom: -100%;
    top: auto;
    width: 100%;
    height: 75vh;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    border-right: none;
    border-top: 2px solid var(--ocean);
    padding: 1.5rem;
    z-index: 1001;
    box-shadow: 0 -8px 32px var(--card-shadow);
  }

  .sidebar.active {
    bottom: 0;
  }

  .sidebar::before {
    content: "";
    display: block;
    width: 40px;
    height: 4px;
    background: var(--border);
    border-radius: var(--radius-full);
    margin: -0.5rem auto 1rem;
  }

  .main-content {
    padding: 1rem 1.25rem;
  }

  .content-header {
    flex-direction: column;
    gap: 0.75rem;
    align-items: stretch;
  }

  .top-stats {
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.5rem;
    justify-content: center;
  }

  .stat-group {
    padding: 0.25rem 0.5rem;
    background: var(--bg-app);
    border-radius: var(--radius-sm);
    min-width: 55px;
  }

  .stat-divider {
    display: none;
  }

  .grid-layout,
  .form-row,
  .profile-flex-row {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .visibility-grid {
    grid-template-columns: 1fr;
  }

  .btn-primary,
  .btn-explore {
    width: 100%;
  }

  .lyto-fab {
    display: flex !important;
  }
}

/* --- FAB MOBILE --- */
.lyto-fab {
  display: none;
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 52px;
  height: 52px;
  border-radius: var(--radius-lg);
  background: var(--ocean);
  border: none;
  box-shadow: 0 4px 24px var(--ocean-glow);
  z-index: 1002;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.lyto-fab:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 32px var(--ocean-glow);
}

.fab-icon {
  width: 22px;
  height: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.fab-icon span {
  display: block;
  width: 100%;
  height: 2px;
  background: #ffffff;
  border-radius: 2px;
  transition: var(--transition);
}

.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* --- MODAIS --- */
.modal-overlay,
.lyto-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fade-in 0.2s ease;
}

.modal-content,
.lyto-modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2rem;
  width: 90%;
  max-width: 480px;
  max-height: 80vh;
  overflow-y: auto;
  animation: slide-up 0.3s ease;
}

.modal-content h2,
.lyto-modal-content h2 {
  color: var(--ocean-light);
  font-size: 1.1rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 1.25rem;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slide-up {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
