/* ========================================
   Ticket Estudiante - Vista Moderna
   ======================================== */

:root {
  --primary-color: #4ab7d8;
  --primary-dark: #2a297e;
  --primary-blue-index: #6994bd;
  --primary-dark-index: #2c3f51;
  --secondary-color: #7cafdf;
  --success-color: #239954;
  --success-green-index: #2ecc71;
  --danger-color: #e74c3c;
  --danger-red-index: #e74c3c;
  --warning-color: #f39c12;
  --warning-orange-index: #f39c12;
  --info-color: #3498db;
  --info-blue-index: #3498db;
  --light-bg: #f8fafc;
  --card-bg: #ffffff;
  --card-bg-index: #ffffff;
  --text-primary: #1e293b;
  --text-primary-index: #1e293b;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-muted-index: #64748b;
  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
  --shadow-lg-index: 0 10px 25px rgba(0, 0, 0, 0.15);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-md-index: 12px;
  --radius-lg: 16px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   Container Principal
   ======================================== */
.ticket-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.ticket-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* ========================================
   Header
   ======================================== */
.ticket-header {
  text-align: center;
  margin-bottom: 1rem;
}

.ticket-header h1 {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.ticket-header h1 i {
  color: var(--primary-color);
}

.ticket-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin: 0;
}

/* ========================================
   Info Alert
   ======================================== */
.info-alert {
  background: linear-gradient(135deg, #e3f2fd 0%, #f0f9ff 100%);
  border-left: 4px solid var(--info-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
}

.info-alert-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  background: var(--info-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.25rem;
}

.info-alert-content h4 {
  margin: 0 0 0.75rem 0;
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 600;
}

.info-alert-content ol {
  margin: 0;
  padding-left: 1.5rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

.info-alert-content li {
  margin-bottom: 0.5rem;
}

.info-alert-content strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* ========================================
   Requisitos y consideraciones
   ======================================== */
.requisitos-section {
  background: linear-gradient(135deg, #f8f9fa 0%, #fff9e6 100%);
  border-left: 4px solid var(--warning-orange-index);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
}

.requisitos-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  background: var(--warning-orange-index);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.25rem;
}

.requisitos-content h4 {
  margin: 0 0 0.75rem 0;
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 600;
}

.requisitos-content ul {
  margin: 0;
  padding-left: 1.5rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

.requisitos-content li {
  margin-bottom: 0.5rem;
}

.requisitos-content strong {
  color: var(--text-primary);
  font-weight: 600;
}

.requisitos-content a {
  color: var(--primary-dark-index);
  font-weight: 600;
  text-decoration: underline;
}

.requisitos-content a:hover {
  color: var(--primary-blue-index);
}

/* ========================================
   Step Cards
   ======================================== */
.step-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: var(--transition);
  border: 1px solid var(--border-color);
}

.step-card:hover {
  box-shadow: var(--shadow-lg);
}

.step-header {
  background: linear-gradient(
    135deg,
    var(--primary-blue-index) 0%,
    var(--primary-dark-index) 100%
  );
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  color: white;
}

.step-number {
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.step-title h3 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
}

.step-title p {
  margin: 0.25rem 0 0 0;
  font-size: 0.95rem;
  opacity: 0.9;
}

.step-content {
  padding: 2rem;
}

/* ========================================
   Form Elements
   ======================================== */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: flex;
  align-items: center;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  font-size: 1rem;
}

.form-group label i {
  color: var(--primary-color);
  margin-right: 0.5rem;
}

.form-group .required {
  color: var(--danger-color);
  margin-left: 0.25rem;
}

.form-control,
.form-select {
  width: 100%;
  padding: 0.875rem 1rem;
  font-size: 1rem;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-sm);
  transition: var(--transition);
  background: var(--card-bg);
  color: var(--text-primary);
}

.form-control:focus,
.form-select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(74, 183, 216, 0.1);
}

.form-control::placeholder {
  color: var(--text-muted);
}

.form-text {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

textarea.form-control {
  min-height: 120px;
  resize: vertical;
  font-family: inherit;
}

/* ========================================
   Search Student
   ======================================== */
.input-group-search {
  display: flex;
  gap: 0.75rem;
}

.input-group-search .form-control {
  flex: 1;
}

.btn-search {
  padding: 0.875rem 1.5rem;
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--primary-dark-index) 100%
  );
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  display: flex;
  align-items: center;
}

.btn-search:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-search:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* ========================================
   Estudiante Info Card
   ======================================== */
.estudiante-info-card {
  margin-top: 1.5rem;
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
  border: 2px solid var(--success-color);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.estudiante-info-header {
  background: var(--success-color);
  color: white;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
}

.estudiante-info-header i {
  font-size: 1.25rem;
}

.estudiante-info-body {
  padding: 1.5rem;
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(46, 204, 113, 0.2);
  gap: 1rem;
}

.info-row:last-child {
  border-bottom: none;
}

.info-row.input-row {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}

.info-label {
  font-weight: 600;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.info-row.input-row .info-label {
  width: 100%;
}

.input-value {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  border: 2px solid rgba(46, 204, 113, 0.3);
  border-radius: var(--radius-sm);
  transition: var(--transition);
  background: rgba(255, 255, 255, 0.8);
  color: var(--text-primary);
  font-weight: 500;
}

.input-value:focus {
  outline: none;
  border-color: var(--success-color);
  background: white;
  box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.15);
}

.input-value::placeholder {
  color: var(--text-muted);
  font-weight: 400;
}

.info-value {
  color: var(--text-primary);
  font-weight: 500;
  text-align: right;
}

/* ========================================
   Plantilla Info Card
   ======================================== */
.plantilla-info-card {
  background: linear-gradient(
    135deg,
    rgba(118, 160, 209, 0.3) 0%,
    rgba(8, 49, 138, 0.3) 100%
  );
  border: 2px solid var(--primary-dark-index);
  border-radius: var(--radius-md);
  margin-bottom: 2rem;
  overflow: hidden;
}

.plantilla-info-header {
  background: var(--primary-dark-index);
  color: white;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.plantilla-info-header i {
  font-size: 1.25rem;
}

.plantilla-info-header h4 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
}

.plantilla-info-body {
  padding: 1.5rem;
}

.plantilla-categoria {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.plantilla-categoria i {
  color: var(--primary-dark-index);
}

.plantilla-contenido {
  color: var(--text-primary);
  line-height: 1.7;
  white-space: pre-wrap;
}

/* ========================================
   File Upload
   ======================================== */
.file-upload-area {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: 2.5rem 2rem;
  text-align: center;
  background: var(--light-bg);
  transition: var(--transition);
  cursor: pointer;
}

.file-upload-area:hover {
  border-color: var(--primary-color);
  background: #f1f5f9;
}

.file-upload-area.dragover {
  border-color: var(--primary-color);
  background: #e3f2fd;
  transform: scale(1.02);
}

.file-upload-area i {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
  display: block;
}

.file-upload-area p {
  margin: 0.5rem 0;
  color: var(--text-secondary);
}

.file-upload-area p strong {
  color: var(--text-primary);
}

.file-upload-area input[type="file"] {
  display: none;
}

.file-preview-container {
  margin-top: 1rem;
  display: none;
}

.file-preview-container.show {
  display: block;
}

.file-preview-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  background: var(--light-bg);
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.file-preview-item:hover {
  background: #f1f5f9;
}

.file-preview-item i.fa-file {
  color: var(--primary-color);
  font-size: 1.25rem;
}

.file-preview-item span {
  flex: 1;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.file-preview-item .file-size {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.file-preview-item .remove-file {
  color: var(--danger-color);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.file-preview-item .remove-file:hover {
  background: var(--danger-color);
  color: white;
}

/* ========================================
   Submit Button
   ======================================== */
.btn-submit {
  width: 100%;
  padding: 1rem 2rem;
  font-size: 1.1rem;
  font-weight: 600;
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--primary-dark-index) 100%
  );
  color: white;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
}

.btn-submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* ========================================
   Error Messages
   ======================================== */
.error-message {
  color: var(--danger-color);
  font-size: 0.875rem;
  margin-top: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: #fee2e2;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--danger-color);
}

.field-validation-error {
  color: var(--danger-color);
  font-size: 0.875rem;
  margin-top: 0.5rem;
  display: block;
}

.validation-summary {
  background: #fee2e2;
  color: #991b1b;
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  border: 1px solid #fecaca;
}

.validation-summary ul {
  margin: 0;
  padding-left: 1.5rem;
}

/* ========================================
   Modal Success
   ======================================== */
/* ========================================
   Modal Success
   ======================================== */
.modal-success-content {
  border: none;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-success {
  text-align: center;
  padding: 3rem 2.5rem;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  position: relative;
}

.modal-success-icon-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.modal-success-icon-bg {
  position: absolute;
  width: 120px;
  height: 120px;
  background: linear-gradient(
    135deg,
    rgba(46, 204, 113, 0.1) 0%,
    rgba(39, 174, 96, 0.2) 100%
  );
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

.modal-success-icon-wrapper i {
  position: relative;
  font-size: 5rem;
  color: var(--success-color);
  z-index: 1;
  animation: scaleIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.7;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.4;
  }
}

@keyframes scaleIn {
  from {
    transform: scale(0);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.modal-success h3 {
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
}

.modal-success-code-section {
  margin: 2rem 0;
  padding: 1.5rem;
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
  border-radius: var(--radius-md);
  border: 2px solid rgba(46, 204, 113, 0.2);
}

.modal-success-code-label {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
  font-weight: 500;
}

.modal-success .ticket-code {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  background: white;
  padding: 1rem 2rem;
  border-radius: var(--radius-md);
  border: 2px solid var(--primary-color);
  box-shadow: 0 4px 12px rgba(74, 183, 216, 0.2);
  transition: var(--transition);
}

.modal-success .ticket-code i {
  font-size: 1.25rem;
  color: var(--primary-color);
}

.modal-success .ticket-code:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(74, 183, 216, 0.3);
}

.modal-success-message {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.6;
  margin: 1.5rem 0 2rem 0;
}

.btn-modal-new-ticket {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: white;
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--primary-dark-index) 100%
  );
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 15px rgba(74, 183, 216, 0.4);
  position: relative;
  overflow: hidden;
}

.btn-modal-new-ticket::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s;
}

.btn-modal-new-ticket:hover::before {
  left: 100%;
}

.btn-modal-new-ticket:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(74, 183, 216, 0.5);
}

.btn-modal-new-ticket:active {
  transform: translateY(0);
}

.btn-modal-new-ticket i {
  font-size: 1rem;
  transition: var(--transition);
}

.btn-modal-new-ticket:hover i {
  transform: rotate(90deg);
}

.btn-modal-new-ticket span {
  position: relative;
  z-index: 1;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 768px) {
  .ticket-container {
    padding: 1rem 0.5rem;
  }

  .ticket-header h1 {
    font-size: 1.75rem;
  }

  .ticket-subtitle {
    font-size: 1rem;
  }

  .info-alert {
    flex-direction: column;
    padding: 1.25rem;
  }

  .requisitos-section {
    flex-direction: column;
    padding: 1.25rem;
  }

  .step-header {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  .step-content {
    padding: 1.5rem;
  }

  .input-group-search {
    flex-direction: column;
  }

  .btn-search {
    width: 100%;
    justify-content: center;
  }

  .info-row {
    flex-direction: column;
    gap: 0.25rem;
  }

  .file-upload-area {
    padding: 2rem 1.5rem;
  }

  .file-upload-area i {
    font-size: 2.5rem;
  }

  .modal-success {
    padding: 2rem 1.5rem;
  }

  .modal-success-icon-bg {
    width: 100px;
    height: 100px;
  }

  .modal-success-icon-wrapper i {
    font-size: 4rem;
  }

  .modal-success h3 {
    font-size: 1.5rem;
  }

  .modal-success-code-section {
    padding: 1.25rem;
  }

  .modal-success .ticket-code {
    font-size: 1.25rem;
    padding: 0.875rem 1.5rem;
  }

  .btn-modal-new-ticket {
    width: 100%;
    padding: 0.875rem 2rem;
    font-size: 1rem;
  }
}

@media (max-width: 576px) {
  .ticket-header h1 {
    font-size: 1.5rem;
    flex-direction: column;
  }

  .step-number {
    width: 40px;
    height: 40px;
    font-size: 1.25rem;
  }

  .step-title h3 {
    font-size: 1.25rem;
  }
}
