/* Sistema de Instrucciones para Empleados - estilos (prefijo sie-) */
.sie-app * { margin: 0; padding: 0; box-sizing: border-box; }
.sie-app { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }
.sie-container { max-width: 1400px; margin: 0 auto; background: #fff; border-radius: 20px; box-shadow: 0 20px 60px rgba(0,0,0,0.3); overflow: hidden; }
.sie-header { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: #fff; padding: 30px; text-align: center; }
.sie-header h1 { font-size: 2.5em; margin-bottom: 10px; color: #fff; }
.sie-app .sie-language-selector select {
    height: 48px;
    padding: 0 20px;
    border-radius: 25px;
    border: none;
    font-size: 16px;
    line-height: 48px;
    box-sizing: border-box;
    cursor: pointer;
    background: #fff;
    color: #667eea;
    font-weight: bold;
    margin-top: 15px;
    vertical-align: middle;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}
.sie-app .sie-language-selector select option { color: #667eea; background: #fff; }

.sie-tabs { display: flex; background: #f8f9fa; border-bottom: 2px solid #e9ecef; flex-wrap: wrap; }
.sie-tab { flex: 1; min-width: 150px; padding: 20px; text-align: center; cursor: pointer; background: transparent; border: none; font-size: 16px; font-weight: 600; color: #6c757d; transition: all 0.3s; }
.sie-tab:hover { background: #e9ecef; }
.sie-tab.active { background: #fff; color: #667eea; border-bottom: 3px solid #667eea; }

.sie-content { padding: 30px; }
.sie-tab-content { display: none; }
.sie-tab-content.active { display: block; }

.sie-editor-container, .sie-filter-section { background: #f8f9fa; padding: 20px; border-radius: 10px; margin-bottom: 20px; }
.sie-editor-container h2 { color: #667eea; margin-bottom: 20px; }
.sie-content > .sie-tab-content > h2 { color: #667eea; margin: 30px 0 20px 0; }
.sie-filter-section h3 { margin-bottom: 15px; color: #667eea; }
.sie-hint { font-size: 13px; color: #6c757d; margin-bottom: 12px; }

.sie-toolbar { display: flex; gap: 10px; margin-bottom: 15px; flex-wrap: wrap; padding: 10px; background: #fff; border-radius: 8px; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
.sie-app .sie-toolbar button { padding: 8px 15px; border: 1px solid #dee2e6; background: #fff; color: #333; border-radius: 5px; cursor: pointer; transition: all 0.2s; font-size: 15px; line-height: 1.2; min-width: 42px; }
.sie-app .sie-toolbar button b, .sie-app .sie-toolbar button i, .sie-app .sie-toolbar button u { color: #333; }
.sie-app .sie-toolbar button:hover, .sie-app .sie-toolbar button:hover b, .sie-app .sie-toolbar button:hover i, .sie-app .sie-toolbar button:hover u { background: #667eea; color: #fff; border-color: #667eea; }
.sie-app #sieEditor { min-height: 300px; background: #fff; border: 2px solid #dee2e6; border-radius: 8px; padding: 20px; font-size: 16px; line-height: 1.6; color: #333; }
#sieEditor:focus { outline: none; border-color: #667eea; }
#sieEditor:empty:before { content: attr(data-placeholder-text); color: #adb5bd; }

.sie-form-group { margin-bottom: 20px; }
.sie-form-group label { display: block; margin-bottom: 8px; font-weight: 600; color: #495057; }
.sie-app .sie-form-group input, .sie-app .sie-form-group textarea { width: 100%; padding: 12px; border: 2px solid #dee2e6; border-radius: 8px; font-size: 16px; line-height: 1.4; transition: border-color 0.3s; background: #fff; color: #333; }
.sie-app .sie-form-group select {
    width: 100%;
    height: 50px;
    padding: 0 40px 0 14px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 16px;
    line-height: 50px;
    background: #fff;
    color: #333;
    cursor: pointer;
    box-sizing: border-box;
    vertical-align: middle;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2214%22%20height%3D%2214%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23667eea%22%20stroke-width%3D%222%22%3E%3Cpolyline%20points%3D%226%209%2012%2015%2018%209%22%3E%3C%2Fpolyline%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}
.sie-app .sie-form-group select option { color: #333; background: #fff; font-size: 16px; }
.sie-form-group input:focus, .sie-form-group select:focus, .sie-form-group textarea:focus { outline: none; border-color: #667eea; }
.sie-app .sie-form-group input::placeholder, .sie-app .sie-form-group textarea::placeholder { color: #adb5bd; opacity: 1; }
.sie-filter-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 15px; }

.sie-app .sie-btn { padding: 12px 30px; border: none; border-radius: 8px; font-size: 16px; font-weight: 600; cursor: pointer; transition: all 0.3s; color: #fff; line-height: 1.3; }
.sie-app .sie-btn:hover { color: #fff; }
.sie-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.sie-btn-primary { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.sie-btn-success { background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%); }
.sie-btn-danger { background: linear-gradient(135deg, #eb3349 0%, #f45c43 100%); }
.sie-btn-info { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); }
.sie-btn-small { padding: 6px 12px; font-size: 13px; }
.sie-btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 15px; }

.sie-instructions-grid, .sie-jobs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); gap: 20px; margin-top: 20px; }
.sie-instruction-card, .sie-job-card { background: #fff; border-radius: 12px; padding: 20px; box-shadow: 0 4px 15px rgba(0,0,0,0.1); transition: all 0.3s; border-left: 4px solid #667eea; }
.sie-job-card { border-left-color: #11998e; }
.sie-instruction-card:hover, .sie-job-card:hover { transform: translateY(-5px); box-shadow: 0 8px 25px rgba(0,0,0,0.15); }
.sie-instruction-title, .sie-job-title { font-size: 1.3em; font-weight: 700; color: #333; margin-bottom: 10px; }
.sie-job-description { color: #666; line-height: 1.6; margin-bottom: 10px; }
.sie-job-date { color: #999; font-size: 14px; margin-bottom: 10px; }
.sie-instruction-meta { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 15px; }

.sie-badge { padding: 5px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; display: inline-block; }
.sie-badge-category { background: #e3f2fd; color: #1976d2; }
.sie-badge-job { background: #f3e5f5; color: #7b1fa2; }
.sie-badge-priority-low { background: #e8f5e9; color: #2e7d32; }
.sie-badge-priority-medium { background: #fff3e0; color: #f57c00; }
.sie-badge-priority-high { background: #ffebee; color: #c62828; }
.sie-badge-priority-urgent { background: #fce4ec; color: #ad1457; }

.sie-instruction-content { color: #666; line-height: 1.6; margin-bottom: 15px; }
.sie-instruction-footer { display: flex; justify-content: space-between; align-items: center; padding-top: 15px; border-top: 1px solid #eee; }
.sie-instruction-date { color: #999; font-size: 14px; }

.sie-group-header { background: #e9ecef; padding: 15px 20px; border-radius: 10px; margin: 30px 0 15px 0; border-left: 5px solid #764ba2; display: flex; justify-content: space-between; align-items: center; }
.sie-group-title { font-size: 1.4em; font-weight: 700; color: #495057; }
.sie-group-desc { font-size: 13px; color: #6c757d; margin-top: 4px; font-weight: 400; }
.sie-group-count { background: #764ba2; color: #fff; padding: 5px 15px; border-radius: 20px; font-size: 14px; white-space: nowrap; }
.sie-instruction-jobdesc { font-size: 12.5px; color: #6c757d; background: #f8f9fa; border-radius: 6px; padding: 8px 10px; margin-bottom: 12px; }
.sie-instruction-jobdesc strong { color: #7b1fa2; }
.sie-job-desc-box { font-size: 13px; color: #555; background: #f3e5f5; border-left: 3px solid #7b1fa2; border-radius: 6px; padding: 10px 12px; margin-top: 12px; }
.sie-job-desc-box strong { color: #7b1fa2; }

.sie-modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 99999; justify-content: center; align-items: center; }
.sie-modal.open { display: flex; }
.sie-modal-content { background: #fff; padding: 30px; border-radius: 15px; max-width: 600px; width: 90%; max-height: 80vh; overflow-y: auto; }
.sie-modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.sie-modal-header h2 { color: #333; }
.sie-close-modal { font-size: 28px; cursor: pointer; color: #999; }

.sie-notification { position: fixed; top: 20px; right: 20px; padding: 15px 25px; background: #38ef7d; color: #fff; border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.2); display: none; z-index: 100000; }
.sie-notification.show { display: block; }

.sie-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-bottom: 30px; }
.sie-stat-card { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: #fff; padding: 25px; border-radius: 12px; text-align: center; }
.sie-stat-number { font-size: 2.5em; font-weight: 700; margin-bottom: 10px; }

.sie-view-responses-btn { margin-top: 10px; padding: 8px 16px; background: #667eea; color: #fff; border: none; border-radius: 6px; cursor: pointer; font-size: 14px; }
.sie-response-item { background: #f8f9fa; padding: 12px; border-radius: 8px; margin-bottom: 10px; border-left: 3px solid #667eea; }
.sie-response-header { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 14px; flex-wrap: wrap; gap: 5px; }
.sie-response-employee { font-weight: 600; color: #667eea; }
.sie-empty-state { text-align: center; padding: 60px 20px; color: #999; }
.sie-empty-state-icon { font-size: 4em; margin-bottom: 20px; }

@media (max-width: 768px) {
    .sie-tabs { flex-direction: column; }
    .sie-instructions-grid, .sie-jobs-grid { grid-template-columns: 1fr; }
}

/* ---------- LOGIN DE EMPLEADO ---------- */
.sie-login { display:flex; justify-content:center; align-items:center; min-height:60vh; padding:20px; }
.sie-login-box { background:#fff; border-radius:20px; box-shadow:0 20px 60px rgba(102,126,234,0.25); max-width:420px; width:100%; overflow:hidden; position:relative; }
.sie-login-header { background:linear-gradient(135deg,#667eea 0%,#764ba2 100%); color:#fff; padding:30px 24px; text-align:center; }
.sie-login-header h1 { font-size:20px; font-weight:800; color:#fff; margin-bottom:6px; }
.sie-login-header p { font-size:13px; opacity:0.92; margin:0; }
.sie-login-body { padding:28px 24px; }
.sie-app .sie-login-body input { width:100%; padding:14px; border:2px solid #dee2e6; border-radius:10px; font-size:18px; color:#333; text-align:center; letter-spacing:3px; }
.sie-app .sie-login-body input:focus { outline:none; border-color:#667eea; }
.sie-login-admin-hint { font-size:12px; color:#9a9aaa; text-align:center; margin:16px 0 0; }
.sie-login-lang { text-align:center; padding:0 24px 22px; }
.sie-app .sie-login-lang select { padding:8px 16px; border-radius:20px; border:2px solid #e6e3f0; background:#fff; color:#667eea; font-weight:600; font-size:14px; cursor:pointer; }

/* ---------- BOTÓN CERRAR SESIÓN ---------- */
.sie-logout-wrap { margin-top:12px; display:flex; gap:10px; justify-content:center; flex-wrap:wrap; }
.sie-logout-btn { background:rgba(255,255,255,0.2); border:1px solid rgba(255,255,255,0.4); color:#fff; padding:7px 18px; border-radius:20px; font-size:13px; font-weight:600; cursor:pointer; transition:background 0.2s; }
.sie-logout-btn:hover { background:rgba(255,255,255,0.32); }
.sie-sound-btn { background:rgba(255,255,255,0.2); border:1px solid rgba(255,255,255,0.4); color:#fff; padding:7px 18px; border-radius:20px; font-size:13px; font-weight:600; cursor:pointer; transition:background 0.2s; }
.sie-sound-btn:hover { background:rgba(255,255,255,0.32); }
.sie-sound-btn.active { background:#38ef7d; border-color:#38ef7d; color:#0b3d2e; }
.sie-install-btn { background:#fff; border:2px solid #667eea; color:#667eea; padding:7px 18px; border-radius:20px; font-size:13px; font-weight:700; cursor:pointer; transition:all 0.2s; }
.sie-install-btn:hover { background:#667eea; color:#fff; }

/* ---------- BANNER DE ALERTA ---------- */
.sie-alert-banner {
    display:none;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    background:linear-gradient(135deg,#eb3349,#f45c43);
    color:#fff;
    padding:14px 18px;
    font-weight:700;
    font-size:15px;
    animation: siePulse 1s ease-in-out infinite;
}
.sie-alert-banner.show { display:flex; }
.sie-alert-banner button {
    background:#fff; color:#c62828; border:none; border-radius:20px;
    padding:7px 18px; font-weight:700; font-size:13px; cursor:pointer; white-space:nowrap;
}
@keyframes siePulse {
    0%,100% { opacity:1; }
    50% { opacity:0.72; }
}

/* ---------- FOTO EN RESPUESTAS ---------- */
.sie-photo-controls { display:flex; gap:10px; flex-wrap:wrap; align-items:center; }
.sie-photo-preview { margin-top:12px; }
.sie-photo-preview img { max-width:100%; max-height:260px; border-radius:10px; border:2px solid #e6e3f0; display:block; }
.sie-response-photo { margin-top:10px; }
.sie-response-photo img { max-width:100%; max-height:220px; border-radius:8px; border:1px solid #e6e3f0; cursor:pointer; display:block; }
.sie-modal-photo { margin-top:10px; }
.sie-modal-photo img { max-width:100%; max-height:300px; border-radius:10px; border:1px solid #e6e3f0; display:block; }

/* ---------- GRUPOS ---------- */
.sie-group-gate { padding: 20px; }
.sie-group-gate-box { max-width: 420px; margin: 20px auto; background: #fff; border-radius: 14px; padding: 24px; box-shadow: 0 8px 30px rgba(0,0,0,0.12); }
.sie-group-gate-box h2 { margin: 0 0 16px; color: #667eea; text-align: center; }
.sie-group-gate-info { background: #f3e5f5; border-left: 3px solid #7b1fa2; border-radius: 8px; padding: 10px 12px; margin-bottom: 14px; font-weight: 600; color: #7b1fa2; }
.sie-group-card { background: #fff; border: 1px solid #e6e3f0; border-radius: 12px; padding: 16px; margin-bottom: 14px; }
.sie-group-card-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.sie-group-card-title { font-size: 1.15em; font-weight: 700; color: #495057; }
.sie-group-badge { background: #667eea; color: #fff; padding: 3px 12px; border-radius: 20px; font-size: 13px; font-weight: 700; }
.sie-group-emps { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.sie-emp-chip { background: #f3e5f5; color: #7b1fa2; border-radius: 16px; padding: 4px 10px; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }
.sie-emp-chip button { background: none; border: none; color: #c62828; cursor: pointer; font-weight: 700; font-size: 15px; line-height: 1; padding: 0; }
.sie-group-addemp { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; }
.sie-group-addemp .sie-form-group { flex: 1; min-width: 160px; margin: 0; }

/* ---------- MÚLTIPLES FOTOS ---------- */
.sie-photos-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.sie-photo-item { width: 120px; height: 120px; object-fit: cover; border-radius: 8px; border: 1px solid #e6e3f0; cursor: pointer; }
.sie-photo-preview { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.sie-photo-thumb { position: relative; width: 90px; height: 90px; }
.sie-photo-thumb img { width: 90px; height: 90px; object-fit: cover; border-radius: 8px; border: 2px solid #e6e3f0; }
.sie-photo-thumb-x { position: absolute; top: -8px; right: -8px; width: 24px; height: 24px; border-radius: 50%; background: #eb3349; color: #fff; border: 2px solid #fff; cursor: pointer; font-size: 12px; line-height: 1; padding: 0; display: flex; align-items: center; justify-content: center; }

/* ---------- TRABAJO COMO MENSAJE PRINCIPAL ---------- */
.sie-job-block { margin-bottom: 28px; }
.sie-job-main-message { background: #f8f9ff; border: 1px solid #e6e3f0; border-left: 4px solid #667eea; border-radius: 10px; padding: 16px; margin: 12px 0; }
.sie-job-main-label { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: #667eea; font-weight: 700; margin-bottom: 6px; }
.sie-job-main-text { font-size: 15px; color: #333; line-height: 1.5; white-space: pre-wrap; }

/* ---------- INDICADOR DE GRUPO EN EL ENCABEZADO ---------- */
.sie-group-badge-header { display: inline-block; background: rgba(255,255,255,0.2); color: #fff; border: 1px solid rgba(255,255,255,0.4); border-radius: 20px; padding: 6px 16px; font-size: 14px; font-weight: 600; margin: 8px auto 0; }
.sie-group-badge-header .sie-gb-emp { opacity: 0.85; font-weight: 400; }

/* ---------- SECCIÓN DE INSTRUCCIÓN EN CREAR TRABAJO ---------- */
.sie-job-instr-section { margin-top: 20px; padding-top: 16px; border-top: 2px dashed #e6e3f0; }
.sie-job-instr-section h3 { margin: 0 0 4px; color: #667eea; font-size: 16px; }
