﻿/* PAGE SPECIFIC STYLES - Money & Gallery
   Clean, compact layout with accent header bars
*/

/* ---- Full-bleed Overrides ---- */
.page-fullbleed {
  max-width: 100%;
  margin: 0;
  padding: 0;
}

.page-card {
  border-radius: 0;
  border: none;
  box-shadow: none;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  animation: page-arrive 0.6s cubic-bezier(0.16,1,0.3,1) both;
}

@keyframes page-arrive {
  from { opacity: 0; }
  to   { opacity: 1; }
}


/* ---- Ambient Particles ---- */
.page-particles {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.particle {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(34,211,238,0.12), rgba(34,211,238,0.01));
  border: 1px solid rgba(34,211,238,0.05);
  animation: float var(--d) var(--t) ease-in-out infinite alternate;
  opacity: 0;
  width: var(--s);
  height: var(--s);
}

.particle:nth-child(1) { --s:10px; --d:8s;  --t:0s;  top:15%; left:5%;  }
.particle:nth-child(2) { --s:20px; --d:12s; --t:1s;  top:25%; right:8%; }
.particle:nth-child(3) { --s:8px;  --d:10s; --t:3s;  top:50%; left:15%; }
.particle:nth-child(4) { --s:14px; --d:14s; --t:2s;  top:70%; right:20%; }
.particle:nth-child(5) { --s:16px; --d:9s;  --t:4s;  top:85%; left:40%; }
.particle:nth-child(6) { --s:12px; --d:11s; --t:5s;  top:40%; right:45%; }

@keyframes float {
  0%   { transform: translateY(0) translateX(0); opacity: 0; }
  20%  { opacity: 0.5; }
  50%  { opacity: 0.3; }
  100% { transform: translateY(-40px) translateX(20px); opacity: 0; }
}


/* ---- Page Header with gradient accent ---- */
.page-header {
  position: relative;
  z-index: 5;
  padding: 20px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Money accent */
.money-accent {
  background:
    linear-gradient(180deg, rgba(34,211,238,0.06) 0%, transparent 100%),
    rgba(15,23,42,0.4);
}

/* Gallery accent */
.gallery-accent {
  background:
    linear-gradient(180deg, rgba(99,102,241,0.06) 0%, transparent 100%),
    rgba(15,23,42,0.4);
}

/* Login accent */
.login-accent {
  background:
    linear-gradient(180deg, rgba(168,85,247,0.06) 0%, transparent 100%),
    rgba(15,23,42,0.4);
}


/* --- 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(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
}

.section-bar::before {
  content: "\2756";
  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;
}


/* --- Footer full-bleed --- */
.page-card > footer,
.page-card footer {
  border-top: 1px solid var(--border);
  background: rgba(0,0,0,0.15);
}


/* --- Stats Dashboard (Money Page) --- */
.stats-overview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  padding: 32px 32px 12px;
  max-width: 800px;
  margin: 0 auto;
  animation: page-fade-up 0.5s 0.2s cubic-bezier(0.16,1,0.3,1) both;
}

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

.stat-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(34,211,238,0.2);
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.3);
}

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

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

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


/* --- Table (Full-bleed width) --- */
.table-wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px 32px;
  animation: page-fade-up 0.5s 0.35s cubic-bezier(0.16,1,0.3,1) both;
}

#contacts-table {
  border-collapse: separate;
  border-spacing: 0 8px;
  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: background 0.2s ease, box-shadow 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 {
  background: rgba(34, 211, 238, 0.05);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

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

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


/* --- 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; }
}


/* --- Shared Keyframe --- */
@keyframes page-fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}


/* --- Responsive --- */
@media (max-width: 640px) {
  .page-header { padding: 14px 16px; }
  .stats-overview { padding: 20px 16px 8px; gap: 12px; }
  .stat-value { font-size: 22px; }
  .table-wrap { padding: 0 12px 24px; }
  #contacts-table td:nth-child(4),
  #contacts-table th:nth-child(4) {
    display: none;
  }
}


/* ---- Light Theme Overrides ---- */
[data-theme="light"] .money-accent {
  background:
    linear-gradient(180deg, rgba(8,145,178,0.06) 0%, transparent 100%),
    rgba(255,255,255,0.7);
}

[data-theme="light"] .gallery-accent {
  background:
    linear-gradient(180deg, rgba(99,102,241,0.05) 0%, transparent 100%),
    rgba(255,255,255,0.7);
}

[data-theme="light"] .login-accent {
  background:
    linear-gradient(180deg, rgba(168,85,247,0.04) 0%, transparent 100%),
    rgba(255,255,255,0.7);
}

[data-theme="light"] .page-card > footer,
[data-theme="light"] .page-card footer {
  background: rgba(0,0,0,0.02);
}

[data-theme="light"] .stat-card {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(0, 0, 0, 0.06);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

[data-theme="light"] .stat-card:hover {
  background: #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

[data-theme="light"] .section-bar {
  background: rgba(0, 0, 0, 0.02);
}

[data-theme="light"] #contacts-table tbody tr {
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

[data-theme="light"] #contacts-table tbody tr:hover {
  background: #fff;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

[data-theme="light"] #contacts-table a {
  background: rgba(8, 145, 178, 0.08);
  border-color: rgba(8, 145, 178, 0.2);
}

[data-theme="light"] .particle {
  background: radial-gradient(circle at 30% 30%, rgba(8,145,178,0.06), rgba(8,145,178,0.01));
  border-color: rgba(8,145,178,0.03);
}

[data-theme="light"] .sk-blob,
[data-theme="light"] .sk-line {
  background: rgba(0, 0, 0, 0.06);
}
