/* ============================================================
   CarefullyWork — Estilos globales (paleta #04566b / #00cd00)
   Inspirado visualmente en TaskRabbit
   ============================================================ */

:root {
  --cw-dark:    #04566b;
  --cw-green:   #00cd00;
  --cw-mid:     #00798d;
  --cw-gray:    #343539;
  --cw-light:   #f0fafa;
  --cw-muted:   #67727e;
  --cw-border:  #dce0e6;
  --cw-white:   #ffffff;
  --shadow-sm:  0 1px 3px rgba(4,86,107,.08), 0 1px 2px rgba(4,86,107,.05);
  --shadow-md:  0 4px 12px rgba(4,86,107,.12);
  --shadow-lg:  0 20px 40px rgba(4,86,107,.15);
  --radius-sm:  8px;
  --radius-md:  14px;
  --radius-lg:  20px;
  --radius-xl:  28px;
  --radius-pill:9999px;
}

/* ── Reset / base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--cw-light);
  color: var(--cw-gray);
  -webkit-font-smoothing: antialiased;
}
h1,h2,h3,h4,h5,h6 { color: var(--cw-gray); font-weight: 700; }
a { color: var(--cw-dark); }
a:hover { color: var(--cw-mid); }

/* ── Login card ───────────────────────────────────────────── */
.login-card {
  background: var(--cw-white);
  border-radius: var(--radius-lg);
  padding: 36px 40px;
  box-shadow: var(--shadow-md);
}

.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  background: #fff;
  border: 1.5px solid var(--cw-border);
  border-radius: var(--radius-pill);
  padding: 12px 20px;
  font-size: .95rem;
  font-weight: 600;
  color: var(--cw-gray);
  cursor: pointer;
  transition: box-shadow .2s, border-color .2s, background .2s;
  font-family: 'Inter', system-ui, sans-serif;
}
.btn-google:hover {
  border-color: #bbb;
  background: #fafafa;
  box-shadow: var(--shadow-sm);
}
.btn-google svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}

.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0;
  color: var(--cw-muted);
  font-size: .8rem;
}
.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--cw-border);
}

@media (max-width: 480px) {
  .login-card { padding: 24px 20px; }
}

/* ── Navbar pública ────────────────────────────────────────── */
.navbar-public {
  background: var(--cw-white);
  border-bottom: 1px solid var(--cw-border);
  padding: .75rem 0;
  position: sticky;
  top: 0;
  z-index: 200;
}
.navbar-public .navbar-brand img { height: 42px; }

/* ── Botones ───────────────────────────────────────────────── */
.btn-cw-primary {
  background: var(--cw-dark);
  color: #fff;
  border: none;
  border-radius: var(--radius-pill);
  font-weight: 600;
  padding: 12px 28px;
  transition: background .2s, transform .15s;
}
.btn-cw-primary:hover { background: var(--cw-mid); color: #fff; transform: translateY(-1px); }

.btn-cw-outline {
  background: transparent;
  color: var(--cw-dark);
  border: 1.5px solid var(--cw-dark);
  border-radius: var(--radius-pill);
  font-weight: 600;
  padding: 10px 24px;
  transition: all .2s;
}
.btn-cw-outline:hover { background: var(--cw-dark); color: #fff; }

.btn-cw-green {
  background: var(--cw-green);
  color: #fff;
  border: none;
  border-radius: var(--radius-pill);
  font-weight: 700;
  padding: 12px 28px;
  transition: filter .2s, transform .15s;
}
.btn-cw-green:hover { filter: brightness(0.88); color:#fff; transform: translateY(-1px); }

/* Mapeo Bootstrap */
.btn-primary  { background:var(--cw-dark);  border-color:var(--cw-dark);  border-radius:var(--radius-pill); font-weight:600; }
.btn-primary:hover,
.btn-primary:focus { background:var(--cw-mid); border-color:var(--cw-mid); }
.btn-outline-primary { color:var(--cw-dark); border-color:var(--cw-dark); border-radius:var(--radius-pill); font-weight:600; }
.btn-outline-primary:hover { background:var(--cw-dark); border-color:var(--cw-dark); }
.btn-success  { background:var(--cw-green); border-color:var(--cw-green); border-radius:var(--radius-pill); font-weight:600; color:#fff; }
.btn-success:hover { filter:brightness(.88); border-color:var(--cw-green); color:#fff; }

/* ── HERO ──────────────────────────────────────────────────── */
.hero-section {
  background: var(--cw-white);
  padding: 72px 0 56px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(4,86,107,.08);
  color: var(--cw-dark);
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  font-size: .8rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 800;
  line-height: 1.1;
  color: #1a2e36;
}
.hero-title .accent { color: var(--cw-dark); }

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--cw-muted);
  max-width: 520px;
  line-height: 1.65;
}

.hero-searchbar {
  display: flex;
  align-items: center;
  background: #fff;
  border: 1.5px solid var(--cw-border);
  border-radius: var(--radius-pill);
  padding: 6px 6px 6px 20px;
  box-shadow: var(--shadow-md);
  max-width: 560px;
  margin-top: 28px;
}
.hero-searchbar input {
  border: none;
  outline: none;
  flex: 1;
  font-size: 1rem;
  background: transparent;
  color: var(--cw-gray);
}
.hero-searchbar input::placeholder { color: var(--cw-muted); }
.hero-searchbar button {
  background: var(--cw-dark);
  color: #fff;
  border: none;
  border-radius: var(--radius-pill);
  padding: 10px 22px;
  font-weight: 600;
  font-size: .9rem;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background .2s;
}
.hero-searchbar button:hover { background: var(--cw-mid); }

.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 24px;
  font-size: .85rem;
  color: var(--cw-muted);
}
.hero-trust span { display: flex; align-items: center; gap: 6px; }
.hero-trust .icon-ok  { color: var(--cw-dark); }
.hero-trust .icon-gr  { color: var(--cw-green); }
.hero-trust .icon-sta { color: #f59e0b; }

.hero-image-wrap {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  height: 380px;
}
.hero-image-wrap img { width: 100%; height: 100%; object-fit: cover; }

/* ── Servicios ─────────────────────────────────────────────── */
.section-title {
  font-size: 1.9rem;
  font-weight: 800;
  color: #1a2e36;
  margin-bottom: 6px;
}
.section-sub {
  color: var(--cw-muted);
  font-size: 1rem;
  margin-bottom: 32px;
}

.service-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  cursor: pointer;
  text-decoration: none;
  color: var(--cw-gray);
  transition: color .2s;
}
.service-pill:hover { color: var(--cw-dark); }

.service-pill-icon {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--cw-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  transition: background .2s, transform .2s;
  border: 2px solid transparent;
}
.service-pill:hover .service-pill-icon {
  background: rgba(4,86,107,.1);
  border-color: var(--cw-dark);
  transform: scale(1.08);
}
.service-pill.active .service-pill-icon {
  background: rgba(4,86,107,.12);
  border-color: var(--cw-dark);
}
.service-pill-label { font-size: .85rem; font-weight: 600; line-height: 1.2; }
.service-pill-underline {
  width: 36px; height: 3px;
  background: var(--cw-dark);
  border-radius: 2px;
  opacity: 0;
  transition: opacity .2s;
}
.service-pill:hover .service-pill-underline,
.service-pill.active .service-pill-underline { opacity: 1; }

/* ── Proyectos populares ───────────────────────────────────── */
.project-card {
  display: flex;
  background: #fff;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .25s, transform .25s;
  text-decoration: none;
  color: inherit;
}
.project-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  color: inherit;
}
.project-card-img { width: 110px; flex-shrink: 0; overflow: hidden; }
.project-card-img img { width: 100%; height: 100%; object-fit: cover; }
.project-card-body {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.project-card-title { font-size: .9rem; font-weight: 700; color: #1a2e36; margin-bottom: 4px; }
.project-card-sub   { font-size: .8rem; color: var(--cw-muted); }

/* ── Proveedores ───────────────────────────────────────────── */
.provider-card {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .25s, transform .25s;
}
.provider-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.stars { color: #f59e0b; letter-spacing: 1px; }

/* ── Stats strip ───────────────────────────────────────────── */
.stats-strip {
  background: linear-gradient(135deg, #e8f6f8 0%, #d6f0d6 100%);
  border-radius: var(--radius-lg);
  padding: 36px 40px;
}
.stat-item-label { font-size: .8rem; font-weight: 700; color: var(--cw-dark); text-transform: uppercase; letter-spacing: .5px; }
.stat-item-value { font-size: 1.8rem; font-weight: 800; color: var(--cw-dark); line-height: 1; }

/* ── How it works ──────────────────────────────────────────── */
.how-card {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 24px;
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}
.how-number {
  width: 52px; height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--cw-dark);
  flex-shrink: 0;
}
.how-num-1 { background: rgba(4,86,107,.1); }
.how-num-2 { background: rgba(0,205,0,.12); }
.how-num-3 { background: rgba(0,121,141,.15); }

/* ── Satisfacción ──────────────────────────────────────────── */
.satisfaction-section { background: #f7fdfd; }
.guarantee-card {
  padding: 28px 24px;
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  height: 100%;
}
.guarantee-card h5 { font-weight: 700; color: #1a2e36; margin-bottom: 10px; }
.guarantee-icon { font-size: 2rem; margin-bottom: 12px; color: var(--cw-dark); }

/* ── CTA doble ─────────────────────────────────────────────── */
.cta-card { padding: 40px; border-radius: var(--radius-lg); height: 100%; }
.cta-card-client   { background: linear-gradient(135deg, #e8f6f8, #c7ecef); }
.cta-card-provider { background: linear-gradient(135deg, #e8fbe8, #c7f0c7); }
.cta-card h3 { font-size: 1.5rem; font-weight: 800; color: #1a2e36; }
.cta-card p  { color: var(--cw-muted); }

/* ── Quick tags ────────────────────────────────────────────── */
.quick-tag {
  display: inline-block;
  padding: 8px 18px;
  border: 1.5px solid var(--cw-border);
  border-radius: var(--radius-pill);
  font-size: .85rem;
  font-weight: 600;
  color: var(--cw-gray);
  text-decoration: none;
  transition: border-color .2s, color .2s, background .2s;
  white-space: nowrap;
}
.quick-tag:hover {
  border-color: var(--cw-dark);
  color: var(--cw-dark);
  background: rgba(4,86,107,.05);
}

/* ── Reseñas ───────────────────────────────────────────────── */
.review-card { background: #fff; border-radius: var(--radius-md); padding: 24px; box-shadow: var(--shadow-sm); height: 100%; }
.review-name { font-weight: 700; color: #1a2e36; font-size: 1rem; }
.review-text { font-size: .9rem; color: var(--cw-muted); line-height: 1.6; margin: 10px 0; }
.review-link { font-size: .85rem; font-weight: 600; color: var(--cw-dark); text-decoration: none; }
.review-link:hover { text-decoration: underline; }

/* ── Footer ────────────────────────────────────────────────── */
footer.cw-footer {
  background: #1a2e36;
  color: rgba(255,255,255,.8);
  padding: 48px 0 24px;
}
footer.cw-footer img.footer-logo { filter: brightness(0) invert(1); height: 36px; margin-bottom: 16px; }
footer.cw-footer .footer-text { font-size: .85rem; color: rgba(255,255,255,.65); }
footer.cw-footer .footer-copy { font-size: .8rem; color: rgba(255,255,255,.5); border-top: 1px solid rgba(255,255,255,.1); padding-top: 16px; margin-top: 16px; }

/* ── Sidebar ───────────────────────────────────────────────── */
.sidebar {
  width: 260px;
  background: var(--cw-white);
  height: 100vh;
  position: fixed;
  left: 0; top: 0;
  box-shadow: 2px 0 10px rgba(4,86,107,.07);
  z-index: 100;
  transition: transform .3s;
  overflow-y: auto;
}
.sidebar-brand { padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--cw-border); }
.sidebar .nav-link {
  color: #64748b;
  border-radius: 10px;
  margin: 2px 8px;
  padding: 10px 16px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar .nav-link i { width: 18px; text-align: center; }
.sidebar .nav-link:hover,
.sidebar .nav-link.active { background: rgba(4,86,107,.07); color: var(--cw-dark); }
.main-content { margin-left: 260px; min-height: 100vh; padding: 2rem; transition: margin-left .3s; }

/* ── Sidebar colapsable ────────────────────────────────────── */
.sidebar-logo-mini { display: none; height: 34px; }
.sidebar-collapse-btn {
  position: fixed;
  top: 22px;
  left: 248px;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--cw-white);
  border: 1px solid var(--cw-border);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 110;
  transition: left .3s;
  cursor: pointer;
  color: var(--cw-dark);
  padding: 0;
}
.sidebar-collapse-btn i { transition: transform .3s; font-size: .75rem; }

body.sidebar-collapsed .sidebar { width: 72px; }
body.sidebar-collapsed .main-content { margin-left: 72px; }
body.sidebar-collapsed .sidebar-collapse-btn { left: 60px; }
body.sidebar-collapsed .sidebar-collapse-btn i { transform: rotate(180deg); }
body.sidebar-collapsed .sidebar-brand { padding: 1.25rem .5rem; display: flex; justify-content: center; }
.sidebar img.rounded-circle { flex-shrink: 0; }
body.sidebar-collapsed .sidebar-user-card { padding: 0; justify-content: center; }
body.sidebar-collapsed .sidebar-logo-full { display: none; }
body.sidebar-collapsed .sidebar-logo-mini { display: inline-block; }
body.sidebar-collapsed .nav-label { display: none; }
body.sidebar-collapsed .nav-link { justify-content: center; padding: 12px 8px; margin: 2px 10px; }
body.sidebar-collapsed .nav-link .badge { position: absolute; top: 4px; right: 10px; }

@media (max-width: 767px) {
  .sidebar-collapse-btn { display: none !important; }
  body.sidebar-collapsed .sidebar { width: 260px; }
  body.sidebar-collapsed .main-content { margin-left: 0; }
  body.sidebar-collapsed .nav-label { display: inline; }
  body.sidebar-collapsed .sidebar-brand { display: block; justify-content: normal; }
  body.sidebar-collapsed .sidebar-logo-full { display: inline-block; }
  body.sidebar-collapsed .sidebar-logo-mini { display: none; }
  body.sidebar-collapsed .nav-link { justify-content: flex-start; padding: 10px 16px; margin: 2px 8px; }
}

/* ── Chat ──────────────────────────────────────────────────── */
.chat-container { display:flex; flex-direction:column; height:65vh; }
.chat-messages { flex:1; overflow-y:auto; padding:1rem; background:#f8fafc; border-radius:12px; }
.message-bubble { max-width:70%; margin-bottom:1rem; }
.message-bubble.sent { margin-left:auto; }
.message-bubble .bubble { padding:10px 16px; border-radius:18px; }
.message-bubble.sent .bubble { background:var(--cw-dark); color:#fff; border-bottom-right-radius:4px; }
.message-bubble.received .bubble { background:#fff; color:var(--cw-gray); border-bottom-left-radius:4px; box-shadow:var(--shadow-sm); }
.message-bubble.admin-msg .bubble { background:#fef3c7; color:#92400e; border-radius:10px; }

/* ── Badges ────────────────────────────────────────────────── */
.badge-status { padding:4px 12px; border-radius:50px; font-size:.75rem; font-weight:600; }
.badge-pending    { background:#fef3c7; color:#92400e; }
.badge-accepted   { background:#d1fae5; color:#065f46; }
.badge-completed  { background:#dbeafe; color:#1e40af; }
.badge-cancelled, .badge-rejected { background:#fee2e2; color:#991b1b; }
.badge-offered    { background:#ede9fe; color:#5b21b6; }
.badge-active     { background:#d1fae5; color:#065f46; }
.badge-in_progress { background:#e2e8f0; color:#334155; }

/* ── Inputs ────────────────────────────────────────────────── */
.form-control, .form-select {
  border-radius: 10px;
  border: 2px solid var(--cw-border);
  padding: 10px 14px;
  transition: border-color .2s;
  color: var(--cw-gray);
}
.form-control:focus, .form-select:focus {
  border-color: var(--cw-dark);
  box-shadow: 0 0 0 3px rgba(4,86,107,.12);
}

/* ── Tarjetas ──────────────────────────────────────────────── */
.card {
  border: none;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: box-shadow .25s, transform .25s;
}
.card:hover { box-shadow: var(--shadow-md); }
.form-section {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
}

/* ── Avatar ────────────────────────────────────────────────── */
.avatar-circle {
  width:50px; height:50px;
  border-radius:50%;
  background:linear-gradient(135deg,var(--cw-dark),var(--cw-mid));
  display:inline-flex; align-items:center; justify-content:center;
  color:#fff; font-weight:700; font-size:1.1rem;
  flex-shrink: 0;
}

/* ── Stat-card ─────────────────────────────────────────────── */
.stat-card { text-align:center; padding:1.5rem; }
.stat-card .number { font-size:2.5rem; font-weight:800; color:var(--cw-dark); }
.stat-card .label  { color:var(--cw-muted); font-size:.875rem; font-weight:500; }

/* ── Notificaciones ────────────────────────────────────────── */
.notif-item { padding:12px; border-radius:10px; transition:background .2s; }
.notif-item:hover { background:#f8fafc; }
.notif-item.unread { background:rgba(4,86,107,.06); border-left:3px solid var(--cw-dark); }

/* ── Utilidades ────────────────────────────────────────────── */
.fw-600 { font-weight:600!important; }
.fw-700 { font-weight:700!important; }
.fw-800 { font-weight:800!important; }
.text-cw { color: var(--cw-dark)!important; }
.bg-cw  { background: var(--cw-dark)!important; }
.border-cw { border-color: var(--cw-dark)!important; }
.section-light  { background: var(--cw-white); }
.section-tinted { background: var(--cw-light); }

/* ── Decoraciones laterales ────────────────────────────────── */
.has-side-decor { position: relative; overflow: hidden; }
.has-side-decor > .container { position: relative; z-index: 1; }
.side-decor {
  position: absolute;
  top: 0;
  height: 100%;
  width: 90px;
  max-width: 10vw;
  object-fit: cover;
  z-index: 0;
  opacity: .85;
  pointer-events: none;
  user-select: none;
}
.side-decor-left  { left: 0; width: 55px; max-width: 6vw; }
.side-decor-right { right: 0; width: 55px; max-width: 6vw; }
.side-decor-top-right  { top: 0; right: 0; left: auto; height: auto; width: 90px; max-width: 10vw; }
.side-decor-bottom-left { top: auto; bottom: 0; left: 0; height: auto; width: 60px; max-width: 10vw; }
.side-decor-mid-left   { top: 50%; left: 0; transform: translateY(-50%); height: auto; width: 90px; max-width: 10vw; }

@media (max-width: 767px) { .side-decor { display: none; } }

/* ── Animación ─────────────────────────────────────────────── */
@keyframes fadeInUp { from{opacity:0;transform:translateY(22px)} to{opacity:1;transform:translateY(0)} }
.fade-in-up { animation: fadeInUp .5s ease forwards; }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 991px) {
  .hero-section { padding: 48px 0 40px; }
  .hero-title { font-size: 2rem; }
}
@media (max-width: 767px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.show { transform: translateX(0); }
  .main-content { margin-left: 0; padding: 1rem; }
  .stats-strip { padding: 24px 20px; }
  .cta-card { padding: 28px 20px; }
  .hero-searchbar { flex-direction: column; border-radius: var(--radius-lg); padding: 12px; gap: 10px; }
  .hero-searchbar button { width: 100%; justify-content: center; }
}