/**
 * Shortener - Modern Dark Theme Design System
 * 100% Adaptado e Otimizado para Dispositivos Móveis & Desktops
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg-main: #0a0f1d;
  --bg-card: rgba(21, 30, 48, 0.85);
  --bg-card-hover: rgba(27, 39, 62, 0.95);
  --bg-input: rgba(13, 20, 34, 0.9);
  --bg-input-focus: rgba(15, 23, 42, 1);
  --bg-subtle: rgba(255, 255, 255, 0.04);
  
  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: #38bdf8;
  --border-glow: rgba(56, 189, 248, 0.25);
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --accent-primary: #38bdf8;
  --accent-primary-hover: #0ea5e9;
  --accent-emerald: #10b981;
  --accent-emerald-hover: #059669;
  --accent-gradient: linear-gradient(135deg, #38bdf8 0%, #6366f1 100%);
  --accent-gradient-hover: linear-gradient(135deg, #0ea5e9 0%, #4f46e5 100%);
  
  --danger: #f43f5e;
  --danger-bg: rgba(244, 63, 94, 0.12);
  --danger-border: rgba(244, 63, 94, 0.35);
  
  --success: #10b981;
  --success-bg: rgba(16, 185, 129, 0.12);
  --success-border: rgba(16, 185, 129, 0.35);
  
  --warning: #f59e0b;
  --warning-bg: rgba(245, 158, 11, 0.12);
  --warning-border: rgba(245, 158, 11, 0.35);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 25px rgba(56, 189, 248, 0.2);
  
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);

  --touch-target: 44px;
}

/* Reset e Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100%;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  min-height: -webkit-fill-available;
  display: flex;
  flex-direction: column;
  background: 
    radial-gradient(circle at 15% 15%, rgba(56, 189, 248, 0.07) 0%, transparent 40%),
    radial-gradient(circle at 85% 70%, rgba(99, 102, 241, 0.07) 0%, transparent 40%),
    var(--bg-main);
  background-attachment: fixed;
  padding: 0;
  margin: 0;
  overflow-x: hidden;
}

/* Header & Navbar */
.site-header {
  border-bottom: 1px solid var(--border-color);
  background: rgba(10, 15, 29, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
}

.header-container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.header-container.header-container-centered {
  justify-content: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  flex-shrink: 0;
  transition: opacity var(--transition-fast);
}

.brand:hover {
  opacity: 0.9;
}

.brand-icon {
  width: 24px;
  height: 24px;
  color: var(--accent-primary);
  flex-shrink: 0;
}

.brand span {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.site-header nav {
  display: flex;
  align-items: center;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.4rem 0.65rem;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
}

.nav-link:hover {
  color: var(--text-primary);
  background: var(--bg-subtle);
}

.nav-link.active {
  color: var(--accent-primary);
  background: rgba(56, 189, 248, 0.12);
  font-weight: 600;
}

/* Link de Painel Bloqueado para Visitantes */
.nav-link.nav-link-locked {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.nav-lock-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: var(--radius-sm);
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #f87171;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.nav-link:hover .nav-lock-badge {
  background: rgba(239, 68, 68, 0.25);
  border-color: rgba(239, 68, 68, 0.55);
  color: #fca5a5;
  transform: scale(1.05);
}

.nav-link.active .nav-lock-badge {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.4);
  color: var(--accent-primary);
}

.github-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-secondary);
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  padding: 0.35rem 0.7rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
  transition: all var(--transition-fast);
  white-space: nowrap;
  min-height: 36px;
}

.github-badge:hover {
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
}

.auth-slot {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.mobile-menu-toggle {
  display: none;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.mobile-menu-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.mobile-menu-toggle .hamburger-icon-close {
  display: none;
}

.site-header.mobile-nav-open .mobile-menu-toggle {
  background: rgba(56, 189, 248, 0.15);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.site-header.mobile-nav-open .mobile-menu-toggle .hamburger-icon-open {
  display: none;
}

.site-header.mobile-nav-open .mobile-menu-toggle .hamburger-icon-close {
  display: block;
}

@keyframes slideDownNav {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Desktop default labels */
.auth-btn-text-mobile {
  display: none;
}
.auth-btn-text-desktop {
  display: inline;
}

@media (max-width: 860px), (orientation: landscape) and (max-height: 550px) {
  .site-header {
    width: 100%;
    overflow-x: clip;
  }

  .header-container {
    padding: 0.45rem 0.75rem !important;
    display: grid !important;
    grid-template-columns: 1fr auto 1fr !important;
    align-items: center !important;
    gap: 0.35rem !important;
    position: relative !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .brand {
    grid-column: 1 !important;
    justify-self: start !important;
    display: inline-flex !important;
    align-items: center !important;
    flex: 0 0 auto !important;
    font-size: 0.95rem !important;
    gap: 0.35rem !important;
    min-width: 0 !important;
    white-space: nowrap !important;
  }

  .brand-icon {
    width: 18px !important;
    height: 18px !important;
    flex-shrink: 0 !important;
  }

  .brand span {
    white-space: nowrap !important;
    font-weight: 700 !important;
  }

  /* Botão de Autenticação / Perfil do Usuário rigorosamente centralizado no meio exato do cabeçalho via CSS Grid */
  .auth-slot {
    grid-column: 2 !important;
    justify-self: center !important;
    margin: 0 auto !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: static !important;
    transform: none !important;
    min-width: 0 !important;
    max-width: 100% !important;
    pointer-events: auto !important;
  }

  .auth-btn-text-desktop {
    display: none !important;
  }

  .auth-btn-text-mobile {
    display: inline !important;
  }

  .auth-slot .auth-login-btn {
    display: inline-flex !important;
    align-items: center !important;
    padding: 0.25rem 0.55rem !important;
    font-size: 0.76rem !important;
    min-height: 30px !important;
    height: 30px !important;
    gap: 0.3rem !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }

  .user-profile-menu {
    display: inline-flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 0.25rem !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .user-avatar-btn {
    display: inline-flex !important;
    align-items: center !important;
    padding: 0.15rem 0.4rem 0.15rem 0.2rem !important;
    font-size: 0.72rem !important;
    min-height: 30px !important;
    height: 30px !important;
    gap: 0.25rem !important;
    min-width: 0 !important;
    max-width: 115px !important;
    flex-shrink: 1 !important;
  }

  .user-avatar-img {
    width: 20px !important;
    height: 20px !important;
    flex-shrink: 0 !important;
  }

  .user-name-label {
    max-width: 70px !important;
    font-size: 0.72rem !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    display: inline-block !important;
  }

  .user-logout-btn {
    display: inline-flex !important;
    align-items: center !important;
    padding: 0.2rem 0.4rem !important;
    font-size: 0.72rem !important;
    min-height: 30px !important;
    height: 30px !important;
    gap: 0.2rem !important;
    flex-shrink: 0 !important;
    white-space: nowrap !important;
  }

  .user-logout-btn svg {
    width: 12px !important;
    height: 12px !important;
  }

  .mobile-menu-toggle {
    grid-column: 3 !important;
    justify-self: end !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
    padding: 0 !important;
    flex-shrink: 0 !important;
  }

  .mobile-menu-toggle svg {
    width: 18px !important;
    height: 18px !important;
  }

  .site-header nav {
    display: none;
    width: 100%;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(13, 20, 34, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 1.25rem 1.25rem 1.25rem;
    box-shadow: var(--shadow-lg);
    animation: slideDownNav 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 999;
    max-height: calc(100vh - 55px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .site-header.mobile-nav-open nav {
    display: block !important;
  }

  .nav-links {
    flex-direction: column;
    align-items: stretch;
    gap: 0.4rem;
  }

  .nav-link {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    border-radius: var(--radius-md);
  }

  .nav-link.nav-link-locked {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }

  .nav-link.nav-link-locked .nav-lock-badge {
    margin-left: auto;
    width: 22px;
    height: 22px;
  }

  .github-badge {
    width: 100%;
    justify-content: center;
    padding: 0.65rem 1rem;
    margin-top: 0.25rem;
  }
}

/* Layout Principal */
.main-content {
  flex: 1;
  max-width: 780px;
  width: 100%;
  margin: 1.75rem auto;
  padding: 0 1.25rem;
}

/* Hero & Cabeçalhos de Página */
.page-header {
  text-align: center;
  margin-bottom: 1.75rem;
}

.page-header h1 {
  font-size: clamp(1.6rem, 5vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.25;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, #ffffff 30%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.page-header p {
  color: var(--text-secondary);
  font-size: clamp(0.92rem, 2.5vw, 1.05rem);
  max-width: 580px;
  margin: 0 auto;
  line-height: 1.5;
}

/* Cards e Contêineres */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.65rem;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
  transition: border-color var(--transition-normal);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-gradient);
  opacity: 0.7;
}

.card-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.info-card {
  background: rgba(30, 41, 59, 0.4);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.35rem;
  margin-bottom: 1.5rem;
}

.info-card h2 {
  font-size: 1.08rem;
  font-weight: 600;
  margin-bottom: 0.65rem;
  color: var(--text-primary);
}

.info-card p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  margin-bottom: 0.65rem;
  line-height: 1.55;
}

.info-card ul, .info-card ol {
  padding-left: 1.25rem;
  color: var(--text-secondary);
  font-size: 0.92rem;
}

.info-card li {
  margin-bottom: 0.45rem;
}

.info-card a, p a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.info-card a:hover, p a:hover {
  text-decoration: underline;
  color: #7dd3fc;
}

/* Badges e Pílulas */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1;
}

.badge-privacy {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-info {
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-primary);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.provider-badge.github {
  background: rgba(255, 255, 255, 0.08);
  color: #f1f5f9;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.provider-badge.google {
  background: rgba(66, 133, 244, 0.15);
  color: #93c5fd;
  border: 1px solid rgba(66, 133, 244, 0.35);
}

/* Formulários & Campos de Entrada */
.form-group, .labeled-input {
  margin-bottom: 1.15rem;
}

label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
  letter-spacing: 0.01em;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

input[type="text"],
input[type="url"],
input[type="password"],
textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1rem; /* 16px no mobile previne zoom indesejado no iOS Safari */
  transition: all var(--transition-fast);
  outline: none;
  min-height: var(--touch-target);
}

input[type="password"].has-toggle,
input[type="text"].has-toggle {
  padding-right: 3rem;
}

/* Oculta os botões nativos redundantes de revelar senha em navegadores (Edge, IE, WebKit) */
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear,
input[type="password"]::-webkit-credentials-auto-fill-button,
input[type="password"]::-webkit-contacts-auto-fill-button {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  width: 0 !important;
  height: 0 !important;
}

input[type="text"]:focus,
input[type="url"]:focus,
input[type="password"]:focus,
textarea:focus {
  background: var(--bg-input-focus);
  border-color: var(--border-focus);
  box-shadow: var(--shadow-glow);
}

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

textarea {
  resize: vertical;
  min-height: 75px;
  padding: 0.75rem 1rem;
}

.input-icon-btn {
  position: absolute;
  right: 0.4rem;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast);
}

.input-icon-btn:hover, .input-icon-btn:active {
  color: var(--text-primary);
}

/* Custom Slug Container & Input Prefix */
.slug-input-group {
  display: flex;
  align-items: center;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all var(--transition-fast);
  width: 100%;
}

.slug-input-group:focus-within {
  border-color: var(--border-focus);
  box-shadow: var(--shadow-glow);
  background: var(--bg-input-focus);
}

.slug-prefix {
  padding: 0.75rem 0.6rem 0.75rem 0.85rem;
  color: var(--accent-primary);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  font-weight: 600;
  user-select: none;
  background: rgba(56, 189, 248, 0.05);
  border-right: 1px solid var(--border-color);
  flex-shrink: 0;
}

.slug-input-group input {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  padding-left: 0.75rem;
  flex: 1;
  min-width: 0;
}

.slug-status {
  font-size: 0.82rem;
  margin-top: 0.4rem;
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  transition: all var(--transition-fast);
  line-height: 1.4;
}

.slug-status svg {
  flex-shrink: 0;
  margin-top: 2px;
}

.slug-status.available {
  color: var(--accent-emerald);
}

.slug-status.exists {
  color: var(--warning);
}

/* Split Rows (Senhas lado a lado no desktop, empilhadas no mobile) */
.split-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* Checkboxes & Toggles */
.checkbox-group {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
  cursor: pointer;
  min-height: 32px;
}

.checkbox-group input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  min-height: 20px;
  border: 1.5px solid var(--border-color);
  border-radius: 4px;
  background: var(--bg-input);
  cursor: pointer;
  display: grid;
  place-content: center;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.checkbox-group input[type="checkbox"]:checked {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
}

.checkbox-group input[type="checkbox"]:checked::before {
  content: "";
  width: 9px;
  height: 5px;
  border-left: 2px solid #000;
  border-bottom: 2px solid #000;
  transform: rotate(-45deg) translate(1px, -1px);
}

.checkbox-group label {
  margin-bottom: 0;
  cursor: pointer;
  user-select: none;
  font-weight: 500;
  font-size: 0.88rem;
  line-height: 1.35;
}

/* Opções Avançadas (Details / Summary) */
details {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  padding: 0.75rem 1rem;
  margin-bottom: 1.25rem;
  transition: background var(--transition-fast);
}

details[open] {
  background: rgba(255, 255, 255, 0.03);
}

summary {
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  list-style: none;
  min-height: 32px;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: '▼';
  font-size: 0.7rem;
  transition: transform var(--transition-fast);
  color: var(--text-muted);
}

details[open] summary::after {
  transform: rotate(180deg);
}

.details-content {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-color);
}

/* Botões */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.35rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-fast);
  white-space: nowrap;
  font-family: inherit;
  min-height: var(--touch-target);
  touch-action: manipulation;
}

.btn-sm {
  padding: 0.4rem 0.75rem;
  font-size: 0.82rem;
  border-radius: var(--radius-sm);
  min-height: 34px;
}

.btn-primary {
  background: var(--accent-gradient);
  color: #050b17;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(56, 189, 248, 0.3);
}

.btn-primary:hover {
  background: var(--accent-gradient-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.45);
}

.btn-primary:active {
  transform: translateY(0);
  opacity: 0.95;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-secondary:active {
  background: rgba(255, 255, 255, 0.18);
}

/* Botão Oficial GitHub (Fundo branco, texto e ícone pretos) */
.btn-github {
  background: #ffffff !important;
  color: #1f2328 !important;
  border: 1px solid #d0d7de !important;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
  transition: all var(--transition-fast);
}

.btn-github svg {
  fill: #1f2328 !important;
  color: #1f2328 !important;
  flex-shrink: 0;
}

.btn-github:hover {
  background: #f3f4f6 !important;
  color: #000000 !important;
  border-color: #bbc0c4 !important;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.18);
  transform: translateY(-1px);
}

.btn-github:hover svg {
  fill: #000000 !important;
  color: #000000 !important;
}

.btn-github:active {
  background: #e5e7eb !important;
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.btn-danger {
  background: rgba(244, 63, 94, 0.15);
  color: #fda4af;
  border: 1px solid rgba(244, 63, 94, 0.3);
}

.btn-danger:hover {
  background: rgba(244, 63, 94, 0.25);
  border-color: rgba(244, 63, 94, 0.5);
  color: #fff;
}

.btn-block {
  width: 100%;
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.75rem;
}

/* Área de Saída (Output Box) */
.output-box {
  background: rgba(10, 15, 29, 0.9);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.9rem;
  margin-top: 0.75rem;
}

.output-box input {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.88rem;
  color: #7dd3fc;
  background: rgba(0, 0, 0, 0.4);
}

/* Histórico de Links Salvos */
.history-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

.history-item {
  background: rgba(13, 20, 34, 0.7);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.9rem 1.1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  transition: all var(--transition-fast);
}

.history-item:hover {
  border-color: rgba(56, 189, 248, 0.3);
  background: rgba(17, 26, 46, 0.9);
}

.history-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  overflow: hidden;
  flex: 1;
  min-width: 200px;
}

.history-slug {
  font-weight: 700;
  color: var(--accent-primary);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.92rem;
  word-break: break-all;
}

.history-target {
  font-size: 0.82rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-date {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.history-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

/* Toast / Alerta de Sucesso */
.alert-toast {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--accent-emerald);
  margin-top: 0.6rem;
  opacity: 0;
  transform: translateY(4px);
  transition: all var(--transition-normal);
  padding: 0.4rem 0.2rem;
}

.alert-toast.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Caixas de Erro & Aviso */
.error-banner {
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  color: #fecdd3;
  margin-bottom: 1.5rem;
  text-align: center;
}

.error-banner h3 {
  color: var(--danger);
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.error-banner p {
  color: #fda4af;
  font-size: 0.92rem;
  margin-bottom: 1rem;
}

.error-banner .btn-group {
  justify-content: center;
}

.noscript-warning {
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
  border-radius: var(--radius-lg);
  padding: 1.35rem;
  color: #fef3c7;
  margin-bottom: 1.5rem;
}

.noscript-warning h3 {
  color: var(--warning);
  margin-bottom: 0.5rem;
}

.noscript-warning p {
  color: #fde68a;
  font-size: 0.92rem;
  line-height: 1.55;
  margin-bottom: 0.75rem;
}

/* Dica de Senha (Hint) */
.hint-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: #a5b4fc;
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  margin-bottom: 1.25rem;
  width: 100%;
}

/* Bookmark Button */
.bookmark-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.25rem;
  background: rgba(56, 189, 248, 0.1);
  color: var(--accent-primary);
  border: 2px dashed var(--accent-primary);
  border-radius: var(--radius-md);
  font-weight: 700;
  text-decoration: none;
  cursor: grab;
  transition: all var(--transition-fast);
  margin: 0.75rem 0;
  user-select: none;
  width: 100%;
  text-align: center;
  min-height: var(--touch-target);
}

.bookmark-btn:hover {
  background: rgba(56, 189, 248, 0.2);
  border-style: solid;
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.bookmark-btn[aria-disabled="true"] {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
  border-color: var(--text-muted);
  color: var(--text-muted);
}

/* Inline button container */
.inline-button-container {
  display: flex;
  gap: 0.5rem;
  width: 100%;
}

.inline-button-container input {
  flex: 1;
}

/* Código em linha */
code {
  font-family: 'JetBrains Mono', monospace;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-color);
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
  font-size: 0.85em;
  color: #38bdf8;
  word-break: break-word;
}

/* Separadores */
hr {
  border: 0;
  border-top: 1px solid var(--border-color);
  margin: 1.75rem 0;
}

/* Rodapé */
footer {
  margin-top: auto;
  border-top: 1px solid var(--border-color);
  background: rgba(10, 15, 29, 0.6);
  padding: 1.5rem 1.25rem max(1.5rem, env(safe-area-inset-bottom));
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

footer a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

footer a:hover {
  color: var(--accent-primary);
}

/* ==========================================================================
   Responsividade Avançada & Adaptação para Telas Móveis
   ========================================================================== */

/* Telas médias e Tablets em modo desktop */
@media (min-width: 861px) and (max-width: 1060px) and (min-height: 551px) {
  .nav-link {
    padding: 0.35rem 0.55rem;
    font-size: 0.8rem;
  }
}

@media (max-width: 640px) {
  .main-content {
    margin: 1.25rem auto;
    padding: 0 1rem;
  }

  .card {
    padding: 1.35rem 1.15rem;
    border-radius: 14px;
  }

  .info-card {
    padding: 1.15rem;
    border-radius: 14px;
  }

  .split-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .inline-button-container {
    flex-direction: column;
  }

  .inline-button-container .btn {
    width: 100%;
  }

  .history-item {
    padding: 0.85rem 1rem;
    gap: 0.65rem;
  }

  .history-actions {
    width: 100%;
    justify-content: stretch;
  }

  .history-actions .btn {
    flex: 1;
    text-align: center;
  }

  .history-target {
    max-width: 100%;
  }
}

/* Smartphones pequenos (iPhone SE, Galaxy A, etc. <= 480px) */
@media (max-width: 480px) {
  .header-container {
    padding: 0.5rem 0.85rem;
  }

  .brand {
    font-size: 1.05rem;
  }

  .github-badge {
    padding: 0.25rem 0.55rem;
    font-size: 0.75rem;
    min-height: 32px;
  }

  .main-content {
    margin: 1rem auto;
    padding: 0 0.85rem;
  }

  .card {
    padding: 1.2rem 0.95rem;
    border-radius: 12px;
  }

  .card-title {
    font-size: 1.05rem;
  }

  .btn-group {
    flex-direction: column;
    width: 100%;
  }

  .btn-group .btn {
    width: 100%;
  }

  .btn {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    width: 100%;
  }

  .slug-prefix {
    padding: 0.75rem 0.45rem;
    font-size: 0.82rem;
  }

  .history-actions {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 0.35rem;
    width: 100%;
  }

  .history-actions .btn {
    width: 100%;
    padding: 0.4rem 0.5rem;
    font-size: 0.78rem;
  }
}

/* ==========================================================================
   Autenticação Social, Modais & Menu de Usuário
   ========================================================================== */

/* Menu de Usuário no Cabeçalho */
.user-profile-menu {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.user-avatar-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.2rem 0.65rem 0.2rem 0.35rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  text-decoration: none;
  color: var(--text-primary);
  font-size: 0.82rem;
  font-weight: 600;
  transition: all var(--transition-fast);
  min-height: 36px;
}

.user-avatar-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--accent-primary);
}

.user-avatar-img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(56, 189, 248, 0.2);
}

.user-name-label {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-logout-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.65rem;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: var(--radius-full);
  color: #fca5a5;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  min-height: 36px;
  transition: all var(--transition-fast);
}

.user-logout-btn:hover {
  background: rgba(239, 68, 68, 0.22);
  border-color: #ef4444;
  color: #ffffff;
}

/* Modal Backdrop & Card */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(5, 10, 20, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.modal-card {
  background: #111a2e;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  max-width: 480px;
  width: 100%;
  max-height: calc(100vh - 2.5rem);
  max-height: calc(100dvh - 2.5rem);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  margin: auto;
  padding: 1.75rem;
  box-shadow: var(--shadow-lg);
  position: relative;
  animation: modalFadeIn 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.85rem;
}

.modal-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast);
  line-height: 1;
}

.modal-close-btn:hover {
  color: var(--text-primary);
}

/* Botões de Login Social */
.social-login-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.btn-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition-fast);
  background: #ffffff !important;
  color: #181717 !important;
  border: 1px solid #e5e7eb !important;
  min-height: 48px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.btn-social:hover {
  transform: translateY(-2px);
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
  box-shadow: 0 4px 14px rgba(255, 255, 255, 0.18);
}

.btn-social:active {
  transform: translateY(0);
  background: #f1f5f9 !important;
}

.btn-github {
  background: #ffffff !important;
  color: #181717 !important;
  border-color: #e5e7eb !important;
}

.btn-github svg {
  fill: #181717 !important;
}

.btn-google {
  background: #ffffff !important;
  color: #1f2937 !important;
  border-color: #e5e7eb !important;
}

/* ==========================================================================
   Dashboard / Painel de Controle
   ========================================================================== */

/* Grid de Métricas (KPIs) */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.stat-card {
  background: rgba(17, 26, 46, 0.8);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.15rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  position: relative;
  overflow: hidden;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.stat-card:hover {
  border-color: rgba(56, 189, 248, 0.35);
  transform: translateY(-2px);
}

.stat-icon {
  color: var(--accent-primary);
  margin-bottom: 0.2rem;
}

.stat-value {
  font-size: 1.65rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
  font-family: 'JetBrains Mono', monospace;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Barra de Busca & Filtro na Dashboard */
.search-filter-bar {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.search-input-wrapper {
  flex: 1;
  min-width: 220px;
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 0.85rem;
  color: var(--text-muted);
  pointer-events: none;
}

.search-input-wrapper input {
  padding-left: 2.5rem;
}

/* Tabela de Links da Dashboard */
.dashboard-table-container {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: rgba(13, 20, 34, 0.7);
}

.dashboard-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.dashboard-table th {
  background: rgba(21, 30, 48, 0.95);
  padding: 0.85rem 1rem;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.dashboard-table td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  vertical-align: middle;
}

.dashboard-table tr:last-child td {
  border-bottom: none;
}

.dashboard-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* Coluna Fixa de Ações (Sempre visível sem depender do scroll) */
.dashboard-table th.th-actions,
.dashboard-table td.td-actions {
  position: sticky;
  right: 0;
  white-space: nowrap;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.dashboard-table th.th-actions {
  z-index: 5;
  background: #151e30;
  box-shadow: -6px 0 16px rgba(0, 0, 0, 0.45);
}

.dashboard-table td.td-actions {
  z-index: 3;
  background: #0d1422;
  box-shadow: -6px 0 16px rgba(0, 0, 0, 0.45);
  transition: background var(--transition-fast);
}

.dashboard-table tr:hover td.td-actions {
  background: #172136;
}

.clicks-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
  background: rgba(56, 189, 248, 0.12);
  color: #7dd3fc;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.table-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  justify-content: flex-end;
}

.table-actions .btn-sm {
  padding: 0.3rem 0.55rem;
  font-size: 0.78rem;
}

/* ==========================================================================
   Admin Dashboard Styles (dougretrogames)
   ========================================================================== */

.admin-tabs-bar {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  background: rgba(13, 20, 34, 0.7);
  padding: 0.35rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  flex-wrap: wrap;
}

.admin-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.15rem;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-secondary);
  border: none;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.admin-tab-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.admin-tab-btn.active {
  background: var(--accent-primary);
  color: #050b17;
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(56, 189, 248, 0.3);
}

.admin-tab-badge {
  background: rgba(0, 0, 0, 0.25);
  color: inherit;
  font-size: 0.75rem;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-full);
  font-weight: 700;
}

.badge-admin {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
  font-weight: 700;
}

/* Barra Flutuante / Destaque de Ações em Lote */
.batch-actions-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.25rem;
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.15), rgba(15, 23, 42, 0.95));
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-radius: var(--radius-md);
  margin-bottom: 1.25rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  animation: modalFadeIn 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  flex-wrap: wrap;
}

.batch-actions-info {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: #fca5a5;
  font-weight: 600;
  font-size: 0.92rem;
}

.batch-actions-btns {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Checkboxes da Tabela */
.table-checkbox-cell {
  width: 38px;
  text-align: center;
}

.table-checkbox {
  width: 17px;
  height: 17px;
  cursor: pointer;
  accent-color: var(--accent-primary);
  border-radius: 4px;
}

/* Grid de Usuários Registrados */
.users-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.user-card {
  background: rgba(17, 26, 46, 0.7);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: all var(--transition-fast);
}

.user-card:hover {
  border-color: rgba(56, 189, 248, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.user-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-card-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--border-color);
  object-fit: cover;
  background: #111a2e;
}

.user-card-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  background: rgba(0, 0, 0, 0.25);
  border-radius: var(--radius-md);
  padding: 0.65rem;
  text-align: center;
}

/* 2FA / TOTP Styles */
.twofa-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.twofa-badge.active {
  background: rgba(16, 185, 129, 0.15);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.twofa-badge.active:hover {
  background: rgba(16, 185, 129, 0.25);
  border-color: rgba(16, 185, 129, 0.6);
}

.twofa-badge.warning {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.twofa-badge.warning:hover {
  background: rgba(245, 158, 11, 0.25);
  border-color: rgba(245, 158, 11, 0.6);
}

.twofa-qr-box {
  background: #ffffff;
  padding: 0.65rem;
  border-radius: var(--radius-lg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  margin: 0.65rem auto;
}

.twofa-qr-box img {
  width: 155px;
  height: 155px;
  max-width: 100%;
  display: block;
}

.twofa-secret-box {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.88rem;
  color: #38bdf8;
  word-break: break-all;
}

.otp-pin-input {
  font-family: 'JetBrains Mono', monospace, -apple-system, sans-serif !important;
  font-size: 1.6rem !important;
  letter-spacing: 0.3em !important;
  text-align: center !important;
  padding: 0.65rem 0.85rem !important;
  width: 100% !important;
  max-width: 250px !important;
  margin: 0 auto !important;
  border: 2px solid rgba(56, 189, 248, 0.5) !important;
  border-radius: var(--radius-md) !important;
  color: #38bdf8 !important;
  background: rgba(15, 23, 42, 0.95) !important;
  cursor: text !important;
  touch-action: manipulation !important;
  -webkit-user-select: text !important;
  user-select: text !important;
  display: block !important;
}

.otp-pin-input:focus {
  border-color: var(--accent-primary) !important;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.25) !important;
  outline: none !important;
}

.twofa-step-badge {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent-primary);
  color: #0f172a;
  font-weight: 800;
  font-size: 0.78rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ==========================================
   Sparklines & Mini Gráficos por Link
   ========================================== */
.clicks-cell-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.25rem 0.4rem;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  cursor: pointer;
  user-select: none;
}

.clicks-cell-wrapper:hover {
  background: rgba(56, 189, 248, 0.1);
}

.clicks-cell-wrapper:hover .clicks-badge {
  border-color: var(--accent-primary);
  color: #fff;
}

.clicks-cell-wrapper:hover .sparkline-container {
  border-color: rgba(56, 189, 248, 0.5);
}

.sparkline-container {
  display: inline-flex;
  align-items: center;
  padding: 3px 5px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.sparkline-svg {
  display: block;
  overflow: visible;
}

/* ==========================================
   Modal de Estatísticas e Gráficos do Link
   ========================================== */
.analytics-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.analytics-stat-card {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.analytics-toggle-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.analytics-toggle-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.analytics-toggle-btn.active {
  background: var(--accent-primary);
  color: #050b17;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(56, 189, 248, 0.3);
}

.analytics-chart-box {
  background: rgba(11, 18, 33, 0.95);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  min-height: 240px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow-x: auto;
}

.chart-svg-main {
  width: 100%;
  height: 200px;
  overflow: visible;
}

.chart-bar-rect {
  transition: all 0.2s ease;
  cursor: pointer;
}

.chart-bar-rect:hover {
  fill: #38bdf8 !important;
  filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.6));
}

.analytics-breakdown-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.85rem;
}

.analytics-breakdown-row:last-child {
  border-bottom: none;
}

.analytics-breakdown-row:hover {
  background: rgba(255, 255, 255, 0.03);
}

/* ==========================================
   Mobile Responsive Modal Optimizations
   ========================================== */
@media (max-width: 640px) {
  .modal-backdrop {
    padding: 0.75rem 0.5rem;
    align-items: flex-start;
  }

  .modal-card {
    padding: 1.25rem 1rem !important;
    max-height: calc(100vh - 1.5rem) !important;
    max-height: calc(100dvh - 1.5rem) !important;
    margin: 0.5rem auto 2.5rem auto !important;
    position: relative !important;
    z-index: 1000 !important;
  }

  .twofa-qr-box {
    padding: 0.5rem;
    margin: 0.4rem auto;
  }

  .twofa-qr-box img {
    width: 140px;
    height: 140px;
  }

  .otp-pin-input {
    font-size: 1.35rem !important;
    letter-spacing: 0.25em !important;
    padding: 0.6rem 0.5rem !important;
    max-width: 220px !important;
  }
}




