/* ============================================================
   DIRECTOTE.COM — Main CSS Entry Point
   Archivo: main.css
   Descripción: Importa todos los módulos del design system
   ============================================================ */

/* Vendor (se cargan vía CDN en el HTML, pero se documentan aquí)
   - Bootstrap 5.3.3
   - FontAwesome 6.5.2
*/

/* Design System */
@import url('./design-system/01-tokens.css');
@import url('./design-system/02-base.css');
@import url('./design-system/03-atoms.css');
@import url('./design-system/04-molecules.css');
@import url('./design-system/05-organisms.css');
@import url('./design-system/06-animations.css');
@import url('./design-system/07-utilities.css');
@import url('./design-system/08-dark-mode.css');
@import url('./design-system/09-accessibility.css');

/* ============================================================
   COMPONENTES ESPECÍFICOS DE PÁGINA
   (Estilos que no encajan en atoms/molecules/organisms)
   ============================================================ */

/* === AUTH PAGES === */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.auth-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}
.auth-card {
  width: 100%;
  max-width: 440px;
  background: #fff;
  border-radius: var(--radius-2xl);
  padding: 2.5rem 2rem;
  box-shadow: 0 10px 40px rgba(17, 24, 39, 0.08);
  border: 1px solid var(--neutral-100);
}
.auth-card.wide { max-width: 480px; }
.auth-logo {
  text-align: center;
  margin-bottom: 2rem;
}
.auth-logo-icon {
  width: 64px; height: 64px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, var(--brand-500), var(--action-500));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.75rem;
  margin-bottom: 1rem;
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.3);
}
.auth-title {
  font-family: var(--font-display);
  font-weight: var(--font-bold);
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--neutral-900);
}
.auth-subtitle {
  color: var(--neutral-500);
  font-size: 0.9375rem;
  margin-bottom: 2rem;
  line-height: 1.6;
}
.auth-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0;
  color: var(--neutral-400);
  font-size: 0.8125rem;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--neutral-200);
}
.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  color: var(--neutral-600);
  font-size: 0.9375rem;
}
.auth-footer a {
  color: var(--brand-600);
  font-weight: var(--font-semibold);
}

/* Social login */
.social-login {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.btn-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem;
  border: 1.5px solid var(--neutral-200);
  border-radius: var(--radius-lg);
  background: #fff;
  font-weight: var(--font-medium);
  font-size: 0.9375rem;
  color: var(--neutral-700);
  transition: all var(--duration-base) var(--ease-out);
  cursor: pointer;
}
.btn-social:hover {
  border-color: var(--neutral-300);
  background: var(--neutral-50);
  transform: translateY(-1px);
}

/* Password strength */
.password-strength {
  display: flex;
  gap: 4px;
  margin-top: 0.5rem;
}
.password-strength-bar {
  flex: 1;
  height: 4px;
  background: var(--neutral-200);
  border-radius: var(--radius-full);
  transition: background var(--duration-base);
}
.password-strength.weak .password-strength-bar:nth-child(1) { background: var(--danger-500); }
.password-strength.medium .password-strength-bar:nth-child(-n+2) { background: var(--warning-500); }
.password-strength.good .password-strength-bar:nth-child(-n+3) { background: var(--brand-500); }
.password-strength.strong .password-strength-bar { background: var(--success-500); }

/* Password toggle */
.input-password-wrapper { position: relative; }
.input-password-wrapper .toggle-password {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--neutral-400);
  cursor: pointer;
  padding: 0.25rem;
  z-index: 2;
}
.input-password-wrapper .toggle-password:hover { color: var(--neutral-600); }

/* OTP inputs */
.otp-inputs {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}
.otp-input {
  width: 56px; height: 64px;
  text-align: center;
  font-size: 1.75rem;
  font-weight: var(--font-bold);
  font-family: var(--font-mono);
  border: 2px solid var(--neutral-200);
  border-radius: var(--radius-xl);
  background: var(--neutral-50);
  color: var(--neutral-900);
  transition: all var(--duration-base) var(--ease-out);
}
.otp-input:focus {
  outline: none;
  border-color: var(--brand-500);
  background: #fff;
  box-shadow: var(--shadow-glow-brand);
  transform: translateY(-2px);
}
.otp-input.filled {
  border-color: var(--success-500);
  background: var(--success-50);
  color: var(--success-700);
}
.otp-input.error {
  border-color: var(--danger-500);
  background: var(--danger-50);
  animation: dt-shake 0.4s ease;
}

/* Account type cards */
.account-type-card {
  border: 2px solid var(--neutral-200);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  cursor: pointer;
  transition: all var(--duration-base) var(--ease-out);
  text-align: center;
}
.account-type-card:hover {
  border-color: var(--brand-300);
  transform: translateY(-2px);
}
.account-type-card.selected {
  border-color: var(--brand-500);
  background: var(--brand-50);
}
.account-type-icon {
  width: 56px; height: 56px;
  border-radius: var(--radius-xl);
  background: var(--brand-50);
  color: var(--brand-600);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin: 0 auto 1rem;
}
.account-type-card.selected .account-type-icon {
  background: var(--brand-500);
  color: #fff;
}

/* Success state */
.success-state { display: none; text-align: center; }
.success-state.active { display: block; }
.success-icon {
  width: 100px; height: 100px;
  border-radius: 50%;
  background: var(--success-50);
  color: var(--success-500);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 2.5rem;
}

/* === FEED === */
.feed-container {
  max-width: 560px;
  margin: 1.5rem auto;
  padding: 0 1rem;
}
@media (min-width: 768px) { .feed-container { max-width: 1200px; } }

.feed-list-mobile {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
@media (min-width: 768px) { .feed-list-mobile { display: none; } }

.feed-grid-desktop {
  display: none;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
@media (min-width: 768px) { .feed-grid-desktop { display: grid; } }
@media (min-width: 1200px) { .feed-grid-desktop { grid-template-columns: repeat(3, 1fr); } }

.filters-bar {
  background: #fff;
  border-bottom: 1px solid var(--neutral-100);
  padding: 0.75rem 1rem;
  position: sticky;
  top: var(--header-height);
  z-index: calc(var(--z-sticky) - 1);
}
.filters-tabs {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.filters-tabs::-webkit-scrollbar { display: none; }
.filter-tab {
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: var(--neutral-100);
  color: var(--neutral-700);
  font-size: 0.875rem;
  font-weight: var(--font-medium);
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--duration-base) var(--ease-out);
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}
.filter-tab:hover { background: var(--neutral-200); }
.filter-tab.active {
  background: var(--brand-500);
  color: #fff;
  box-shadow: 0 4px 12px rgba(59,130,246,0.3);
}
.filter-btn {
  padding: 0.5rem 0.875rem;
  border-radius: 999px;
  background: #fff;
  border: 1.5px solid var(--neutral-200);
  color: var(--neutral-700);
  font-size: 0.875rem;
  font-weight: var(--font-medium);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  transition: all var(--duration-base) var(--ease-out);
}
.filter-btn:hover {
  border-color: var(--brand-500);
  color: var(--brand-600);
}

.feed-loader {
  text-align: center;
  padding: 2rem;
  color: var(--neutral-500);
  font-size: 0.875rem;
}

/* === PROFILE === */
.profile-header {
  background: linear-gradient(135deg, var(--brand-500), var(--action-500));
  color: #fff;
  padding: 3rem 1rem 5rem;
  text-align: center;
  position: relative;
}
.profile-avatar-wrapper {
  margin-top: -60px;
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
}
.profile-avatar {
  width: 120px; height: 120px;
  border-radius: 50%;
  border: 4px solid #fff;
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  background: #fff;
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }

.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin: 1.5rem 0;
}
@media (min-width: 768px) {
  .profile-stats-grid { grid-template-columns: repeat(4, 1fr); }
}

/* === DASHBOARD === */
.dashboard-welcome {
  margin-bottom: 2rem;
}
.dashboard-welcome h1 {
  font-size: 1.75rem;
  margin-bottom: 0.25rem;
}
.dashboard-welcome p {
  color: var(--neutral-500);
  margin: 0;
}

/* === EMPTY STATE === */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  max-width: 400px;
  margin: 0 auto;
}
.empty-state-icon {
  width: 120px; height: 120px;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-50), var(--action-50));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--brand-400);
}
.empty-state-title {
  font-size: 1.25rem;
  font-weight: var(--font-bold);
  color: var(--neutral-900);
  margin-bottom: 0.5rem;
}
.empty-state-text {
  font-size: 0.9375rem;
  color: var(--neutral-500);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

/* === ERROR STATE === */
.error-state {
  text-align: center;
  padding: 3rem 2rem;
}
.error-state-icon {
  width: 80px; height: 80px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: var(--danger-50);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--danger-500);
}

/* === ERROR PAGES === */
.error-page {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  text-align: center;
}
.error-code {
  font-family: var(--font-display);
  font-size: clamp(5rem, 15vw, 10rem);
  font-weight: var(--font-extrabold);
  background: linear-gradient(135deg, var(--brand-500), var(--action-500));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
  margin-bottom: 1rem;
}

/* === MAP === */
.map-filters {
  position: absolute;
  top: 1rem; left: 1rem; right: 1rem;
  z-index: 10;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.map-panel {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: #fff;
  border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
  box-shadow: var(--shadow-xl);
  max-height: 60vh;
  overflow-y: auto;
  z-index: 10;
  padding: 1rem;
}
@media (min-width: 768px) {
  .map-panel {
    top: 0; bottom: 0;
    left: 0; right: auto;
    width: 380px;
    border-radius: 0;
    max-height: none;
  }
}
.map-panel-handle {
  width: 40px; height: 4px;
  background: var(--neutral-300);
  border-radius: 2px;
  margin: 0 auto 1rem;
}
@media (min-width: 768px) {
  .map-panel-handle { display: none; }
}

/* === CHAT === */
.chat-wrapper {
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--header-height));
}
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.chat-message {
  max-width: 75%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-xl);
  font-size: 0.9375rem;
  line-height: 1.5;
}
.chat-message.received {
  background: var(--neutral-100);
  color: var(--neutral-900);
  align-self: flex-start;
  border-bottom-left-radius: var(--radius-sm);
}
.chat-message.sent {
  background: var(--brand-500);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: var(--radius-sm);
}
.chat-input-bar {
  padding: 1rem;
  border-top: 1px solid var(--neutral-100);
  background: #fff;
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

/* === TRUST SCORE === */
.trust-score-circle {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: conic-gradient(var(--success-500) 0% 92%, var(--neutral-200) 92% 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.trust-score-circle::before {
  content: '';
  position: absolute;
  inset: 6px;
  background: #fff;
  border-radius: 50%;
}
.trust-score-value {
  position: relative;
  font-family: var(--font-display);
  font-weight: var(--font-extrabold);
  font-size: 1.25rem;
  color: var(--neutral-900);
}

/* === FILE UPLOAD === */
.file-upload {
  border: 2px dashed var(--neutral-300);
  border-radius: var(--radius-xl);
  padding: 2rem;
  text-align: center;
  background: var(--neutral-50);
  transition: all var(--duration-base) var(--ease-out);
  cursor: pointer;
}
.file-upload:hover,
.file-upload.drag-over {
  border-color: var(--brand-500);
  background: var(--brand-50);
}
.file-upload-icon {
  font-size: 3rem;
  color: var(--neutral-400);
  margin-bottom: 1rem;
}
.file-upload-text {
  color: var(--neutral-600);
  font-size: 0.9375rem;
  margin-bottom: 0.5rem;
}
.file-upload-hint {
  color: var(--neutral-500);
  font-size: 0.8125rem;
}

/* === SETTINGS LIST === */
.settings-section {
  margin-bottom: 2rem;
}
.settings-section-title {
  font-size: 0.75rem;
  font-weight: var(--font-bold);
  color: var(--neutral-500);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.75rem;
  padding: 0 0.5rem;
}
.settings-list {
  background: #fff;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--neutral-100);
}
.settings-item {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--neutral-100);
  cursor: pointer;
  transition: background var(--duration-base);
  text-decoration: none;
  color: inherit;
}
.settings-item:last-child { border-bottom: none; }
.settings-item:hover { background: var(--neutral-50); color: inherit; }
.settings-item-icon {
  width: 36px; height: 36px;
  border-radius: var(--radius-md);
  background: var(--brand-50);
  color: var(--brand-600);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.settings-item-content { flex: 1; min-width: 0; }
.settings-item-label {
  font-weight: var(--font-medium);
  font-size: 0.9375rem;
}
.settings-item-desc {
  font-size: 0.8125rem;
  color: var(--neutral-500);
}
.settings-item-arrow {
  color: var(--neutral-400);
}

/* === FAQ === */
.faq-search {
  max-width: 600px;
  margin: 0 auto 2rem;
}

/* === TABLE === */
.table-custom {
  width: 100%;
  background: #fff;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--neutral-100);
  border-collapse: collapse;
}
.table-custom th {
  background: var(--neutral-50);
  padding: 0.875rem 1rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: var(--font-bold);
  color: var(--neutral-600);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--neutral-200);
}
.table-custom td {
  padding: 1rem;
  border-bottom: 1px solid var(--neutral-100);
  font-size: 0.9375rem;
}
.table-custom tr:last-child td { border-bottom: none; }
.table-custom tr:hover td { background: var(--neutral-50); }

.icon-message{
  width: 35px;
  height: auto;
  display: inline-block;
  padding-right:5px;
}

/* === COUNTDOWN === */
.countdown {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: var(--neutral-500);
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}
.countdown-timer {
  font-family: var(--font-mono);
  font-weight: var(--font-bold);
  color: var(--brand-600);
}

/* === LOGS === */
.log-container {
  background: var(--neutral-900);
  color: var(--neutral-300);
  border-radius: var(--radius-lg);
  padding: 1rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  max-height: 300px;
  overflow-y: auto;
}
.log-entry {
  padding: 0.25rem 0;
  border-bottom: 1px solid var(--neutral-800);
}
.log-entry:last-child { border-bottom: none; }
.log-time { color: var(--neutral-500); }
.log-success { color: var(--success-400); }
.log-error { color: var(--danger-400); }
.log-warning { color: var(--warning-400); }