:root {
  --bg-main: #0f172a;
  --bg-card: #1e293b;
  --bg-card-hover: #273549;
  --border-color: #334155;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --purple: #8b5cf6;
  --font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* UTILIDADES GLOBALES */
.hidden {
  display: none !important;
}

/* NAVBAR */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background-color: #0b1120;
  border-bottom: 1px solid var(--border-color);
  flex-wrap: wrap;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-icon {
  background: linear-gradient(135deg, var(--primary), var(--purple));
  color: white;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.brand-title {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-badge {
  font-size: 0.65rem;
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(96, 165, 250, 0.3);
  font-weight: 600;
  letter-spacing: 0.5px;
}

.brand-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.board-selector-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.board-selector-wrap label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.styled-select {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  font-size: 0.88rem;
  outline: none;
  font-family: inherit;
  cursor: pointer;
  max-width: 250px;
}

.styled-select.sm {
  padding: 0.35rem 0.6rem;
  font-size: 0.82rem;
  max-width: 200px;
}

.styled-select:focus {
  border-color: var(--primary);
}

.status-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
}

.status-badge.connected {
  background-color: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-badge.connecting {
  background-color: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.status-badge.error {
  background-color: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: currentColor;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.9); }
}

/* AUDIO CONTROL BAR */
.audio-control-bar {
  background-color: #131d31;
  border-bottom: 1px solid var(--border-color);
  padding: 0.75rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.audio-toggle {
  display: flex;
  align-items: center;
}

.btn-voice {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 1.1rem;
  border-radius: 8px;
  border: none;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.btn-voice.active {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.3);
}

.btn-voice.muted {
  background-color: #334155;
  color: #94a3b8;
}

.btn-lucia {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(139, 92, 246, 0.4);
  background: rgba(139, 92, 246, 0.12);
  color: #c4b5fd;
  font-weight: 600;
  font-size: 0.86rem;
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: inherit;
  margin-left: 0.5rem;
  position: relative;
}

.btn-lucia.active {
  background: linear-gradient(135deg, #7c3aed, #6366f1);
  color: white;
  border-color: transparent;
  box-shadow: 0 2px 10px rgba(124, 58, 237, 0.35);
}

.btn-lucia.hearing {
  background: linear-gradient(135deg, #ec4899, #8b5cf6);
  color: white;
  box-shadow: 0 0 16px rgba(236, 72, 153, 0.7);
  animation: pulse-hearing 1.5s infinite;
}

@keyframes pulse-hearing {
  0%, 100% { box-shadow: 0 0 8px rgba(236, 72, 153, 0.4); }
  50% { box-shadow: 0 0 20px rgba(236, 72, 153, 0.9); }
}

.btn-lucia.processing {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  animation: pulse-proc 1s infinite alternate;
}

@keyframes pulse-proc {
  from { opacity: 0.85; }
  to { opacity: 1; }
}

.btn-lucia.muted {
  background-color: #334155;
  color: #94a3b8;
  border-color: #475569;
}

.voice-wave-icon {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 14px;
}

.voice-wave-icon span {
  display: block;
  width: 3px;
  background-color: white;
  border-radius: 2px;
  height: 100%;
}

.btn-voice.active .voice-wave-icon span:nth-child(1) { height: 60%; }
.btn-voice.active .voice-wave-icon span:nth-child(2) { height: 100%; }
.btn-voice.active .voice-wave-icon span:nth-child(3) { height: 75%; }
.btn-voice.active .voice-wave-icon span:nth-child(4) { height: 40%; }

.btn-voice.speaking .voice-wave-icon span {
  animation: wave 0.8s ease-in-out infinite alternate;
}

.btn-voice.speaking .voice-wave-icon span:nth-child(2) { animation-delay: 0.2s; }
.btn-voice.speaking .voice-wave-icon span:nth-child(3) { animation-delay: 0.4s; }
.btn-voice.speaking .voice-wave-icon span:nth-child(4) { animation-delay: 0.1s; }

@keyframes wave {
  0% { transform: scaleY(0.3); }
  100% { transform: scaleY(1); }
}

.audio-settings-inline {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.setting-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.setting-item input[type="range"] {
  width: 80px;
  accent-color: var(--primary);
  cursor: pointer;
}

.setting-item-checkbox {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.setting-item-checkbox label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
}

.btn-secondary {
  background-color: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
}

.btn-secondary:hover {
  background-color: var(--bg-card-hover);
  border-color: var(--primary);
}

.btn-icon {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-icon.sm {
  width: 30px;
  height: 30px;
}

.btn-icon:hover {
  color: var(--text-main);
  border-color: var(--primary);
}

/* LUCIA ASSISTANT PANEL */
.lucia-assistant-panel {
  background: linear-gradient(180deg, #13112c, #0f172a);
  border-bottom: 1px solid rgba(139, 92, 246, 0.3);
  padding: 0.75rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

/* LUCIA LIVE BAR */
.lucia-live-bar {
  background: rgba(30, 27, 75, 0.6);
  border: 1px solid rgba(139, 92, 246, 0.35);
  border-radius: 8px;
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: #c4b5fd;
  transition: all 0.25s ease;
}

.lucia-live-bar.detected {
  background: linear-gradient(90deg, #500724, #3b0764);
  color: #fbcfe8;
  border-color: #ec4899;
  box-shadow: 0 0 15px rgba(236, 72, 153, 0.35);
}

.lucia-live-bar.active-command {
  background: linear-gradient(90deg, #1e1b4b, #2e1065);
  color: #a7f3d0;
  border-color: #10b981;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.35);
}

.lucia-live-content {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  overflow: hidden;
  flex: 1;
}

.lucia-live-dot {
  width: 9px;
  height: 9px;
  min-width: 9px;
  border-radius: 50%;
  background-color: #a855f7;
  animation: pulse 1.2s infinite;
}

.lucia-live-bar.detected .lucia-live-dot {
  background-color: #f43f5e;
}

.lucia-live-bar.active-command .lucia-live-dot {
  background-color: #10b981;
}

.lucia-live-label {
  font-weight: 600;
  white-space: nowrap;
}

.lucia-live-transcript {
  font-style: italic;
  color: #f8fafc;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lucia-listen-timer {
  display: flex;
  align-items: center;
  margin-left: 0.75rem;
}

.lucia-listen-timer.hidden {
  display: none;
}

.timer-badge {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.4);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.15rem 0.6rem;
  border-radius: 12px;
  white-space: nowrap;
  animation: pulse 1s infinite;
}

/* CHIPS */
.lucia-chips-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 0.8rem;
}

.chips-label {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.78rem;
}

.lucia-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: #cbd5e1;
  padding: 0.3rem 0.7rem;
  border-radius: 16px;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.lucia-chip:hover {
  background: rgba(139, 92, 246, 0.2);
  border-color: #a855f7;
  color: #ffffff;
  transform: translateY(-1px);
}

/* MANUAL FORM */
.lucia-text-form {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.1rem;
}

.lucia-text-form input {
  flex: 1;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 8px;
  padding: 0.5rem 0.9rem;
  color: #ffffff;
  font-size: 0.85rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}

.lucia-text-form input:focus {
  border-color: #8b5cf6;
  box-shadow: 0 0 8px rgba(139, 92, 246, 0.3);
}

.btn-lucia-send {
  background: linear-gradient(135deg, #7c3aed, #6366f1);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 0.5rem 1rem;
  font-size: 0.82rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
}

.btn-lucia-send:hover {
  background: linear-gradient(135deg, #6d28d9, #4f46e5);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.35);
}

/* MAIN DASHBOARD */
.dashboard-grid {
  padding: 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  flex: 1;
}

/* STATS ROW */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.stat-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.stat-icon {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bg-blue { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.bg-yellow { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.bg-red { background: rgba(239, 68, 68, 0.15); color: #f87171; }
.bg-green { background: rgba(16, 185, 129, 0.15); color: #34d399; }

.stat-info {
  display: flex;
  flex-direction: column;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-main);
}

/* COLUMNS */
.main-columns {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
  flex: 1;
}

@media (max-width: 1024px) {
  .main-columns {
    grid-template-columns: 1fr;
  }
}

.card-panel {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.panel-header {
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.panel-title {
  font-size: 1.05rem;
  font-weight: 600;
}

.panel-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.btn-text {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.8rem;
  cursor: pointer;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

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

/* EVENTS FEED */
.events-feed {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 580px;
  overflow-y: auto;
}

.empty-feed {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

.empty-icon {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.event-card {
  background-color: #162032;
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--primary);
  border-radius: 8px;
  padding: 0.9rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  animation: slideIn 0.3s ease;
}

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

.event-card.card_moved {
  border-left-color: var(--primary);
}

.event-card.card_due_soon {
  border-left-color: var(--warning);
  background-color: rgba(245, 158, 11, 0.05);
}

.event-card.card_due_now {
  border-left-color: var(--danger);
  background-color: rgba(239, 68, 68, 0.08);
}

.event-card.card_created {
  border-left-color: var(--success);
}

.event-card.card_comment {
  border-left-color: #ec4899;
  background-color: rgba(236, 72, 153, 0.06);
}

.event-card.card_lucia {
  border-left-color: #8b5cf6;
  background-color: rgba(139, 92, 246, 0.09);
}

.event-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.event-tag {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.4px;
}

.tag-moved { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }
.tag-due-soon { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }
.tag-due-now { background: rgba(239, 68, 68, 0.2); color: #f87171; }
.tag-created { background: rgba(16, 185, 129, 0.2); color: #34d399; }
.tag-comment { background: rgba(236, 72, 153, 0.2); color: #f472b6; }
.tag-lucia { background: rgba(139, 92, 246, 0.3); color: #c4b5fd; font-weight: 700; }
.tag-test { background: rgba(139, 92, 246, 0.2); color: #a78bfa; }

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

.event-text {
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.4;
  color: #f1f5f9;
}

.event-details {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.event-details span {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.btn-repeat-speech {
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.72rem;
  cursor: pointer;
  margin-left: auto;
}

.btn-repeat-speech:hover {
  color: var(--primary);
  border-color: var(--primary);
}

/* DUE CARDS LIST */
.due-cards-list {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-height: 580px;
  overflow-y: auto;
}

.due-item {
  background-color: #162032;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.8rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.due-item.urgent {
  border-color: rgba(239, 68, 68, 0.4);
  background-color: rgba(239, 68, 68, 0.05);
}

.due-item.soon {
  border-color: rgba(245, 158, 11, 0.4);
  background-color: rgba(245, 158, 11, 0.05);
}

.due-item-title {
  font-size: 0.88rem;
  font-weight: 600;
}

.due-item-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
}

.due-badge {
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.72rem;
}

.badge-urgent { background: rgba(239, 68, 68, 0.2); color: #f87171; }
.badge-soon { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }
.badge-normal { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }

/* MODAL */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  backdrop-filter: blur(4px);
}

.modal-overlay.hidden {
  display: none;
}

.modal-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  width: 90%;
  max-width: 540px;
  max-height: 90vh;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
}

.modal-header {
  padding: 1.1rem 1.4rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.btn-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
}

.modal-body {
  padding: 1.25rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  overflow-y: auto;
  max-height: calc(90vh - 130px);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-group label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.styled-input {
  background-color: #0f172a;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.6rem 0.8rem;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.88rem;
}

.styled-input:focus {
  border-color: var(--primary);
  outline: none;
}

.form-group-checkbox {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.form-group-checkbox label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.modal-footer {
  padding: 1rem 1.4rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: white;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.btn-primary:hover {
  filter: brightness(1.1);
}

/* ======================================================== */
/* ESTILOS DE AUTENTICACIÓN (LOGIN Y REGISTRO)              */
/* ======================================================== */
.auth-wrapper {
  min-height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  background: radial-gradient(circle at 50% 25%, #1e1b4b 0%, #090d16 80%);
}

.auth-card {
  background: rgba(15, 23, 42, 0.94);
  border: 1px solid rgba(139, 92, 246, 0.35);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  width: 100%;
  max-width: 460px;
  border-radius: 20px;
  padding: 2.4rem 2.2rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.75), 0 0 35px rgba(124, 58, 237, 0.2);
  animation: authCardEnter 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes authCardEnter {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.auth-header {
  text-align: center;
  margin-bottom: 1.8rem;
}

.auth-logo {
  display: inline-flex;
  padding: 0.85rem;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.25), rgba(99, 102, 241, 0.25));
  border: 1px solid rgba(139, 92, 246, 0.45);
  border-radius: 18px;
  color: #c4b5fd;
  margin-bottom: 0.9rem;
  box-shadow: 0 8px 20px rgba(124, 58, 237, 0.25);
}

.auth-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #f8fafc;
  letter-spacing: -0.01em;
  margin-bottom: 0.3rem;
}

.auth-subtitle {
  font-size: 0.84rem;
  color: var(--text-muted);
}

.auth-tabs {
  display: flex;
  background: rgba(2, 6, 23, 0.7);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  gap: 4px;
}

.auth-tab {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.6rem 0.8rem;
  border-radius: 9px;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
  text-align: center;
}

.auth-tab:hover:not(.active) {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.auth-tab.active {
  background: linear-gradient(135deg, #7c3aed, #6366f1);
  color: white;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.4);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.auth-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.auth-form .form-group label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #cbd5e1;
}

.auth-form .styled-input {
  width: 100%;
  background-color: #0b1120;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 10px;
  padding: 0.72rem 0.95rem;
  font-size: 0.9rem;
  color: #f8fafc;
  outline: none;
  font-family: inherit;
  transition: all 0.2s ease;
}

.auth-form .styled-input:focus {
  border-color: #a855f7;
  background-color: #0f172a;
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.25);
}

.w-full {
  width: 100%;
}

.auth-hint {
  background: rgba(99, 102, 241, 0.08);
  border: 1px dashed rgba(99, 102, 241, 0.35);
  padding: 0.7rem 0.9rem;
  border-radius: 10px;
  font-size: 0.78rem;
  color: #c4b5fd;
  text-align: center;
  margin-top: 0.25rem;
  line-height: 1.4;
}

.auth-switch-text {
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.auth-switch-text a {
  color: #a855f7;
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.15s ease;
}

.auth-switch-text a:hover {
  color: #c084fc;
  text-decoration: underline;
}

.auth-note {
  font-size: 0.76rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.45;
  margin-top: 0.25rem;
}

.auth-alert {
  padding: 0.7rem 0.95rem;
  border-radius: 10px;
  font-size: 0.82rem;
  margin-bottom: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.auth-alert.error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.45);
  color: #fca5a5;
}

.auth-alert.success {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.45);
  color: #6ee7b7;
}

/* ======================================================== */
/* ENVOLTORIOS DE APLICACIÓN (ADMIN Y PORTAL USUARIO)        */
/* ======================================================== */
.admin-wrapper {
  min-height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-main);
}

/* ======================================================== */
/* ESTILOS DEL PORTAL DE TICKETS (USUARIO)                  */
/* ======================================================== */
.user-portal-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-main);
}

.user-badge {
  background: rgba(14, 165, 233, 0.2);
  color: #38bdf8;
  border: 1px solid rgba(14, 165, 233, 0.4);
}

.admin-badge {
  background: rgba(236, 72, 153, 0.2);
  color: #f472b6;
  border: 1px solid rgba(236, 72, 153, 0.4);
}

.user-info-pill {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(148, 163, 184, 0.2);
  padding: 0.4rem 0.85rem;
  border-radius: 20px;
  font-size: 0.85rem;
  color: #e2e8f0;
}

.btn-logout {
  color: #f87171 !important;
  border-color: rgba(239, 68, 68, 0.3) !important;
}

.btn-logout:hover {
  background: rgba(239, 68, 68, 0.15) !important;
  border-color: #ef4444 !important;
}

.portal-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 1.5rem;
  padding: 1.5rem 2rem;
  flex: 1;
}

@media (max-width: 900px) {
  .portal-grid {
    grid-template-columns: 1fr;
  }
}

.portal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
}

.portal-card-header {
  margin-bottom: 1.25rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border-color);
}

.portal-card-header h3 {
  font-size: 1.15rem;
  color: #f8fafc;
  margin-bottom: 0.25rem;
}

.portal-card-header p {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ticket-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

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

@media (max-width: 600px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

.styled-textarea {
  background-color: #0f172a;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.88rem;
  resize: vertical;
}

.styled-textarea:focus {
  border-color: var(--primary);
  outline: none;
}

/* EXTRACTOR DE DIAGNÓSTICO */
.extractor-box {
  background: rgba(15, 23, 42, 0.65);
  border: 1px dashed rgba(139, 92, 246, 0.45);
  border-radius: 12px;
  padding: 1rem 1.15rem;
  margin: 0.35rem 0;
}

.extractor-box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.extractor-box-header strong {
  color: #c4b5fd;
  font-size: 0.88rem;
  display: block;
}

.extractor-box-header p {
  color: var(--text-muted);
  font-size: 0.76rem;
  margin-top: 0.15rem;
}

.extractor-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.btn-tool-download {
  background: linear-gradient(135deg, #059669, #10b981);
  color: white;
  text-decoration: none;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 0.42rem 0.75rem;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: all 0.2s ease;
}

.btn-tool-download:hover {
  background: linear-gradient(135deg, #047857, #059669);
  transform: translateY(-1px);
  color: white;
}

.btn-secondary-download {
  background: linear-gradient(135deg, #0284c7, #0ea5e9);
}

.btn-secondary-download:hover {
  background: linear-gradient(135deg, #0369a1, #0284c7);
}

.btn-tool-paste {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.25);
  color: #e2e8f0;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 0.42rem 0.7rem;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: all 0.2s ease;
  font-family: inherit;
}

.btn-tool-paste:hover {
  background: rgba(139, 92, 246, 0.25);
  border-color: #a855f7;
  color: #ffffff;
}

/* BADGES DE INCIDENCIA Y PROYECTO */
.badge-incident {
  background: rgba(139, 92, 246, 0.25);
  color: #c4b5fd;
  border: 1px solid rgba(139, 92, 246, 0.5);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  letter-spacing: 0.02em;
}

.badge-project {
  background: rgba(30, 41, 59, 0.8);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
}

.ticket-meta-pill {
  font-size: 0.75rem;
  color: #cbd5e1;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.btn-copy-sm {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: var(--text-muted);
  font-size: 0.7rem;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-copy-sm:hover {
  background: rgba(139, 92, 246, 0.3);
  color: white;
}

.btn-submit-ticket {
  margin-top: 0.5rem;
  padding: 0.75rem 1.2rem;
  font-size: 0.95rem;
}

/* LISTA DE MIS TICKETS */
.my-tickets-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  overflow-y: auto;
  max-height: calc(100vh - 240px);
  padding-right: 4px;
}

.ticket-item {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 10px;
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.ticket-item:hover {
  border-color: rgba(139, 92, 246, 0.4);
  transform: translateY(-1px);
}

.ticket-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.ticket-code {
  font-weight: 700;
  font-size: 0.82rem;
  color: #a855f7;
}

.ticket-badges {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.badge-priority {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.15rem 0.55rem;
  border-radius: 12px;
}

.badge-priority.baja { background: rgba(59, 130, 246, 0.2); color: #93c5fd; }
.badge-priority.media { background: rgba(234, 179, 8, 0.2); color: #fde047; }
.badge-priority.alta { background: rgba(249, 115, 22, 0.2); color: #fdba74; }
.badge-priority.urgente { background: rgba(239, 68, 68, 0.25); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.5); }

.badge-status {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.15rem 0.55rem;
  border-radius: 12px;
}

.badge-status.pending { background: rgba(234, 179, 8, 0.2); color: #facc15; }
.badge-status.in_progress { background: rgba(14, 165, 233, 0.2); color: #38bdf8; }
.badge-status.review { background: rgba(168, 85, 247, 0.2); color: #c084fc; }
.badge-status.completed { background: rgba(16, 185, 129, 0.2); color: #34d399; }

.ticket-item-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #f8fafc;
}

.ticket-item-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
  white-space: pre-wrap;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ticket-item-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  padding-top: 0.45rem;
  border-top: 1px dashed rgba(148, 163, 184, 0.1);
}

.ticket-trello-link {
  color: #38bdf8;
  text-decoration: none;
  font-weight: 500;
}

.ticket-trello-link:hover {
  text-decoration: underline;
}

/* ======================================================== */
/* ESTILOS PARA GESTIÓN DE TICKETS DEL ADMIN                */
/* ======================================================== */
.admin-nav-tabs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: 1rem;
}

.admin-tab-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: var(--text-muted);
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: inherit;
  transition: all 0.2s ease;
}

.admin-tab-btn:hover {
  color: white;
  border-color: var(--primary);
}

.admin-tab-btn.active {
  background: linear-gradient(135deg, #7c3aed, #6366f1);
  color: white;
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.35);
}

.badge-count {
  background: rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.5);
  font-size: 0.7rem;
  padding: 0.05rem 0.45rem;
  border-radius: 10px;
}

.admin-tickets-container {
  padding: 1.25rem 0;
  overflow-x: auto;
}

.admin-tickets-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
  text-align: left;
}

.admin-tickets-table th {
  background: rgba(15, 23, 42, 0.6);
  padding: 0.75rem 1rem;
  color: var(--text-muted);
  font-weight: 600;
  border-bottom: 1px solid var(--border-color);
}

.admin-tickets-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  color: #e2e8f0;
}

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

/* ======================================================== */
/* BARRA DE HORARIO LABORAL Y RECORDATORIOS POR PRIORIDAD   */
/* ======================================================== */
.priority-policy-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  padding: 0.75rem 1.25rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  backdrop-filter: blur(8px);
}

.policy-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
  color: var(--text-main);
}

.policy-icon {
  font-size: 1.15rem;
}

.policy-text strong {
  color: var(--text-main);
  margin-right: 0.25rem;
}

.policy-text span {
  color: var(--text-muted);
}

.policy-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.policy-badge.badge-active {
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.4);
}

.policy-badge.badge-inactive {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.policy-badge.badge-pause {
  background: rgba(147, 51, 234, 0.2);
  color: #c084fc;
  border: 1px solid rgba(147, 51, 234, 0.4);
}

.policy-tags {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.priority-chip {
  font-size: 0.76rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  white-space: nowrap;
}

.priority-chip.chip-para-ayer {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.priority-chip.chip-alta {
  background: rgba(249, 115, 22, 0.2);
  color: #fdba74;
  border: 1px solid rgba(249, 115, 22, 0.4);
}

.priority-chip.chip-media {
  background: rgba(234, 179, 8, 0.2);
  color: #fde047;
  border: 1px solid rgba(234, 179, 8, 0.4);
}

.priority-chip.chip-baja {
  background: rgba(34, 197, 94, 0.2);
  color: #86efac;
  border: 1px solid rgba(34, 197, 94, 0.4);
}

/* TOGGLE DE VISIBILIDAD DE CONTRASEÑAS */
.password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.password-wrapper input {
  padding-right: 2.5rem !important;
  width: 100%;
}

.btn-toggle-visibility {
  position: absolute;
  right: 0.5rem;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 1.05rem;
  padding: 0.25rem 0.4rem;
  border-radius: 4px;
  color: var(--text-muted);
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-toggle-visibility:hover {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.1);
}

/* SECCIONES DEL FORMULARIO DE SOPORTE AVANZADO */
.form-section-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #a78bfa;
  margin-top: 0.45rem;
  margin-bottom: 0.1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px dashed rgba(167, 139, 250, 0.25);
  padding-bottom: 0.35rem;
}

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

@media (max-width: 768px) {
  .form-row-3 {
    grid-template-columns: 1fr;
  }
}



