/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

a {
  text-decoration: none;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  color: #333;
  line-height: 1.6;
}

/* Navigation Bar */
.navbar {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.nav-brand h2 {
  color: #667eea;
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.nav-menu {
  display: flex;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-link {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  font-size: 1rem;
  transition: all 0.3s ease;
  position: relative;
  padding: 0.5rem 0;
}

.nav-link:hover {
  color: #667eea;
  transform: translateY(-2px);
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #667eea, #764ba2);
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

/* Mobile Navigation Toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 4px;
}

.bar {
  width: 25px;
  height: 3px;
  background: #333;
  transition: all 0.3s ease;
  border-radius: 2px;
}

/* Main Content */
.main-content {
  margin-top: 70px;
  padding: 2rem 0;
  min-height: calc(100vh - 70px);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Entity Hero Section */
.entity-hero {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 3rem;
  margin-bottom: 3rem;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  position: relative;
  overflow: hidden;
}

.entity-hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, #667eea, #764ba2, #4facfe, #00f2fe);
}

.entity-hero-content {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.entity-hero-image {
  width: 180px;
  height: 180px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  position: relative;
}

.entity-hero-image::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 20px;
  border: 3px solid rgba(255, 255, 255, 0.5);
  pointer-events: none;
}

.entity-hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.entity-hero-image:hover img {
  transform: scale(1.05);
}

.entity-hero-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.entity-hero-title {
  font-size: 3rem;
  font-weight: 700;
  color: #333;
  margin: 0;
  line-height: 1.1;
  letter-spacing: -1px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.entity-hero-url {
  font-size: 1.3rem;
  color: #667eea;
  margin: 0;
  font-weight: 500;
}

.entity-hero-role {
  align-self: flex-start;
  font-size: 1rem;
  padding: 0.8rem 1.5rem;
  border-radius: 25px;
  font-weight: 700;
}

.entity-hero-data {
  margin-top: 1rem;
}

.entity-hero-data h3 {
  color: #333;
  font-size: 1.4rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.entity-hero-data pre {
  background: rgba(248, 249, 250, 0.8);
  padding: 1.5rem;
  border-radius: 12px;
  overflow-x: auto;
  font-family: "Monaco", "Menlo", "Ubuntu Mono", monospace;
  font-size: 0.9rem;
  line-height: 1.6;
  border: 1px solid #e9ecef;
  max-height: 300px;
  overflow-y: auto;
}

.entity-hero-data p {
  background: rgba(248, 249, 250, 0.8);
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid #e9ecef;
  color: #555;
  font-size: 1rem;
  line-height: 1.6;
  margin: 0;
}

/* Search Section */
.search-section {
  margin-top: 2rem;
  margin-bottom: 3rem;
}

.search-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
  gap: 2rem;
}

.search-card {
  position: relative;
}

.search-form {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 2px solid #f0f0f0;
}

.edit-form {
  margin-top: 2rem;
}

.edit-form h4 {
  color: #333;
  font-size: 1.3rem;
  margin-bottom: 1.5rem;
  font-weight: 600;
  text-align: center;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e9ecef;
}

/* Event Creation Section */
.event-creation-section {
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.event-creation-section .container {
  max-width: 800px;
}

.event-creation-card {
  position: relative;
}

/* Events List Section */
.events-list-section {
  margin-top: 2rem;
  margin-bottom: 3rem;
}

.section-title {
  color: white;
  font-size: 2rem;
  text-align: center;
  margin-bottom: 2rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  font-weight: 400;
}

.events-list-section .container {
  max-width: 1000px;
}

.events-list-card {
  position: relative;
}

.events-list {
  max-height: 400px;
  overflow-y: auto;
  margin-top: 1rem;
}

.servidos-list {
  max-height: 400px;
  overflow-y: auto;
  margin-top: 1rem;
}

.event-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  margin-bottom: 0.5rem;
  background: rgba(248, 249, 250, 0.8);
  border-radius: 8px;
  border: 1px solid #e9ecef;
  transition: all 0.3s ease;
  gap: 1rem;
}

.event-item:hover {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

.event-item-clickable {
  cursor: pointer;
}

.event-item-clickable:hover {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
  border-color: #667eea;
}

.event-click-hint {
  color: #667eea;
  font-size: 0.85rem;
  font-weight: 500;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.event-item-clickable:hover .event-click-hint {
  opacity: 1;
}

.event-item:last-child {
  margin-bottom: 0;
}

.event-info {
  flex: 1;
}

.event-name {
  color: #333;
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
}

.event-date {
  color: #667eea;
  font-size: 0.9rem;
  margin: 0.25rem 0;
  font-weight: 500;
}

.event-location {
  color: #666;
  font-size: 0.9rem;
  margin: 0.25rem 0;
}

.event-attendees {
  color: #28a745;
  font-size: 0.9rem;
  margin: 0.25rem 0;
  font-weight: 500;
}

.attendee-count {
  font-weight: 600;
}

.event-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.event-image {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.event-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.event-image img:hover {
  transform: scale(1.05);
}

.no-events {
  text-align: center;
  padding: 2rem;
  color: #666;
  font-style: italic;
}

.no-events p {
  margin: 0;
  font-size: 1rem;
}

/* Servido Items */
.servido-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  margin-bottom: 0.4rem;
  background: rgba(248, 249, 250, 0.8);
  border-radius: 8px;
  border: 1px solid #e9ecef;
  transition: all 0.3s ease;
  gap: 0.75rem;
}

.servido-item:hover {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

.servido-item:last-child {
  margin-bottom: 0;
}

.servido-info {
  flex: 1;
}

.servido-info h4 {
  color: #333;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.servido-info p {
  color: #666;
  font-size: 0.9rem;
  margin: 0.1rem 0;
}

.servido-actions {
  display: flex;
  gap: 0;
  flex-shrink: 0;
  flex-wrap: nowrap;
}

.no-servidos {
  text-align: center;
  padding: 2rem;
  color: #666;
  font-style: italic;
}

.no-servidos p {
  margin: 0;
  font-size: 1rem;
}

/* Modal Styles */
.modal {
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
}

.modal-content {
  background: rgba(255, 255, 255, 0.98);
  margin: 5% auto;
  padding: 0;
  border-radius: 15px;
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 2rem 1rem 2rem;
  border-bottom: 2px solid #f0f0f0;
}

.modal-header h3 {
  margin: 0;
  color: #333;
  font-size: 1.5rem;
  font-weight: 600;
}

.close-modal {
  color: #aaa;
  font-size: 2rem;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s ease;
}

.close-modal:hover,
.close-modal:focus {
  color: #333;
}

.modal .form {
  padding: 2rem;
}

.form-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

/* File Upload Styles */
.file-upload-label {
  display: block;
  padding: 12px 16px;
  border: 2px dashed #e1e5e9;
  border-radius: 8px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.8);
  margin-bottom: 1rem;
}

.file-upload-label:hover {
  border-color: #667eea;
  background: rgba(102, 126, 234, 0.05);
}

.file-input {
  display: none;
}

.file-upload-text {
  color: #666;
  font-size: 1rem;
  font-weight: 500;
}

.image-preview {
  margin-top: 1rem;
  text-align: center;
}

.image-preview img {
  max-width: 200px;
  max-height: 200px;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  object-fit: cover;
}

.remove-image-btn {
  display: block;
  margin: 1rem auto 0;
  padding: 0.5rem 1rem;
  background: #dc3545;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.3s ease;
}

.remove-image-btn:hover {
  background: #c82333;
}

/* Registration Section */
.registration-section {
  margin-top: 2rem;
}

.registration-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 2rem;
}

.registration-card {
  position: relative;
}

/* Admin Cards */
.card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 15px;
  padding: 2rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

/* Loading and Error States */
.loading {
  text-align: center;
  color: #667eea;
  font-size: 1.1rem;
  padding: 2rem;
}

.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
  padding: 1rem;
  border-radius: 8px;
  text-align: center;
  font-weight: 500;
}

/* Entity Details */
.entity-details {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.entity-header {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 2px solid #e9ecef;
}

.entity-image {
  width: 120px;
  height: 120px;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.entity-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.entity-image:hover img {
  transform: scale(1.05);
}

.entity-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.entity-info h2 {
  color: #333;
  font-size: 2rem;
  font-weight: 600;
  margin: 0;
  line-height: 1.2;
}

.entity-info p {
  color: #667eea;
  font-size: 1.1rem;
  margin: 0;
}

/* Role Badges */
.role-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.role-admin {
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
  color: white;
}

.role-manager {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white;
}

.role-user {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  color: white;
}

.role-read {
  background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
  color: white;
}

.role-write {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

/* Entity Content */
.entity-content {
  background: rgba(248, 249, 250, 0.8);
  border-radius: 10px;
  padding: 1.5rem;
  border: 1px solid #e9ecef;
}

.entity-content h3 {
  color: #333;
  font-size: 1.3rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.entity-content pre {
  background: rgba(255, 255, 255, 0.9);
  padding: 1rem;
  border-radius: 8px;
  overflow-x: auto;
  font-family: "Monaco", "Menlo", "Ubuntu Mono", monospace;
  font-size: 0.9rem;
  line-height: 1.5;
  border: 1px solid #dee2e6;
  max-height: 400px;
  overflow-y: auto;
}

.entity-content p {
  color: #555;
  font-size: 1rem;
  line-height: 1.6;
  background: rgba(255, 255, 255, 0.9);
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid #dee2e6;
}

/* Card Headers */
.card-header {
  margin-bottom: 2rem;
  text-align: center;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid #f0f0f0;
}

.card-header h3 {
  color: #333;
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.card-header p {
  color: #666;
  font-size: 1rem;
  margin: 0;
  font-weight: 400;
}

/* Forms */
.form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-input {
  padding: 12px 16px;
  border: 2px solid #e1e5e9;
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.8);
}

.form-input:focus {
  outline: none;
  border-color: #667eea;
  background: white;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-input::placeholder {
  color: #a0a0a0;
}

/* Checkbox Styles */
.checkbox-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.form-checkbox {
  width: 18px;
  height: 18px;
  accent-color: #667eea;
  cursor: pointer;
}

.checkbox-label {
  color: #333;
  font-size: 0.95rem;
  cursor: pointer;
  user-select: none;
}

/* Buttons */
.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
  margin-top: 1rem;
}

.btn::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:hover::before {
  left: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-success {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(79, 172, 254, 0.3);
}

.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(79, 172, 254, 0.4);
}

.btn-secondary {
  background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(108, 117, 125, 0.4);
}

.btn-info {
  background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(23, 162, 184, 0.3);
}

.btn-info:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(23, 162, 184, 0.4);
}

.btn-danger {
  background: linear-gradient(135deg, #dc3545 0%, #e74c3c 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
}

/* Small Buttons */
.btn-small,
.btn-sm {
  padding: 0.4rem 0.6rem;
  font-size: 0.7rem;
  border: none;
  border-radius: 4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.btn-small::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.3s;
}

.btn-small:hover::before {
  left: 100%;
}

.btn-small.btn-edit {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  color: white;
}

.btn-small.btn-edit:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.btn-small.btn-delete {
  background: linear-gradient(135deg, #dc3545 0%, #e74c3c 100%);
  color: white;
}

.btn-small.btn-delete:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.btn-small.btn-attendance {
  background: linear-gradient(135deg, #17a2b8 0%, #20c997 100%);
  color: white;
}

.btn-small.btn-attendance:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(23, 162, 184, 0.3);
}

.btn-small.btn-secondary {
  background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
  color: white;
}

.btn-small.btn-secondary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

.btn-small.btn-success {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  color: white;
}

.btn-small.btn-success:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

/* Messages */
.message {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.message:not(:empty) {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.message.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.message.info {
  background: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
  .nav-menu {
    position: fixed;
    left: -100%;
    top: 70px;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.98);
    width: 100%;
    text-align: center;
    transition: 0.3s;
    box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(10px);
  }

  .nav-menu.active {
    left: 0;
  }

  .nav-links {
    flex-direction: column;
    gap: 0;
    padding: 2rem 0;
  }

  .nav-links li {
    margin: 1rem 0;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-toggle.active .bar:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.active .bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .nav-toggle.active .bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .container {
    padding: 0 15px;
  }

  /* Hero Section Mobile */
  .entity-hero {
    padding: 2rem 1.5rem;
    margin-bottom: 2rem;
  }

  .entity-hero-content {
    flex-direction: column;
    text-align: center;
    gap: 2rem;
  }

  .entity-hero-image {
    width: 150px;
    height: 150px;
    align-self: center;
  }

  .entity-hero-title {
    font-size: 2.2rem;
  }

  .entity-hero-url {
    font-size: 1.1rem;
  }

  .entity-hero-role {
    align-self: center;
  }

  /* Search Section Mobile */
  .search-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  /* Events Section Mobile */
  .section-title {
    font-size: 1.5rem;
  }

  .event-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .event-image {
    width: 100%;
    height: 120px;
    align-self: center;
  }

  .event-actions {
    align-self: flex-end;
  }

  /* Modal Mobile */
  .modal-content {
    margin: 2% auto;
    width: 95%;
  }

  .modal-header {
    padding: 1.5rem;
  }

  .modal .form {
    padding: 1.5rem;
  }

  /* Registration Forms Mobile */
  .registration-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .card {
    padding: 1.5rem;
  }

  /* Servido Items Mobile */
  .servido-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
  }

  .servido-info {
    width: 100%;
  }

  .servido-info h4 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
  }

  .servido-info p {
    font-size: 0.85rem;
    margin: 0.05rem 0;
  }

  .servido-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 0;
  }

  .servido-actions .btn-small,
  .servido-actions .btn-sm {
    font-size: 0.65rem;
    padding: 0.3rem 0.5rem;
    flex: 1;
    min-width: 0;
  }
}

@media screen and (max-width: 480px) {
  .nav-container {
    padding: 0 15px;
  }

  .nav-brand h2 {
    font-size: 1.5rem;
  }

  h1 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
  }

  .card {
    padding: 1.2rem;
  }

  .entity-image {
    width: 80px;
    height: 80px;
  }

  .entity-info h2 {
    font-size: 1.3rem;
  }

  .entity-content {
    padding: 1rem;
  }

  .entity-content pre {
    font-size: 0.8rem;
    max-height: 250px;
  }
}

/* Animation for page load */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card {
  animation: fadeInUp 0.6s ease forwards;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

/* Attendance Modal Styles */
.attendance-modal-content {
  max-width: 800px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
}

/* Delete Confirmation Modal Styles */
#delete-confirmation-modal .modal-content {
  max-width: 500px;
  width: 90%;
  background: linear-gradient(145deg, #ffffff 0%, #f8fafb 100%);
  border-radius: 20px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.5);
  overflow: hidden;
  animation: deleteModalFadeIn 0.3s ease-out;
}

#delete-confirmation-modal .modal-header {
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
  color: white;
  padding: 1.5rem 2rem;
  border-bottom: none;
  position: relative;
}

#delete-confirmation-modal .modal-header::before {
  content: "⚠️";
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
}

#delete-confirmation-modal .modal-header h3 {
  color: white;
  font-size: 1.3rem;
  font-weight: 600;
  margin-left: 2rem;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

#delete-confirmation-modal .close-modal {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.8rem;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

#delete-confirmation-modal .close-modal:hover {
  color: white;
  transform: scale(1.1);
}

#delete-confirmation-modal .modal-body {
  padding: 2rem;
  text-align: center;
}

#delete-confirmation-modal .modal-body p {
  font-size: 1.1rem;
  color: #555;
  margin-bottom: 2rem;
  line-height: 1.6;
}

#delete-confirmation-modal .modal-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

#delete-confirmation-modal .btn {
  min-width: 120px;
  padding: 0.8rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

#delete-confirmation-modal .btn-danger {
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(238, 90, 82, 0.4);
}

#delete-confirmation-modal .btn-danger:hover {
  background: linear-gradient(135deg, #ff5252 0%, #d32f2f 100%);
  box-shadow: 0 6px 20px rgba(238, 90, 82, 0.6);
  transform: translateY(-2px);
}

#delete-confirmation-modal .btn-secondary {
  background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(108, 117, 125, 0.4);
}

#delete-confirmation-modal .btn-secondary:hover {
  background: linear-gradient(135deg, #5a6268 0%, #343a40 100%);
  box-shadow: 0 6px 20px rgba(108, 117, 125, 0.6);
  transform: translateY(-2px);
}

@keyframes deleteModalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.8) translateY(-50px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.attendance-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.attendance-search-section {
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.form-select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: #333;
  font-size: 1rem;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8'><path d='M6 8L0 2h12z' fill='%23333'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px;
}

.form-select:focus {
  border-color: #667eea;
  outline: none;
  background: rgba(255, 255, 255, 0.15);
}

.attendance-display {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.attendance-tabs {
  display: flex;
  background: rgba(0, 0, 0, 0.1);
}

.tab-btn {
  flex: 1;
  padding: 1rem;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  border-bottom: 3px solid transparent;
}

.tab-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.9);
}

.tab-btn.active {
  color: #667eea;
  border-bottom-color: #667eea;
  background: rgba(102, 126, 234, 0.1);
}

.attendance-lists {
  position: relative;
  min-height: 200px;
}

.attendance-list {
  display: none;
  padding: 1.5rem;
}

.attendance-list.active {
  display: block;
}

.attendance-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  margin-bottom: 0.5rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.attendance-item:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.attendee-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.attendee-name {
  font-weight: 600;
  color: #333;
}

.attendee-details {
  font-size: 0.9rem;
  color: #666;
}

.attendance-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
  font-size: 0.85rem;
  color: #666;
}

.remove-attendance-btn {
  background: #e74c3c;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.3s ease;
}

.remove-attendance-btn:hover {
  background: #c0392b;
  transform: scale(1.05);
}

.no-attendance {
  text-align: center;
  padding: 2rem;
  color: #666;
  font-style: italic;
}

.attendance-button {
  background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
  color: white;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.3s ease;
  margin-left: 0.5rem;
}

.attendance-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3);
}

/* Mobile Responsiveness for Attendance */
@media (max-width: 768px) {
  .attendance-modal-content {
    width: 95%;
    max-height: 90vh;
  }
  
  .attendance-container {
    gap: 1rem;
  }
  
  .attendance-search-section {
    padding: 1rem;
  }
  
  .attendance-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  
  .attendance-meta {
    align-items: flex-start;
    width: 100%;
  }
  
  .remove-attendance-btn {
    align-self: flex-end;
  }
}

/* Attendance Type Switch */
.attendance-type-switch {
  display: flex;
  background: #f0f0f0;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid #e0e0e0;
}

.attendance-type-switch input[type="radio"] {
  display: none;
}

.switch-option {
  flex: 1;
  padding: 10px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
  font-size: 14px;
  border: none;
  user-select: none;
}

.servido-option {
  background: #e3f2fd;
  color: #1565c0;
  border-right: 1px solid #e0e0e0;
}

.servidor-option {
  background: #f3e5f5;
  color: #6a1b9a;
}

.attendance-type-switch input[type="radio"]:checked + .servido-option {
  background: #2196f3;
  color: white;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.attendance-type-switch input[type="radio"]:checked + .servidor-option {
  background: #9c27b0;
  color: white;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.switch-option:hover {
  opacity: 0.8;
}

/* QR Scanner Styles */
.qr-scanner-section {
  margin: 1rem 0;
  padding: 1rem;
  border: 2px dashed #ccc;
  border-radius: 8px;
  background: #f9f9f9;
  text-align: center;
}

.qr-video {
  width: 100%;
  max-width: 300px;
  height: auto;
  border-radius: 8px;
  border: 2px solid #007bff;
}

.qr-scanner-controls {
  margin-top: 1rem;
}

/* Collapsible Sections Styles */
.collapsible-header {
  cursor: pointer;
  user-select: none;
  transition: all 0.3s ease;
  position: relative;
}

.collapsible-header:hover {
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-1px);
}

.collapsible-header h3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0;
  font-size: 1.4rem;
  font-weight: 600;
}

.collapse-icon {
  display: inline-block;
  font-size: 1.2rem;
  transition: transform 0.3s ease;
  color: #667eea;
  font-weight: bold;
  margin-left: 0.5rem;
}

.collapse-icon.collapsed {
  transform: rotate(-90deg);
}

.collapsible-content {
  overflow: hidden;
  transition: max-height 0.4s ease, opacity 0.3s ease;
  max-height: 5000px; /* Much larger to accommodate long lists */
  opacity: 1;
}

.collapsible-content.collapsed {
  max-height: 0;
  opacity: 0;
  padding-top: 0;
  padding-bottom: 0;
}

/* Smooth animation for height changes */
.collapsible-content {
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.3s ease,
              padding 0.3s ease;
}

/* Search container positioning for servidos */
.collapsible-header .search-container {
  margin-top: 1rem;
  transition: all 0.3s ease;
}

/* Hide search when collapsed */
.collapsed + .collapsible-content {
  visibility: hidden;
}

/* Loading and empty states within collapsible content */
.collapsible-content .loading,
.collapsible-content .no-events,
.collapsible-content .no-servidos {
  transition: all 0.3s ease;
}

/* Global Notification System */
.notification-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 400px;
  width: 100%;
}

.notification {
  border-radius: 12px;
  color: white;
  font-weight: 500;
  font-size: 0.95rem;
  line-height: 1.4;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
  animation: slideInRight 0.4s ease-out forwards;
  transform: translateX(100%);
  opacity: 0;
  min-height: 60px;
  word-wrap: break-word;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.notification::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 4px;
  background: rgba(255, 255, 255, 0.3);
}

.notification-success {
  background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
  border-color: rgba(46, 204, 113, 0.3);
}

.notification-error {
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
  border-color: rgba(231, 76, 60, 0.3);
}

.notification-warning {
  background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
  border-color: rgba(243, 156, 18, 0.3);
}

.notification-info {
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
  border-color: rgba(52, 152, 219, 0.3);
}

.notification.closing {
  animation: slideOutRight 0.3s ease-in forwards;
}

.notification-content {
  padding: 16px 20px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notification:hover {
  transform: translateY(-2px);
}

.notification-message {
  font-weight: 500;
  word-wrap: break-word;
  text-align: center;
}

.notification-show {
  transform: translateX(0);
  opacity: 1;
}

.notification-hide {
  animation: slideOutRight 0.3s ease-in forwards;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOutRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

/* Mobile notifications */
@media (max-width: 768px) {
  .notification-container {
    top: 80px;
    left: 10px;
    right: 10px;
    max-width: none;
  }

  .notification-content {
    padding: 14px 16px;
  }

  .notification {
    font-size: 0.9rem;
    min-height: 50px;
  }
}

/* Mobile responsiveness for collapsible sections */
@media (max-width: 768px) {
  .collapsible-header h3 {
    font-size: 1.2rem;
  }

  .collapse-icon {
    font-size: 1rem;
  }

  .collapsible-header:hover {
    transform: none; /* Disable hover transform on mobile */
  }
}