@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Manrope:wght@400;500;700;800&display=swap');

:root{
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f5f4f2;
  --accent: #e40605;        /* Vajnory red */
  --accent-dark: #b30504;
  --accent-soft: rgba(228,6,5,0.08);
  --text: #1c1b1a;
  --muted: #6d6b68;
  --border: #e6e3df;
  --radius: 14px;
}

*{box-sizing:border-box;}
html,body{margin:0;padding:0;}
body{
  background:var(--bg);
  color:var(--text);
  font-family:'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height:1.5;
  -webkit-tap-highlight-color:transparent;
}

.wrap{
  max-width:560px;
  margin:0 auto;
  padding:0 18px 48px;
}

/* --- Signature top bar --- */
.top-flag{
  height:6px;
  background:var(--accent);
}

header.app-header{
  text-align:center;
  padding:28px 18px 18px;
}
.logo-row{
  display:flex;
  align-items:center;
  justify-content:center;
  flex-wrap:wrap;
  gap:16px;
  margin-bottom:18px;
}
.logo-row img{
  height:38px;
  width:auto;
  max-width:180px;
  object-fit:contain;
}
.logo-row .logo-chip{
  background:var(--surface-2);
  border:1px solid var(--border);
  border-radius:10px;
  padding:8px 14px;
  display:flex;
  align-items:center;
}
.logo-row .logo-chip img{ height:30px; }
.logo-row .logo-divider{
  width:1px;
  height:28px;
  background:var(--border);
}
header.app-header h1{
  font-family:'Bebas Neue', sans-serif;
  letter-spacing:0.06em;
  font-size:2.4rem;
  margin:0.2em 0 0.1em;
  color:var(--accent);
}
header.app-header p{
  color:var(--muted);
  margin:0;
  font-size:0.95rem;
}

.card{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:22px;
  margin-top:18px;
  box-shadow:0 1px 3px rgba(20,18,16,0.04);
}

/* Ticket-stub signature on the upload card: punched holes + perforated top edge */
.card.ticket{
  position:relative;
  margin-top:30px;
}
.card.ticket::before,
.card.ticket::after{
  content:"";
  position:absolute;
  top:-11px;
  width:22px; height:22px;
  border-radius:50%;
  background:var(--bg);
  border:1px solid var(--border);
}
.card.ticket::before{ left:-11px; }
.card.ticket::after{ right:-11px; }
.card.ticket .perforation{
  position:absolute;
  top:-1px; left:22px; right:22px;
  height:1px;
  background-image:linear-gradient(90deg, var(--border) 60%, transparent 0%);
  background-size:10px 1px;
  background-repeat:repeat-x;
}

label{
  display:block;
  font-weight:700;
  font-size:0.85rem;
  letter-spacing:0.02em;
  margin:16px 0 6px;
  color:var(--text);
}
label .req{ color:var(--accent); }
label .opt{ color:var(--muted); font-weight:500; }

input[type=text],
input[type=email],
input[type=password],
textarea{
  width:100%;
  background:var(--surface-2);
  border:1px solid var(--border);
  border-radius:10px;
  padding:12px 14px;
  color:var(--text);
  font-family:inherit;
  font-size:1rem;
}
input:focus, textarea:focus{
  outline:2px solid var(--accent);
  outline-offset:1px;
}
textarea{ min-height:80px; resize:vertical; }

.file-drop{
  margin-top:16px;
  border:2px dashed var(--border);
  border-radius:12px;
  padding:22px 16px;
  text-align:center;
  color:var(--muted);
  cursor:pointer;
  transition:border-color .15s ease, background .15s ease;
}
.file-drop.has-file{ border-color:var(--accent); color:var(--text); background:var(--accent-soft); }
.file-drop input{ display:none; }
.file-drop .shutter{
  width:56px; height:56px;
  border-radius:50%;
  background:var(--accent);
  margin:0 auto 10px;
  display:flex; align-items:center; justify-content:center;
  box-shadow:0 0 0 4px var(--surface-2), 0 0 0 5px var(--border);
}
.file-drop .shutter svg{ width:26px; height:26px; }
.preview-grid{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  justify-content:center;
  margin-top:12px;
}
.preview-grid img.preview{
  width:72px; height:72px;
  object-fit:cover;
  border-radius:8px;
  border:1px solid var(--border);
}

button.submit-btn{
  width:100%;
  margin-top:22px;
  background:var(--accent);
  color:#fff;
  border:none;
  border-radius:10px;
  padding:14px;
  font-size:1.05rem;
  font-weight:800;
  letter-spacing:0.02em;
  cursor:pointer;
}
button.submit-btn:hover{ background:var(--accent-dark); }
button.submit-btn:active{ transform:translateY(1px); }
button.submit-btn:disabled{ opacity:0.6; }

.msg{
  border-radius:10px;
  padding:12px 14px;
  margin-top:16px;
  font-size:0.92rem;
}
.msg.success{ background:#e9f7ec; color:#1c6b34; border:1px solid #b9e5c4; }
.msg.error{ background:#fdeceb; color:#a4201d; border:1px solid #f4bcb9; }

.hint{ color:var(--muted); font-size:0.8rem; margin-top:6px; }

footer.app-footer{
  text-align:center;
  color:var(--muted);
  font-size:0.78rem;
  margin-top:28px;
}
a.gallery-link{
  display:block;
  text-align:center;
  margin-top:18px;
  color:var(--accent);
  font-weight:700;
  text-decoration:none;
}
a.gallery-link:hover{ color:var(--accent-dark); }

/* --- Gallery --- */
.gallery-wrap{ max-width:1100px; }
.gallery-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(220px, 1fr));
  gap:16px;
  margin-top:18px;
}
.photo-card{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius);
  overflow:hidden;
  display:flex;
  flex-direction:column;
  box-shadow:0 1px 3px rgba(20,18,16,0.04);
}
.photo-card .photo-frame{
  aspect-ratio:4/3;
  overflow:hidden;
  background:var(--surface-2);
}
.photo-card img{
  width:100%; height:100%; object-fit:cover; display:block;
  cursor:zoom-in;
}
.photo-meta{ padding:12px 14px 14px; }
.photo-desc{ font-size:0.92rem; margin:0 0 4px; }
.photo-author{ color:var(--muted); font-size:0.8rem; margin:0 0 10px; }
.like-row{
  display:flex; align-items:center; gap:8px;
}
.like-btn{
  display:flex; align-items:center; gap:6px;
  background:var(--surface-2);
  border:1px solid var(--border);
  color:var(--text);
  border-radius:999px;
  padding:7px 14px;
  font-weight:700;
  font-size:0.85rem;
  cursor:pointer;
}
.like-btn svg{ width:16px; height:16px; }
.like-btn.liked{ background:var(--accent-soft); border-color:var(--accent); color:var(--accent-dark); }
.like-btn.liked svg{ fill:var(--accent); }
.like-btn:disabled{ opacity:0.6; cursor:default; }

.empty-state{
  text-align:center;
  color:var(--muted);
  padding:60px 20px;
}

/* Lightbox */
.lightbox{
  position:fixed; inset:0; background:rgba(20,18,16,0.88);
  display:none; align-items:center; justify-content:center; z-index:50; padding:20px;
}
.lightbox.open{ display:flex; }
.lightbox img{ max-width:100%; max-height:90vh; border-radius:8px; }
.lightbox-close{
  position:absolute; top:16px; right:20px;
  background:none; border:none; color:#fff; font-size:2rem; cursor:pointer;
}

/* Admin */
.admin-table{ width:100%; border-collapse:collapse; margin-top:18px; }
.admin-table th, .admin-table td{
  border-bottom:1px solid var(--border);
  padding:10px 8px;
  text-align:left;
  font-size:0.88rem;
  vertical-align:middle;
}
.admin-table img{ width:70px; height:52px; object-fit:cover; border-radius:6px; }
.btn-delete{
  background:#fff; color:var(--accent); border:1px solid var(--accent); border-radius:8px;
  padding:8px 12px; font-weight:700; cursor:pointer; font-size:0.82rem;
}
.btn-delete:hover{ background:var(--accent-soft); }
.btn-approve{
  background:var(--accent); color:#fff; border:none; border-radius:8px;
  padding:8px 12px; font-weight:700; cursor:pointer; font-size:0.82rem;
}
.btn-approve:hover{ background:var(--accent-dark); }
.action-cell{ display:flex; gap:8px; flex-wrap:wrap; }
.login-form{ max-width:360px; margin:60px auto; }
.top-bar{
  display:flex; justify-content:space-between; align-items:center;
  padding-top:24px; flex-wrap:wrap; gap:10px;
}
.top-bar a{ color:var(--accent); text-decoration:none; font-weight:700; font-size:0.85rem;}
.top-bar a:hover{ color:var(--accent-dark); }

.admin-tabs{
  display:flex; gap:6px; margin-top:18px; border-bottom:1px solid var(--border);
  flex-wrap:wrap;
}
.admin-tabs a{
  padding:10px 14px;
  color:var(--muted);
  text-decoration:none;
  font-weight:700;
  font-size:0.88rem;
  border-bottom:2px solid transparent;
  margin-bottom:-1px;
}
.admin-tabs a.active{ color:var(--accent); border-bottom-color:var(--accent); }
.admin-tabs .badge{
  background:var(--accent);
  color:#fff;
  border-radius:999px;
  padding:1px 7px;
  font-size:0.72rem;
  margin-left:4px;
}
.status-badge{
  display:inline-block;
  padding:3px 9px;
  border-radius:999px;
  font-size:0.76rem;
  font-weight:700;
  white-space:nowrap;
}
.status-badge.status-pending{ background:#fdf1e0; color:#946200; }
.status-badge.status-approved{ background:#e9f7ec; color:#1c6b34; }

@media (max-width:480px){
  .admin-table{ font-size:0.78rem; }
}
