:root {
  --primary: #FF0000;
  --primary-dark: #CC0000;
  --primary-light: #FF6666;
  --secondary: #0066FF;
  --secondary-dark: #0052CC;
  --background: #ffffff;
  --surface: #f8f9fa;
  --text-primary: #2c3e50;
  --text-secondary: #7f8c8d;
  --border: #ecf0f1;
  --success: #27ae60;
  --warning: #f39c12;
  --error: #FF0000;
  --shadow: 0 2px 8px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.15);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

html {
  -webkit-text-size-adjust: 100%;
}

img,
svg,
video,
canvas {
  max-width: 100%;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--background);
  color: var(--text-primary);
  line-height: 1.6;
}

/* Header & Navigation moved to ../shared/topbar-admin-sync.css */

.content {
  min-height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
}

.page-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 60px 32px;
  text-align: center;
}

.page-header h1 {
  font-size: 42px;
  margin: 0;
}

.page-content {
  flex-grow: 1;
  padding: 60px 32px;
  max-width: none;
  width: 100%;
  margin: 0;
}

.placeholder {
  background: var(--surface);
  border: 2px dashed var(--border);
  border-radius: 8px;
  padding: 60px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 18px;
}

.hidden {
  display: none !important;
}

/* Admin Override Banner */
.admin-override-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff8e1;
  border: 1.5px solid #f9a825;
  border-left: 5px solid #f57f17;
  border-radius: 10px;
  padding: 12px 18px;
  margin-bottom: 18px;
  color: #5d3e00;
  font-size: 14px;
  line-height: 1.5;
}

.admin-override-banner strong {
  color: #e65100;
}

.register-event-picker {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 18px;
  max-width: 560px;
}

.register-event-picker label {
  font-size: 14px;
  font-weight: 700;
  color: #304a7b;
}

.register-event-picker select {
  width: 100%;
  height: 44px;
  border: 1px solid #c6d9ff;
  border-radius: 10px;
  background: #fff;
  color: #1f2d3d;
  padding: 0 12px;
}

/* ============== Countdown Timer ============== */
.countdown-section {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 20px;
  padding: 60px 40px;
  margin-bottom: 40px;
  box-shadow: 0 20px 60px rgba(102, 126, 234, 0.4);
  position: relative;
  overflow: hidden;
}

.countdown-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  animation: pulse 8s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.5;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }
}

.countdown-header {
  text-align: center;
  margin-bottom: 48px;
  position: relative;
  z-index: 1;
}

.event-title {
  font-size: 32px;
  font-weight: 700;
  color: white;
  margin-bottom: 12px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.event-dates {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 24px;
}

.countdown-label {
  font-size: 18px;
  font-weight: 600;
  color: #ffd700;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.countdown-timer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.countdown-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 16px;
  padding: 24px 32px;
  min-width: 120px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.countdown-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.countdown-number {
  font-size: 64px;
  font-weight: 800;
  color: #667eea;
  line-height: 1;
  text-align: center;
  margin-bottom: 8px;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  transition: all 0.3s ease;
}

.countdown-number.updating {
  animation: numberPop 0.4s ease;
}

@keyframes numberPop {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.15);
    color: #764ba2;
  }
  100% {
    transform: scale(1);
  }
}

.countdown-label-text {
  font-size: 14px;
  font-weight: 600;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-align: center;
}

.countdown-separator {
  font-size: 48px;
  font-weight: 700;
  color: white;
  opacity: 0.7;
  line-height: 1;
  padding: 0 10px;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.registration-guide {
  margin: 0 0 28px;
  background: #eef4ff;
  border: 1px solid #d7e5ff;
  border-left: 4px solid #667eea;
  border-radius: 12px;
  padding: 18px 20px;
  color: #1f2d3d;
}

.register-view-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 14px;
}

.register-view-btn {
  border: 1px solid #c6d9ff;
  background: #fff;
  color: #35538b;
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.register-view-btn:hover {
  border-color: #8fb2ff;
  background: #f3f7ff;
}

.register-view-btn.active {
  background: #667eea;
  border-color: #667eea;
  color: #fff;
}

.registration-guide h2 {
  margin: 0 0 12px;
  font-size: 20px;
  color: #304a7b;
}

.registration-guide > ol {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.registration-guide li {
  line-height: 1.55;
}

.registration-guide li ol {
  margin-top: 6px;
  padding-left: 20px;
}

.registration-guide .guide-note {
  display: inline-block;
  margin-top: 4px;
  color: #d90429;
  font-style: italic;
  font-weight: 700;
}

.coach-info-summary {
  background: #f5f8ff;
  border: 1px solid #d8e4ff;
  border-radius: 10px;
  padding: 14px;
}

.coach-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
}

.coach-summary-grid div {
  color: #1f2d3d;
  font-size: 14px;
  line-height: 1.5;
}

.coach-summary-grid strong {
  color: #304a7b;
}


/* ============== Footer ============== */
.footer {
  background: var(--text-primary);
  color: white;
  padding: 60px 32px 24px;
  margin-top: 80px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 40px;
  max-width: none;
  width: 100%;
  margin: 0 0 40px;
}

.footer-col h4 {
  margin-bottom: 16px;
  font-size: 16px;
}

.footer-col p {
  color: rgba(255,255,255,0.7);
  margin-bottom: 8px;
  font-size: 14px;
  line-height: 1.6;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 8px;
}

.footer-col a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-col a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
  text-align: center;
  color: rgba(255,255,255,0.5);
  font-size: 14px;
}

/* ============== Responsive Design ============== */
@media (max-width: 900px) {
/* Profile dropdown mobile */
.page-header {
    padding: 40px 20px;
  }

  .page-header h1 {
    font-size: 28px;
  }

  .page-content {
    padding: 40px 20px;
  }

  .placeholder {
    padding: 40px;
  }

  .footer-content {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }
}

@media (max-width: 768px) {
.brand-text {
    font-size: 16px;
  }

  .page-header {
    padding: 30px 16px;
  }

  .page-header h1 {
    font-size: 22px;
  }

  .page-content {
    padding: 30px 16px;
  }

  .placeholder {
    padding: 30px;
    font-size: 16px;
  }

  /* Countdown Timer Mobile */
  .countdown-section {
    padding: 28px 14px;
    border-radius: 16px;
  }

  .event-title {
    font-size: 22px;
    line-height: 1.35;
  }

  .event-dates {
    font-size: 14px;
  }

  .countdown-label {
    font-size: 14px;
  }

  .countdown-header {
    margin-bottom: 20px;
  }

  .countdown-timer {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
  }

  .countdown-card {
    padding: 14px 12px;
    min-width: 0;
    width: 100%;
    border-radius: 12px;
  }

  .countdown-number {
    font-size: 44px;
    margin-bottom: 6px;
  }

  .countdown-label-text {
    font-size: 10px;
    letter-spacing: 0.08em;
  }

  .countdown-separator {
    display: none;
  }

  .registration-guide {
    padding: 14px;
    margin-bottom: 20px;
    border-radius: 10px;
  }

  .registration-view-actions {
  margin-bottom: 24px;
}

/* Admin Edited Notice */
.edited-badge {
    font-size: 10px;
    color: #ffffff !important;
    background-color: #e74c3c !important;
    padding: 2px 6px;
    border-radius: 4px;
    margin-top: 4px;
    display: inline-block;
    font-weight: 600;
    line-height: 1.2;
}

.admin-edit-notice {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

.admin-edit-notice svg {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px;
    min-height: 20px;
    flex-shrink: 0;
    color: #e74c3c;
}

.history-athlete-item {
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 15px;
    border: 1px solid #eee;
}

.history-athlete-item h4 {
    margin-bottom: 8px;
    color: #2c3e50;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
  .register-view-btn {
    flex: 1;
    min-width: 0;
    padding: 9px 10px;
    font-size: 13px;
    text-align: center;
  }

  .registration-guide h2 {
    font-size: 18px;
  }

  .registration-guide > ol,
  .registration-guide li ol {
    padding-left: 18px;
  }

  .coach-summary-grid {
    grid-template-columns: 1fr;
  }

  .footer {
    padding: 40px 16px 20px;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .footer-col h4 {
    font-size: 14px;
  }

  .footer-col p,
  .footer-col a {
    font-size: 13px;
  }
}
/* ============== Registration Form ============== */
.registration-form {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.form-section {
  background: white;
  border-radius: 12px;
  padding: 32px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}

.form-section:last-child {
  margin-bottom: 0;
}

.section-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--border);
}

.section-number {
  background: var(--primary);
  color: white;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
}

.subsection {
  margin-bottom: 32px;
}

.subsection-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-weight: 500;
  color: var(--text-primary);
  font-size: 14px;
}

.required {
  color: var(--error);
}

.form-control {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.1);
}

.form-control-file {
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  background: white;
  cursor: pointer;
}

.image-preview {
  margin-top: 12px;
  position: relative;
  display: inline-block;
}

.preview-img {
  max-width: 200px;
  max-height: 200px;
  border-radius: 8px;
  border: 2px solid var(--border);
}

.btn-remove-image {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(255, 0, 0, 0.9);
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: background 0.2s ease;
}

.btn-remove-image:hover {
  background: var(--primary-dark);
}

.info-notice {
  background: #e3f2fd;
  border-left: 4px solid var(--secondary);
  padding: 16px;
  border-radius: 4px;
  margin-bottom: 20px;
}

.info-notice p {
  margin: 6px 0;
  font-size: 14px;
  color: var(--text-primary);
}

.info-notice strong {
  font-weight: 600;
}

.category-group {
  margin-bottom: 24px;
}

.category-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.competition-entries {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.competition-entry {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--surface);
  border-radius: 6px;
  transition: background 0.2s ease;
}

.competition-entry:hover {
  background: #f0f0f0;
}

.competition-entry input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.competition-entry-label {
  flex-grow: 1;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  cursor: pointer;
  font-size: 14px;
}

.competition-entry-name {
  font-weight: 500;
  color: var(--text-primary);
}

.competition-entry-note {
  color: var(--text-secondary);
  opacity: 0.75;
  font-size: 13px;
  font-weight: 400;
}

.fee-display {
  background: #fff3e0;
  border-left: 4px solid var(--warning);
  padding: 16px;
  border-radius: 4px;
  margin-top: 20px;
  font-size: 16px;
}

.fee-display strong {
  font-weight: 600;
}

.fee-display span {
  color: var(--primary);
  font-weight: 700;
}

.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
}

.btn {
  padding: 10px 24px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 0, 0, 0.3);
}

.btn-primary:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.btn-secondary {
  background: #6c757d;
  color: white;
}

.btn-secondary:hover {
  background: #5a6268;
}

.btn-success {
  background: var(--success);
  color: white;
}

.btn-success:hover {
  background: #229954;
}

.btn-danger {
  background: var(--error);
  color: white;
}

.btn-danger:hover {
  background: var(--primary-dark);
}

.btn-lg {
  padding: 14px 32px;
  font-size: 16px;
}

/* Danh sách VĐV */
.athletes-list-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.empty-message {
  text-align: center;
  color: var(--text-secondary);
  padding: 40px;
  background: var(--surface);
  border-radius: 8px;
  font-size: 16px;
}

.athlete-card {
  background: var(--surface);
  border-radius: 8px;
  padding: 20px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: box-shadow 0.2s ease;
}

.athlete-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.athlete-number {
  background: var(--secondary);
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  flex-shrink: 0;
}

.athlete-photo {
  width: 80px;
  height: 100px;
  object-fit: cover;
  border-radius: 6px;
  border: 2px solid var(--border);
  flex-shrink: 0;
}

.athlete-info {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.athlete-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.athlete-details {
  font-size: 14px;
  color: var(--text-secondary);
}

.athlete-competitions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.competition-badge {
  background: var(--secondary);
  color: white;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.athlete-fee {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
  margin-top: 8px;
}

.athlete-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}

.btn-sm {
  padding: 6px 16px;
  font-size: 12px;
}

.btn-edit {
  background: var(--secondary);
  color: white;
  border: none;
  padding: 8px 20px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s ease;
}

.btn-edit:hover {
  background: var(--secondary-dark);
}

.btn-delete {
  background: white;
  color: var(--error);
  border: 2px solid var(--error);
  padding: 8px 20px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
}

.btn-delete:hover {
  background: var(--error);
  color: white;
}

/* Tổng lệ phí */
.total-fee-container {
  background: var(--surface);
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 24px;
}

.fee-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  font-size: 16px;
}

.fee-row:not(:last-child) {
  border-bottom: 1px solid var(--border);
}

.fee-row.total {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
  padding-top: 16px;
}

.fee-label {
  font-weight: 600;
}

.fee-value {
  font-weight: 700;
}

/* Tinh chỉnh khoảng cách riêng cho Section 5: Xác nhận đăng ký */
.submit-section .total-fee-container {
  margin-bottom: 20px;
}

.submit-section .form-actions {
  margin-top: 0;
  margin-bottom: 16px;
}

.submit-section .info-notice {
  margin-top: 0;
  margin-bottom: 0;
}

/* Responsive for Registration Form */
@media (max-width: 768px) {
  .form-section {
    padding: 20px;
  }

  .section-title {
    font-size: 20px;
    flex-direction: column;
    align-items: flex-start;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .athlete-card {
    flex-direction: column;
  }

  .athlete-actions {
    flex-direction: row;
    width: 100%;
  }

  .btn-edit,
  .btn-delete {
    flex: 1;
  }

  .fee-row {
    font-size: 14px;
  }

  .fee-row.total {
    font-size: 18px;
  }
}

/* ============== Payment Modal ============== */
.payment-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.payment-modal-content {
  background: white;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  max-width: 600px;
  width: 95%;
  max-height: 85vh;
  overflow-y: auto;
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.payment-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid var(--border);
}

.payment-modal-header h2 {
  font-size: 20px;
  color: var(--text-primary);
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  font-size: 28px;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background-color: var(--surface);
  color: var(--text-primary);
}

.payment-info-summary {
  padding: 16px 20px;
  background-color: var(--surface);
  border-bottom: 1px solid var(--border);
  line-height: 1.8;
}

.payment-info-summary p {
  margin: 4px 0;
  font-size: 14px;
}

.payment-tabs {
  display: flex;
  border-bottom: 2px solid var(--border);
  padding: 0 20px;
  gap: 0;
}

.tab-btn {
  background: none;
  border: none;
  padding: 12px 16px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all 0.3s ease;
}

.tab-btn:hover {
  color: var(--text-primary);
}

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.tab-content {
  padding: 20px;
  animation: fadeIn 0.2s ease-out;
}

.qr-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 250px;
  background-color: var(--surface);
  border-radius: 8px;
  margin-bottom: 16px;
}

.qr-loading {
  color: var(--text-secondary);
  font-size: 14px;
}

#qrImage {
  max-width: 100%;
  max-height: 300px;
  border-radius: 8px;
}

.payment-instruction {
  background-color: var(--surface);
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 16px;
}

.payment-instruction p {
  font-weight: 500;
  margin-bottom: 8px;
  font-size: 14px;
}

.payment-instruction ol {
  margin-left: 20px;
  font-size: 13px;
  line-height: 1.8;
}

.bank-info {
  background-color: var(--surface);
  padding: 16px;
  border-radius: 8px;
}

.bank-info p {
  font-weight: 500;
  margin-bottom: 12px;
  font-size: 14px;
}

.info-field {
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
}

.info-field label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.info-field-with-copy {
  display: flex;
  gap: 8px;
}

.info-value {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 13px;
  background-color: white;
  color: var(--text-primary);
  font-family: 'Courier New', monospace;
}

.info-value:readonly {
  background-color: #f5f5f5;
  cursor: default;
}

.btn-copy {
  padding: 6px 12px;
  background-color: var(--secondary);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-copy:hover {
  background-color: var(--secondary-dark);
}

.btn-copy:active {
  transform: scale(0.98);
}

.payment-modal-footer {
  display: flex;
  gap: 12px;
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  justify-content: flex-end;
}

.btn-block {
  width: 100%;
}

.btn-ghost {
  background-color: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  padding: 10px 16px;
}

.btn-ghost:hover {
  background-color: var(--surface);
  color: var(--text-primary);
}

/* ============== Responsive Payment Modal ============== */
@media (max-width: 640px) {
  .payment-modal-content {
    width: 100%;
    max-height: 100vh;
    border-radius: 12px 12px 0 0;
    animation: slideUpMobile 0.3s ease-out;
  }

  @keyframes slideUpMobile {
    from {
      transform: translateY(100%);
    }
    to {
      transform: translateY(0);
    }
  }

  .payment-tabs {
    flex-direction: column;
  }

  .tab-btn {
    border-bottom: 2px solid transparent;
    margin-bottom: 0;
  }

  .payment-modal-footer {
    flex-direction: column-reverse;
  }

  .payment-modal-footer .btn {
    width: 100%;
  }
}

/* ============== Registration History ============== */
.history-table-wrapper {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.history-table {
  width: 100%;
  border-collapse: collapse;
  background-color: white;
}

.history-table thead {
  background-color: var(--surface);
  border-bottom: 2px solid var(--border);
}

.history-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: var(--text-primary);
  font-size: 13px;
  white-space: nowrap;
}

.history-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-primary);
}

.history-table tbody tr:hover {
  background-color: var(--surface);
}

.status-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.status-badge.status-draft {
  background-color: #e3f2fd;
  color: #1976d2;
}

.status-badge.status-submitted {
  background-color: #fff3cd;
  color: #856404;
}

.status-badge.status-paid {
  background-color: #d4edda;
  color: #155724;
}

.status-badge.status-btc_confirmed {
  background-color: #d1ecf1;
  color: #0c5460;
}

.status-badge.status-cancelled {
  background-color: #f8d7da;
  color: #721c24;
}

.btn-view-detail {
  padding: 6px 12px;
  background-color: var(--secondary);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.btn-view-detail:hover {
  background-color: var(--secondary-dark);
}

.btn-view-detail:active {
  transform: scale(0.98);
}

/* ============== Detail Modal ============== */
.detail-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  animation: fadeIn 0.3s ease-out;
}

.detail-modal-content {
  background: white;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  max-width: 700px;
  width: 95%;
  max-height: 85vh;
  overflow-y: auto;
  animation: slideUp 0.3s ease-out;
}

.detail-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background-color: white;
  z-index: 10;
}

.detail-modal-header h2 {
  font-size: 20px;
  color: var(--text-primary);
  margin: 0;
}

.detail-modal-body {
  padding: 20px;
}

.info-block {
  margin-bottom: 20px;
  padding: 16px;
  background-color: var(--surface);
  border-radius: 8px;
  border-left: 4px solid var(--primary);
}

.info-block h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.info-block p {
  margin: 8px 0;
  font-size: 13px;
  line-height: 1.6;
}

.info-block strong {
  color: var(--text-primary);
}

.info-block code {
  background-color: white;
  padding: 2px 6px;
  border-radius: 3px;
  font-family: 'Courier New', monospace;
  font-size: 12px;
  color: #d63384;
}

.history-athlete-item {
  margin-bottom: 12px;
  padding: 12px;
  background-color: white;
  border-radius: 6px;
  border-left: 3px solid var(--secondary);
}

.history-athlete-item h4 {
  font-size: 14px;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.history-athlete-item p {
  margin: 4px 0;
  font-size: 13px;
  color: var(--text-secondary);
}

.badge {
  display: inline-block;
  margin-right: 6px;
  padding: 3px 8px;
  background-color: var(--secondary);
  color: white;
  border-radius: 3px;
  font-size: 11px;
}

.payment-info-block {
  margin: 20px 0;
  padding: 16px;
  background-color: #f0f7ff;
  border-radius: 8px;
  border-left: 4px solid var(--success);
}

.cancellation-info-block {
  background-color: #fff1f2;
  border-left-color: var(--error);
}

.payment-info-block h4 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.payment-info-block p {
  margin: 8px 0;
  font-size: 13px;
}

.detail-modal-footer {
  display: flex;
  gap: 12px;
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  justify-content: flex-end;
  position: sticky;
  bottom: 0;
  background-color: white;
}

/* ============== Responsive History & Detail Modal ============== */
@media (max-width: 768px) {
  .history-table {
    font-size: 12px;
  }

  .history-table th,
  .history-table td {
    padding: 8px;
  }

  .detail-modal-content {
    width: 100%;
    border-radius: 12px 12px 0 0;
  }
}

@media (max-width: 480px) {
  .history-table-wrapper {
    font-size: 11px;
  }

  .history-table th,
  .history-table td {
    padding: 6px 8px;
  }

  .btn-view-detail {
    padding: 4px 8px;
    font-size: 10px;
  }

  .detail-modal-footer {
    flex-direction: column;
  }

  .detail-modal-footer .btn {
    width: 100%;
  }
}
