/* =============================================
   CONECTASERVICIOS — CSS puro (compatible con Tailwind CDN)
   ============================================= */

/* ── Reset horizontal overflow (evita scroll lateral en móvil) ── */
html, body {
    overflow-x: hidden;
    max-width: 100%;
}

/* ── Buttons ─────────────────────────────────── */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #4f46e5;
    color: #fff;
    font-weight: 600;
    font-size: 0.875rem;
    padding: 10px 20px;
    border-radius: 16px;
    border: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(79,70,229,0.25);
    text-decoration: none;
    line-height: 1.4;
}
.btn-primary:hover  { background: #4338ca; transform: scale(1.02); box-shadow: 0 4px 14px rgba(79,70,229,0.35); }
.btn-primary:active { background: #3730a3; transform: scale(0.98); }
.btn-primary:focus-visible { outline: 2px solid #818cf8; outline-offset: 2px; }

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #f1f5f9;
    color: #374151;
    font-weight: 600;
    font-size: 0.875rem;
    padding: 10px 20px;
    border-radius: 16px;
    border: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    text-decoration: none;
    line-height: 1.4;
}
.btn-secondary:hover  { background: #e2e8f0; }
.btn-secondary:active { background: #cbd5e1; transform: scale(0.98); }

.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: transparent;
    color: #4f46e5;
    font-weight: 600;
    font-size: 0.875rem;
    padding: 10px 20px;
    border-radius: 16px;
    border: 2px solid #c7d2fe;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    text-decoration: none;
    line-height: 1.4;
}
.btn-outline:hover { border-color: #818cf8; background: #eef2ff; }

.btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #ef4444;
    color: #fff;
    font-weight: 600;
    font-size: 0.875rem;
    padding: 10px 20px;
    border-radius: 16px;
    border: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    text-decoration: none;
    line-height: 1.4;
}
.btn-danger:hover  { background: #dc2626; }
.btn-danger:active { transform: scale(0.98); }

/* ── Form inputs ─────────────────────────────── */
.input-field {
    display: block;
    width: 100%;
    padding: 11px 16px;
    border-radius: 12px;
    border: 2px solid #cbd5e1;
    background: #fff;
    color: #111827;
    font-size: 0.9rem;
    font-weight: 500;
    font-family: inherit;
    line-height: 1.5;
    transition: border-color 0.15s, box-shadow 0.15s;
    outline: none;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
}
.input-field::placeholder { color: #94a3b8; font-weight: 400; }
.input-field:hover  { border-color: #818cf8; }
.input-field:focus  { border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,0.18); }
.input-field:disabled,
.input-field[readonly] { background: #f8fafc; color: #94a3b8; border-color: #e2e8f0; cursor: not-allowed; }

select.input-field {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}
textarea.input-field { resize: vertical; min-height: 100px; line-height: 1.6; }

/* ── Labels ──────────────────────────────────── */
.field-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}
.field-hint {
    display: block;
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 4px;
}

/* ── Sidebar ─────────────────────────────────── */
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #4b5563;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}
.sidebar-link:hover { background: #f1f5f9; color: #111827; }
.sidebar-link.active { background: #eef2ff; color: #4338ca; font-weight: 600; }

/* ── Bottom nav ──────────────────────────────── */
.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 0.7rem;
    font-weight: 500;
    color: #6b7280;
    text-decoration: none;
    padding: 8px 4px 4px;
    transition: color 0.15s;
}
.bottom-nav-item svg { width: 20px; height: 20px; }
.bottom-nav-item:hover { color: #4f46e5; }

/* ── Dropdown menu ───────────────────────────── */
.menu-item {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    font-size: 0.875rem;
    color: #374151;
    text-decoration: none;
    transition: background 0.1s;
}
.menu-item:hover { background: #f9fafb; }

/* ── Status badges ───────────────────────────── */
.status-badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 999px;
    display: inline-block;
}
.status-pending   { background: #fefce8; color: #a16207; border: 1px solid #fde68a; }
.status-accepted  { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.status-unlocked  { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.status-completed { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.status-rejected  { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.status-cancelled { background: #f3f4f6; color: #4b5563; border: 1px solid #e5e7eb; }

/* ── Verification badges ─────────────────────── */
.badge-verified   { display: inline-flex; align-items: center; gap: 4px; font-size: 0.7rem; font-weight: 600; background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; padding: 2px 8px; border-radius: 999px; }
.badge-partial    { display: inline-flex; align-items: center; gap: 4px; font-size: 0.7rem; font-weight: 600; background: #fefce8; color: #a16207; border: 1px solid #fde68a; padding: 2px 8px; border-radius: 999px; }
.badge-unverified { display: inline-flex; align-items: center; gap: 4px; font-size: 0.7rem; font-weight: 600; background: #f3f4f6; color: #6b7280; border: 1px solid #e5e7eb; padding: 2px 8px; border-radius: 999px; }

/* ── Plan badges ─────────────────────────────── */
.plan-badge  { font-size: 0.7rem; font-weight: 700; padding: 2px 10px; border-radius: 999px; text-transform: uppercase; letter-spacing: 0.05em; display: inline-block; }
.plan-gray   { background: #f3f4f6; color: #374151; }
.plan-blue   { background: #dbeafe; color: #1e40af; }
.plan-purple { background: #ede9fe; color: #5b21b6; }
.plan-gold   { background: #fef9c3; color: #92400e; }

/* ── Stars ───────────────────────────────────── */
.stars { display: inline-flex; align-items: center; gap: 2px; }
.star-filled { width: 16px; height: 16px; color: #facc15; fill: #facc15; }
.star-empty  { width: 16px; height: 16px; color: #e5e7eb; fill: #e5e7eb; }

/* ── Role card (registro) ────────────────────── */
.role-card {
    cursor: pointer;
    border-radius: 16px;
    border: 2px solid #e2e8f0;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
    background: #fff;
}
.role-card:hover { border-color: #a5b4fc; background: #eef2ff; }
.role-card.active { border-color: #6366f1; background: #eef2ff; box-shadow: 0 2px 8px rgba(99,102,241,0.15); }

/* ── Admin quick link ────────────────────────── */
.admin-quick-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    text-decoration: none;
    border: 1px solid #f1f5f9;
    background: #fff;
    transition: background 0.15s, border-color 0.15s;
}
.admin-quick-link:hover { background: #f9fafb; border-color: #e2e8f0; }

/* ── Card ────────────────────────────────────── */
.card {
    background: #fff;
    border-radius: 16px;
    border: 1px solid #f1f5f9;
    transition: box-shadow 0.2s;
}
.card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.08); }

/* ── Safe area mobile ────────────────────────── */
.safe-area-bottom { padding-bottom: env(safe-area-inset-bottom, 0); }

/* ── Scrollbar ───────────────────────────────── */
* { scrollbar-width: thin; scrollbar-color: #e2e8f0 transparent; }
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 100px; }
::-webkit-scrollbar-thumb:hover { background: #cbd5e1; }

/* ── Line clamp ──────────────────────────────── */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── City Select ─────────────────────────────── */
.city-select-wrap { position: relative; }

.city-dropdown {
    position: absolute;
    left: 0; right: 0;
    top: calc(100% + 4px);
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.12);
    z-index: 9999;
    overflow: hidden;
    max-height: 240px;
    overflow-y: auto;
}
.city-dropdown.hidden { display: none; }

.city-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    text-align: left;
    padding: 10px 14px;
    font-size: 0.8125rem;
    border: none;
    background: none;
    cursor: pointer;
    border-bottom: 1px solid #f9fafb;
    transition: background 0.1s;
    font-family: inherit;
}
.city-option:last-child { border-bottom: none; }
.city-option:hover { background: #eef2ff; }

.city-geo-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #6366f1;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 8px;
    transition: color 0.2s;
    z-index: 10;
}
.city-geo-btn:hover { color: #4f46e5; }

/* ── Leaflet overrides ───────────────────────── */
.leaflet-container { font-family: 'Inter', system-ui, sans-serif; }
.leaflet-popup-content-wrapper { border-radius: 16px !important; box-shadow: 0 10px 40px rgba(0,0,0,0.15) !important; padding: 0 !important; }
.leaflet-popup-content { margin: 14px !important; }
.leaflet-popup-tip-container { display: none; }

/* ── Animations ──────────────────────────────── */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeIn 0.2s ease-out; }

/* ── Mobile ──────────────────────────────────── */
@media (max-width: 640px) {
    .btn-primary, .btn-secondary {
        width: 100%;
        justify-content: center;
    }
}
