/* =========================================
   MyPixel / Pixel Modern Theme
   app.css
========================================= */

:root {
  --px-bg: #f6f8fc;
  --px-bg-soft: #fbfcfe;
  --px-surface: #ffffff;
  --px-surface-2: #f9fafc;
  --px-border: rgba(15, 23, 42, 0.08);
  --px-border-strong: rgba(15, 23, 42, 0.12);

  --px-text: #111827;
  --px-text-soft: #667085;
  --px-text-muted: #8a94a6;

  --px-primary: #6d5efc;
  --px-primary-2: #8b5cf6;
  --px-cyan: #06b6d4;
  --px-danger: #ef4444;
  --px-success: #10b981;
  --px-warning: #f59e0b;
  --px-dark: #111827;

  --px-shadow-sm: 0 10px 24px rgba(15, 23, 42, 0.05);
  --px-shadow-md: 0 18px 40px rgba(15, 23, 42, 0.08);
  --px-shadow-lg: 0 28px 70px rgba(15, 23, 42, 0.12);

  --px-radius-sm: 12px;
  --px-radius-md: 18px;
  --px-radius-lg: 24px;
  --px-radius-xl: 30px;

  --px-gradient: linear-gradient(135deg, #7c4dff 0%, #5b5bd6 55%, #06b6d4 100%);
  --px-gradient-soft: linear-gradient(135deg, rgba(124, 77, 255, 0.10), rgba(6, 182, 212, 0.10));
}

html,
body {
  min-height: 100%;
}

body {
  background:
    radial-gradient(circle at top left, rgba(123, 92, 255, 0.08), transparent 28%),
    radial-gradient(circle at bottom right, rgba(6, 182, 212, 0.06), transparent 24%),
    var(--px-bg);
  color: var(--px-text);
  font-family: "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* =========================================
   Global
========================================= */

a {
  color: var(--px-primary);
  text-decoration: none;
}

a:hover {
  color: var(--px-primary-2);
}

img {
  max-width: 100%;
}

.text-muted {
  color: var(--px-text-soft) !important;
}

.min-w-0 {
  min-width: 0;
}

.min-vh-75 {
  min-height: 75vh;
}

.rounded-4 {
  border-radius: var(--px-radius-lg) !important;
}

.shadow-sm {
  box-shadow: var(--px-shadow-sm) !important;
}

.shadow {
  box-shadow: var(--px-shadow-md) !important;
}

.border-soft {
  border: 1px solid var(--px-border);
}

.bg-soft {
  background: var(--px-surface-2);
}

.glass-card {
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: var(--px-shadow-md);
}

/* =========================================
   Buttons
========================================= */

.btn {
  border-radius: 16px;
  font-weight: 700;
  transition: .22s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:focus,
.form-control:focus,
.form-select:focus,
textarea:focus {
  box-shadow: 0 0 0 0.18rem rgba(109, 94, 252, 0.16);
  border-color: rgba(109, 94, 252, 0.28);
}

.btn-gradient,
.pixel-btn-primary {
  background: var(--px-gradient);
  color: #fff;
  border: 0;
  box-shadow: 0 14px 32px rgba(92, 76, 255, 0.22);
}

.btn-gradient:hover,
.pixel-btn-primary:hover {
  color: #fff;
}

.pixel-btn-light {
  background: rgba(255, 255, 255, 0.90);
  border: 1px solid var(--px-border);
  color: var(--px-text);
  box-shadow: var(--px-shadow-sm);
}

.pixel-btn-light:hover {
  color: var(--px-text);
  background: #fff;
}

.btn-outline-dark {
  border-color: rgba(17, 24, 39, 0.12);
}

.btn-outline-secondary {
  border-color: rgba(100, 116, 139, 0.18);
}

/* =========================================
   Forms
========================================= */

.form-control,
.form-select,
textarea.form-control {
  border-radius: 16px;
  border: 1px solid var(--px-border);
  background: rgba(255, 255, 255, 0.96);
  color: var(--px-text);
  padding: 0.78rem 0.95rem;
}

.form-control::placeholder,
textarea::placeholder {
  color: #9aa3b2;
}

/* =========================================
   Navbar
========================================= */

.navbar {
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.04);
}

.navbar-brand {
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--px-text) !important;
}

.navbar .nav-link {
  font-weight: 600;
  color: #4b5563 !important;
  border-radius: 12px;
  padding: 10px 14px !important;
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
  background: rgba(109, 94, 252, 0.08);
  color: var(--px-primary) !important;
}

/* =========================================
   Home / Landing
========================================= */

.pixel-home {
  background:
    radial-gradient(circle at top left, rgba(123, 92, 255, 0.14), transparent 32%),
    radial-gradient(circle at bottom right, rgba(0, 209, 255, 0.12), transparent 28%),
    linear-gradient(180deg, #f7f8fc 0%, #ffffff 55%, #f7f9fc 100%);
  min-height: 100vh;
}

.pixel-badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.8);
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 10px 25px rgba(0,0,0,0.05);
  color: #5b5f73;
  font-size: 0.92rem;
  font-weight: 600;
}

.pixel-title {
  font-size: clamp(2.2rem, 5vw, 4.3rem);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #111827;
}

.pixel-gradient-text {
  display: block;
  background: linear-gradient(90deg, #7c4dff 0%, #4f46e5 45%, #06b6d4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.pixel-subtitle {
  font-size: 1.05rem;
  color: #5f6678;
  max-width: 580px;
}

.pixel-mini-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.pixel-mini-stat {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255,255,255,0.76);
  border: 1px solid rgba(0,0,0,0.05);
  box-shadow: 0 14px 25px rgba(0,0,0,0.05);
  min-width: 150px;
}

.pixel-mini-stat strong {
  display: block;
  color: #111827;
  font-size: 0.98rem;
}

.pixel-mini-stat span {
  color: #667085;
  font-size: 0.88rem;
}

.pixel-device-card {
  background: rgba(255,255,255,0.78);
  border: 1px solid rgba(255,255,255,0.65);
  box-shadow: 0 30px 70px rgba(17, 24, 39, 0.10);
  border-radius: 28px;
  overflow: hidden;
  backdrop-filter: blur(14px);
}

.pixel-device-topbar {
  display: flex;
  gap: 8px;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  background: rgba(248,250,252,0.8);
}

.pixel-device-topbar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #d1d5db;
}

.pixel-device-body {
  padding: 22px;
}

.pixel-feed-card,
.pixel-side-widget,
.pixel-feature-card,
.pixel-cta-card {
  background: #fff;
  border: 1px solid rgba(15,23,42,0.05);
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.07);
  border-radius: 24px;
}

.pixel-feed-card {
  padding: 20px;
}

.pixel-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--px-gradient);
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
}

.pixel-post-box {
  height: 220px;
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(124,77,255,0.14), rgba(6,182,212,0.12)),
    linear-gradient(180deg, #eef2ff 0%, #f8fafc 100%);
}

.pixel-side-widget {
  padding: 18px;
  height: 100%;
}

.pixel-chat-line {
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, #e5e7eb, #f3f4f6);
  margin-bottom: 12px;
}

.pixel-chat-line.short {
  width: 70%;
}

.pixel-tag {
  display: inline-block;
  margin: 4px 6px 0 0;
  padding: 8px 12px;
  border-radius: 999px;
  background: #f4f6fb;
  color: #556070;
  font-size: 0.86rem;
  font-weight: 600;
}

.pixel-section-label {
  display: inline-block;
  margin-bottom: 10px;
  color: #6d5efc;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 0.8rem;
}

.pixel-section-title {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 800;
  color: #111827;
  letter-spacing: -0.02em;
}

.pixel-section-subtitle {
  max-width: 700px;
  margin: 12px auto 0;
  color: #667085;
  font-size: 1rem;
}

.pixel-feature-card {
  padding: 26px;
  height: 100%;
}

.pixel-feature-icon {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(124,77,255,0.14), rgba(6,182,212,0.14));
  color: #5b4ff7;
  font-size: 1.4rem;
  margin-bottom: 16px;
}

.pixel-cta-card {
  padding: 28px;
}

/* =========================================
   Auth / Login / Register
========================================= */

.auth-section {
  position: relative;
  overflow: hidden;
  min-height: calc(100vh - 78px);
  background:
    radial-gradient(circle at top left, rgba(124, 77, 255, 0.16), transparent 26%),
    radial-gradient(circle at bottom right, rgba(6, 182, 212, 0.12), transparent 24%),
    linear-gradient(180deg, #f7f8fc 0%, #ffffff 100%);
}

.auth-showcase {
  position: relative;
  padding: 36px;
  border-radius: 30px;
  background: rgba(255,255,255,0.60);
  border: 1px solid rgba(255,255,255,0.65);
  backdrop-filter: blur(14px);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.08);
}

.auth-title {
  font-size: clamp(2rem, 3.8vw, 3.5rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 800;
  color: #111827;
}

.auth-subtitle {
  font-size: 1.02rem;
  color: var(--px-text-soft);
  max-width: 560px;
}

.badge-soft-primary {
  background: rgba(109, 94, 252, 0.10);
  color: var(--px-primary);
  border: 1px solid rgba(109, 94, 252, 0.12);
  font-weight: 700;
}

.auth-feature-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  border-radius: 20px;
  background: rgba(255,255,255,0.76);
  border: 1px solid rgba(15, 23, 42, 0.05);
  box-shadow: 0 14px 26px rgba(15, 23, 42, 0.05);
}

.auth-feature-icon {
  flex: 0 0 50px;
  width: 50px;
  height: 50px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--px-gradient-soft);
  color: var(--px-primary);
  font-size: 1.25rem;
}

.auth-card {
  background: rgba(255,255,255,0.90);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,0.68) !important;
  box-shadow: 0 28px 70px rgba(15,23,42,0.12) !important;
  overflow: hidden;
}

.auth-logo {
  width: 68px;
  height: 68px;
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--px-gradient);
  color: #fff;
  font-size: 1.5rem;
  font-weight: 800;
  box-shadow: 0 16px 28px rgba(92,76,255,0.22);
}

.auth-input {
  padding-left: 2.8rem !important;
  border-radius: 18px !important;
  background: rgba(255,255,255,0.95);
}

.input-icon-wrap {
  position: relative;
}

.input-icon {
  position: absolute;
  top: 50%;
  left: 1rem;
  transform: translateY(-50%);
  color: #98a2b3;
  font-size: 1rem;
  z-index: 2;
}

.auth-btn {
  min-height: 52px;
  border-radius: 18px !important;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.auth-divider {
  position: relative;
  text-align: center;
}

.auth-divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  transform: translateY(-50%);
}

.auth-divider span {
  position: relative;
  display: inline-block;
  padding: 0 14px;
  background: rgba(255,255,255,0.92);
  color: #98a2b3;
  font-size: 0.92rem;
}

/* =========================================
   Feed / Posts
========================================= */

.post-card {
  background: rgba(255,255,255,0.95);
  border: 1px solid var(--px-border);
  border-radius: 24px;
  box-shadow: var(--px-shadow-md);
  overflow: hidden;
}

.post-card .card-body,
.post-card .post-body {
  padding: 1.2rem;
}

.post-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.post-author-name {
  font-weight: 800;
  color: var(--px-text);
}

.post-author-username {
  color: var(--px-text-soft);
  font-size: .92rem;
}

.post-content {
  color: #273244;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.65;
}

.post-image-wrap {
  margin-top: 14px;
  overflow: hidden;
  border-radius: 20px;
  background: #f6f8fb;
}

.post-image,
.post-image-clickable,
.post-image-clickable img {
  width: 100%;
  display: block;
  border-radius: 20px;
}

.post-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.post-actions .btn {
  border-radius: 999px;
  font-weight: 700;
}

.comment-bubble {
  display: inline-block;
  background: #f4f6fb;
  padding: 10px 14px;
  border-radius: 16px;
  color: #344054;
}

/* =========================================
   Profile
========================================= */

.profile-header-card {
  background: rgba(255,255,255,0.92);
  border: 1px solid var(--px-border);
  border-radius: 28px;
  box-shadow: var(--px-shadow-md);
  overflow: hidden;
}

.profile-cover {
  height: 220px;
  background:
    linear-gradient(135deg, rgba(124,77,255,.25), rgba(6,182,212,.18)),
    linear-gradient(180deg, #eef2ff 0%, #f8fafc 100%);
}

.profile-main {
  margin-top: -52px;
  padding: 0 24px 24px;
}

.profile-photo-xl,
.profile-photo-lg,
.profile-photo-md,
.profile-photo-sm {
  object-fit: cover;
  border-radius: 50%;
  background: #eef2f7;
}

.profile-photo-xl {
  width: 140px;
  height: 140px;
  border: 6px solid #fff;
  box-shadow: var(--px-shadow-sm);
}

.profile-photo-lg {
  width: 72px;
  height: 72px;
}

.profile-photo-md {
  width: 56px;
  height: 56px;
}

.profile-photo-sm {
  width: 44px;
  height: 44px;
}

.profile-avatar-lg,
.profile-avatar-sm {
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--px-gradient);
  color: #fff;
  font-weight: 800;
}

.profile-avatar-lg {
  width: 56px;
  height: 56px;
}

.profile-avatar-sm {
  width: 44px;
  height: 44px;
}

/* =========================================
   Chat
========================================= */

.chat-sidebar-card,
.chat-main-card {
  background: rgba(255,255,255,0.92);
  border: 1px solid var(--px-border);
  box-shadow: var(--px-shadow-md);
}

.chat-sidebar-card,
.chat-main-card,
.chat-header,
.chat-footer {
  border-radius: 24px;
}

.chat-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  transition: .2s ease;
  margin-bottom: 10px;
  border: 1px solid transparent;
}

.chat-list-item:hover {
  background: rgba(109, 94, 252, 0.06);
  border-color: rgba(109, 94, 252, 0.08);
}

.chat-list-item.active {
  background: linear-gradient(135deg, rgba(124,77,255,.12), rgba(6,182,212,.08));
  border-color: rgba(109, 94, 252, 0.12);
}

.chat-messages-area {
  height: 560px;
  overflow-y: auto;
  background:
    radial-gradient(circle at top right, rgba(124,77,255,.05), transparent 20%),
    #fbfcfe;
}

.chat-message-row {
  display: flex;
  margin-bottom: 14px;
}

.chat-message-row.mine {
  justify-content: flex-end;
}

.chat-message-row.other {
  justify-content: flex-start;
}

.chat-message-bubble {
  max-width: min(80%, 420px);
  padding: 12px 14px;
  border-radius: 20px;
  box-shadow: 0 12px 24px rgba(15,23,42,.05);
  overflow-wrap: break-word;
  word-break: break-word;
}

.chat-message-row.mine .chat-message-bubble {
  background: var(--px-gradient);
  color: #fff;
  border-bottom-right-radius: 8px;
}

.chat-message-row.other .chat-message-bubble {
  background: #fff;
  color: var(--px-text);
  border: 1px solid var(--px-border);
  border-bottom-left-radius: 8px;
}

.chat-message-time {
  margin-top: 8px;
  font-size: .78rem;
  opacity: .82;
}

.chat-input-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.chat-input {
  min-height: 48px;
  max-height: 132px;
  resize: none;
  border-radius: 18px;
  padding: 12px 16px;
}

.chat-send-btn {
  white-space: nowrap;
  border-radius: 18px;
  min-width: 112px;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 14px 28px rgba(92, 76, 255, 0.22);
  flex-shrink: 0;
}

.chat-composer-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chat-tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px !important;
  border: 1px solid var(--px-border);
}

.chat-composer-note {
  color: var(--px-text-soft);
  font-size: .87rem;
}

.chat-attachment-preview {
  margin-bottom: 12px;
}

.chat-attachment-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid #e9ecef;
  border-radius: 16px;
  background: #f8f9fa;
}

.chat-attachment-thumb {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 12px;
}

.chat-attachment-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e9ecef;
  font-size: 1.2rem;
}

.chat-message-image {
  max-width: 260px;
  width: 100%;
  border-radius: 14px;
  display: block;
}

.chat-audio-card {
  min-width: 220px;
  max-width: 320px;
}

.chat-attachment-card.recording {
  border-color: #f5c2c7;
  background: #fff5f5;
}

.chat-attachment-icon.pulse {
  animation: pulseChatMic 1s infinite;
}

@keyframes pulseChatMic {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.08); opacity: 0.75; }
  100% { transform: scale(1); opacity: 1; }
}

/* =========================================
   Modals / Alerts
========================================= */

.modal-content {
  border-radius: 24px;
  border: 1px solid var(--px-border);
  box-shadow: var(--px-shadow-lg);
  overflow: hidden;
}

.alert {
  border-radius: 16px;
  border: 1px solid transparent;
  box-shadow: var(--px-shadow-sm);
}

.badge {
  border-radius: 999px;
  padding: .55em .75em;
}

/* =========================================
   Responsive
========================================= */

@media (max-width: 991px) {
  .pixel-title,
  .auth-title {
    font-size: 2.4rem;
  }

  .pixel-mini-stats {
    flex-direction: column;
  }

  .chat-messages-area {
    height: 460px;
  }

  .chat-message-bubble {
    max-width: 88%;
  }
}

@media (max-width: 767px) {
  body {
    font-size: 15px;
  }

  .container {
    padding-left: 14px;
    padding-right: 14px;
  }

  .chat-input-row {
    gap: 8px;
  }

  .pixel-title,
  .auth-title {
    font-size: 2rem;
  }

  .auth-showcase {
    padding: 24px;
  }

  .auth-card .card-body {
    padding: 1.5rem !important;
  }

  .chat-messages-area {
    height: calc(100vh - 320px);
    min-height: 320px;
    padding: 14px !important;
  }

  .chat-header {
    position: sticky;
    top: 70px;
    z-index: 5;
  }

  .chat-footer {
    position: sticky;
    bottom: calc(72px + env(safe-area-inset-bottom));
    z-index: 6;
    box-shadow: 0 -10px 24px rgba(15,23,42,.05);
  }
 
  /*agregado */
.chat-send-btn {
  min-width: 110px;
  min-height: 46px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  flex-shrink: 0;
  line-height: 1;
}

.chat-send-btn i {
  font-size: 1rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.chat-send-label {
  display: inline-block;
  line-height: 1;
}

@media (max-width: 767px) {
  .chat-send-btn {
    width: 52px;
    min-width: 52px;
    height: 52px;
    min-height: 52px;
    padding: 0;
    border-radius: 14px;
    gap: 0;
  }

  .chat-send-btn i {
    font-size: 1.1rem;
    margin: 0 !important;
  }

  .chat-send-btn .chat-send-label {
    display: none !important;
  }
}
  .chat-tool-btn {
    padding-left: 12px;
    padding-right: 12px;
  }

  .chat-sidebar-card {
    margin-top: 8px;
  }
}

@media (max-width: 480px) {
  .pixel-title,
  .auth-title {
    font-size: 1.8rem;
  }

  .chat-message-bubble {
    max-width: 92%;
    padding: 10px 12px;
  }

  .chat-main-card,
  .chat-sidebar-card {
    border-radius: 22px !important;
  }

  .chat-messages-area {
    height: calc(100vh - 340px);
    min-height: 300px;
  }

  .chat-footer {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  .chat-input {
    min-height: 52px;
    font-size: 16px;
  }

  .auth-logo {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    font-size: 1.25rem;
  }
}

/* =========================
   Pixel Navbar
========================= */

.pixel-navbar {
  background: rgba(255, 255, 255, 0.78) !important;
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.04);
}

.pixel-brand {
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand-logo {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--px-gradient);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 10px 20px rgba(92, 76, 255, 0.18);
}

.brand-text {
  color: var(--px-text);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.pixel-nav-list {
  padding-top: 8px;
  padding-bottom: 8px;
}

.pixel-nav-link {
  display: inline-flex;
  align-items: center;
  border-radius: 14px;
  padding: 10px 14px !important;
  font-weight: 700;
  color: #4b5563 !important;
  transition: .2s ease;
}

.pixel-nav-link:hover,
.pixel-nav-link.active {
  background: rgba(109, 94, 252, 0.08);
  color: var(--px-primary) !important;
}

.custom-navbar-toggler {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  padding: 8px 10px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.custom-navbar-toggler:focus {
  box-shadow: 0 0 0 0.18rem rgba(109, 94, 252, 0.16);
}

.nav-user-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(15,23,42,.08);
  box-shadow: 0 12px 24px rgba(15,23,42,.05);
}

.nav-user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--px-gradient);
  color: #fff;
  font-size: .9rem;
  font-weight: 800;
}

.nav-user-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.nav-user-name {
  color: var(--px-text);
  font-weight: 700;
  font-size: .92rem;
}

.nav-user-meta small {
  color: var(--px-text-soft);
  font-size: .76rem;
}

.mobile-user-box {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255,255,255,0.96);
  border: 1px solid rgba(15,23,42,.06);
  box-shadow: 0 12px 24px rgba(15,23,42,.04);
  margin: 8px 0;
}

.chat-badge,
.mobile-chat-badge,
.mobile-bottom-badge {
  position: absolute;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .72rem;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(239, 68, 68, 0.22);
}

.mobile-chat-badge {
  top: 6px;
  right: 2px;
}

.mobile-bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1040;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--px-border);
  box-shadow: 0 -10px 24px rgba(15,23,42,.08);
}

.mobile-bottom-link {
  position: relative;
  text-decoration: none;
  color: var(--px-text-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 58px;
  border-radius: 18px;
  font-size: .74rem;
  font-weight: 700;
  transition: .2s ease;
}

.mobile-bottom-link i {
  font-size: 1.15rem;
}

.mobile-bottom-link.active {
  color: var(--px-primary);
  background: rgba(109, 94, 252, 0.08);
}

.mobile-bottom-link-create {
  transform: translateY(-12px);
}

.mobile-bottom-create-btn {
  width: 48px;
  height: 48px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--px-gradient);
  color: #fff;
  box-shadow: 0 14px 26px rgba(92, 76, 255, 0.22);
}

.mobile-bottom-badge {
  top: 5px;
  right: 18px;
}

.mobile-logout-btn {
  box-shadow: 0 10px 22px rgba(239, 68, 68, 0.10);
}


@media (max-width: 991px) {
  body {
    padding-bottom: calc(86px + env(safe-area-inset-bottom));
  }

  .pixel-footer {
    margin-bottom: calc(18px + env(safe-area-inset-bottom));
  }

  .chat-main-col {
    order: 1;
  }

  .chat-sidebar-col {
    order: 2;
  }
}

@media (max-width: 991px) {
  .pixel-nav-list {
    padding-top: 12px;
  }

  .pixel-nav-link {
    width: 100%;
    justify-content: flex-start;
  }
}

/*dashboard */
/* =========================
   Dashboard Modern
========================= */

.dashboard-profile-card,
.dashboard-side-card,
.dashboard-create-card,
.dashboard-empty-card {
  background: rgba(255,255,255,0.94);
  border: 1px solid rgba(15,23,42,.07);
  border-radius: 26px;
  box-shadow: 0 20px 45px rgba(15,23,42,.08);
}

.dashboard-profile-card {
  overflow: hidden;
}

.dashboard-profile-top {
  padding: 22px 22px 0;
}

.dashboard-profile-body,
.dashboard-side-card,
.dashboard-create-card {
  padding: 22px;
}

.dashboard-bio {
  color: var(--px-text-soft);
  line-height: 1.6;
}

.mini-stat-card {
  padding: 14px 10px;
  border-radius: 18px;
  background: linear-gradient(180deg, #fafbff 0%, #f5f7fb 100%);
  border: 1px solid rgba(15,23,42,.05);
}

.mini-stat-card h6 {
  color: var(--px-text);
}

.mini-stat-card small {
  color: var(--px-text-soft);
}

.suggestion-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.suggestion-user-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 18px;
  background: #fbfcfe;
  border: 1px solid rgba(15,23,42,.05);
}

.dashboard-post-card {
  background: rgba(255,255,255,0.96);
}

.post-counter-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #f5f7fb;
  border: 1px solid rgba(15,23,42,.06);
  color: #475467;
  font-size: .92rem;
  font-weight: 700;
}

.post-textarea {
  min-height: 120px;
  resize: vertical;
  border-radius: 20px !important;
}

.post-preview-box {
  padding: 10px;
  background: #f8fafc;
  border: 1px solid rgba(15,23,42,.06);
  border-radius: 20px;
}

.post-preview-image {
  display: block;
  width: 100%;
  max-height: 340px;
  object-fit: cover;
  border-radius: 16px;
}

.dashboard-empty-card {
  text-align: center;
  padding: 54px 24px;
}

.modal-close-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 2;
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 24px rgba(15,23,42,.16);
}

.post-modal-image {
  max-height: 88vh;
  object-fit: contain;
}

@media (max-width: 767px) {
  .dashboard-profile-top,
  .dashboard-profile-body,
  .dashboard-side-card,
  .dashboard-create-card {
    padding: 16px;
  }

  .suggestion-user-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .suggestion-user-card .btn {
    width: 100%;
  }
}

/* =========================
   Profile Modern
========================= */

.profile-overview-card,
.profile-edit-card,
.profile-list-card {
  background: rgba(255,255,255,0.94);
  border: 1px solid rgba(15,23,42,.07);
  border-radius: 26px;
  box-shadow: 0 20px 45px rgba(15,23,42,.08);
}

.profile-overview-card {
  overflow: hidden;
}

.profile-overview-cover {
  height: 120px;
  background:
    linear-gradient(135deg, rgba(124,77,255,.22), rgba(6,182,212,.18)),
    linear-gradient(180deg, #eef2ff 0%, #f8fafc 100%);
}

.profile-overview-body {
  padding: 0 22px 22px;
  margin-top: -42px;
}

.profile-photo-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 14px;
}

.profile-avatar-xl {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--px-gradient);
  color: #fff;
  font-size: 2rem;
  font-weight: 800;
  border: 6px solid #fff;
  box-shadow: 0 14px 28px rgba(15,23,42,.08);
}

.profile-bio-text {
  color: var(--px-text-soft);
  line-height: 1.6;
}

.profile-edit-card,
.profile-list-card {
  padding: 22px;
}

.profile-bio-textarea {
  border-radius: 20px !important;
  resize: vertical;
}

.profile-preview-box {
  padding: 16px;
  border-radius: 22px;
  background: #f8fafc;
  border: 1px solid rgba(15,23,42,.06);
  display: flex;
  justify-content: center;
}

.profile-user-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.profile-user-row {
  padding: 12px 14px;
  border-radius: 18px;
  background: #fbfcfe;
  border: 1px solid rgba(15,23,42,.05);
}

.profile-link:hover {
  color: var(--px-primary) !important;
}

.profile-input-group .input-group-text {
  border-radius: 16px 0 0 16px;
  border: 1px solid var(--px-border);
  background: #fff;
  color: var(--px-text-soft);
}

.profile-input-group .form-control {
  border-left: 0;
}

@media (max-width: 767px) {
  .profile-overview-body,
  .profile-edit-card,
  .profile-list-card {
    padding-left: 16px;
    padding-right: 16px;
  }

  .profile-avatar-xl,
  .profile-photo-xl {
    width: 110px;
    height: 110px;
  }
}

/* =========================
   Pixel Footer
========================= */

.pixel-footer {
  margin-top: 40px;
  padding: 20px 0 28px;
  background: transparent;
}

.pixel-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border-radius: 22px;
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(15,23,42,.06);
  backdrop-filter: blur(12px);
  box-shadow: 0 14px 28px rgba(15,23,42,.05);
}

.pixel-footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pixel-footer-logo {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--px-gradient);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 12px 24px rgba(92,76,255,.18);
}

.pixel-footer-name {
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--px-text);
}

.pixel-footer-copy,
.pixel-footer-meta {
  color: var(--px-text-soft);
  font-size: .92rem;
}

@media (max-width: 767px) {
  .pixel-footer-inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 16px;
  }
}

/* =========================================
   Enhanced UI States
========================================= */

.app-alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid transparent;
  margin-bottom: 16px;
}

.app-alert.is-success {
  background: rgba(16, 185, 129, 0.10);
  color: #065f46;
  border-color: rgba(16, 185, 129, 0.18);
}

.app-alert.is-error {
  background: rgba(239, 68, 68, 0.10);
  color: #991b1b;
  border-color: rgba(239, 68, 68, 0.18);
}

.app-alert-icon {
  font-size: 1.05rem;
  line-height: 1;
  margin-top: 2px;
}

.app-alert-content {
  flex: 1;
  font-weight: 600;
}

.field-hint {
  margin-top: 8px;
  font-size: .85rem;
  color: #8a94a6;
  transition: .2s ease;
}

.field-hint.is-error {
  color: #c2410c;
}

.form-control.is-invalid,
.form-control.is-valid {
  background-image: none !important;
}

.form-control.is-invalid {
  border-color: #fb7185;
  box-shadow: 0 0 0 4px rgba(244, 63, 94, 0.08);
}

.form-control.is-valid {
  border-color: #34d399;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.08);
}

.btn.is-loading,
.auth-btn.is-loading,
.chat-send-btn.is-loading {
  pointer-events: none;
  opacity: .96;
}

.btn-sleek,
.btn-sleek-secondary {
  border-radius: 999px !important;
  font-weight: 700;
  min-height: 40px;
  padding: .62rem 1rem;
  transition: .2s ease;
}

.btn-sleek {
  background: #111827;
  color: #fff;
  border: 1px solid rgba(17,24,39,.08);
  box-shadow: 0 12px 24px rgba(17,24,39,.10);
}

.btn-sleek:hover {
  background: #0f172a;
  color: #fff;
  transform: translateY(-1px);
}

.btn-sleek.is-active {
  background: #fff;
  color: #4b5563;
  border: 1px solid rgba(17,24,39,.10);
  box-shadow: none;
}

.btn-sleek-secondary {
  background: rgba(109, 94, 252, 0.08);
  color: #5b4ff7;
  border: 1px solid rgba(109, 94, 252, 0.16);
}

.btn-sleek-secondary:hover {
  background: rgba(109, 94, 252, 0.14);
  color: #4338ca;
}

.empty-state-card {
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,250,252,.98));
  border: 1px dashed rgba(148, 163, 184, 0.30);
  border-radius: 28px;
  padding: 28px;
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.05);
}

.empty-state-card.compact {
  padding: 22px;
}

.empty-state-icon {
  width: 72px;
  height: 72px;
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(124,77,255,.14), rgba(6,182,212,.12));
  color: #5b4ff7;
  font-size: 1.7rem;
}

.empty-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #94a3b8;
  font-size: .92rem;
}

.comment-meta {
  font-size: .78rem;
  color: #98a2b3;
  margin-top: 6px;
  padding-left: 6px;
}

.page-section-loading {
  opacity: .6;
  transition: opacity .25s ease;
}

.page-section-loading.is-ready {
  opacity: 1;
}

.chat-skeleton-list {
  display: grid;
  gap: 14px;
}

.chat-skeleton {
  height: 62px;
  border-radius: 18px;
  background: linear-gradient(90deg, #eef2f7 25%, #f8fafc 37%, #eef2f7 63%);
  background-size: 400% 100%;
  animation: skeletonShimmer 1.2s ease-in-out infinite;
  width: 78%;
}

.chat-skeleton.outgoing {
  margin-left: auto;
  width: 64%;
}

.chat-skeleton.short {
  width: 52%;
}

@keyframes skeletonShimmer {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}

.pixel-home-simple {
  min-height: calc(100vh - 78px);
  background:
    radial-gradient(circle at top left, rgba(124,77,255,.16), transparent 24%),
    radial-gradient(circle at bottom right, rgba(6,182,212,.14), transparent 24%),
    linear-gradient(180deg, #f8f9fc 0%, #ffffff 100%);
}

.pixel-hero-flex {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  align-items: center;
  justify-content: space-between;
  min-height: 72vh;
}

.pixel-hero-copy {
  flex: 1 1 460px;
  max-width: 640px;
}

.pixel-hero-panel {
  flex: 1 1 320px;
  display: flex;
  justify-content: center;
}

.pixel-panel-card {
  width: 100%;
  max-width: 420px;
  display: grid;
  gap: 16px;
  padding: 24px;
  border-radius: 28px;
  background: rgba(255,255,255,.82);
  border: 1px solid rgba(255,255,255,.66);
  backdrop-filter: blur(16px);
  box-shadow: 0 28px 60px rgba(15, 23, 42, 0.09);
}

.pixel-panel-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.05);
}

.pixel-panel-item i {
  font-size: 1.25rem;
  color: #5b4ff7;
}

.pixel-panel-item strong {
  display: block;
  color: #111827;
  margin-bottom: 4px;
}

.pixel-panel-item span {
  color: #667085;
  font-size: .92rem;
}

@media (max-width: 991.98px) {
  .pixel-hero-flex {
    min-height: auto;
  }

  .empty-state-card,
  .dashboard-empty-card {
    padding: 22px;
  }
}
