/* PAGE SPECIFIC STYLES - Money & Gallery
   Vibe: Clean layout tweaks for content-heavy pages
*/

/* --- Header Layout --- */
.titleblock {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  min-width: 0;
}

.titleblock h1 {
  margin: 0;
  font-size: 26px;
  line-height: 1.2;
  font-weight: 700;
  color: var(--text);
}

.subhead {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  opacity: 0.8;
  line-height: 1.4;
}

/* --- Section Dividers --- */
.section-bar {
  padding: 12px 24px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
}

.section-bar::before {
  content: "❖"; 
  margin-right: 10px;
  opacity: 0.6;
  font-size: 10px;
  color: var(--accent);
}

.card .content {
  padding: 0;
  position: relative;
}

.hint {
  display: block !important;
  color: var(--muted);
  font-size: 13px;
}

/* --- NEW: Stats Dashboard (Money Page) --- */
.stats-overview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 24px 24px 8px 24px;
}

.stat-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; width: 4px; height: 100%;
  background: var(--accent);
  opacity: 0.5;
}

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

.stat-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
}

/* --- NEW: Floating Table Rows --- */
#contacts-table {
  border-collapse: separate;
  border-spacing: 0 8px;
  padding: 0 16px;
  width: 100%;
}

#contacts-table thead th {
  background: transparent;
  border-bottom: none;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 0 16px 8px;
  color: var(--muted);
}

#contacts-table tbody tr {
  background: rgba(30, 41, 59, 0.4);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transition: transform 0.2s ease, background 0.2s ease;
}

#contacts-table tbody tr td:first-child { border-top-left-radius: 12px; border-bottom-left-radius: 12px; }
#contacts-table tbody tr td:last-child { border-top-right-radius: 12px; border-bottom-right-radius: 12px; }

#contacts-table tbody tr td {
  border-bottom: none;
  padding: 16px;
  color: var(--text);
  vertical-align: middle;
}

#contacts-table tbody tr:hover {
  transform: scale(1.01);
  background: rgba(34, 211, 238, 0.05);
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

/* --- FIX: Phone & Meal Column Styling --- */
/* Style phone links as buttons */
#contacts-table a {
  display: inline-block;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  padding: 6px 12px;
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.3);
  border-radius: 8px;
  transition: all 0.2s ease;
}

#contacts-table a:hover {
  background: var(--accent);
  color: #0f172a;
  transform: translateY(-1px);
}

/* Style the Meal/Notes text */
#contacts-table td:nth-child(4) {
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--muted);
}

/* NEW: Skeleton Loading */
.skeleton-row td { padding: 16px; }
.sk-blob, .sk-line {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  animation: pulse 1.5s infinite ease-in-out;
}
.sk-blob { width: 24px; height: 24px; border-radius: 50%; }
.sk-line { height: 14px; }
.sk-line.long { width: 80%; }
.sk-line.medium { width: 60%; }
.sk-line.short { width: 40%; }
@keyframes pulse {
  0% { opacity: 0.3; }
  50% { opacity: 0.7; }
  100% { opacity: 0.3; }
}

@media (max-width: 600px) {
  .stats-overview { padding: 16px; }
  #contacts-table { padding: 0 8px; }
  .stat-value { font-size: 20px; }
  /* Keep meal hidden on very small screens, or show it if crucial */
  #contacts-table td:nth-child(4), 
  #contacts-table th:nth-child(4) { 
     display: none; 
  }
}