/* =========================================================
   POPDA XV DOCUMENT SHOWCASE & UPLOAD PORTAL
   Design System & Styling
   ========================================================= */

:root {
  --primary: #0284c7;
  --primary-hover: #0369a1;
  --primary-light: #e0f2fe;
  --secondary: #0ea5e9;
  
  --accent-cyan: #06b6d4;
  --accent-navy: #0f172a;
  --accent-dark: #1e293b;
  
  --success: #10b981;
  --success-bg: #ecfdf5;
  --success-border: #a7f3d0;
  
  --warning: #f59e0b;
  --warning-bg: #fffbeb;
  --warning-border: #fde68a;
  
  --danger: #ef4444;
  --danger-bg: #fef2f2;
  --danger-border: #fecaca;
  
  --muted: #64748b;
  --muted-light: #f1f5f9;
  --border: #e2e8f0;
  
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.04);
}

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

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Utilities */
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.text-blue { color: var(--primary); }
.text-cyan { color: var(--accent-cyan); }
.text-emerald { color: var(--success); }
.text-amber { color: var(--warning); }
.text-rose { color: var(--danger); }
.text-purple { color: #8b5cf6; }
.text-muted { color: var(--muted); }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-center { text-align: center; }
.font-mono { font-family: 'Courier New', Courier, monospace; letter-spacing: 0.25em; font-size: 1.2rem; }

.hidden { display: none !important; }

/* Announcement Bar */
.top-announcement {
  background: linear-gradient(90deg, #0f172a 0%, #0369a1 100%);
  color: #f8fafc;
  padding: 0.5rem 0;
  font-size: 0.825rem;
}

.announcement-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.announcement-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.badge-pill {
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: white;
}

/* Main Header */
.main-header {
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 40;
  box-shadow: var(--shadow-sm);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.brand-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #0284c7 0%, #06b6d4 100%);
  color: white;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: 0 4px 10px rgba(6, 182, 212, 0.3);
}

.brand-title {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--accent-navy);
}

.brand-subtitle {
  font-size: 0.825rem;
  color: var(--muted);
}

/* Auth Area in Header */
.auth-box {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.view-mode-tag {
  font-size: 0.775rem;
  color: var(--muted);
  background-color: var(--muted-light);
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.admin-badge {
  font-size: 0.775rem;
  background-color: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-full);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* Main Content */
.main-content {
  padding-top: 1.75rem;
  padding-bottom: 4rem;
  flex: 1;
}

/* Athlete Profile Card */
.athlete-card {
  background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%);
  border: 1px solid #bae6fd;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.75rem;
  box-shadow: var(--shadow-sm);
  flex-wrap: wrap;
}

.athlete-info-col {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.athlete-avatar {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0284c7 0%, #38bdf8 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.85rem;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.28);
  flex-shrink: 0;
  overflow: hidden;
  border: 3px solid #ffffff;
  outline: 2.5px solid #0ea5e9;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.athlete-avatar:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.4);
}

.athlete-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  display: block;
}

.athlete-tags {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
  flex-wrap: wrap;
}

.tag {
  font-size: 0.725rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.tag-cyan { background-color: #cffafe; color: #0891b2; }
.tag-blue { background-color: #dbeafe; color: #1d4ed8; }
.tag-gold { background-color: #fef3c7; color: #b45309; }

.athlete-name {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--accent-navy);
  margin-bottom: 0.25rem;
}

.athlete-meta {
  display: flex;
  gap: 1.25rem;
  font-size: 0.85rem;
  color: var(--muted);
  flex-wrap: wrap;
}

.athlete-meta span {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.athlete-action-col {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.status-summary-box {
  background: white;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.status-label {
  font-size: 0.725rem;
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.2rem;
}

.doc-count-display {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}

.doc-count-number {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}

.doc-count-total {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}

.progress-bar-bg {
  height: 8px;
  background-color: #e2e8f0;
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #0284c7 0%, #10b981 100%);
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}

/* Info Guide Card */
.info-guide-card {
  background-color: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
}

.info-guide-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 0.5rem;
}

.info-badge {
  font-size: 0.95rem;
  color: var(--accent-navy);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.guide-rules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.15rem;
}

.rule-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  font-size: 0.825rem;
}

.rule-item i {
  font-size: 1.25rem;
  margin-top: 0.15rem;
  flex-shrink: 0;
}

.rule-item strong {
  display: block;
  color: var(--accent-navy);
  margin-bottom: 0.15rem;
}

.rule-item p {
  color: var(--text-muted);
}

/* Documents Section */
.docs-section {
  margin-bottom: 3rem;
}

.section-title-wrap {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.section-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--accent-navy);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-desc {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.2rem;
}

.filter-pills {
  display: flex;
  gap: 0.4rem;
  background-color: var(--muted-light);
  padding: 0.25rem;
  border-radius: var(--radius-md);
}

.pill {
  border: none;
  background: transparent;
  padding: 0.35rem 0.75rem;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
}

.pill:hover {
  color: var(--text-main);
}

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

/* Document Table Presentation */
.document-table-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.doc-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.doc-table thead {
  background: #f8fafc;
  border-bottom: 2px solid #e2e8f0;
}

.doc-table th {
  padding: 0.9rem 1.15rem;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent-navy);
  white-space: nowrap;
}

.th-no { width: 90px; text-align: center; }
.th-name { min-width: 320px; }
.th-status { width: 140px; text-align: center; }
.th-action { width: 270px; text-align: center; }

.doc-table tbody tr {
  border-bottom: 1px solid #edf2f7;
  transition: background-color 0.15s ease;
}

.doc-table tbody tr:hover {
  background-color: #f8fafc;
}

.doc-table tbody tr:last-child {
  border-bottom: none;
}

.doc-table td {
  padding: 1rem 1.15rem;
  vertical-align: middle;
}

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

.no-number {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--accent-navy);
  line-height: 1;
}

.no-code-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 800;
  background-color: var(--muted-light);
  color: var(--primary);
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
  margin-top: 0.25rem;
}

.doc-table-name-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.doc-table-title {
  font-size: 0.975rem;
  font-weight: 700;
  color: var(--accent-navy);
}

.doc-table-desc {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.4;
}

.doc-file-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary);
  background-color: var(--primary-light);
  border: 1px solid #bae6fd;
  border-radius: var(--radius-sm);
  padding: 0.25rem 0.6rem;
  margin-top: 0.35rem;
  width: fit-content;
}

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

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

.action-buttons-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.btn-table-action {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
  transition: all 0.15s ease;
  line-height: 1.2;
}

.btn-action-preview {
  background-color: #0284c7;
  color: white;
}
.btn-action-preview:hover {
  background-color: #0369a1;
}

.btn-action-download {
  background-color: #047857;
  color: white;
}
.btn-action-download:hover {
  background-color: #065f46;
}

.btn-action-upload {
  background-color: #0284c7;
  color: white;
}
.btn-action-upload:hover {
  background-color: #0369a1;
}

.btn-action-replace {
  background-color: white;
  border: 1px solid var(--border);
  color: var(--accent-navy);
}
.btn-action-replace:hover {
  background-color: var(--muted-light);
}

.btn-action-delete {
  background-color: transparent;
  color: var(--danger);
  border: 1px solid transparent;
}
.btn-action-delete:hover {
  background-color: var(--danger-bg);
}

.doc-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

.doc-card.is-uploaded {
  border-left: 5px solid var(--success);
}

.doc-card.is-empty {
  border-left: 5px solid #cbd5e1;
}

.doc-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.doc-code-badge {
  background-color: var(--muted-light);
  color: var(--accent-dark);
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  letter-spacing: 0.02em;
}

.doc-status-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.badge-ready {
  background-color: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.badge-waiting {
  background-color: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

.doc-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--accent-navy);
  margin-bottom: 0.35rem;
  line-height: 1.35;
}

.doc-desc {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 1rem;
  line-height: 1.45;
}

.doc-file-info {
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 0.7rem 0.85rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.file-name-wrap {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-navy);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-name-wrap i {
  font-size: 1.2rem;
}

.file-meta-sub {
  font-size: 0.7rem;
  color: var(--muted);
  font-weight: normal;
}

.doc-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: auto;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.6rem 1.15rem;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: inherit;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-primary {
  background-color: var(--primary);
  color: white;
  box-shadow: 0 2px 4px rgba(2, 132, 199, 0.2);
}

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

.btn-outline {
  background-color: white;
  border-color: var(--border);
  color: var(--accent-navy);
}

.btn-outline:hover {
  background-color: var(--muted-light);
  border-color: #cbd5e1;
}

.btn-ghost {
  background-color: transparent;
  color: var(--muted);
}

.btn-ghost:hover {
  background-color: rgba(0, 0, 0, 0.05);
  color: var(--text-main);
}

.btn-sm {
  padding: 0.4rem 0.75rem;
  font-size: 0.8rem;
}

.btn-danger-ghost {
  background-color: transparent;
  color: var(--danger);
  border: 1px solid transparent;
}

.btn-danger-ghost:hover {
  background-color: var(--danger-bg);
  border-color: var(--danger-border);
}

/* Pedoman Section */
.pedoman-section {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}

.pedoman-header-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.pedoman-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--accent-navy);
  margin-top: 0.35rem;
}

.pedoman-sub {
  font-size: 0.85rem;
  color: var(--muted);
}

.pedoman-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.pdf-viewer-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.pdf-viewer-header {
  background-color: #1e293b;
  color: white;
  padding: 0.65rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

.pdf-viewer-header .btn {
  color: #cbd5e1;
}
.pdf-viewer-header .btn:hover {
  color: white;
}

.pdf-embed-box {
  background-color: #334155;
  min-height: 700px;
}

.pdf-fallback-box {
  padding: 4rem 2rem;
  text-align: center;
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  animation: modalFadeIn 0.2s ease-out;
}

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

.modal-box {
  background: white;
  width: 100%;
  max-width: 520px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  animation: modalSlideUp 0.25s ease-out;
}

.modal-sm { max-width: 420px; }
.modal-xl { max-width: 950px; }

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

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

.modal-header h3 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--accent-navy);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 1.25rem;
  color: var(--muted);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: var(--radius-sm);
  transition: all 0.15s;
}

.modal-close:hover {
  color: var(--text-main);
  background-color: var(--muted-light);
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.modal-footer {
  padding: 1rem 1.5rem;
  background-color: #f8fafc;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

.modal-doc-info {
  background-color: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
}

.modal-doc-info h4 {
  color: #0369a1;
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.2rem;
}

.modal-doc-info p {
  font-size: 0.8rem;
  color: var(--muted);
}

/* Dropzone */
.dropzone {
  border: 2px dashed #93c5fd;
  background-color: #f8fafc;
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.dropzone:hover, .dropzone.dragover {
  border-color: var(--primary);
  background-color: #f0f9ff;
}

.dropzone-icon {
  font-size: 2.25rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.dropzone-text {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--accent-navy);
}

.dropzone-hint {
  font-size: 0.75rem;
  color: var(--muted);
  display: block;
  margin-top: 0.25rem;
}

.dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.selected-file-info {
  background-color: #ecfdf5;
  border: 1px solid #a7f3d0;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: #047857;
  font-weight: 600;
}

.btn-clear-file {
  margin-left: auto;
  background: transparent;
  border: none;
  color: #047857;
  cursor: pointer;
}

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

.form-group label {
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--accent-navy);
}

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

.form-input {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.875rem;
  color: var(--text-main);
  outline: none;
  transition: border-color 0.2s;
}

.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.form-checkbox-wrap {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.8rem;
  color: var(--accent-navy);
}

.form-checkbox-wrap input {
  margin-top: 0.2rem;
}

/* Preview Lightbox */
.preview-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 420px;
  background-color: #0f172a;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.preview-container img {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
}

.preview-container object {
  width: 100%;
  height: 70vh;
}

/* Toast */
.toast-notification {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background-color: #0f172a;
  color: white;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.875rem;
  font-weight: 600;
  z-index: 9999;
  animation: slideUpToast 0.25s ease-out;
}

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

/* =========================================================
   RESPONSIVE DESIGN (Media Queries)
   ========================================================= */

/* Tablets & Small Laptops (<= 992px) */
@media (max-width: 992px) {
  .header-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.85rem;
  }
  .auth-section {
    width: 100%;
    justify-content: flex-end;
  }
  .athlete-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .athlete-action-col {
    width: 100%;
  }
}

/* Mobile & Smartphone Devices (<= 768px) */
@media (max-width: 768px) {
  /* Page & Container */
  .container {
    padding: 0 1rem;
  }
  .main-content {
    padding-top: 1rem;
    padding-bottom: 3.5rem;
  }

  /* Top Announcement Bar */
  .top-announcement {
    font-size: 0.725rem;
    padding: 0.4rem 0;
  }
  .announcement-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.35rem;
  }
  .badge-pill {
    font-size: 0.7rem;
    padding: 0.15rem 0.55rem;
  }

  /* Main Header */
  .header-container {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
    gap: 0.5rem;
  }
  .brand-section {
    gap: 0.65rem;
  }
  .brand-icon {
    width: 36px;
    height: 36px;
    font-size: 1rem;
    border-radius: 8px;
  }
  .brand-title {
    font-size: 0.95rem;
    line-height: 1.2;
  }
  .brand-subtitle {
    font-size: 0.725rem;
  }
  .view-mode-tag {
    display: none; /* Hide verbose view tag on mobile to save header space */
  }
  .auth-box {
    gap: 0.4rem;
  }
  .btn-sm {
    padding: 0.4rem 0.75rem;
    font-size: 0.75rem;
  }

  /* Athlete Card: Dedicated Profile Layout */
  .athlete-card {
    background: linear-gradient(180deg, #ffffff 0%, #f0f9ff 100%);
    border: 1.5px solid #bae6fd;
    border-radius: 20px;
    padding: 1.35rem 1rem;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.08);
  }
  .athlete-info-col {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.85rem;
    width: 100%;
  }
  .athlete-avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    border: 4px solid #ffffff;
    outline: 3px solid #0ea5e9;
    box-shadow: 0 6px 20px rgba(2, 132, 199, 0.3);
    margin: 0 auto;
  }
  .athlete-tags {
    justify-content: center;
    gap: 0.35rem;
  }
  .tag {
    font-size: 0.675rem;
    padding: 0.2rem 0.55rem;
  }
  .athlete-name {
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 0.35rem;
    color: var(--accent-navy);
  }
  .athlete-meta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    width: 100%;
    font-size: 0.8rem;
  }
  .athlete-meta span {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #e0f2fe;
    border-radius: 9999px;
    padding: 0.35rem 0.85rem;
    width: 100%;
    max-width: 320px;
    box-sizing: border-box;
    color: #334155;
    font-weight: 500;
  }
  .athlete-action-col {
    width: 100%;
  }
  .athlete-action-col .btn {
    width: 100%;
    justify-content: center;
    padding: 0.65rem 1rem;
    border-radius: 10px;
  }

  /* Section Header & Filter Pills */
  .section-title-wrap {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.85rem;
    margin-bottom: 1rem;
  }
  .section-title {
    font-size: 1.1rem;
    line-height: 1.3;
  }
  .section-desc {
    font-size: 0.8rem;
  }
  .filter-pills {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    width: 100%;
    gap: 0.3rem;
    padding: 0.25rem;
    background-color: #e2e8f0;
    border-radius: 12px;
  }
  .pill {
    text-align: center;
    padding: 0.5rem 0.25rem;
    font-size: 0.775rem;
    white-space: nowrap;
    border-radius: 8px;
  }

  /* =========================================================
     TRANSFORM TABLE INTO DEDICATED MOBILE CARDS
     ========================================================= */
  .document-table-card {
    background: transparent;
    border: none;
    box-shadow: none;
    border-radius: 0;
  }
  .table-responsive {
    overflow: visible;
  }
  .doc-table {
    display: block;
    width: 100%;
  }
  .doc-table thead {
    display: none; /* Hide wide table header on mobile */
  }
  .doc-table tbody {
    display: flex;
    flex-direction: column;
    gap: 0.95rem;
    width: 100%;
  }
  .doc-table tbody tr {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "no status"
      "name name"
      "action action";
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 16px;
    padding: 1.1rem 1rem;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
    gap: 0.65rem;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
  }
  .doc-table tbody tr:hover {
    background: #ffffff;
  }

  /* 1. Top row: Number/Code on left, Status on right */
  .doc-table td.td-no {
    grid-area: no;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-align: left;
    padding: 0;
  }
  .td-no .no-number {
    width: 26px;
    height: 26px;
    background: #e0f2fe;
    color: #0284c7;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 800;
  }
  .td-no .no-code-tag {
    margin-top: 0;
    font-size: 0.75rem;
    font-weight: 800;
    background: #f1f5f9;
    color: #0369a1;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
  }
  .doc-table td.td-status {
    grid-area: status;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0;
  }
  .doc-status-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.65rem;
  }

  /* 2. Middle row: Document Name & Details */
  .doc-table td.td-name {
    grid-area: name;
    display: block;
    padding: 0.35rem 0 0.65rem 0;
    border-bottom: 1px dashed #e2e8f0;
  }
  .doc-table-title {
    font-size: 0.975rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--accent-navy);
  }
  .doc-table-desc {
    font-size: 0.775rem;
    color: var(--muted);
    line-height: 1.45;
    margin-top: 0.25rem;
  }
  .doc-file-tag {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.725rem;
    padding: 0.35rem 0.6rem;
    margin-top: 0.5rem;
    width: 100%;
    box-sizing: border-box;
    white-space: normal;
    word-break: break-all;
    border-radius: 6px;
  }

  /* 3. Bottom row: Big Touch-Friendly Action Buttons */
  .doc-table td.td-action {
    grid-area: action;
    display: block;
    padding: 0;
    width: 100%;
  }
  .action-buttons-wrap {
    display: flex;
    width: 100%;
    gap: 0.5rem;
    flex-wrap: wrap;
  }
  .action-buttons-wrap .btn-action-preview,
  .action-buttons-wrap .btn-action-download {
    flex: 1 1 calc(50% - 0.25rem);
    justify-content: center;
    padding: 0.65rem 0.5rem;
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: 10px;
    min-height: 42px;
  }
  .action-buttons-wrap .btn-action-upload {
    width: 100%;
    justify-content: center;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    font-weight: 700;
    border-radius: 10px;
    min-height: 44px;
  }
  .action-buttons-wrap .btn-action-replace,
  .action-buttons-wrap .btn-action-delete {
    flex: 0 0 42px;
    height: 42px;
    padding: 0;
    justify-content: center;
    align-items: center;
    border-radius: 10px;
    font-size: 0.95rem;
  }

  /* Pedoman Section on Mobile */
  .pedoman-header-card {
    padding: 1.25rem 1rem;
    flex-direction: column;
    gap: 1rem;
    border-radius: 16px;
  }
  .pedoman-title {
    font-size: 1.1rem;
    line-height: 1.3;
  }
  .pedoman-sub {
    font-size: 0.8rem;
  }
  .pedoman-actions {
    width: 100%;
    flex-direction: column;
    gap: 0.5rem;
  }
  .pedoman-actions .btn {
    width: 100%;
    justify-content: center;
    min-height: 44px;
    border-radius: 10px;
    font-size: 0.875rem;
  }
  .pdf-viewer-card {
    display: none; /* Hide heavy iframe/object on mobile browsers */
  }

  /* Modals on Mobile */
  .modal-overlay {
    padding: 0.75rem;
    align-items: center;
  }
  .modal-box {
    width: 100%;
    max-width: 440px;
    max-height: 90vh;
    border-radius: 20px;
  }
  .modal-header {
    padding: 1rem 1.25rem;
  }
  .modal-body {
    padding: 1.25rem;
    gap: 0.85rem;
  }
  .modal-footer {
    padding: 0.85rem 1.25rem;
  }
  .modal-footer .btn {
    flex: 1;
    min-height: 44px;
    font-size: 0.875rem;
    font-weight: 700;
    justify-content: center;
  }
  .form-row {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  /* Toast Notification */
  .toast-notification {
    left: 1rem;
    right: 1rem;
    bottom: 1.25rem;
    text-align: center;
    justify-content: center;
    border-radius: 12px;
  }
}

/* Extra Small Phones (<= 400px) */
@media (max-width: 400px) {
  .brand-title {
    font-size: 0.875rem;
  }
  .athlete-avatar {
    width: 84px;
    height: 84px;
  }
  .athlete-name {
    font-size: 1.2rem;
  }
  .action-buttons-wrap .btn-action-preview,
  .action-buttons-wrap .btn-action-download {
    flex: 1 1 100%;
  }
}
