/* ═══════════════════════════════════════════════════════════════
   BOLSA DE TRABAJO PRO — FRONTEND STYLES
   ═══════════════════════════════════════════════════════════════ */

:root {
    --bt-primary:     #1a3c5e;
    --bt-primary-dark:#0f2640;
    --bt-accent:      #e84f2c;
    --bt-accent-light:#ff6b47;
    --bt-green:       #10b981;
    --bt-yellow:      #f59e0b;
    --bt-purple:      #8b5cf6;
    --bt-bg:          #f8fafc;
    --bt-white:       #ffffff;
    --bt-gray-50:     #f9fafb;
    --bt-gray-100:    #f1f5f9;
    --bt-gray-200:    #e2e8f0;
    --bt-gray-400:    #94a3b8;
    --bt-gray-600:    #475569;
    --bt-gray-800:    #1e293b;
    --bt-text:        #1e293b;
    --bt-text-light:  #64748b;
    --bt-border:      #e2e8f0;
    --bt-radius:      12px;
    --bt-radius-sm:   8px;
    --bt-shadow:      0 1px 3px rgba(0,0,0,.08), 0 4px 16px rgba(0,0,0,.06);
    --bt-shadow-md:   0 4px 12px rgba(0,0,0,.1), 0 12px 40px rgba(0,0,0,.08);
    --bt-shadow-lg:   0 8px 24px rgba(0,0,0,.12), 0 20px 60px rgba(0,0,0,.1);
    --bt-transition:  all .2s ease;
    --bt-font:        'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* ── RESET ── */
.bt-wrap *, .bt-modal * { box-sizing: border-box; }
.bt-wrap { font-family: var(--bt-font); color: var(--bt-text); background: var(--bt-bg); min-height: 100vh; }

/* ── HERO SEARCH ── */
.bt-hero {
    background: linear-gradient(135deg, var(--bt-primary) 0%, #2d5a8e 60%, #1a4f7a 100%);
    padding: 56px 32px 48px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.bt-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}
.bt-hero-title {
    color: #fff;
    font-size: clamp(26px, 4vw, 40px);
    font-weight: 800;
    margin: 0 0 10px;
    letter-spacing: -0.5px;
}
.bt-hero-sub {
    color: rgba(255,255,255,.75);
    font-size: 17px;
    margin: 0 0 32px;
}

/* Search bar */
.bt-search-bar {
    display: flex;
    gap: 10px;
    max-width: 900px;
    margin: 0 auto 20px;
    background: #fff;
    border-radius: 14px;
    padding: 8px;
    box-shadow: var(--bt-shadow-lg);
    flex-wrap: wrap;
}
.bt-search-field {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 180px;
    padding: 8px 12px;
    border-right: 1px solid var(--bt-border);
}
.bt-search-field:last-of-type { border-right: none; }
.bt-search-field .bt-icon { font-size: 18px; flex-shrink: 0; }
.bt-search-field input,
.bt-search-field select {
    border: none;
    outline: none;
    background: transparent;
    font-size: 15px;
    color: var(--bt-text);
    width: 100%;
    font-family: var(--bt-font);
}
.bt-search-field select { cursor: pointer; }
.bt-btn-search {
    flex-shrink: 0;
    white-space: nowrap;
    border-radius: 10px !important;
}

/* Quick filters */
.bt-quick-filters {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}
.bt-filter-label { color: rgba(255,255,255,.7); font-size: 14px; }
.bt-filter-chip {
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.25);
    color: #fff;
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 13px;
    cursor: pointer;
    transition: var(--bt-transition);
}
.bt-filter-chip:hover,
.bt-filter-chip.active {
    background: rgba(255,255,255,.25);
    border-color: rgba(255,255,255,.5);
}

/* ── STATS BAR ── */
.bt-stats-bar {
    background: var(--bt-white);
    border-bottom: 1px solid var(--bt-border);
    padding: 16px 32px;
    display: flex;
    align-items: center;
    gap: 32px;
    flex-wrap: wrap;
}
.bt-stat { display: flex; align-items: center; gap: 8px; }
.bt-stat-num { font-size: 22px; font-weight: 800; color: var(--bt-primary); }
.bt-stat-label { font-size: 13px; color: var(--bt-text-light); }
.bt-cta-group { margin-left: auto; display: flex; gap: 10px; flex-wrap: wrap; }

/* ── RESULTS ── */
.bt-results-wrap { max-width: 1100px; margin: 0 auto; padding: 32px 24px 60px; }
.bt-results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}
.bt-results-header p { color: var(--bt-text-light); font-size: 15px; margin: 0; }

/* ── OFERTA CARD ── */
.bt-oferta-card {
    background: var(--bt-white);
    border: 1px solid var(--bt-border);
    border-radius: var(--bt-radius);
    padding: 24px;
    margin-bottom: 16px;
    transition: var(--bt-transition);
    position: relative;
}
.bt-oferta-card:hover {
    box-shadow: var(--bt-shadow-md);
    border-color: var(--bt-primary);
    transform: translateY(-2px);
}
.bt-card-header { display: flex; gap: 16px; margin-bottom: 14px; }
.bt-card-logo {
    width: 54px; height: 54px; flex-shrink: 0;
    background: linear-gradient(135deg, var(--bt-primary), #2d6a9f);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 18px; font-weight: 800;
    letter-spacing: 1px;
}
.bt-card-main { flex: 1; min-width: 0; }
.bt-card-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.bt-card-title {
    font-size: 18px; font-weight: 700; color: var(--bt-text);
    margin: 0 0 4px; line-height: 1.3;
}
.bt-card-empresa { color: var(--bt-text-light); font-size: 14px; margin: 0; }

.bt-card-meta {
    display: flex; flex-wrap: wrap; gap: 12px;
    margin-bottom: 12px; padding-bottom: 12px;
    border-bottom: 1px solid var(--bt-gray-100);
}
.bt-meta-item { font-size: 13px; color: var(--bt-text-light); display: flex; align-items: center; gap: 4px; }
.bt-meta-salary { color: var(--bt-green); font-weight: 600; }
.bt-meta-deadline { color: var(--bt-accent); }

.bt-card-excerpt { font-size: 14px; color: var(--bt-text-light); line-height: 1.6; margin-bottom: 16px; }

.bt-card-actions { display: flex; gap: 10px; align-items: center; }

/* ── BADGES ── */
.bt-badge {
    display: inline-block; padding: 3px 10px;
    border-radius: 30px; font-size: 12px; font-weight: 600;
    background: #e8f0fe; color: var(--bt-primary);
}
.bt-badge-new { background: #fef3c7; color: #92400e; }
.bt-badge-jornada { background: #f0fdf4; color: #166534; }
.bt-badge-modalidad { background: #fdf4ff; color: #7e22ce; }

/* ── BUTTONS ── */
.bt-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 10px 20px; border-radius: var(--bt-radius-sm);
    font-size: 14px; font-weight: 600; cursor: pointer;
    border: none; transition: var(--bt-transition); text-decoration: none;
    white-space: nowrap; font-family: var(--bt-font);
}
.bt-btn-primary {
    background: var(--bt-accent);
    color: #fff !important;
}
.bt-btn-primary:hover { background: var(--bt-accent-light); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(232,79,44,.3); }
.bt-btn-outline {
    background: transparent;
    color: var(--bt-primary) !important;
    border: 2px solid var(--bt-primary);
}
.bt-btn-outline:hover { background: var(--bt-primary); color: #fff !important; }
.bt-btn-ghost {
    background: var(--bt-gray-100);
    color: var(--bt-text) !important;
}
.bt-btn-ghost:hover { background: var(--bt-gray-200); }
.bt-btn-search { background: var(--bt-accent); color: #fff; padding: 12px 24px; font-size: 15px; }
.bt-btn-search:hover { background: var(--bt-accent-light); }
.bt-btn-full { width: 100%; justify-content: center; }
.bt-btn-xl { padding: 16px 32px; font-size: 16px; border-radius: 10px; }

/* ── NO RESULTS ── */
.bt-no-results {
    text-align: center; padding: 60px 24px; color: var(--bt-text-light);
    background: var(--bt-white); border-radius: var(--bt-radius);
    border: 2px dashed var(--bt-border);
}
.bt-no-results-icon { font-size: 56px; margin-bottom: 16px; }
.bt-no-results h3 { font-size: 22px; color: var(--bt-text); margin: 0 0 8px; }

/* ── PAGINATION ── */
.bt-pagination {
    display: flex; align-items: center; justify-content: center;
    gap: 16px; margin-top: 32px; padding-top: 24px;
    border-top: 1px solid var(--bt-border);
}
.bt-page-btn {
    padding: 8px 20px; border-radius: var(--bt-radius-sm);
    border: 1px solid var(--bt-border); background: var(--bt-white);
    cursor: pointer; font-size: 14px; transition: var(--bt-transition);
    font-family: var(--bt-font);
}
.bt-page-btn:hover:not(:disabled) { border-color: var(--bt-primary); color: var(--bt-primary); }
.bt-page-btn:disabled { opacity: .4; cursor: not-allowed; }
#bt-page-info { color: var(--bt-text-light); font-size: 14px; }

/* ── LOADING SPINNER ── */
.bt-loading {
    text-align: center; padding: 48px;
}
.bt-spinner {
    width: 40px; height: 40px;
    border: 3px solid var(--bt-gray-200);
    border-top-color: var(--bt-primary);
    border-radius: 50%;
    animation: bt-spin .7s linear infinite;
    margin: 0 auto 12px;
}
@keyframes bt-spin { to { transform: rotate(360deg); } }

/* ── MODAL ── */
.bt-modal {
    position: fixed; inset: 0; z-index: 99999;
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
}
.bt-modal-overlay {
    position: absolute; inset: 0;
    background: rgba(0,0,0,.55); backdrop-filter: blur(4px);
}
.bt-modal-box {
    position: relative; background: var(--bt-white);
    border-radius: 16px; padding: 36px;
    width: 100%; max-width: 580px; max-height: 90vh;
    overflow-y: auto; box-shadow: var(--bt-shadow-lg);
    animation: bt-modal-in .25s ease;
}
@keyframes bt-modal-in {
    from { opacity:0; transform: scale(.95) translateY(8px); }
    to   { opacity:1; transform: scale(1) translateY(0); }
}
.bt-modal-close {
    position: absolute; top: 16px; right: 16px;
    width: 32px; height: 32px; border-radius: 50%;
    border: none; background: var(--bt-gray-100);
    font-size: 18px; cursor: pointer; display: flex;
    align-items: center; justify-content: center;
    transition: var(--bt-transition);
}
.bt-modal-close:hover { background: var(--bt-gray-200); }
.bt-modal-title { font-size: 22px; font-weight: 700; margin: 0 0 6px; }
.bt-modal-subtitle { color: var(--bt-text-light); margin: 0 0 24px; font-size: 15px; }

/* ── FORMS ── */
.bt-form-wrap { max-width: 860px; margin: 0 auto; }
.bt-form-hero {
    background: linear-gradient(135deg, var(--bt-primary), #2d6a9f);
    color: #fff; text-align: center; padding: 48px 32px;
    border-radius: var(--bt-radius) var(--bt-radius) 0 0;
}
.bt-form-hero-empresa { background: linear-gradient(135deg, #0f2640, #1a3c5e); }
.bt-form-hero-icon { font-size: 48px; margin-bottom: 12px; }
.bt-form-hero h2 { font-size: 28px; font-weight: 800; margin: 0 0 8px; color: #fff; }
.bt-form-hero p { color: rgba(255,255,255,.75); margin: 0; font-size: 16px; }

.bt-form {
    background: var(--bt-white);
    border-radius: 0 0 var(--bt-radius) var(--bt-radius);
    border: 1px solid var(--bt-border); border-top: none;
    padding: 0;
}
.bt-form-section {
    padding: 32px 36px;
    border-bottom: 1px solid var(--bt-gray-100);
}
.bt-form-section:last-of-type { border-bottom: none; }
.bt-section-title {
    font-size: 16px; font-weight: 700; color: var(--bt-primary);
    margin: 0 0 20px; display: flex; align-items: center; gap: 8px;
    padding-bottom: 12px; border-bottom: 2px solid var(--bt-gray-100);
}

.bt-form-row { display: flex; gap: 20px; }
.bt-form-2col > * { flex: 1; min-width: 0; }
.bt-form-3col > * { flex: 1; min-width: 0; }

.bt-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.bt-field label { font-size: 14px; font-weight: 600; color: var(--bt-gray-800); }
.req { color: var(--bt-accent); }

.bt-field input[type="text"],
.bt-field input[type="email"],
.bt-field input[type="tel"],
.bt-field input[type="url"],
.bt-field input[type="number"],
.bt-field input[type="date"],
.bt-field select,
.bt-field textarea,
.bt-modal .bt-field input,
.bt-modal .bt-field select,
.bt-modal .bt-field textarea {
    border: 1.5px solid var(--bt-border);
    border-radius: var(--bt-radius-sm);
    padding: 11px 14px;
    font-size: 15px;
    color: var(--bt-text);
    background: var(--bt-white);
    transition: border-color .2s;
    font-family: var(--bt-font);
    width: 100%;
}
.bt-field input:focus,
.bt-field select:focus,
.bt-field textarea:focus,
.bt-modal input:focus,
.bt-modal select:focus,
.bt-modal textarea:focus {
    outline: none;
    border-color: var(--bt-primary);
    box-shadow: 0 0 0 3px rgba(26,60,94,.1);
}
.bt-field textarea { resize: vertical; min-height: 120px; }

/* File upload zone */
.bt-file-upload-zone {
    border: 2px dashed var(--bt-border);
    border-radius: var(--bt-radius);
    padding: 40px 24px;
    text-align: center;
    cursor: pointer;
    transition: var(--bt-transition);
    position: relative;
}
.bt-file-upload-zone:hover,
.bt-file-upload-zone.dragging { border-color: var(--bt-primary); background: rgba(26,60,94,.03); }
.bt-file-hidden { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.bt-file-icon-big { font-size: 40px; margin-bottom: 8px; }
.bt-file-upload-title { font-size: 16px; font-weight: 600; color: var(--bt-text); margin: 0 0 4px; }
.bt-file-upload-sub { font-size: 13px; color: var(--bt-text-light); margin: 0; }
.bt-file-selected { display: flex; align-items: center; gap: 10px; justify-content: center; }
.bt-file-name-display { font-size: 14px; font-weight: 600; color: var(--bt-green); }
.bt-file-remove { background: none; border: none; cursor: pointer; color: var(--bt-accent); font-size: 16px; }

/* Simple file upload (modal) */
.bt-file-upload { position: relative; }
.bt-file-upload input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; z-index: 2; }
.bt-file-label {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    border: 2px dashed var(--bt-border); border-radius: var(--bt-radius-sm);
    padding: 12px; cursor: pointer; font-size: 14px; color: var(--bt-text-light);
    transition: var(--bt-transition);
}
.bt-file-label:hover { border-color: var(--bt-primary); color: var(--bt-primary); }

/* Radio group */
.bt-radio-group { display: flex; flex-direction: column; gap: 10px; }
.bt-radio-item { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; }
.bt-radio-item input { margin: 0; }

/* Form submit */
.bt-form-submit { padding: 32px 36px; text-align: center; background: var(--bt-gray-50); }
.bt-form-disclaimer { font-size: 12px; color: var(--bt-text-light); margin-top: 12px; }

/* Messages */
.bt-message {
    padding: 14px 18px; border-radius: var(--bt-radius-sm);
    font-size: 14px; margin: 16px 0;
}
.bt-message.success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.bt-message.error   { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }

/* ── SINGLE OFERTA ── */
.bt-oferta-single-wrap { max-width: 1100px; margin: 0 auto; padding: 40px 24px 60px; }
.bt-single-layout { display: grid; grid-template-columns: 1fr 340px; gap: 32px; align-items: start; }

.bt-single-header { display: flex; gap: 20px; margin-bottom: 20px; align-items: flex-start; }
.bt-company-logo-big {
    width: 80px; height: 80px; flex-shrink: 0;
    background: linear-gradient(135deg, var(--bt-primary), #2d6a9f);
    border-radius: 16px; display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 24px; font-weight: 800; letter-spacing: 2px;
}
.bt-single-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.bt-single-title { font-size: 28px; font-weight: 800; margin: 0 0 8px; line-height: 1.2; }
.bt-single-empresa { font-size: 16px; color: var(--bt-text-light); margin: 0; }
.bt-single-empresa a { color: var(--bt-primary); }

.bt-single-meta-bar {
    display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px;
}
.bt-meta-pill {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--bt-gray-100); padding: 6px 14px;
    border-radius: 30px; font-size: 13px; color: var(--bt-text-light);
}
.bt-meta-pill-salary { background: #f0fdf4; color: var(--bt-green); font-weight: 600; }
.bt-meta-pill-deadline { background: #fff7ed; color: #c2410c; }

.bt-single-section { margin-bottom: 32px; }
.bt-single-section h2 { font-size: 20px; font-weight: 700; margin: 0 0 14px; color: var(--bt-primary); }
.bt-single-content { font-size: 15px; line-height: 1.8; color: var(--bt-text); }
.bt-single-content ul { padding-left: 20px; }
.bt-single-content li { margin-bottom: 4px; }

.bt-single-back { margin-top: 32px; }

/* Sidebar */
.bt-sidebar-card {
    background: var(--bt-white); border: 1px solid var(--bt-border);
    border-radius: var(--bt-radius); padding: 24px; margin-bottom: 16px;
}
.bt-sidebar-apply { border-color: var(--bt-accent); border-width: 2px; }
.bt-sidebar-apply h3 { font-size: 18px; font-weight: 700; margin: 0 0 8px; }
.bt-sidebar-apply p { font-size: 14px; color: var(--bt-text-light); margin: 0 0 16px; }
.bt-sidebar-card h4 { font-size: 15px; font-weight: 700; margin: 0 0 14px; }
.bt-sidebar-card p { font-size: 14px; color: var(--bt-text-light); margin: 0 0 14px; }

.bt-info-list { list-style: none; margin: 0; padding: 0; }
.bt-info-list li { font-size: 14px; color: var(--bt-text); padding: 6px 0; border-bottom: 1px solid var(--bt-gray-100); display: flex; gap: 6px; }
.bt-info-list li:last-child { border-bottom: none; }
.bt-info-list strong { color: var(--bt-text-light); min-width: 90px; }

.bt-sidebar-cv { background: var(--bt-gray-50); }

/* ── MIS APLICACIONES ── */
.bt-mis-apps-search { background: var(--bt-white); border-radius: var(--bt-radius); padding: 28px; margin-bottom: 24px; border: 1px solid var(--bt-border); }
.bt-email-lookup { max-width: 600px; margin: 0 auto; }
.bt-input-btn-row { display: flex; gap: 10px; }
.bt-input-btn-row input { flex: 1; }

.bt-apps-list { display: flex; flex-direction: column; gap: 12px; }
.bt-apps-count { color: var(--bt-text-light); font-size: 14px; margin-bottom: 16px; }
.bt-app-card { background: var(--bt-white); border-radius: var(--bt-radius); padding: 20px 24px; border: 1px solid var(--bt-border); }
.bt-app-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; gap: 12px; }
.bt-app-title { font-size: 16px; font-weight: 700; margin: 0; }
.bt-app-status { padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 700; }
.bt-app-meta { font-size: 13px; color: var(--bt-text-light); margin-bottom: 8px; }
.bt-app-carta { background: var(--bt-gray-50); border-radius: 6px; padding: 12px; font-size: 13px; }
.bt-app-carta strong { display: block; margin-bottom: 4px; }

/* ── FORM HERO (inside wrap) ── */
.bt-form-wrap .bt-form-hero { border-radius: var(--bt-radius) var(--bt-radius) 0 0; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
    .bt-search-bar { flex-direction: column; }
    .bt-search-field { border-right: none; border-bottom: 1px solid var(--bt-border); }
    .bt-search-field:last-of-type { border-bottom: none; }
    .bt-stats-bar { flex-direction: column; align-items: flex-start; gap: 16px; }
    .bt-cta-group { margin-left: 0; }
    .bt-form-2col,
    .bt-form-3col { flex-direction: column; }
    .bt-single-layout { grid-template-columns: 1fr; }
    .bt-single-sidebar { order: -1; }
    .bt-card-actions { flex-direction: column; }
    .bt-form-section { padding: 20px; }
    .bt-form-submit { padding: 20px; }
    .bt-modal-box { padding: 24px; }
    .bt-results-wrap { padding: 20px 16px 40px; }
    .bt-hero { padding: 40px 20px 36px; }
    .bt-single-title { font-size: 22px; }
    .bt-company-logo-big { width: 60px; height: 60px; font-size: 18px; }
    .bt-input-btn-row { flex-direction: column; }
}
