/* ==========================================
   DESIGN SYSTEM & VARIABLES
   ========================================== */
:root {
  /* Color Palette - Espresso & Caramel Gold Theme */
  --bg-main: #0c0806;
  --bg-secondary: #140e0b;
  --bg-gradient: radial-gradient(circle at 50% 0%, #1c130e 0%, #0c0806 80%);
  
  --primary: #d49a5b; /* Caramel Gold */
  --primary-hover: #e5b075;
  --primary-glow: rgba(212, 154, 91, 0.25);
  
  --secondary: #e6a93b; /* Amber */
  --secondary-glow: rgba(230, 169, 59, 0.2);
  
  --accent: #2e1d15; /* Coffee Roast */
  
  /* Text Colors */
  --text-primary: #f5ece5;
  --text-secondary: #bba698;
  --text-muted: #837064;
  
  /* UI Elements */
  --glass-bg: rgba(20, 14, 11, 0.65);
  --glass-border: rgba(212, 154, 91, 0.15);
  --glass-border-hover: rgba(212, 154, 91, 0.3);
  --glass-shadow: rgba(0, 0, 0, 0.5);
  
  --card-border-radius: 16px;
  --transition-speed: 0.3s;
  --transition-bezier: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================
   RESET & GLOBAL STYLES
   ========================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Outfit', sans-serif;
  background-color: var(--bg-main);
  background-image: var(--bg-gradient);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
  background: #2a1b14;
  border-radius: 5px;
  border: 2px solid var(--bg-main);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* Top Bar Decorative Gradient */
.top-bar-gradient {
  height: 6px;
  width: 100%;
  background: linear-gradient(90deg, #5c3b21 0%, #d49a5b 50%, #e6a93b 100%);
  box-shadow: 0 2px 20px var(--primary-glow);
  position: relative;
  z-index: 10;
}

.app-container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  min-height: 100vh;
}

/* ==========================================
   HEADER SECTION
   ========================================== */
.main-header {
  margin-bottom: 0.5rem;
}

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

.logo-area {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo-icon {
  font-size: 3rem;
  filter: drop-shadow(0 0 10px var(--primary-glow));
  animation: float 4s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.main-header h1 {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: 2px;
  background: linear-gradient(135deg, #ffffff 0%, var(--primary) 60%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.5px;
}

.date-badge {
  background: rgba(212, 154, 91, 0.08);
  border: 1px solid var(--glass-border);
  padding: 0.6rem 1.2rem;
  border-radius: 50px;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--primary);
  backdrop-filter: blur(10px);
}

/* ==========================================
   STATS DASHBOARD
   ========================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.stat-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--card-border-radius);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.2rem;
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px 0 var(--glass-shadow);
  transition: transform var(--transition-speed) var(--transition-bezier), border-color var(--transition-speed);
}

.stat-card:hover {
  transform: translateY(-5px);
  border-color: var(--glass-border-hover);
  box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.6), 0 0 15px rgba(212, 154, 91, 0.05);
}

.stat-icon {
  font-size: 2.2rem;
  background: rgba(212, 154, 91, 0.1);
  width: 60px;
  height: 60px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(212, 154, 91, 0.15);
}

.stat-info {
  display: flex;
  flex-direction: column;
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 500;
}

.stat-value {
  color: var(--text-primary);
  font-size: 1.4rem;
  font-weight: 700;
  margin-top: 0.2rem;
}

/* ==========================================
   GLASS PANELS (Reusable)
   ========================================== */
.glass-panel {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--card-border-radius);
  backdrop-filter: blur(16px);
  box-shadow: 0 8px 32px 0 var(--glass-shadow);
  transition: border-color var(--transition-speed) var(--transition-bezier);
}

.glass-panel:hover {
  border-color: rgba(212, 154, 91, 0.25);
}

/* ==========================================
   LAYOUT STRUCTURE
   ========================================== */
.main-layout {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 2rem;
  align-items: start;
}

.results-column {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* ==========================================
   CONTROL CARD (SEARCH & FILTERS)
   ========================================== */
.control-card {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.search-box {
  position: relative;
  width: 100%;
}

.search-icon {
  position: absolute;
  left: 1.2rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1.2rem;
}

.search-box input {
  width: 100%;
  padding: 1rem 3rem;
  background: rgba(12, 8, 6, 0.8);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1rem;
  transition: all var(--transition-speed) var(--transition-bezier);
}

.search-box input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-glow);
}

.clear-btn {
  position: absolute;
  right: 1.2rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  transition: color var(--transition-speed);
}

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

.filters-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.filter-group {
  flex: 1;
  min-width: 200px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.filter-group label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  font-weight: 600;
}

.filter-group select {
  padding: 0.9rem 1.2rem;
  background: rgba(12, 8, 6, 0.8);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  cursor: pointer;
  outline: none;
  transition: all var(--transition-speed) var(--transition-bezier);
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23bba698' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 1.2rem center;
  background-size: 1em;
  padding-right: 2.5rem;
}

.filter-group select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

/* ==========================================
   RESULTS TABLE CARD
   ========================================== */
.table-card {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  overflow: hidden;
}

.table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(212, 154, 91, 0.1);
  padding-bottom: 1rem;
}

.table-header h2 {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.results-count {
  font-size: 0.85rem;
  color: var(--text-muted);
  background: rgba(212, 154, 91, 0.05);
  padding: 0.3rem 0.8rem;
  border-radius: 30px;
  border: 1px solid rgba(212, 154, 91, 0.08);
}

.table-wrapper {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid rgba(212, 154, 91, 0.08);
  background: rgba(12, 8, 6, 0.4);
}

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

th, td {
  padding: 1rem 1.2rem;
  border-bottom: 1px solid rgba(212, 154, 91, 0.05);
}

th {
  background-color: rgba(20, 14, 11, 0.9);
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 1px;
  user-select: none;
}

th.sortable {
  cursor: pointer;
  transition: background var(--transition-speed), color var(--transition-speed);
}

th.sortable:hover {
  background: rgba(212, 154, 91, 0.05);
  color: var(--text-primary);
}

.sort-indicator {
  display: inline-block;
  margin-left: 4px;
  font-size: 0.7rem;
  color: var(--primary);
}

tbody tr {
  cursor: pointer;
  transition: all 0.2s ease;
}

tbody tr:hover {
  background-color: rgba(212, 154, 91, 0.08);
}

tbody tr.selected-row {
  background-color: rgba(212, 154, 91, 0.15) !important;
  border-left: 4px solid var(--primary);
}

/* Table Specific Cell Styles */
.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.85rem;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
}

tr:nth-child(1) .rank-badge {
  background: linear-gradient(135deg, #ffd700, #b8860b);
  color: #000;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

tr:nth-child(2) .rank-badge {
  background: linear-gradient(135deg, #c0c0c0, #708090);
  color: #000;
  box-shadow: 0 0 10px rgba(192, 192, 192, 0.2);
}

tr:nth-child(3) .rank-badge {
  background: linear-gradient(135deg, #cd7f32, #8b4513);
  color: #fff;
  box-shadow: 0 0 10px rgba(205, 127, 50, 0.2);
}

.cell-placa {
  font-family: monospace;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--primary);
  background: rgba(212, 154, 91, 0.06);
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  border: 1px solid rgba(212, 154, 91, 0.1);
  display: inline-block;
}

.cell-name {
  font-weight: 600;
  color: var(--text-primary);
}

.cell-cat {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.cell-time {
  font-weight: 700;
  font-family: monospace;
  color: var(--secondary);
}

.cell-diff {
  font-family: monospace;
  font-size: 0.85rem;
  color: var(--text-muted);
}

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

.btn-icon-only {
  background: rgba(212, 154, 91, 0.1);
  border: 1px solid rgba(212, 154, 91, 0.2);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  transition: all var(--transition-speed);
}

.btn-icon-only:hover {
  background: var(--primary);
  color: #000;
  transform: scale(1.1);
  box-shadow: 0 0 10px var(--primary-glow);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}

.empty-icon {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.empty-state h3 {
  color: var(--text-secondary);
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

/* ==========================================
   DETAIL COLUMN & DIPLOMA VIEWER
   ========================================== */
.detail-column {
  position: sticky;
  top: 2rem;
}

.detail-card {
  padding: 1.8rem;
  min-height: 500px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Selection Prompt */
.detail-prompt {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

.prompt-icon {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  opacity: 0.3;
  animation: pulse 2s infinite alternate;
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 0.25; }
  100% { transform: scale(1.08); opacity: 0.45; }
}

.detail-prompt h3 {
  color: var(--text-secondary);
  font-size: 1.25rem;
  margin-bottom: 0.8rem;
}

.detail-prompt p {
  font-size: 0.9rem;
  line-height: 1.6;
}

/* Detail Content Mode */
.detail-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  height: 100%;
}

.close-detail-btn {
  align-self: flex-end;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-secondary);
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.2s;
  display: none; /* Only visible on mobile/responsive layouts */
}

.close-detail-btn:hover {
  background: rgba(255,255,255,0.1);
  color: var(--text-primary);
}

.rider-header {
  border-bottom: 1px solid rgba(212, 154, 91, 0.1);
  padding-bottom: 1.2rem;
}

.rider-placa-badge {
  font-family: monospace;
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  background: rgba(212, 154, 91, 0.15);
  color: var(--primary);
  border: 1px solid rgba(212, 154, 91, 0.25);
  padding: 0.3rem 0.7rem;
  border-radius: 6px;
  display: inline-block;
  margin-bottom: 0.6rem;
}

.rider-header h2 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

.rider-cat-tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-secondary);
  background: var(--accent);
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
}

.rider-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.8rem;
}

.rider-stat-box {
  background: rgba(12, 8, 6, 0.6);
  border: 1px solid rgba(212, 154, 91, 0.08);
  border-radius: 10px;
  padding: 0.8rem;
  display: flex;
  flex-direction: column;
}

.box-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.5px;
}

.box-val {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 0.1rem;
}

#rider-time {
  color: var(--secondary);
  font-family: monospace;
}

#rider-puesto-global, #rider-puesto-cat {
  color: var(--primary);
}

/* Diploma Preview Component */
.diploma-viewer-section {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.viewer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.viewer-header h3 {
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.2rem;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-speed) var(--transition-bezier);
  text-decoration: none;
  border: none;
}

.btn-primary {
  background: var(--primary);
  color: #0c0806;
  box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(212, 154, 91, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
}

.pdf-container {
  height: 250px;
  border: 1px solid rgba(212, 154, 91, 0.15);
  border-radius: 10px;
  overflow: hidden;
  background: #000;
  position: relative;
}

.pdf-container iframe {
  width: 100%;
  height: 100%;
  background: #fff;
}

.pdf-fallback {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1.5rem;
  text-align: center;
  background: rgba(20, 14, 11, 0.95);
}

.pdf-fallback p {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* ==========================================
   FOOTER
   ========================================== */
.main-footer {
  margin-top: 1rem;
  border-top: 1px solid rgba(212, 154, 91, 0.08);
  padding: 1.5rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.app-version {
  background: rgba(212, 154, 91, 0.04);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  border: 1px solid rgba(212, 154, 91, 0.05);
}

/* ==========================================
   RESPONSIVE DESIGN / MEDIA QUERIES
   ========================================== */
@media (max-width: 1100px) {
  .main-layout {
    grid-template-columns: 1fr; /* Single column layout */
  }
  
  .detail-column {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100;
    padding: 1rem;
    background: rgba(12, 8, 6, 0.95);
    backdrop-filter: blur(20px);
    display: none; /* Managed by JS - only show when active class is added */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .detail-column.active {
    display: block; /* Use block to allow scrolling naturally */
  }
  
  .detail-card {
    width: 100%;
    max-width: 550px;
    margin: 2rem auto;
    min-height: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.8);
  }
  
  .close-detail-btn {
    display: block; /* Show close button in mobile popup mode */
    margin-bottom: 1rem;
  }
  
  .pdf-container {
    height: 380px; /* Taller on mobile overlay */
  }
}

@media (max-width: 768px) {
  .app-container {
    padding: 1rem;
    gap: 1.2rem;
  }
  
  .main-header h1 {
    font-size: 1.8rem;
  }
  
  .logo-icon {
    font-size: 2rem;
  }
  
  .subtitle {
    font-size: 0.85rem;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
  }

  .stat-card {
    padding: 0.8rem;
    gap: 0.6rem;
    border-radius: 12px;
  }

  .stat-icon {
    width: 44px;
    height: 44px;
    font-size: 1.5rem;
    border-radius: 8px;
  }

  .stat-value {
    font-size: 1.1rem;
  }

  .control-card {
    padding: 1rem;
    gap: 1rem;
  }

  .search-box input {
    padding: 0.8rem 2.5rem;
    font-size: 0.9rem;
  }

  .filter-group {
    min-width: 100%;
  }

  .table-card {
    padding: 1rem;
    background: transparent;
    border: none;
    box-shadow: none;
  }
  
  .table-header {
    margin-bottom: 1rem;
  }

  /* Transform table to card list on mobile devices */
  table, thead, tbody, th, td, tr {
    display: block;
  }
  
  thead {
    display: none; /* Hide table headers visually */
  }
  
  .table-wrapper {
    background: transparent;
    border: none;
    overflow-x: visible;
  }

  tbody tr {
    background: rgba(20, 14, 11, 0.55);
    border: 1px solid rgba(212, 154, 91, 0.12);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 0.8rem;
    display: grid;
    grid-template-areas:
      "rank name action"
      "placa cat action"
      "city time action";
    grid-template-columns: 45px 1fr 45px;
    gap: 0.4rem;
    align-items: center;
    position: relative;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    border-left: 3px solid rgba(212, 154, 91, 0.3);
  }
  
  tbody tr.selected-row {
    border-color: var(--primary);
    border-left: 3px solid var(--primary);
    background: rgba(212, 154, 91, 0.15) !important;
    box-shadow: 0 4px 20px rgba(212, 154, 91, 0.15);
  }
  
  td {
    padding: 0 !important;
    border: none !important;
    display: flex;
    align-items: center;
  }
  
  /* Map each cell to card layout grid area */
  td:nth-child(1) { 
    grid-area: rank; 
    justify-content: flex-start;
  }
  td:nth-child(2) { 
    grid-area: placa; 
    display: inline-block;
  }
  td:nth-child(3) { 
    grid-area: name; 
    font-weight: 700;
    color: var(--text-primary);
  }
  td:nth-child(4) { 
    grid-area: cat; 
    font-size: 0.8rem;
    color: var(--text-secondary);
  }
  td:nth-child(5) { 
    grid-area: city; 
    font-size: 0.8rem;
    color: var(--text-muted);
  }
  td:nth-child(6) { 
    grid-area: time; 
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--secondary);
  }
  td:nth-child(7) { 
    display: none; /* Hide difference column */
  } 
  td:nth-child(8) { 
    grid-area: action; 
    display: flex;
    justify-content: flex-end;
  }

  .rank-badge {
    width: 28px;
    height: 28px;
    font-size: 0.8rem;
  }

  .cell-name {
    font-size: 0.95rem;
    line-height: 1.3;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .header-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.8rem;
  }
  
  .date-badge {
    align-self: flex-start;
  }
  
  tbody tr {
    grid-template-areas:
      "rank name"
      "placa cat"
      "city time"
      "action action";
    grid-template-columns: 45px 1fr;
    gap: 0.4rem;
  }
  
  td:nth-child(8) {
    justify-content: center;
    margin-top: 0.4rem;
    border-top: 1px solid rgba(212, 154, 91, 0.08) !important;
    padding-top: 0.4rem !important;
  }
  
  .btn-icon-only {
    width: 100%;
    border-radius: 6px;
    gap: 0.5rem;
    font-size: 0.85rem;
    padding: 0.5rem;
    height: auto;
  }
  
  .btn-icon-only::after {
    content: " Ver Diploma";
    font-weight: 600;
  }
}

/* Spinner for loading PDFs */
.spinner {
  width: 45px;
  height: 45px;
  border: 4px solid rgba(212, 154, 91, 0.15);
  border-left-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
