/* ============================================
   SUNPOWER EMPLOYEE PORTAL - FINAL ENTERPRISE
   ============================================ */

:root {
  --primary-50: #eff6ff;
  --primary-100: #dbeafe;
  --primary-500: #3b82f6;
  --primary-600: #2563eb;
  --primary-700: #1d4ed8;
  --primary-800: #1e40af;
  --primary-900: #1e3a8a;
  
  --success-500: #22c55e;
  --warning-500: #f59e0b;
  --error-500: #ef4444;
  
  --gray-0: #ffffff;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
  
  --bg: var(--gray-50);
  --card: var(--gray-0);
  --text: var(--gray-900);
  --muted: var(--gray-500);
  --line: var(--gray-200);
  --blue: var(--primary-800);
  --blue2: var(--primary-600);
  --blue-light: var(--primary-100);
  --good: var(--success-500);
  --warn: var(--warning-500);
  --bad: var(--error-500);
  
  --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;
  
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'SF Mono', Monaco, monospace;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  min-height: 100vh;
}

/* ============================================
   TOPBAR
   ============================================ */
.topbar {
  height: 56px;
  background: linear-gradient(90deg, var(--primary-900) 0%, var(--primary-800) 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.topbar-left, .topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-mini {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-dot {
  width: 8px;
  height: 8px;
  background: var(--success-500);
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.3);
}

.brand-title {
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.3px;
}

.topbar-pill {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-mono);
  letter-spacing: 0.5px;
}

/* ============================================
   BOTONES
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  border: 1px solid transparent;
  background: transparent;
  transition: all 0.2s ease;
  text-decoration: none;
}

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

.btn.primary {
  background: var(--primary-600);
  color: #fff;
  border-color: var(--primary-600);
}

.btn.primary:hover {
  background: var(--primary-700);
  border-color: var(--primary-700);
  box-shadow: var(--shadow-sm);
}

.btn.secondary {
  background: var(--gray-100);
  color: var(--gray-700);
  border-color: var(--gray-200);
}

.btn.ghost {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
}

.btn.ghost:hover {
  background: rgba(255, 255, 255, 0.2);
}

.btn.sm {
  padding: 8px 14px;
  font-size: 13px;
}

.btn.lg {
  padding: 14px 24px;
  font-size: 15px;
}

.btn.full {
  width: 100%;
}
/* ============================================
   QUICK QUESTIONS - ESTILOS ESPECÍFICOS
   ============================================ */
.quick-questions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.quick-questions .btn.quick-question {
  background: #ffffff !important;
  border: 1px solid var(--gray-300) !important;
  color: var(--gray-700) !important;
  padding: 10px 16px !important;
  border-radius: var(--radius) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  box-shadow: var(--shadow-xs) !important;
}

.quick-questions .btn.quick-question:hover {
  background: var(--primary-50) !important;
  border-color: var(--primary-500) !important;
  color: var(--primary-700) !important;
  box-shadow: var(--shadow-sm) !important;
  transform: translateY(-1px) !important;
}

/* ============================================
   BOTTOM NAVIGATION
   ============================================ */
.bottomnav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 64px;
  background: #fff;
  border-top: 1px solid var(--gray-200);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 100;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.04);
  padding-bottom: env(safe-area-inset-bottom);
}

.bottomnav .nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 12px;
  color: var(--gray-500);
  font-size: 11px;
  font-weight: 600;
  transition: all 0.2s ease;
  border-radius: var(--radius);
  min-width: 64px;
  text-decoration: none;
  cursor: pointer;
}

.bottomnav .nav-item:hover {
  color: var(--primary-600);
  background: var(--gray-50);
}

.bottomnav .nav-item.active {
  color: var(--primary-800);
}

.bn-ico {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bn-ico svg {
  width: 22px;
  height: 22px;
  stroke-width: 2;
}

/* ============================================
   LAYOUT
   ============================================ */
.shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: calc(100vh - 56px);
}

.sidebar {
  background: #fff;
  border-right: 1px solid var(--gray-200);
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar .nav-item {
  padding: 12px 16px;
  border-radius: var(--radius);
  color: var(--gray-700);
  font-weight: 600;
  font-size: 14px;
  transition: all 0.15s ease;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.sidebar .nav-item:hover {
  background: var(--gray-50);
  color: var(--gray-900);
}

.sidebar .nav-item.active {
  background: var(--primary-50);
  color: var(--primary-800);
}

.content {
  padding: 24px;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}

/* ============================================
   ENCABEZADOS
   ============================================ */
.page-head {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-xs);
}

.page-head h1 {
  font-size: 22px;
  font-weight: 700;
  margin: 0;
  color: var(--gray-900);
  letter-spacing: -0.3px;
}

.subhead {
  color: var(--gray-500);
  font-size: 14px;
  margin-top: 6px;
  line-height: 1.5;
}

/* ============================================
   CARDS
   ============================================ */
.card, .azCard {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-xs);
  transition: all 0.2s ease;
}

.card:hover, .azCard:hover {
  box-shadow: var(--shadow-sm);
}

.azCardTitle {
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 8px;
  color: var(--gray-900);
}

.azCardSub {
  color: var(--gray-500);
  font-size: 14px;
  line-height: 1.6;
}
/* ============================================
   TIMELINE
   ============================================ */
.progress-timeline {
  position: relative;
  padding-left: 32px;
}

.progress-timeline::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--gray-200);
}

.progress-item {
  position: relative;
  padding-bottom: 24px;
}

.progress-item-icon {
  position: absolute;
  left: -32px;
  top: 2px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--gray-500);
  border: 2px solid #fff;
  box-shadow: var(--shadow-xs);
}

.progress-item.completed .progress-item-icon {
  background: var(--success-500);
  color: #fff;
}

.progress-item.current .progress-item-icon {
  background: var(--primary-600);
  color: #fff;
}

.progress-item-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 16px;
  transition: all 0.2s ease;
}

/* ============================================
   FORMULARIOS
   ============================================ */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.inp, .form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 15px;
  background: #fff;
  color: var(--gray-900);
  transition: all 0.2s ease;
  font-family: inherit;
}

.inp:focus, .form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px var(--primary-100);
}

/* ============================================
   CHAT
   ============================================ */
.chat-container {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-xl);
  height: 450px;
  display: flex;
  flex-direction: column;
  background: #fff;
  overflow: hidden;
}

.chat-header {
  padding: 16px 20px;
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
  font-weight: 600;
  font-size: 14px;
  color: var(--gray-700);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--gray-50);
}

.chat-message {
  max-width: 80%;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.5;
}

.chat-message.employee {
  align-self: flex-end;
  background: var(--primary-600);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.chat-message.admin {
  align-self: flex-start;
  background: #fff;
  border: 1px solid var(--gray-200);
  color: var(--gray-800);
  border-bottom-left-radius: 4px;
}

.chat-input-area {
  padding: 16px 20px;
  border-top: 1px solid var(--gray-200);
  display: flex;
  gap: 12px;
  background: #fff;
}

.chat-input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-full);
  font-size: 15px;
  transition: all 0.2s ease;
}

.chat-input:focus {
  outline: none;
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px var(--primary-100);
}

.chat-send {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary-600);
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chat-send:hover {
  background: var(--primary-700);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 920px) {
  .shell {
    grid-template-columns: 1fr;
  }
  
  .sidebar {
    display: none;
  }
  
  .content {
    padding: 16px;
    padding-bottom: 80px;
    max-width: 100%;
  }
}
@media (max-width: 480px) {
  .bottomnav .nav-item {
    min-width: 56px;
    padding: 6px 8px;
  }
  
  .quick-questions .btn.quick-question {
    flex: 1 1 calc(50% - 4px);
    min-width: 140px;
  }
}

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

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

::-webkit-scrollbar-thumb {
  background: var(--gray-300);
  border-radius: 4px;
}

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

::selection {
  background: var(--primary-100);
  color: var(--primary-900);
}
