:root {
  --primary-color: #17436f;
  --secondary-color: #0d2b4d;
  --success-color: #52C41A;
  --warning-color: #FAAD14;
  --error-color: #F5222D;
  --text-dark: #172d45;
  --text-light: #54687a;
  --bg-light: #f4f7f9;
  --border-color: #e3eaed;
  --gold: #f4bb46;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.15);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: #fdf8ed;
  min-height: 100vh;
  color: var(--text-dark);
  line-height: 1.6;
}

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

/* Header */
.header {
  text-align: center;
  color: white;
  margin-bottom: 30px;
  padding: 25px 20px;
  background: linear-gradient(125deg, #0b294c, #17436f);
  border-radius: 0 0 16px 16px;
}

.form-home-link {
  display: inline-block;
  margin-bottom: 12px;
  color: white;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Camera Section */
.camera-section {
  text-align: center;
  margin: 20px 0;
}

#cameraContainer {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#qrVideo {
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
}

#scanStatus {
  margin-top: 10px;
  font-size: 14px;
  color: #666;
}

/* Camera section styling */
.camera-section {
  margin-bottom: 30px;
}

.camera-controls {
  display: flex;
  flex-direction: column;
  gap: 15px;
  align-items: flex-start;
}

.camera-controls .form-group {
  width: 100%;
}

.camera-controls .form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--text-dark);
}

#qrReader {
  border: 3px solid var(--primary-color);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

#qrReader video {
  display: block;
  width: 100%;
  height: auto;
}

.btn-danger {
  background: #f44336;
}

.btn-danger:hover {
  background: #d32f2f;
}

/* Login Screen */
.login-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  padding: 20px;
}

.login-card {
  background: white;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  padding: 40px;
  max-width: 400px;
  width: 100%;
  text-align: center;
  border-top: 5px solid var(--gold);
}

.login-card .logo {
  font-size: 2.5rem;
  margin-bottom: 10px;
  color: var(--primary-color);
}

.login-card h2 {
  margin: 0 0 10px 0;
  color: var(--text-dark);
}

.login-card p {
  margin: 0 0 30px 0;
  color: var(--text-light);
  font-size: 0.95rem;
}

.login-card .form-group {
  text-align: left;
  margin-bottom: 20px;
}

.login-card .form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--text-dark);
}

.login-card .input-field {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.3s;
}

.login-card .input-field:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.login-card .error-message {
  margin-bottom: 20px;
  text-align: left;
}

.logout-btn {
  background: #fff5df !important;
  color: var(--text-dark);
  border-color: var(--gold) !important;
  margin-left: auto;
}

.logout-btn:hover {
  background: #ffe7ad !important;
}

/* Settings Page Styles */
.settings-lock {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  padding: 40px;
}

.lock-card {
  background: white;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  padding: 40px;
  max-width: 400px;
  width: 100%;
  text-align: center;
}

.lock-icon {
  font-size: 4rem;
  margin-bottom: 20px;
}

.lock-card h2 {
  margin: 0 0 10px 0;
  color: var(--text-dark);
}

.lock-card p {
  margin: 0 0 30px 0;
  color: var(--text-light);
}

.settings-section {
  margin-top: 40px;
  padding: 30px;
  background: #f9f9f9;
  border-radius: 12px;
  border-left: 4px solid var(--primary-color);
}

.settings-section h3 {
  margin-top: 0;
  color: var(--text-dark);
  font-size: 1.3rem;
}

.settings-section p {
  color: var(--text-light);
  margin-bottom: 20px;
}

.mapping-grid {
  display: grid;
  gap: 20px;
  margin-bottom: 20px;
}

.mapping-item {
  background: white;
  padding: 15px;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
}

.mapping-item label {
  display: block;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-dark);
  font-size: 1.1rem;
}

.range-inputs {
  display: flex;
  align-items: center;
  gap: 10px;
}

.input-field-small {
  width: 60px;
  padding: 8px;
  border: 2px solid var(--border-color);
  border-radius: 6px;
  font-size: 1rem;
  text-align: center;
}

.input-field-small:focus {
  outline: none;
  border-color: var(--primary-color);
}

.tshirt-mapping-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-bottom: 20px;
}

.tshirt-mapping-item {
  background: white;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
}

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

.import-actions {
  display: flex;
  gap: 15px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.file-upload-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}

.file-input {
  display: none;
}

.file-name {
  color: var(--text-light);
  font-style: italic;
}

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

.btn-info:hover {
  background: var(--secondary-color);
}

.btn-success {
  background: #4CAF50;
  color: white;
}

.btn-success:hover {
  background: #45a049;
}

.danger-zone {
  border-left-color: #f44336 !important;
  background: #ffebee !important;
}

.text-danger {
  color: #f44336;
  font-weight: 600;
}

.danger-actions {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.danger-action-item {
  background: white;
  padding: 20px;
  border-radius: 8px;
  border: 2px solid #ffcdd2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.danger-action-item strong {
  display: block;
  margin-bottom: 5px;
  color: var(--text-dark);
}

.danger-action-item p {
  margin: 0;
  color: var(--text-light);
  font-size: 0.9rem;
}

.success-message {
  background: #e8f5e9;
  border: 2px solid #4CAF50;
  color: #2e7d32;
  padding: 15px;
  border-radius: 8px;
}

.text-muted {
  color: var(--text-light);
  font-size: 0.95rem;
}

/* 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);
  overflow: auto;
}

.modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background-color: white;
  margin: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  margin: 0;
  color: var(--text-dark);
}

.btn-close {
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: var(--text-light);
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s;
}

.btn-close:hover {
  background: var(--bg-light);
  color: var(--text-dark);
}

.modal-body {
  padding: 20px;
}

.modal-footer {
  padding: 20px;
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* Edit button on child card */
.child-card {
  position: relative;
}

.btn-edit {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 16px;
  cursor: default;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-edit:hover {
  background: var(--secondary-color);
  transform: scale(1.1);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Status badges */
.badge-secondary {
  background-color: #6c757d;
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

/* Row status colors */
.status-checked-in {
  background-color: #f0f9f4 !important;
}

.status-pending {
  background-color: #fff9e6 !important;
}

/* Child edit forms in admin check-in */
.child-edit-form {
  background: #f8f9fa;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 15px;
}

.child-edit-form h6 {
  margin: 0 0 10px 0;
  color: var(--text-dark);
  font-size: 1rem;
}

.child-edit-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-bottom: 10px;
}

.child-edit-form .form-group {
  margin-bottom: 10px;
}

.child-edit-form .form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--text-dark);
}

.child-edit-form .form-group input,
.child-edit-form .form-group select,
.child-edit-form .form-group textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 0.9rem;
  background: white;
}

.child-edit-form .form-group input:focus,
.child-edit-form .form-group select:focus,
.child-edit-form .form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.1);
}

.child-edit-form .form-group textarea {
  resize: vertical;
  min-height: 60px;
}

.admin-child-edit h5 {
  color: var(--text-dark);
  margin: 0 0 15px 0;
  font-size: 1.1rem;
}

.logo {
  font-size: 2.5rem;
  font-weight: bold;
  margin-bottom: 10px;
}

.form-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  letter-spacing: 0.04em;
}

.form-brand-logo {
  display: block;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  object-fit: cover;
  background: white;
}

.subtitle {
  font-size: 1.1rem;
  opacity: 0.95;
}

/* Card */
.card {
  background: white;
  border-radius: 16px;
  padding: 30px;
  box-shadow: var(--shadow-lg);
  margin-bottom: 20px;
  border: 1px solid var(--border-color);
}

.card h2 {
  color: var(--text-dark);
  margin-bottom: 10px;
  font-size: 1.8rem;
  font-family: Georgia, 'Times New Roman', serif;
  letter-spacing: -0.025em;
}

.card > p {
  color: var(--text-light);
  margin-bottom: 25px;
}

.registration-lookup {
  margin: -8px 0 25px;
  color: var(--text-light);
}

.text-button {
  border: 0;
  background: none;
  padding: 0;
  color: var(--primary-color);
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

.text-button:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 3px;
}

.donation-details {
  margin: 0 0 24px;
  padding: 16px 18px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: var(--bg-light);
}

.donation-details summary {
  color: var(--primary-color);
  font-weight: 600;
  cursor: pointer;
}

.donation-details summary:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 4px;
}

.donation-details > p {
  margin: 14px 0;
  color: var(--text-light);
}

.control-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0;
  font-weight: 600;
}

.control-toggle input { width: 20px; height: 20px; }

/* Form Elements */
.form-group {
  margin-bottom: 20px;
}

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

.input-field {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s;
}

.input-field:focus {
  outline: none;
  border-color: var(--primary-color);
}

.input-field:read-only {
  background-color: #F5F5F5;
  color: var(--text-light);
  cursor: not-allowed;
  border-color: #E0E0E0;
}

/* Buttons */
.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  margin-right: 10px;
  margin-top: 10px;
}

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

.btn-primary:hover {
  background: #0d2b4d;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(13, 43, 77, 0.2);
}

.registration-body .btn-primary {
  background: var(--gold);
  color: var(--text-dark);
}

.registration-body .btn-primary:hover {
  background: #ffd071;
}

.btn-secondary {
  background: #e7eef3;
  color: var(--primary-color);
}

.btn-secondary:hover {
  background: #d8e5ed;
}

.btn-success {
  background: var(--success-color);
  color: white;
}

.btn-success:hover {
  background: #3FA116;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Steps */
.step {
  display: none;
}

.step.active {
  display: block;
  animation: fadeIn 0.3s;
}

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

/* Children List */
.children-list {
  margin: 20px 0;
}

.child-card {
  display: flex;
  align-items: center;
  padding: 15px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.3s;
}

.child-card:hover {
  border-color: var(--primary-color);
  background: #fffaf1;
}

.child-card input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-right: 15px;
  cursor: pointer;
}

.child-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.child-info strong {
  font-size: 1.1rem;
  color: var(--text-dark);
  margin-bottom: 5px;
}

.child-info span {
  font-size: 0.9rem;
  color: var(--text-light);
}

/* Donation Options */
.donation-options {
  margin: 20px 0;
}

.radio-card {
  display: flex;
  align-items: center;
  padding: 15px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.3s;
}

.radio-card:hover {
  border-color: var(--primary-color);
  background: #fffaf1;
}

.radio-card input[type="radio"] {
  width: 20px;
  height: 20px;
  margin-right: 15px;
  cursor: pointer;
}

.radio-content {
  display: flex;
  flex-direction: column;
}

.radio-content strong {
  font-size: 1.1rem;
  color: var(--text-dark);
  margin-bottom: 3px;
}

.radio-content span {
  font-size: 0.9rem;
  color: var(--text-light);
}

/* EFT Details */
.eft-details {
  background: var(--bg-light);
  padding: 20px;
  border-radius: 8px;
  margin: 20px 0;
}

.eft-details h3 {
  margin-bottom: 15px;
  color: var(--text-dark);
}

.bank-info p {
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.note {
  margin-top: 15px;
  font-size: 0.9rem;
  color: var(--text-light);
  font-style: italic;
}

/* Confirmation */
.confirmation-card {
  text-align: center;
}

.success-icon {
  width: 80px;
  height: 80px;
  background: var(--success-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  margin: 0 auto 20px;
}

.qr-container {
  margin: 30px 0;
  padding: 20px;
  background: white;
  border: 2px dashed var(--border-color);
  border-radius: 8px;
}

.qr-container img {
  max-width: 250px;
  width: 100%;
}

.checkin-code {
  background: var(--bg-light);
  padding: 15px;
  border-radius: 8px;
  margin: 20px 0;
  font-size: 1.1rem;
}

.checkin-code span {
  color: var(--primary-color);
  font-weight: bold;
  font-family: monospace;
  font-size: 1.2rem;
}

.checkin-summary {
  text-align: left;
  margin: 20px 0;
}

.summary-section {
  margin-bottom: 15px;
}

.checkin-summary ul {
  margin-left: 20px;
  margin-top: 5px;
}

/* Error Message */
.error-message {
  display: none;
  background: #FFF1F0;
  color: var(--error-color);
  padding: 12px;
  border-radius: 8px;
  margin-top: 15px;
  border-left: 4px solid var(--error-color);
}

/* Info Message */
.info-message {
  background: #fff7e8;
  color: var(--primary-color);
  padding: 20px;
  border-radius: 8px;
  margin-top: 20px;
  border-left: 4px solid var(--primary-color);
  text-align: center;
}

.info-message p {
  margin-bottom: 10px;
}

.info-message strong {
  font-size: 1.1rem;
}

/* Info Box */
.info-box {
  background: #FFF9E6;
  border: 2px solid #FFD700;
  border-radius: 8px;
  padding: 15px;
  margin: 15px 0;
  font-size: 0.9rem;
  line-height: 1.8;
}

.info-box strong {
  color: var(--text-dark);
}

/* Child Form */
.child-form {
  background: var(--bg-light);
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 15px;
  border: 2px solid var(--border-color);
}

.child-form-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border-color);
}

.child-form-header h4 {
  margin: 0;
  color: var(--text-dark);
}

.btn-remove {
  padding: 6px 12px;
  background: var(--error-color);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.3s;
}

.btn-remove:hover {
  background: #D32F2F;
}

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

.child-form .form-group {
  margin-bottom: 15px;
}

.child-form select.input-field {
  cursor: pointer;
}

/* Loading */
.loading {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  justify-content: center;
  align-items: center;
  flex-direction: column;
  z-index: 9999;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.loading p {
  color: white;
  margin-top: 15px;
  font-size: 1.1rem;
}

/* Admin Styles */
.admin-body {
  background: #fdf8ed;
}

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

.admin-header {
  background: white;
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--gold);
}

.admin-header-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-header-top .logo {
  justify-content: flex-start;
  font-size: 1.5rem;
  line-height: 1.2;
  margin: 0;
}

.admin-header-top .form-brand-logo {
  width: 42px;
  height: 42px;
}

.admin-header-top .logout-btn {
  flex: 0 0 auto;
}

.admin-nav {
  display: flex;
  gap: 10px;
  margin-top: 15px;
  flex-wrap: wrap;
}

.admin-nav-hint {
  display: none;
}

.nav-btn {
  padding: 10px 20px;
  border: 2px solid var(--border-color);
  background: white;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.3s;
}

.nav-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.nav-btn.active {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.nav-btn:focus-visible,
.btn:focus-visible,
.btn-small:focus-visible,
.form-home-link:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.admin-section {
  display: none;
}

.admin-section.active {
  display: block;
  animation: fadeIn 0.3s;
}

.admin-card {
  background: white;
  padding: 25px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-color);
  min-width: 0;
}

.admin-card h2 {
  margin-bottom: 20px;
  font-family: Georgia, 'Times New Roman', serif;
  letter-spacing: -0.025em;
}

.admin-section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.admin-section-heading h2 {
  margin: 0;
}

.admin-list-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.admin-list-actions .btn {
  margin: 0;
}

.tshirt-report {
  background: white;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.tshirt-report table {
  min-width: 570px;
}

/* Scanner */
.scanner-input {
  display: flex;
  gap: 10px;
  margin: 20px 0;
}

.scanner-input .input-field {
  flex: 1;
}

.scanner-divider {
  margin: 20px 0;
  color: var(--text-light);
  text-align: center;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.name-search {
  margin-top: 8px;
}

.admin-search-label {
  display: block;
  font-weight: 700;
  margin-bottom: 8px;
}

.admin-profile-label {
  color: var(--text-light);
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}

.admin-reset-link {
  display: block;
  margin: 14px auto 0;
  padding: 8px;
  border: 0;
  background: none;
  color: var(--primary-color);
  text-decoration: underline;
  cursor: pointer;
}

.admin-login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  color: var(--text-light);
}
.admin-login-divider::before, .admin-login-divider::after {
  content: '';
  flex: 1;
  border-top: 1px solid var(--border-color);
}
.admin-google-login {
  display: block;
  width: 100%;
  background: white;
  color: var(--text-dark);
  border: 1px solid var(--border-color);
  text-decoration: none;
  text-align: center;
}
.admin-google-login:hover { background: var(--bg-light); }

.admin-profile-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
}

.admin-profile-row small { display: block; color: var(--text-light); }

.admin-profile-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.admin-profile-actions .admin-reset-password { width: min(100%, 210px); }

@media (max-width: 600px) {
  .admin-profile-row { align-items: flex-start; flex-direction: column; }
  .admin-profile-actions { width: 100%; }
}

.name-search > p {
  color: var(--text-light);
  margin-top: 5px;
}

.name-search-status {
  min-height: 1.5em;
  color: var(--text-light);
  font-size: 0.92rem;
}

.name-search-results {
  list-style: none;
  margin-top: 8px;
}

.name-search-results li + li {
  margin-top: 8px;
}

.name-search-result {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border-color);
  border-radius: 9px;
  background: #fffdf8;
  color: var(--text-dark);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.name-search-result:hover,
.name-search-result:focus-visible {
  border-color: var(--primary-color);
  background: #fff7e8;
  outline: none;
}

.name-search-result-main {
  min-width: 0;
}

.name-search-result-main strong,
.name-search-result-main small {
  display: block;
  overflow-wrap: anywhere;
}

.name-search-result-main small {
  color: var(--text-light);
  margin-top: 3px;
}

.name-search-result-status {
  flex: 0 0 auto;
  color: var(--primary-color);
  font-size: 0.88rem;
  font-weight: 700;
}

.verification-result {
  margin-top: 30px;
  border: 2px solid var(--border-color);
  border-radius: 12px;
  padding: 20px;
}

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid var(--border-color);
}

.status-badge {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
}

.status-pending {
  background: #FFF7E6;
  color: var(--warning-color);
}

.status-completed {
  background: #F6FFED;
  color: var(--success-color);
}

.info-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--bg-light);
}

.children-details {
  margin-top: 20px;
}

.admin-child-selection {
  display: flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  min-height: 44px;
  font-weight: 600;
  cursor: pointer;
}

.admin-child-selection input {
  width: 20px;
  height: 20px;
  accent-color: var(--primary-color);
}

.child-detail-card {
  background: var(--bg-light);
  padding: 15px;
  border-radius: 8px;
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.child-detail-card .notes {
  color: var(--warning-color);
  font-style: italic;
}

.admin-actions {
  margin-top: 20px;
  display: flex;
  gap: 10px;
}

.admin-actions .input-field {
  flex: 1;
}

/* Tables */
.filter-bar, .search-bar {
  margin: 20px 0;
}

.filter-bar label {
  margin-right: 20px;
  cursor: pointer;
}

.table-container {
  overflow-x: auto;
  margin-top: 20px;
}

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

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

.data-table th {
  background: var(--bg-light);
  font-weight: 600;
  color: var(--text-dark);
}

.data-table tr:hover {
  background: #fffaf1;
}

.text-center {
  text-align: center;
}

.badge {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
}

.badge-success {
  background: #F6FFED;
  color: var(--success-color);
}

.badge-warning {
  background: #FFF7E6;
  color: var(--warning-color);
}

.btn-small {
  padding: 6px 12px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
}

.btn-small:hover {
  background: #0d2b4d;
}

/* Statistics */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.stats-grid-5 {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.stats-grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.stat-card {
  background: white;
  padding: 24px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  border-left: 4px solid var(--primary-color);
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.stat-card-primary {
  border-left-color: #4CAF50;
  background: linear-gradient(135deg, #ffffff 0%, #f0f9f4 100%);
}

.stat-card-info {
  border-left-color: #2196F3;
  background: linear-gradient(135deg, #ffffff 0%, #e3f2fd 100%);
}

.stat-card-success {
  border-left-color: #4CAF50;
  background: linear-gradient(135deg, #ffffff 0%, #f0f9f4 100%);
}

.stat-card-warning {
  border-left-color: #FF9800;
  background: linear-gradient(135deg, #ffffff 0%, #fff3e0 100%);
}

.stat-card-secondary {
  border-left-color: #9E9E9E;
  background: linear-gradient(135deg, #ffffff 0%, #f5f5f5 100%);
}

.stat-card-class {
  border-left-color: #8BC34A;
  background: linear-gradient(135deg, #ffffff 0%, #f1f8e9 100%);
}

.stat-card-tshirt {
  border-left-color: #9C27B0;
  background: linear-gradient(135deg, #ffffff 0%, #f3e5f5 100%);
}

.stat-card-money {
  border-left-color: #FFC107;
  background: linear-gradient(135deg, #ffffff 0%, #fffde7 100%);
}

.stat-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.stat-value {
  font-size: 2.2rem;
  font-weight: bold;
  color: var(--text-dark);
  margin-bottom: 8px;
  line-height: 1;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-light);
  font-weight: 500;
}

#statsSection h3 {
  color: var(--text-dark);
  font-size: 1.3rem;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid #e0e0e0;
}

/* Print Styles */
@media print {
  body {
    background: white;
  }
  
  .btn, .header, .step:not(.active) {
    display: none !important;
  }
  
  .card {
    box-shadow: none;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .container {
    padding: 10px 12px;
  }
  
  .card {
    padding: 20px 16px;
  }
  
  .header .logo {
    font-size: 1.8rem;
  }

  .admin-container {
    padding: 12px;
  }

  .admin-header,
  .admin-card {
    padding: 16px;
  }

  .admin-header-top .logo {
    font-size: 1.18rem;
  }

  .admin-logo-suffix {
    display: none;
  }
  
  .admin-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
    padding-bottom: 6px;
  }

  .admin-nav .nav-btn {
    flex: 0 0 auto;
    width: auto;
    min-height: 44px;
    white-space: nowrap;
    padding: 9px 14px;
  }

  .admin-header-top .logout-btn {
    min-height: 44px;
    padding: 8px 12px;
    font-size: 0.88rem;
  }

  .admin-card h2 {
    font-size: 1.35rem;
  }

  .admin-section-heading,
  .scanner-input,
  .result-header,
  .info-row {
    flex-direction: column;
    align-items: stretch;
  }

  .scanner-input .btn,
  .camera-controls .btn,
  .admin-actions .btn {
    width: 100%;
    margin-right: 0;
  }

  .result-header {
    gap: 8px;
  }

  .admin-list-actions .btn {
    min-height: 44px;
  }

  .name-search-result {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .result-header .status-badge {
    align-self: flex-start;
  }

  .info-row {
    gap: 2px;
  }

  .filter-section,
  .filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
  }

  .filter-bar label {
    margin-right: 0;
  }

  .mobile-card-table,
  .mobile-card-table tbody,
  .mobile-card-table tr {
    display: block;
    width: 100%;
  }

  .mobile-card-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .mobile-card-table tr {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    margin-bottom: 12px;
    overflow: hidden;
  }

  .mobile-card-table td {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 6px 10px;
    width: 100%;
    padding: 9px 12px;
    overflow-wrap: anywhere;
  }

  .mobile-card-table td:last-child {
    border-bottom: 0;
  }

  .mobile-card-table td::before {
    content: attr(data-label);
    flex: 0 0 82px;
    font-weight: 600;
    color: var(--text-light);
  }

  .mobile-card-table td[colspan] {
    display: block;
    text-align: center;
  }

  .mobile-card-table td[colspan]::before {
    display: none;
  }

  .mobile-card-table .btn-small {
    min-height: 44px;
    padding: 8px 12px;
  }

  .settings-section {
    padding: 16px;
    margin-top: 20px;
  }

  .danger-action-item,
  .import-actions,
  .file-upload-wrapper {
    align-items: stretch;
    flex-direction: column;
  }

  .file-name {
    overflow-wrap: anywhere;
  }

  .danger-action-item .btn,
  .import-actions .btn {
    width: 100%;
  }

  .child-edit-form .form-row {
    grid-template-columns: 1fr;
  }

  .modal.active {
    align-items: flex-end;
  }

  .modal-content {
    margin: 8px;
    max-height: calc(100dvh - 16px);
  }

  .modal-header,
  .modal-body,
  .modal-footer {
    padding: 16px;
  }

  .modal-footer {
    flex-wrap: wrap;
  }

  .modal-footer .btn {
    flex: 1 1 150px;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .stat-card {
    padding: 18px;
  }
  
  .admin-actions {
    flex-direction: column;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .admin-list-actions,
  .admin-list-actions .btn {
    width: 100%;
  }

  .registration-body .step .btn {
    width: 100%;
    margin-right: 0;
  }

  .login-screen {
    padding: 12px;
  }

  .login-card,
  .lock-card {
    padding: 24px 18px;
  }

  .login-card .logo {
    font-size: 1.8rem;
  }

  .settings-lock {
    padding: 12px 0;
    min-height: 0;
  }

  .admin-header-top .logo {
    font-size: 1.05rem;
  }

  .tshirt-report {
    padding: 8px;
  }
}

@media (max-width: 640px) {
  .admin-nav-hint {
    display: block;
    margin-top: 2px;
    color: var(--text-light);
    font-size: 0.76rem;
  }
}
