:root {
  --primary: #1e40af;
  --primary-dark: #1e3a8a;
  --secondary: #059669;
  --accent: #dc2626;
  --danger: #ef4444;
  --warning: #f59e0b;
  --light: #f8fafc;
  --dark: #1e293b;
  --border: #e2e8f0;
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-alt: linear-gradient(135deg, #1e40af 0%, #059669 100%);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--gradient);
  min-height: 100vh;
  padding: 16px;
  color: var(--dark);
  line-height: 1.5;
}

.container {
  max-width: 1600px;
  margin: 0 auto;
  background: white;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.volunteer-container {
  max-width: 1400px;
}

/* Professional Header with Logo */
.header {
  text-align: center;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--light);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.logo-section {
  flex-shrink: 0;
}

.church-logo {
  height: 60px;
  width: auto;
  border-radius: 10px;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease;
}

.church-logo:hover {
  transform: scale(1.05);
}

.title-section {
  flex: 1;
  min-width: 250px;
}

.header h1 {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 6px;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.church-name {
  font-size: 1.2rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.subtitle {
  color: #64748b;
  font-size: 1rem;
  margin: 0;
  font-weight: 500;
}

/* Two Column Layout for Desktop */
.two-column-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

.column-left,
.column-right {
  min-height: 400px;
}

/* Photo Instructions */
.photo-instructions {
  background: var(--light);
  padding: 16px;
  border-radius: 10px;
  margin-top: 16px;
  border-left: 4px solid var(--secondary);
}

.photo-instructions h3 {
  color: var(--primary);
  margin-bottom: 12px;
  font-size: 1rem;
  font-weight: 600;
}

.photo-instructions ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.photo-instructions li {
  padding: 6px 0;
  font-size: 0.9rem;
  color: var(--dark);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Photo Upload Section */
.photo-upload-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.upload-highlight {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border: 2px dashed var(--primary);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  transition: all 0.3s ease;
}

.upload-highlight:hover:not(.disabled) {
  border-color: var(--accent);
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.upload-highlight.disabled {
  opacity: 0.6;
  border-color: #cbd5e1;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  cursor: not-allowed;
}

.upload-highlight.disabled:hover {
  border-color: #cbd5e1;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  transform: none;
  box-shadow: none;
}

.large-upload {
  width: 100%;
}

.large-upload-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 24px 16px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.upload-text {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--primary);
}

.upload-hint {
  color: #64748b;
  font-size: 0.9rem;
  font-style: italic;
}

.quick-tips {
  background: #f8fafc;
  padding: 20px;
  border-radius: 12px;
  border-left: 4px solid var(--accent);
}

.quick-tips h3 {
  color: var(--primary);
  margin-bottom: 15px;
  font-size: 1rem;
  font-weight: 600;
}

.quick-tips ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.quick-tips li {
  padding: 8px 0;
  font-size: 0.9rem;
  color: var(--dark);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Section Subtitle */
.section-subtitle {
  color: #64748b;
  font-size: 0.95rem;
  margin-bottom: 10px;
  font-style: italic;
}

/* My Items Section */
#myItemsSection {
  margin-top: 20px;
  padding-top: 10px;
  border-top: 2px solid var(--light);
}

/* Photo Thumbnails */
.photo-thumbnails {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.thumbnail {
  width: 60px;
  height: 34px;
  object-fit: cover;
  border-radius: 4px;
  border: 2px solid var(--light);
  transition: transform 0.2s ease;
}

.thumbnail:hover {
  transform: scale(1.1);
  border-color: var(--primary);
}

/* Thumbnail container with delete button */
.thumbnail-container {
  position: relative;
  display: inline-block;
}

.delete-photo-btn {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--danger);
  color: white;
  border: none;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 10px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 10;
}

.delete-photo-btn:hover {
  background: #dc2626;
  transform: scale(1.1);
}

.thumbnail-container:hover .delete-photo-btn {
  opacity: 1;
  visibility: visible;
}

.more-photos {
  background: var(--primary);
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* Action Buttons */
.action-buttons {
  display: flex;
  gap: 8px;
  align-items: center;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.875rem;
  min-width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Button color variants */
.btn-info {
  background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
  color: white;
  border: none;
}

.btn-info:hover {
  background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
}

.btn-warning {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
  border: none;
}

.btn-warning:hover {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

/* Item Name Styling */
.item-name {
  line-height: 1.4;
}

.item-name strong {
  color: var(--dark);
  font-weight: 600;
}

.item-name small {
  font-size: 0.8rem;
  line-height: 1.3;
}

/* Image Crop Modal */
.crop-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  /* iOS Safari fixes */
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.crop-modal-content {
  background: white;
  border-radius: 16px;
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  /* iOS safe area support */
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  box-sizing: border-box;
}

.crop-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--light);
  background: var(--primary);
  color: white;
  flex-shrink: 0;
}

.crop-modal-header h3 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
}

.crop-close-btn {
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.2s ease;
  touch-action: manipulation;
}

.crop-close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.crop-modal-body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
}

.crop-container {
  width: 100%;
  height: 100%;
  flex: 1;
  margin-bottom: 20px;
  border: 1px solid var(--light);
  border-radius: 8px;
  overflow: hidden;
  background: #f8fafc;
  box-sizing: border-box;
}

.crop-container img {
  max-width: 100%;
  max-height: 100%;
  display: block;
}

.crop-controls {
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex-shrink: 0;
}

.crop-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.crop-btn-mobile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 80px;
  padding: 12px;
  touch-action: manipulation;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.crop-btn-mobile:active {
  transform: scale(0.95);
}

.crop-btn-mobile .btn-text {
  font-size: 0.8rem;
  text-align: center;
  line-height: 1.2;
}

.crop-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  padding-top: 16px;
  border-top: 1px solid var(--light);
  flex-shrink: 0;
}

.crop-btn {
  margin-left: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* iOS-specific fixes */
@supports (-webkit-touch-callout: none) {
  .crop-modal {
    /* iOS Safari specific fixes */
    position: fixed;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    /* Prevent zoom on input focus */
    -webkit-text-size-adjust: 100%;
  }

  .crop-modal-content {
    /* iOS safe area insets */
    padding-top: max(20px, env(safe-area-inset-top));
    padding-bottom: max(20px, env(safe-area-inset-bottom));
    padding-left: max(20px, env(safe-area-inset-left));
    padding-right: max(20px, env(safe-area-inset-right));
  }
}

/* Responsive crop modal */
@media (max-width: 768px) {
  .crop-modal {
    padding: 10px;
    /* Ensure modal covers full viewport on mobile */
    padding-top: env(safe-area-inset-top, 10px);
    padding-bottom: env(safe-area-inset-bottom, 10px);
    padding-left: env(safe-area-inset-left, 10px);
    padding-right: env(safe-area-inset-right, 10px);
  }

  .crop-modal-content {
    max-height: 100vh;
    height: 100vh;
    border-radius: 0;
    max-width: 100vw;
    width: 100vw;
  }

  .crop-modal-body {
    padding: 16px;
    flex: 1;
  }

  .crop-modal-header {
    padding: 16px 20px;
  }

  .crop-container {
    height: calc(100vh - 300px); /* Account for header, controls, and safe areas */
    min-height: 200px;
  }

  .crop-buttons {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    width: 100% !important;
  }

  .crop-btn-mobile {
    min-width: auto !important;
    padding: 12px 8px !important;
    min-height: 50px !important;
    font-size: 0.9rem;
  }

  .crop-btn-mobile .btn-text {
    font-size: 0.75rem !important;
  }

  .crop-actions {
    flex-direction: column;
    gap: 12px !important;
  }

  .crop-actions button {
    width: 100% !important;
    padding: 16px !important;
    font-size: 1rem !important;
    min-height: 50px !important;
  }

  /* iOS specific mobile adjustments */
  @supports (-webkit-touch-callout: none) {
    .crop-modal-body {
      padding: 12px;
    }

    .crop-container {
      height: calc(100vh - 280px); /* Smaller controls on iOS */
    }
  }
}

@media (max-width: 480px) {
  .crop-modal-header h3 {
    font-size: 1rem;
  }

  .crop-btn-mobile {
    padding: 8px 4px !important;
    min-height: 45px !important;
  }

  .crop-btn-mobile .btn-text {
    font-size: 0.7rem !important;
  }

  .crop-actions button {
    padding: 14px !important;
    font-size: 0.9rem !important;
  }
}

/* Enhanced Form Styling */
.form-group {
  margin-bottom: 18px;
  position: relative;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--dark);
  font-size: 0.9rem;
  letter-spacing: 0.025em;
}

input[type="text"],
input[type="number"],
input[type="password"],
select,
textarea {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--border);
  border-radius: 10px;
  font-size: 16px;
  transition: all 0.3s ease;
  background: white;
  font-family: inherit;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
  transform: translateY(-1px);
}

textarea {
  min-height: 100px;
  resize: vertical;
  font-family: inherit;
}

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

label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--dark);
}

input[type="text"],
input[type="number"],
input[type="password"],
select,
textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 16px;
  transition: border-color 0.2s;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
}

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

.search-results {
  position: absolute;
  width: 100%;
  max-height: 300px;
  overflow-y: auto;
  background: white;
  border: 2px solid var(--border);
  border-top: none;
  border-radius: 0 0 8px 8px;
  box-shadow: var(--shadow);
  z-index: 100;
  display: none;
}

.search-result-item {
  padding: 12px 16px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.search-result-item:hover {
  background-color: var(--light);
}

.search-result-item.active {
  background-color: var(--primary);
  color: white;
}

.file-input-wrapper {
  position: relative;
  overflow: hidden;
  display: inline-block;
  width: 100%;
}

.file-input-label {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: var(--light);
  border: 2px dashed var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.file-input-label:hover {
  background: #e5e7eb;
  border-color: var(--primary);
}

.file-input-label svg {
  margin-right: 10px;
}

input[type="file"] {
  position: absolute;
  left: -9999px;
}

.file-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.file-preview-item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.file-preview-item img {
  width: 100%;
  height: auto;
  object-fit: cover;
  aspect-ratio: 16/9;
}

.preview-actions {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.file-preview-item:hover .preview-actions {
  opacity: 1;
}

.file-preview-item .remove-btn {
  background: var(--danger);
  color: white;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: bold;
  transition: transform 0.2s;
}

.file-preview-item .remove-btn:hover {
  transform: scale(1.1);
}

/* Enhanced Button Styling */
.btn {
  padding: 14px 28px;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.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: var(--gradient-alt);
  color: white;
  box-shadow: 0 4px 15px rgba(30, 64, 175, 0.3);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(30, 64, 175, 0.4);
}

.btn-secondary {
  background: var(--secondary);
  color: white;
  box-shadow: 0 4px 15px rgba(5, 150, 105, 0.3);
}

.btn-secondary:hover {
  background: #047857;
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(5, 150, 105, 0.4);
}

.btn-block {
  width: 100%;
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: white;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.875rem;
  border-radius: 6px;
}

.alert {
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 24px;
}

.alert-success {
  background: #d1fae5;
  border: 1px solid var(--secondary);
  color: #065f46;
}

.alert-error {
  background: #fee2e2;
  border: 1px solid var(--danger);
  color: #991b1b;
}

.alert-warning {
  background: #fef3c7;
  border: 1px solid var(--warning);
  color: #92400e;
}

.alert-info {
  background: #dbeafe;
  border: 1px solid var(--primary);
  color: #1e3a8a;
}

.locked-input {
  background: var(--light);
  cursor: not-allowed;
}

.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  animation: fadeIn 0.3s;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  background-color: white;
  margin: 15% auto;
  padding: 40px;
  border-radius: 16px;
  max-width: 500px;
  text-align: center;
  animation: slideIn 0.3s;
  box-shadow: var(--shadow-lg);
}

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

.modal-content h2 {
  font-size: 2rem;
  color: var(--secondary);
  margin-bottom: 20px;
}

.item-code-display {
  font-size: 3rem;
  font-weight: bold;
  color: var(--primary);
  margin: 20px 0;
  padding: 20px;
  background: var(--light);
  border-radius: 12px;
}

/* Volunteer Portal Styles */
.volunteer-layout {
  display: grid;
  gap: 24px;
}

.section {
  background: var(--light);
  padding: 20px;
  border-radius: 10px;
}

.section-title {
  font-size: 1.3rem;
  color: var(--primary);
  margin-bottom: 4px;
  padding-bottom: 4px;
  border-bottom: 2px solid var(--border);
}

.pending-items-list {
  background: white;
  border-radius: 8px;
  padding: 16px;
  margin-top: 16px;
  max-height: 200px;
  overflow-y: auto;
}

.pending-item {
  padding: 12px;
  border: 2px solid var(--border);
  border-radius: 8px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.pending-item:hover {
  border-color: var(--primary);
  background: var(--light);
}

.pending-item.selected {
  border-color: var(--primary);
  background: #dbeafe;
}

.table-container {
  overflow-x: auto;
  background: white;
  border-radius: 8px;
  padding: 20px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  background: var(--light);
  font-weight: 600;
  color: var(--dark);
}

tr:hover {
  background: var(--light);
}

.thumbnail {
  width: 50px;
  height: 28px;
  object-fit: cover;
  border-radius: 4px;
}

.thumbnail-big {
  width: 130px;
  height: 73px;
  object-fit: cover;
  border-radius: 8px;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
}

.pagination button {
  padding: 8px 16px;
  border: 1px solid var(--border);
  background: white;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.pagination button:hover:not(:disabled) {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.pagination button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination .page-info {
  font-weight: 600;
}

.filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
  background: white;
  padding: 20px;
  border-radius: 8px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 16px;
  }

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

  .file-preview {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  }

  .modal-content {
    margin: 30% auto;
    padding: 20px;
  }

  .item-code-display {
    font-size: 2rem;
  }

  table {
    font-size: 14px;
  }

  th, td {
    padding: 8px;
  }

  .filters {
    grid-template-columns: 1fr;
  }
}

.password-section {
  text-align: center;
  max-width: 400px;
  margin: 100px auto;
}

.password-section input {
  margin-bottom: 16px;
}

/* Tab Navigation */
.tab-navigation {
  display: flex;
  background: white;
  border-radius: 12px;
  padding: 8px;
  margin-bottom: 30px;
  box-shadow: var(--shadow);
  overflow-x: auto;
}

.tab-btn {
  flex: 1;
  padding: 12px 20px;
  border: none;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  color: #6b7280;
  transition: all 0.2s;
  white-space: nowrap;
  min-width: 150px;
}

.tab-btn:hover {
  background: var(--light);
  color: var(--primary);
}

.tab-btn.active {
  background: var(--primary);
  color: white;
  box-shadow: var(--shadow);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Photo Editor Modal */
.photo-editor-modal {
  max-width: 90vw;
  max-height: 90vh;
  width: 1200px;
  height: 800px;
  padding: 0;
  overflow: hidden;
}

.photo-editor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 2px solid var(--border);
  background: var(--light);
}

.photo-editor-content {
  display: flex;
  flex-direction: column;
  height: calc(100% - 80px);
}

.photo-editor-main {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #f8f9fa;
  padding: 20px;
}

.cropper-container {
  max-width: 100%;
  max-height: 100%;
  position: relative;
}

.cropper-container img {
  max-width: 100%;
  max-height: 500px;
  display: block;
}

.photo-editor-controls {
  padding: 20px;
  border-top: 2px solid var(--border);
  background: white;
}

.photo-editor-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.photo-editor-options {
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
}

.photo-editor-options label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  color: var(--dark);
}

.photo-editor-footer {
  padding: 20px;
  border-top: 2px solid var(--border);
  background: var(--light);
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

/* Enhanced Table Actions */
.table-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.table-actions .btn {
  padding: 6px 12px;
  font-size: 12px;
  min-width: auto;
}

/* Photo Management */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(75px, 1fr));
  gap: 2px;
  margin: 2px 0;
  max-width: 150px;
}

.item-code-column {
  max-width: 30px;
  width: 30px;
  padding-left: 2px;
  padding-right: 2px;
}
.photo-item {
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  aspect-ratio: 16/9;
}

.photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-item .photo-actions {
  position: absolute;
  top: 4px;
  right: 4px;
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.2s;
}

.photo-item:hover .photo-actions {
  opacity: 1;
}

.photo-item .photo-actions button {
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.photo-item .photo-actions .edit-btn {
  background: var(--primary);
  color: white;
}

.photo-item .photo-actions .delete-btn {
  background: var(--danger);
  color: white;
}

/* Status Badges */
.status-badge {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.status-pending {
  background: #fef3c7;
  color: #92400e;
}

.status-approved {
  background: #d1fae5;
  color: #065f46;
}

/* No Photos Indicator */
.no-photos {
  color: #ef4444;
  font-style: italic;
  font-size: 12px;
}

/* Enhanced Filters */
.filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.filters .form-group {
  margin-bottom: 0;
}

.filters label {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
}

.filters input[type="checkbox"] {
  width: auto;
  margin-right: 8px;
}

/* Enhanced Section Styling */
.section {
  background: white;
  padding: 30px;
  border-radius: 16px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

.section:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.section-title {
  font-size: 1.5rem;
  color: var(--primary);
  margin-bottom: 5px;
  padding-bottom: 6px;
  border-bottom: 3px solid var(--light);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Enhanced Tab Navigation */
.tab-navigation {
  display: flex;
  background: white;
  border-radius: 16px;
  padding: 8px;
  margin-bottom: 30px;
  box-shadow: var(--shadow);
  overflow-x: auto;
  border: 1px solid var(--border);
}

.tab-btn {
  flex: 1;
  padding: 16px 24px;
  border: none;
  background: transparent;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  color: #64748b;
  transition: all 0.3s ease;
  white-space: nowrap;
  min-width: 180px;
  font-size: 0.95rem;
  position: relative;
}

.tab-btn:hover {
  background: var(--light);
  color: var(--primary);
  transform: translateY(-2px);
}

.tab-btn.active {
  background: var(--gradient-alt);
  color: white;
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

/* Enhanced Table Styling */
.table-container {
  overflow-x: auto;
  background: white;
  border-radius: 12px;
}

.sortable {
  cursor: pointer;
  user-select: none;
  position: relative;
  padding-right: 20px !important;
}

.sortable:hover {
  background-color: #f8fafc;
}

.sortable::after {
  content: '↕️';
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  opacity: 0.6;
}

.sortable.sort-asc::after {
  content: '↑';
}

.sortable.sort-desc::after {
  content: '↓';
}

/* Photo item hover effects for delete buttons */
.photo-item:hover .delete-photo-btn {
  display: block !important;
}

.delete-photo-btn:hover {
  background: rgba(220, 38, 38, 0.9) !important;
}

.family-tag {
  background: #e0f2fe;
  border: 1px solid #0ea5e9;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 0.9rem;
  color: #0c4a6e;
  display: inline-block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

th, td {
  padding: 16px 12px;
  text-align: left;
  border-bottom: 2px solid var(--light);
}

th {
  background: var(--light);
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
}

tr:hover {
  background: var(--light);
  transform: scale(1.01);
  transition: all 0.2s ease;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .two-column-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .volunteer-container {
    max-width: 1000px;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 20px;
    margin: 10px;
  }
  
  .volunteer-container {
    margin: 10px;
  }
  
  .header-content {
    flex-direction: column;
    gap: 20px;
  }
  
  .church-logo {
    height: 60px;
  }
  
  .header h1 {
    font-size: 2rem;
  }
  
  .tab-navigation {
    flex-direction: column;
    gap: 8px;
  }
  
  .tab-btn {
    min-width: auto;
    text-align: center;
    padding: 12px 20px;
  }
  
  .photo-editor-modal {
    max-width: 95vw;
    max-height: 95vh;
    width: 100%;
    height: 100%;
  }
  
  .photo-editor-actions {
    justify-content: center;
  }
  
  .photo-editor-options {
    justify-content: center;
  }
  
  .photo-editor-footer {
    justify-content: center;
  }
  
  .table-actions {
    justify-content: center;
  }
  
  .section {
    padding: 20px;
  }
  
  .filters {
    grid-template-columns: 1fr;
  }
}


