/* =========================================================
   ESTILOS GLOBALES - pc_lerning
   Hoja de estilos unica para todas las vistas (admin, usuario,
   franquiciatario y paginas publicas). Generado a partir de los
   bloques <style> que estaban repetidos en cada .php, tomando
   la version mas usada de cada regla como version canonica.
   ========================================================= */

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

body { background: #f0d5e8; font-family: "Poppins", sans-serif; min-height: 100vh; padding-top: 100px; }

.top-header { position: fixed; top: 0; left: 0; right: 0; background: linear-gradient(135deg, #b893cc, #f5a3c7); box-shadow: 0 2px 10px rgba(0,0,0,0.15); z-index: 1000; padding: 20px 0; margin: 15px; border-radius: 20px; }

.top-header .container-fluid { display: grid; grid-template-columns: 1fr minmax(0, auto) 1fr; align-items: center; padding: 0 30px; gap: 15px; }

.top-header h2 { grid-column: 2; justify-self: center; min-width: 0; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: white; font-weight: 600; margin: 0; font-size: 1.5rem; }

.user-info { grid-column: 3; justify-self: end; display: flex; align-items: center; gap: 15px; }

.btn-logout { background: white; border: none; color: #9b7cb8; font-weight: 500; border-radius: 25px; padding: 8px 20px; transition: 0.3s; text-decoration: none; display: inline-block; }

.btn-logout:hover { background: #f8f9fa; transform: translateY(-2px); box-shadow: 0 5px 15px rgba(0,0,0,0.2); color: #9b7cb8; }

.container { max-width: 1200px; padding: 20px 15px; }

.card { border: none; border-radius: 15px; box-shadow: 0 2px 10px rgba(0,0,0,0.1); background: white; }

.form-control, .form-select { border-radius: 25px; padding: 10px 20px; border: 1px solid #ddd; }

.btn-primary { background: linear-gradient(135deg, #f5a3c7, #9b7cb8); border: none; color: white; font-weight: 500; border-radius: 25px; padding: 10px 25px; transition: 0.3s; }

.btn-primary:hover { background: linear-gradient(135deg, #9b7cb8, #f5a3c7); transform: translateY(-2px); box-shadow: 0 5px 15px rgba(155, 124, 184, 0.3); }

.table { border-radius: 15px; overflow: hidden; }

.table thead { background: linear-gradient(135deg, #f5a3c7, #9b7cb8); color: white; }

.table thead th { border: none; padding: 15px; font-weight: 600; }

.table tbody td { padding: 12px 15px; vertical-align: middle; }

.table tbody tr { transition: 0.3s; }

.table tbody tr:hover { background: rgba(155, 124, 184, 0.05); }

.alert { border-radius: 15px; border: none; }

.modal-content { border-radius: 20px; border: none; }

.modal-header { background: linear-gradient(135deg, #f5a3c7, #9b7cb8); color: white; border-radius: 20px 20px 0 0; }

.badge { background: linear-gradient(135deg, #f5a3c7, #9b7cb8); font-weight: 500; padding: 8px 15px; border-radius: 20px; }

.empty-state { text-align: center; padding: 60px 20px; color: #9b7cb8; }

.empty-state .icon { font-size: 80px; opacity: 0.3; }

.btn-volver { background: white; border: none; color: #9b7cb8; font-weight: 500; border-radius: 25px; padding: 8px 20px; transition: 0.3s; text-decoration: none; display: inline-block; }

.btn-volver:hover { background: #f8f9fa; transform: translateY(-2px); box-shadow: 0 5px 15px rgba(0,0,0,0.2); color: #9b7cb8; }

.pregunta-card { background: linear-gradient(135deg, rgba(245, 163, 199, 0.1), rgba(155, 124, 184, 0.1)); border: 1px solid #f0e4f3; border-radius: 12px; padding: 15px; margin-bottom: 12px; transition: all 0.2s ease; word-wrap: break-word; }

.pregunta-card:hover { transform: translateX(5px); box-shadow: 0 2px 8px rgba(155, 124, 184, 0.2); }

.swal2-popup { border-radius: 20px !important; font-family: "Poppins", sans-serif !important; padding: 30px !important; background: #ffffff !important; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2) !important; max-width: 900px !important; }

.swal2-title { color: #9b7cb8 !important; font-weight: 700 !important; font-size: 1.8rem !important; margin-bottom: 20px !important; }

.swal2-html-container { color: #666 !important; font-size: 1rem !important; font-weight: 500 !important; max-height: 500px !important; overflow-y: auto !important; }

.swal2-confirm { background: linear-gradient(135deg, #f5a3c7, #9b7cb8) !important; border: none !important; border-radius: 25px !important; padding: 12px 35px !important; font-weight: 600 !important; }

.swal2-confirm:hover { background: linear-gradient(135deg, #9b7cb8, #f5a3c7) !important; transform: translateY(-2px) !important; box-shadow: 0 6px 20px rgba(155, 124, 184, 0.5) !important; }

.swal2-cancel { background: white !important; border: 2px solid #9b7cb8 !important; border-radius: 25px !important; padding: 12px 35px !important; font-weight: 600 !important; font-size: 1rem !important; color: #9b7cb8 !important; transition: all 0.3s ease !important; }

.swal2-cancel:hover { background: #f8f9fa !important; transform: translateY(-2px) !important; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important; }

.swal2-input, .swal2-textarea { border-radius: 15px !important; border: 2px solid #ddd !important; padding: 12px 20px !important; font-family: "Poppins", sans-serif !important; font-size: 1rem !important; transition: all 0.3s ease !important; }

.swal2-input:focus, .swal2-textarea:focus { border-color: #9b7cb8 !important; box-shadow: 0 0 0 4px rgba(155, 124, 184, 0.15) !important; outline: none !important; }

.header-right { grid-column: 3; justify-self: end; display: flex; align-items: center; gap: 15px; }

.user-section { display: flex; align-items: center; gap: 10px; position: relative; }

.user-toggle { background: rgba(255, 255, 255, 0.2); border: 2px solid white; color: white; font-weight: 500; border-radius: 25px; padding: 8px 20px; transition: 0.3s; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }

.user-toggle:hover { background: white; color: #9b7cb8; transform: translateY(-2px); box-shadow: 0 5px 15px rgba(0,0,0,0.2); }

.user-dropdown { position: absolute; top: 100%; right: 0; margin-top: 10px; background: white; border-radius: 15px; box-shadow: 0 5px 20px rgba(155, 124, 184, 0.3); min-width: 200px; padding: 10px; z-index: 10000; display: none; }

.user-dropdown.show { display: block; }

.user-dropdown-item { padding: 12px 20px; transition: 0.3s; border-radius: 10px; margin-bottom: 5px; font-weight: 500; display: flex; align-items: center; gap: 10px; text-decoration: none; color: #dc3545; cursor: pointer; background: linear-gradient(135deg, rgba(220, 53, 69, 0.05), rgba(245, 163, 199, 0.1)); }

.user-dropdown-item:hover { background: #f8f9fa; }

.form-control { border: 2px solid #f0e4f3; border-radius: 12px; padding: 12px 16px; font-size: 0.95rem; transition: border-color 0.2s; }

.form-control:focus { border-color: #9b7cb8; box-shadow: 0 0 0 0.2rem rgba(155, 124, 184, 0.25); }

.area-card .card { cursor: pointer; transition: all 0.3s ease; height: 100%; position: relative; }

.area-card .dropdown { position: absolute; top: 10px; right: 10px; }
.area-card .dropdown-toggle { background: none; border: none; box-shadow: none; width: 30px; height: 30px; border-radius: 50%; color: #a89ab8; font-size: 1.2rem; line-height: 1; display: flex; align-items: center; justify-content: center; transition: background 0.15s, color 0.15s; }
.area-card .dropdown-toggle:hover, .area-card .dropdown-toggle:focus { background: rgba(155,124,184,0.15); color: #9b7cb8; box-shadow: none; }
.area-card .dropdown-toggle::after { display: none; }
.area-card .dropdown-menu { border-radius: 12px; border: 1px solid #ece5f7; box-shadow: 0 6px 24px rgba(90,60,130,0.15); padding: 6px; z-index: 1055; }
.area-card .dropdown-menu .dropdown-item { border-radius: 8px; font-size: 0.85rem; padding: 8px 12px; }
.area-card .dropdown-menu .dropdown-item i { width: 16px; margin-right: 6px; }

.area-card .card:hover { transform:translateY(-5px); box-shadow:0 5px 20px rgba(155,124,184,0.3); }

.folder-icon { font-size: 4rem; margin: 20px 0 10px 0; }

.area-card h5 { color: #9b7cb8; font-weight: 600; margin-bottom: 20px; word-break: break-word; }

.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 10px; }

.section-header h4 { color: #9b7cb8; font-weight: 600; margin: 0; }

.area-badge { background: linear-gradient(135deg, rgba(245, 163, 199, 0.2), rgba(155, 124, 184, 0.2)); color: #9b7cb8; padding: 5px 12px; border-radius: 15px; font-size: 0.85rem; font-weight: 500; display: inline-block; }

.btn-primary-custom { background: linear-gradient(135deg, #f5a3c7, #9b7cb8); color: white; border: none; border-radius: 12px; padding: 13px; font-weight: 600; font-size: 1rem; width: 100%; cursor: pointer; transition: all 0.3s; }

.btn-primary-custom:hover { transform: translateY(-2px); box-shadow: 0 5px 20px rgba(155,124,184,0.4); }

.modulo-header { background: linear-gradient(135deg, #f5a3c7, #9b7cb8); color: white; padding: 25px 30px; }

.empty-state p { color: #aaa; margin-bottom: 25px; }

.cuestionario-header { text-align:center; margin-bottom:30px; padding:22px; background:linear-gradient(135deg,rgba(245,163,199,0.15),rgba(155,124,184,0.15)); border-radius:15px; }

.cuestionario-header h4 { color:#9b7cb8; font-weight:700; margin-bottom:8px; }

.cuestionario-header p { color:#888; margin:0; font-size:0.95rem; }

.pregunta-card h5 { color:#5c3e7a; font-weight:600; margin-bottom:18px; font-size:1.05rem; line-height:1.5; }

.form-check { padding:12px 15px; border-radius:12px; transition:0.2s; margin-bottom:10px; background:white; border:2px solid #f0e4f3; cursor:pointer; }

.form-check:hover { background:rgba(155,124,184,0.08); border-color:#d0b0e8; transform:translateX(4px); }

.form-check-input { cursor:pointer; width:20px; height:20px; }

.file-upload-container { background:white; padding:20px; border-radius:12px; border:2px solid #f0e4f3; margin-top:10px; }

.file-name-preview { margin-top:10px; padding:10px 14px; background:rgba(155,124,184,0.1); border-radius:10px; border-left:4px solid #9b7cb8; font-size:0.9rem; display:none; color:#555; }

.btn-enviar { background:linear-gradient(135deg,#f5a3c7,#9b7cb8); border:none; color:white; font-weight:700; border-radius:25px; padding:14px 50px; font-size:1.1rem; transition:0.3s; box-shadow:0 4px 15px rgba(155,124,184,0.35); }

.btn-enviar:hover { background:linear-gradient(135deg,#9b7cb8,#f5a3c7); transform:translateY(-2px); box-shadow:0 6px 20px rgba(155,124,184,0.45); color:white; }

@media (max-width: 768px) {
  body { padding-top: 140px; }
  .top-header { margin: 10px; padding: 10px 0; border-radius: 15px; }
  .top-header h2 { font-size: 1.1rem; text-align: center; width: 100%; }
  .top-header .container-fluid { display: flex; flex-direction: column; padding: 0 15px; gap: 10px; }
  .user-info { justify-content: center; width: 100%; }
  .btn-logout { padding: 6px 12px; font-size: 0.8rem; }
  .container { padding: 15px 10px; }
  .card { padding: 15px !important; border-radius: 12px; }
  .table { font-size: 0.75rem; min-width: 650px; }
  .table thead th { padding: 8px 5px; font-size: 0.75rem; }
  .table tbody td { padding: 8px 5px; font-size: 0.75rem; }
  .badge { font-size: 0.75rem; padding: 5px 10px; }
  .empty-state .icon { font-size: 60px; }
  .btn-volver { padding: 6px 15px; font-size: 0.9rem; }
  .area-card h5 { font-size: 1rem; }
  .folder-icon { font-size: 3rem; margin: 15px 0 8px 0; }
  .header-right { justify-content: center; width: 100%; margin-left: 0; gap: 10px; }
  .user-toggle { padding: 6px 12px; font-size: 0.8rem; gap: 5px; }
  .area-card .card { padding: 15px !important; border-radius: 12px; }
  .btn-volver, .user-toggle { padding: 6px 15px; font-size: 0.9rem; }
  .user-dropdown { right: auto; left: 50%; transform: translateX(-50%); min-width: 180px; }
  .top-header h2 i { font-size: 1rem; }
  .user-dropdown-item { padding: 10px 15px; font-size: 0.85rem; gap: 8px; }
}

@media (max-width: 992px) {
  .table thead th, .table tbody td { font-size: 0.85rem; padding: 10px 8px; }
  .top-header h2 { font-size: 1.3rem; }
  .header-right { gap: 12px; }
  .user-toggle { padding: 6px 15px; font-size: 0.9rem; }
  .folder-icon { font-size: 3.5rem; }
}

@media (max-width: 576px) {
  body { padding-top: 150px; }
  .top-header h2 { font-size: 1rem; }
  .btn-logout { font-size: 0.75rem; padding: 5px 10px; }
  .table { min-width: 650px; font-size: 0.7rem; }
  .table thead th, .table tbody td { padding: 6px 4px; }
  .top-header { margin: 8px; padding: 12px 0; }
  .top-header .container-fluid { padding: 0 10px; }
  .btn-volver { width: 100%; justify-content: center; padding: 8px 15px; font-size: 0.85rem; }
  .container { padding: 10px 8px; }
  .swal2-popup { padding: 15px !important; width: 95% !important; }
  .swal2-title { font-size: 1.2rem !important; }
  .swal2-confirm, .swal2-cancel { padding: 10px 25px !important; font-size: 0.9rem !important; }
  .top-header h2 i { font-size: 0.9rem; }
  .area-card h5 { font-size: 0.9rem; margin-bottom: 10px; }
  .folder-icon { font-size: 2.5rem; margin: 10px 0 5px 0; }
  .user-dropdown-item { padding: 8px 12px; font-size: 0.8rem; }
  .header-right { flex-direction: column; width: 100%; }
  .user-toggle { font-size: 0.75rem; padding: 5px 10px; }
  .user-dropdown { min-width: 160px; }
  .area-card .card { padding: 12px !important; }
  .badge { padding: 6px 12px; font-size: 0.8rem; }
  .alert { padding: 10px; font-size: 0.8rem; }
  .user-toggle i:last-child { display: none; }
}

@media (max-width: 768px) and (orientation: landscape) {
  body { padding-top: 100px; }
  .top-header { padding: 8px 0; }
  .top-header .container-fluid { display: grid; grid-template-columns: 1fr minmax(0, auto) 1fr; }
  .top-header h2 { font-size: 1rem; width: auto; }
  .header-right { width: auto; }
  .user-dropdown { right: 0; left: auto; transform: none; }
}

@media print {
  body { padding-top: 0; }
}

@media (max-height: 500px) and (orientation: landscape) {
  body { padding-top: 100px; }
  .top-header { padding: 10px 0; }
}

@media (min-width: 1400px) {
  .container { max-width: 1320px; }
}

@media (max-width: 400px) {
  body { padding-top: 160px; }
  .top-header { margin: 8px; }
  .top-header h2 { font-size: 0.95rem; }
  .btn-volver, .user-toggle { font-size: 0.7rem; padding: 5px 8px; }
}

@media (hover: hover) and (pointer: fine) {
  .user-toggle:hover { background: rgba(255, 255, 255, 0.3); }
  .user-dropdown-item:hover { background: #f8f9fa; }
  .btn-volver:hover { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(0,0,0,0.2); }
}
