/* ============================================================
   RECLUT.AI — Base Design System
   Colores: #0a3f6d (azul marino) | #98c82e (verde lima)
   Tipografía: Poppins
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --blue:       #0a3f6d;
  --blue-mid:   #0d5490;
  --blue-light: #1a6bb5;
  --green:      #98c82e;
  --green-dark: #7aaa1e;
  --green-light:#b8e05a;
  --white:      #ffffff;
  --gray-50:    #f8fafc;
  --gray-100:   #f1f5f9;
  --gray-200:   #e2e8f0;
  --gray-300:   #cbd5e1;
  --gray-500:   #64748b;
  --gray-700:   #334155;
  --gray-900:   #0f172a;
  --red:        #ef4444;
  --amber:      #f59e0b;

  --grad-v:   linear-gradient(180deg, #0a3f6d 0%, #98c82e 100%);
  --grad-h:   linear-gradient(90deg,  #0a3f6d 0%, #98c82e 100%);
  --grad-hero:linear-gradient(135deg, #0a3f6d 0%, #0d5490 50%, #1a6bb5 100%);

  --sidebar-w: 80px;
  --topbar-h:  64px;
  --radius:    12px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow:    0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.05);
  --shadow-lg: 0 10px 25px rgba(0,0,0,.12), 0 4px 10px rgba(0,0,0,.08);
  --shadow-blue: 0 8px 24px rgba(10,63,109,.25);
  --shadow-green: 0 8px 24px rgba(152,200,46,.35);
  --transition: all .2s ease;
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Poppins', sans-serif;
  color: var(--gray-700);
  background: var(--gray-50);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--gray-100); }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--blue-light); }

/* ── Utilities ── */
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 22px; border-radius: 50px; border: none;
  font-family: 'Poppins', sans-serif; font-weight: 600; font-size: .875rem;
  cursor: pointer; transition: var(--transition); text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--green); color: var(--white);
  box-shadow: var(--shadow-green);
}
.btn-primary:hover { background: var(--green-dark); transform: translateY(-1px); box-shadow: 0 12px 28px rgba(152,200,46,.4); }
.btn-secondary {
  background: var(--blue); color: var(--white);
  box-shadow: var(--shadow-blue);
}
.btn-secondary:hover { background: var(--blue-mid); transform: translateY(-1px); }
.btn-outline {
  background: transparent; color: var(--blue);
  border: 2px solid var(--blue);
}
.btn-outline:hover { background: var(--blue); color: var(--white); }
.btn-ghost {
  background: var(--gray-100); color: var(--gray-700);
}
.btn-ghost:hover { background: var(--gray-200); }
.btn-sm { padding: 7px 16px; font-size: .8rem; }
.btn-lg { padding: 14px 32px; font-size: 1rem; }
.btn-block { width: 100%; justify-content: center; }

/* ── Input ── */
.input-group { position: relative; margin-bottom: 16px; }
.input-group label { display: block; font-size: .8rem; font-weight: 600; color: var(--gray-500); margin-bottom: 6px; letter-spacing: .03em; text-transform: uppercase; }
.input-group input, .input-group select, .input-group textarea {
  width: 100%; padding: 12px 16px 12px 44px;
  border: 1.5px solid var(--gray-200); border-radius: var(--radius);
  font-family: 'Poppins', sans-serif; font-size: .9rem; color: var(--gray-700);
  background: var(--white); transition: var(--transition); outline: none;
}
.input-group input:focus, .input-group select:focus {
  border-color: var(--blue-light); box-shadow: 0 0 0 3px rgba(10,63,109,.1);
}
.input-group .input-icon {
  position: absolute; left: 14px; bottom: 13px;
  color: var(--green); font-size: 1rem;
}

/* ── Card ── */
.card {
  background: var(--white); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); padding: 24px;
}
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.card-title { font-size: 1rem; font-weight: 700; color: var(--blue); }

/* ── Badge / Tag ── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 12px; border-radius: 50px; font-size: .72rem;
  font-weight: 600; letter-spacing: .02em;
}
.badge-green  { background: rgba(152,200,46,.15); color: var(--green-dark); }
.badge-blue   { background: rgba(10,63,109,.1);  color: var(--blue); }
.badge-gray   { background: var(--gray-100); color: var(--gray-500); }
.badge-amber  { background: rgba(245,158,11,.15); color: #b45309; }

/* ── Progress bar ── */
.progress-bar { height: 8px; background: var(--gray-200); border-radius: 4px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--grad-h); border-radius: 4px; transition: width .6s ease; }

/* ── Avatar ── */
.avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--grad-h); color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .85rem; flex-shrink: 0;
}
.avatar-lg { width: 56px; height: 56px; font-size: 1.1rem; }
.avatar-xl { width: 80px; height: 80px; font-size: 1.6rem; }

/* ── Sidebar ── */
.sidebar {
  position: fixed; left: 0; top: 0; bottom: 0;
  width: var(--sidebar-w); background: var(--white);
  border-right: 1px solid var(--gray-200);
  display: flex; flex-direction: column; align-items: center;
  padding: 16px 0; gap: 4px; z-index: 100;
  box-shadow: 2px 0 8px rgba(0,0,0,.04);
}
.sidebar-logo {
  width: 48px; height: 48px; margin-bottom: 12px;
}
.sidebar-link {
  width: 48px; height: 48px; border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  color: var(--gray-300); text-decoration: none; position: relative;
  transition: var(--transition); cursor: pointer; border: none; background: none;
}
.sidebar-link:hover, .sidebar-link.active {
  background: rgba(10,63,109,.08); color: var(--blue);
}
.sidebar-link.active { color: var(--green); }
.sidebar-link .badge-dot {
  position: absolute; top: 8px; right: 8px;
  width: 8px; height: 8px; background: var(--red); border-radius: 50%;
  border: 2px solid var(--white);
}
.sidebar-link svg { width: 22px; height: 22px; }
.sidebar-bottom { margin-top: auto; display:flex; flex-direction:column; align-items:center; gap:4px; }
.sidebar-tooltip {
  position: absolute; left: 64px; background: var(--gray-900); color: var(--white);
  padding: 5px 10px; border-radius: 6px; font-size: .75rem; font-weight: 500;
  white-space: nowrap; pointer-events: none; opacity: 0;
  transition: opacity .15s; z-index: 200;
}
.sidebar-link:hover .sidebar-tooltip { opacity: 1; }

/* joBook sidebar button */
.sidebar-jobook {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, #0d1b2e 0%, #0a3560 100%);
  border: 2px solid rgba(152,200,46,.35);
  transition: var(--transition), box-shadow .2s;
}
.sidebar-jobook:hover {
  background: linear-gradient(135deg, #0a3560 0%, #0d5490 100%);
  border-color: rgba(152,200,46,.7);
  box-shadow: 0 0 0 3px rgba(152,200,46,.15);
  color: inherit;
}

/* ── Topbar ── */
.topbar {
  position: fixed; left: var(--sidebar-w); right: 0; top: 0;
  height: var(--topbar-h); background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  display: flex; align-items: center; padding: 0 24px;
  gap: 16px; z-index: 90; box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.topbar-left { display: flex; align-items: center; gap: 12px; flex: 1; }
.topbar-greeting { font-size: .95rem; font-weight: 600; color: var(--gray-700); }
.topbar-search {
  flex: 1; max-width: 480px; position: relative;
}
.topbar-search input {
  width: 100%; padding: 9px 16px 9px 40px;
  border: 1.5px solid var(--gray-200); border-radius: 50px;
  font-family: 'Poppins', sans-serif; font-size: .875rem;
  background: var(--gray-50); outline: none; transition: var(--transition);
}
.topbar-search input:focus { border-color: var(--blue-light); background: var(--white); }
.topbar-search .search-icon {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  color: var(--gray-300); width: 16px; height: 16px;
}
.topbar-right { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.topbar-logo img { height: 36px; }

/* ── Main layout ── */
.main-layout {
  margin-left: var(--sidebar-w);
  padding-top: var(--topbar-h);
  min-height: 100vh;
}
.page-content {
  padding: 24px;
  max-width: 1400px;
  margin: 0 auto;
}

/* ── Copiloto flotante ── */
.assistant-float-root {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 180;
  font-family: 'Poppins', sans-serif;
}

.assistant-float-button {
  height: 52px;
  min-width: 52px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--blue), var(--blue-mid));
  color: #fff;
  box-shadow: 0 14px 34px rgba(10,63,109,.26);
  cursor: pointer;
  font-weight: 800;
}

.assistant-float-button svg {
  width: 21px;
  height: 21px;
}

.assistant-float-window {
  position: absolute;
  right: 0;
  bottom: 66px;
  width: min(380px, calc(100vw - 28px));
  height: min(560px, calc(100vh - 118px));
  display: none;
  grid-template-rows: auto 1fr auto auto;
  background: #fff;
  border: 1.5px solid var(--gray-100);
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(15,23,42,.22);
  overflow: hidden;
}

.assistant-float-root.open .assistant-float-window {
  display: grid;
}

.assistant-float-head {
  min-height: 64px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--blue-mid));
}

.assistant-float-agent {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.assistant-float-avatar {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex: none;
  background: rgba(255,255,255,.16);
}

.assistant-float-title {
  font-size: .86rem;
  font-weight: 900;
  white-space: nowrap;
}

.assistant-float-sub {
  font-size: .68rem;
  color: rgba(255,255,255,.72);
}

.assistant-float-actions {
  display: flex;
  gap: 6px;
}

.assistant-float-icon {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.1);
  color: #fff;
  cursor: pointer;
}

.assistant-float-messages {
  overflow: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: linear-gradient(180deg, #f8fafc, #fff);
}

.assistant-float-welcome {
  margin: auto;
  max-width: 260px;
  text-align: center;
  color: var(--gray-500);
  font-size: .78rem;
}

.assistant-float-welcome strong {
  display: block;
  margin-bottom: 5px;
  color: var(--blue);
  font-size: 1rem;
}

.assistant-float-msg {
  display: flex;
}

.assistant-float-msg.user {
  justify-content: flex-end;
}

.assistant-float-msg > div {
  max-width: 86%;
  padding: 10px 11px;
  border-radius: 13px;
  font-size: .78rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.assistant-float-msg.user > div {
  color: #fff;
  background: var(--blue);
  border-bottom-right-radius: 5px;
}

.assistant-float-msg.bot > div {
  color: var(--gray-700);
  background: #fff;
  border: 1px solid var(--gray-100);
  box-shadow: var(--shadow-sm);
  border-bottom-left-radius: 5px;
}

.assistant-float-msg a {
  color: var(--green-dark);
  font-weight: 800;
}

.assistant-float-typing {
  display: flex;
  gap: 5px;
}

.assistant-float-typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  animation: assistant-float-bounce 1.2s infinite;
}

.assistant-float-typing span:nth-child(2) { animation-delay: .16s; }
.assistant-float-typing span:nth-child(3) { animation-delay: .32s; }

.assistant-float-prompts {
  display: flex;
  gap: 8px;
  padding: 10px 12px 0;
  background: #fff;
}

.assistant-float-prompts button {
  flex: 1;
  min-height: 34px;
  border: 1px solid var(--gray-100);
  border-radius: 10px;
  background: var(--gray-50);
  color: var(--blue);
  font-size: .72rem;
  font-weight: 800;
  cursor: pointer;
}

.assistant-float-compose {
  display: grid;
  grid-template-columns: 1fr 38px;
  gap: 8px;
  padding: 12px;
  background: #fff;
}

.assistant-float-compose input {
  min-width: 0;
  height: 38px;
  border: 1.5px solid var(--gray-200);
  border-radius: 11px;
  padding: 0 12px;
  font-family: 'Poppins', sans-serif;
  font-size: .78rem;
  outline: none;
}

.assistant-float-compose input:focus {
  border-color: var(--blue-light);
}

.assistant-float-compose button {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--green);
  color: #fff;
  cursor: pointer;
}

.assistant-float-compose button:disabled {
  opacity: .55;
}

@keyframes assistant-float-bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: .45; }
  40% { transform: translateY(-4px); opacity: 1; }
}

@media (max-width: 640px) {
  .assistant-float-root {
    right: 14px;
    bottom: 14px;
  }

  .assistant-float-button span {
    display: none;
  }

  .assistant-float-window {
    bottom: 62px;
    height: min(520px, calc(100vh - 94px));
  }
}

/* ── Notification bell ── */
.notif-btn {
  width: 40px; height: 40px; border-radius: 50%;
  border: none; background: var(--gray-100);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; position: relative; transition: var(--transition);
  color: var(--gray-500);
}
.notif-btn:hover { background: var(--gray-200); color: var(--blue); }
.notif-btn .dot {
  position: absolute; top: 8px; right: 8px;
  width: 8px; height: 8px; background: var(--red); border-radius: 50%;
  border: 2px solid var(--white);
  display: none;
}
.notif-btn .dot.visible { display: block; }

/* ── Notification dropdown ── */
.notif-wrap { position: relative; }
.notif-panel {
  display: none;
  position: absolute; top: calc(100% + 10px); right: 0;
  width: 340px; max-height: 420px;
  background: var(--white); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); overflow: hidden; z-index: 2000;
  border: 1px solid var(--gray-100);
}
.notif-panel.open { display: flex; flex-direction: column; }
.notif-panel-header {
  padding: 14px 16px 10px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--gray-100);
}
.notif-panel-header span { font-size: .875rem; font-weight: 700; color: var(--gray-900); }
.notif-panel-header button {
  font-size: .72rem; color: var(--green-dark); background: none; border: none;
  cursor: pointer; font-weight: 600; padding: 0;
}
.notif-list { overflow-y: auto; flex: 1; }
.notif-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 14px; border-bottom: 1px solid var(--gray-50);
  cursor: default; transition: background .15s;
}
.notif-item:last-child { border-bottom: none; }
.notif-item.unread { background: rgba(152,200,46,.06); }
.notif-item:hover { background: var(--gray-50); }
.notif-icon { font-size: 20px; line-height: 1; padding-top: 2px; flex-shrink: 0; }
.notif-body { flex: 1; min-width: 0; }
.notif-title { font-size: .78rem; font-weight: 700; color: var(--gray-900); }
.notif-text {
  font-size: .73rem; color: var(--gray-500); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.notif-time { font-size: .68rem; color: var(--gray-300); margin-top: 4px; }
.notif-empty {
  text-align: center; padding: 32px 16px;
  font-size: .82rem; color: var(--gray-400);
}
.notif-badge {
  position: absolute; top: 6px; right: 6px;
  background: var(--red); color: white; font-size: .6rem; font-weight: 700;
  border-radius: 9px; padding: 1px 5px; border: 2px solid var(--white);
  min-width: 16px; text-align: center; line-height: 14px;
  display: none;
}
.notif-badge.visible { display: block; }

/* ── Toast ── */
.toast-container { position: fixed; top: 80px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; }
.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 18px; border-radius: var(--radius); background: var(--white);
  box-shadow: var(--shadow-lg); font-size: .875rem; font-weight: 500;
  animation: slideInRight .3s ease; min-width: 260px;
  border-left: 4px solid var(--green);
}
.toast.error { border-color: var(--red); }
.toast.info  { border-color: var(--blue); }
@keyframes slideInRight {
  from { transform: translateX(120%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

/* ── Animations ── */
@keyframes fadeIn    { from { opacity: 0; }                   to { opacity: 1; } }
@keyframes slideUp   { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes scaleIn   { from { opacity: 0; transform: scale(.95); }       to { opacity: 1; transform: scale(1); } }
@keyframes shimmer   {
  0%   { background-position: -200% center; }
  100% { background-position:  200% center; }
}
.animate-fade  { animation: fadeIn  .4s ease both; }
.animate-up    { animation: slideUp .4s ease both; }
.animate-scale { animation: scaleIn .35s ease both; }

/* ── Staggered delays ── */
.delay-1 { animation-delay: .05s; }
.delay-2 { animation-delay: .10s; }
.delay-3 { animation-delay: .15s; }
.delay-4 { animation-delay: .20s; }
.delay-5 { animation-delay: .25s; }

/* ── Modal ── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.45);
  backdrop-filter: blur(4px); z-index: 500;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .25s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--white); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); padding: 32px; max-width: 520px;
  width: 90%; animation: scaleIn .3s ease;
}
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.modal-title { font-size: 1.1rem; font-weight: 700; color: var(--blue); }
.modal-close { background: none; border: none; cursor: pointer; color: var(--gray-500); font-size: 1.4rem; line-height: 1; }
