* {
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  min-height: 100vh;
  margin: 0;
  padding: 20px;
}

.student-form-container {
  max-width: 950px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  backdrop-filter: blur(10px);
}

/* Success Container Styles */
.success-container {
  padding: 40px 30px;
  text-align: center;
}

.success-container .alert-success {
  background: linear-gradient(135deg, #d4edda 0%, #e8f5e8 100%);
  border: 2px solid #c3e6cb;
  border-radius: 15px;
  padding: 40px 30px;
  box-shadow: 0 10px 30px rgba(50, 104, 102, 0.1);
  animation: fadeInUp 0.6s ease-out;
}

.success-actions {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 25px;
  flex-wrap: wrap;
}

.success-actions .btn {
  padding: 12px 25px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  min-width: 150px;
  justify-content: center;
}

.success-actions .btn-primary {
  background: linear-gradient(135deg, #326866 0%, #4caf50 100%);
  color: white;
  border: none;
}

.success-actions .btn-primary:hover {
  background: linear-gradient(135deg, #2a5654 0%, #45a049 100%);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(50, 104, 102, 0.3);
}

.success-actions .btn-secondary {
  background: transparent;
  color: #326866;
  border: 2px solid #326866;
}

.success-actions .btn-secondary:hover {
  background: #326866;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(50, 104, 102, 0.2);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.form-header {
  background: linear-gradient(135deg, #326866 0%, #4caf50 100%);
  color: white;
  padding: 40px 30px;
  text-align: center;
  position: relative;
}

.form-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.1"/><circle cx="10" cy="60" r="0.8" fill="white" opacity="0.1"/><circle cx="90" cy="40" r="0.6" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
}

.header-icon {
  font-size: 4rem;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.form-header h1 {
  font-size: 2.5rem;
  margin: 0 0 10px 0;
  font-weight: 700;
  position: relative;
  z-index: 1;
}

.form-header h2 {
  font-size: 1.2rem;
  margin: 0 0 15px 0;
  opacity: 0.9;
  font-weight: 400;
  position: relative;
  z-index: 1;
}

.form-header p {
  font-size: 1rem;
  margin: 0;
  opacity: 0.8;
  position: relative;
  z-index: 1;
}

.alert {
  margin: 20px 30px;
  padding: 15px 20px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
}

.alert-success {
  background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
  color: #155724;
  border: 1px solid #c3e6cb;
}

.alert-error {
  background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.student-form {
  padding: 40px 30px;
}

.form-section {
  border: 2px solid #e9ecef;
  border-radius: 15px;
  padding: 25px;
  margin-bottom: 30px;
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  transition: all 0.3s ease;
}

.form-section:hover {
  border-color: #326866;
  box-shadow: 0 5px 15px rgba(50, 104, 102, 0.1);
}

.form-section legend {
  font-weight: 700;
  font-size: 1.2rem;
  color: #326866;
  padding: 0 15px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.form-section legend::before {
  content: "";
  width: 4px;
  height: 20px;
  background: linear-gradient(135deg, #326866, #4caf50);
  border-radius: 2px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
  margin-bottom: 25px;
}

.form-group {
  margin-bottom: 25px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #333;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-group label i {
  color: #326866;
  font-size: 1.1rem;
}

.required-indicator {
  color: #e74c3c;
  font-weight: bold;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 15px 18px;
  border-radius: 12px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: #fff;
  font-family: inherit;
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #326866;
  box-shadow: 0 0 0 3px rgba(50, 104, 102, 0.1);
  transform: translateY(-2px);
}

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
  border-color: #326866;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #aaa;
  font-style: italic;
}

.form-group select {
  cursor: pointer;
  /* background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23326866' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e"); */
  background-position: left 12px center;
  background-repeat: no-repeat;
  background-size: 16px 12px;
  padding: 15px 18px;
}

/* File input styling */
.file-input {
  padding: 12px 15px !important;
  border: 2px dashed #e1e8ed !important;
  background: #f8f9fa;
  cursor: pointer;
  transition: all 0.3s ease;
}

.file-input:hover {
  border-color: #326866 !important;
  background: #e8f5e8;
}

.file-input:focus {
  border-color: #326866 !important;
  box-shadow: 0 0 0 3px rgba(50, 104, 102, 0.1);
  background: #e8f5e8;
}

.field-help {
  font-size: 0.85rem;
  color: #6c757d;
  margin-top: 5px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.field-help::before {
  font-size: 0.8rem;
}

.field-error {
  color: #e74c3c;
  font-size: 0.85rem;
  margin-top: 5px;
  display: none;
  font-weight: 500;
}

.form-actions {
  text-align: center;
  margin-top: 40px;
}

.submit-btn {
  background: linear-gradient(135deg, #326866 0%, #4caf50 100%);
  color: white;
  padding: 18px 40px;
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 220px;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(50, 104, 102, 0.3);
}

.submit-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(50, 104, 102, 0.4);
}

.submit-btn:active {
  transform: translateY(-1px);
}

.submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none !important;
}

.submit-btn i {
  font-size: 1.2rem;
}

.form-footer {
  text-align: center;
  margin-top: 20px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 10px;
  border-left: 4px solid #326866;
}

.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.loading-content {
  background: white;
  padding: 30px;
  border-radius: 15px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.loading-content i {
  color: #326866;
  margin-bottom: 15px;
}

@media (max-width: 768px) {
  .student-form-container {
    margin: 10px;
    border-radius: 15px;
  }

  .form-header {
    padding: 30px 20px;
  }

  .form-header h1 {
    font-size: 2rem;
  }

  .student-form {
    padding: 30px 20px;
  }

  .form-section {
    padding: 20px 15px;
  }

  .form-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .form-group {
    margin-bottom: 20px;
  }

  .submit-btn {
    width: 100%;
    padding: 16px 30px;
  }
}

@media (max-width: 480px) {
  body {
    padding: 10px;
  }

  .form-header h1 {
    font-size: 1.8rem;
  }

  .header-icon {
    font-size: 3rem;
  }

  .form-group input,
  .form-group select,
  .form-group textarea {
    padding: 12px 15px;
    font-size: 0.95rem;
  }

  .form-section {
    padding: 15px 10px;
    margin-bottom: 20px;
  }
}

.form-group {
  position: relative;
}

.form-group input:focus + .form-icon,
.form-group select:focus + .form-icon {
  color: #326866;
  transform: scale(1.1);
}

.form-group select option {
  padding: 10px;
  font-size: 1rem;
}

.submit-btn.loading {
  pointer-events: none;
  opacity: 0.7;
}

.submit-btn.loading::after {
  content: "";
  width: 20px;
  height: 20px;
  border: 2px solid transparent;
  border-top: 2px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-left: 10px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.form-group input:valid {
  border-color: #27ae60;
}

.form-group input.error,
.form-group select.error,
.form-group textarea.error {
  border-color: #e74c3c !important;
  background-color: rgba(231, 76, 60, 0.1);
  animation: shake 0.5s ease-in-out;
}

.form-group.focused {
  transform: scale(1.02);
  transition: transform 0.2s ease;
}

@keyframes shake {
  0%,
  20%,
  40%,
  60%,
  80% {
    transform: translateX(0);
  }
  10%,
  30%,
  50%,
  70%,
  90% {
    transform: translateX(-5px);
  }
}

.form-group select:disabled {
  background-color: #f8f9fa;
  color: #6c757d;
  cursor: not-allowed;
  opacity: 0.6;
}

.student-form-container {
  animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Additional styling for professional appearance */
.form-section.professional-info {
  border-left: 5px solid #326866;
}

.form-section.documents-info {
  border-left: 5px solid #4caf50;
}

.file-input::-webkit-file-upload-button {
  background: linear-gradient(135deg, #326866, #4caf50);
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: 8px;
  margin-right: 10px;
  cursor: pointer;
  font-weight: 500;
}

.file-input::-webkit-file-upload-button:hover {
  background: linear-gradient(135deg, #2a5a58, #45a049);
}

.wrapper-header {
  margin-bottom: 0px !important;
}

legend {
  display: block;
  width: 30%;
  max-width: 100%;
  padding: 0;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: inherit;
  color: inherit;
  white-space: normal;
}

.breadcrumb,
.coursefilesbreadcrumb {
  display: flex;
  flex-wrap: wrap;
  padding: 0px 2px;
  margin: 0px;
  min-height: 0;
  z-index: 0;
  font-size: 0.75rem;
  list-style: none;
}
