/* Svet techniky - Camp Management System (PHP edition) - static stylesheet */

:root {
  --background: #05070d;
  --foreground: #e6f1ff;
  --panel: #0b1120;
  --panel-border: #1e293b;
  --neon-blue: #22d3ee;
  --neon-green: #39ff8f;
  --neon-pink: #ff3df0;
  --muted: #94a3b8;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }

body {
  background: var(--background);
  color: var(--foreground);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-image:
    radial-gradient(circle at 15% 0%, rgba(34, 211, 238, 0.12), transparent 40%),
    radial-gradient(circle at 85% 20%, rgba(57, 255, 143, 0.08), transparent 40%),
    linear-gradient(180deg, #05070d 0%, #060a14 100%);
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }

::selection { background: var(--neon-blue); color: #05070d; }

/* ---------- Layout ---------- */
.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 256px;
  flex-shrink: 0;
  align-self: flex-start;
  border-right: 1px solid var(--panel-border);
  background: rgba(11, 17, 32, 0.7);
  backdrop-filter: blur(10px);
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--panel-border);
  padding: 20px;
}
.brand-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--neon-green);
  box-shadow: 0 0 8px 2px rgba(57,255,143,0.8);
}
.brand-title { margin: 0; font-size: 14px; font-weight: 700; color: var(--neon-blue); text-shadow: 0 0 12px rgba(34,211,238,0.55); }
.brand-subtitle { margin: 0; font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: #64748b; }

.sidebar-nav { flex: 1; overflow-y: auto; padding: 16px 12px; }
.sidebar-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.nav-link {
  display: flex; align-items: center; gap: 12px;
  border-radius: 8px; padding: 10px 12px; font-size: 14px;
  color: #cbd5e1; transition: background 0.15s, color 0.15s;
}
.nav-link:hover { background: rgba(34,211,238,0.1); color: #67e8f9; }
.nav-link-active { background: rgba(34,211,238,0.12); color: #67e8f9; }

.sidebar-footer { border-top: 1px solid var(--panel-border); padding: 16px; }
.user-chip {
  display: flex; align-items: center; gap: 12px;
  border-radius: 8px; background: rgba(0,0,0,0.3); padding: 10px 12px; margin-bottom: 12px;
}
.user-avatar {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, #22d3ee, #39ff8f);
  color: #05070d; font-size: 12px; font-weight: 700;
}
.user-name { margin: 0; font-size: 14px; font-weight: 500; color: var(--foreground); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.btn-logout {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  border-radius: 8px; border: 1px solid var(--panel-border); background: transparent;
  color: #cbd5e1; padding: 8px 12px; font-size: 14px; cursor: pointer; transition: border-color 0.15s, color 0.15s;
}
.btn-logout:hover { border-color: rgba(251,113,133,0.5); color: #fda4af; }

.main-content { flex: 1; min-width: 0; padding: 32px 40px; }
.main-inner { max-width: 1100px; margin: 0 auto; }

@media (max-width: 900px) {
  .sidebar { width: 72px; }
  .sidebar-brand p, .nav-link span.label, .user-name, .brand-subtitle, .brand-title { display: none; }
  .main-content { padding: 24px; }
}

/* ---------- Typography helpers ---------- */
h1.page-title { font-size: 24px; font-weight: 700; margin: 0; color: var(--foreground); }
p.page-subtitle { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.neon-text { color: var(--neon-blue); text-shadow: 0 0 12px rgba(34,211,238,0.55); }
.section-title { font-size: 18px; font-weight: 700; margin: 32px 0 12px; color: var(--foreground); }

/* ---------- Utility ---------- */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 4px; } .gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; }
.flex-wrap { flex-wrap: wrap; }
.mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; } .mt-5 { margin-top: 20px; } .mt-6 { margin-top: 24px; } .mt-8 { margin-top: 32px; } .mt-10 { margin-top: 40px; }
.ml-auto { margin-left: auto; }
.text-muted { color: var(--muted); font-size: 14px; }
.text-xs { font-size: 12px; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w-full { width: 100%; }
.max-w-md { max-width: 480px; }
.max-w-xl { max-width: 640px; }
.max-w-2xl { max-width: 720px; }
.max-w-3xl { max-width: 860px; }

/* ---------- Panels / Cards ---------- */
.glass-panel {
  background: rgba(11, 17, 32, 0.7);
  border: 1px solid var(--panel-border);
  backdrop-filter: blur(10px);
  border-radius: 16px;
}
.neon-border { box-shadow: 0 0 0 1px rgba(34,211,238,0.25), 0 0 24px rgba(34,211,238,0.12); border-color: var(--neon-blue); }
.pad-5 { padding: 20px; }
.pad-6 { padding: 24px; }
.pad-7 { padding: 28px; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: 32px; }
.stat-card { display: block; padding: 20px; border-radius: 16px; transition: border-color 0.15s; }
.stat-card:hover { border-color: rgba(34,211,238,0.4); }
.stat-card .stat-value { font-size: 30px; font-weight: 700; color: var(--foreground); }
.stat-card .stat-label { margin-top: 12px; font-size: 14px; font-weight: 500; color: #cbd5e1; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; margin-top: 20px; }
.app-card { display: flex; flex-direction: column; padding: 20px; border-radius: 16px; }
.app-card h3 { margin: 0; font-size: 18px; font-weight: 600; color: var(--foreground); }

/* ---------- Buttons ---------- */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; border-radius: 8px; cursor: pointer;
  background: linear-gradient(90deg, #06b6d4, #34d399);
  color: #05070d; font-weight: 600; font-size: 14px;
  padding: 12px 20px;
  box-shadow: 0 0 16px rgba(34,211,238,0.35);
  transition: box-shadow 0.15s;
}
.btn-primary:hover { box-shadow: 0 0 24px rgba(34,211,238,0.5); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-sm { padding: 8px 14px; font-size: 13px; }

.btn-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 6px;
  border: 1px solid var(--panel-border); background: rgba(0,0,0,0.3);
  color: #cbd5e1; cursor: pointer; transition: border-color 0.15s, color 0.15s;
}
.btn-icon:hover { border-color: rgba(34,211,238,0.5); color: #67e8f9; }
.btn-icon.danger:hover { border-color: rgba(251,113,133,0.5); color: #fda4af; }

.btn-link { color: var(--muted); font-size: 14px; }
.btn-link:hover { color: var(--foreground); }

.btn-award {
  border-radius: 6px; border: 1px solid rgba(52,211,153,0.4); background: rgba(52,211,153,0.1);
  color: #6ee7b7; padding: 6px 12px; font-size: 12px; font-weight: 500; cursor: pointer;
}
.btn-award:hover { background: rgba(52,211,153,0.2); }

/* ---------- Forms ---------- */
.form-group { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.form-group:last-child { margin-bottom: 0; }
.form-row { display: grid; gap: 16px; margin-bottom: 20px; }
.form-row.cols-2 { grid-template-columns: repeat(2, 1fr); }
.form-row.cols-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 640px) { .form-row.cols-2, .form-row.cols-3 { grid-template-columns: 1fr; } }

label { font-size: 14px; font-weight: 500; color: #cbd5e1; }
input[type=text], input[type=password], input[type=url], input[type=date],
input[type=time], input[type=number], select, textarea {
  width: 100%; border-radius: 8px; border: 1px solid var(--panel-border);
  background: rgba(0,0,0,0.3); color: var(--foreground); padding: 12px 16px;
  font-size: 14px; font-family: inherit; outline: none; transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--neon-blue); box-shadow: 0 0 0 3px rgba(34,211,238,0.15);
}
textarea { resize: vertical; }
.static-field { width: 100%; border-radius: 8px; border: 1px solid var(--panel-border); background: rgba(0,0,0,0.2); color: #cbd5e1; padding: 12px 16px; }

/* ---------- Login ---------- */
.login-wrap { display: flex; min-height: 100vh; flex: 1; align-items: center; justify-content: center; padding: 16px; width: 100%; }
.login-box { width: 100%; max-width: 420px; }
.login-badge {
  display: inline-flex; align-items: center; gap: 8px; border-radius: 9999px;
  border: 1px solid var(--panel-border); background: rgba(11,17,32,0.6);
  padding: 6px 16px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: #67e8f9;
}

/* ---------- Tables ---------- */
.table-wrap { overflow: hidden; border-radius: 16px; margin-top: 24px; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 14px; }
thead { border-bottom: 1px solid var(--panel-border); background: rgba(0,0,0,0.2); }
th { padding: 12px 20px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
td { padding: 12px 20px; border-top: 1px solid var(--panel-border); }
tbody tr:hover { background: rgba(34,211,238,0.05); }
.text-right { text-align: right; }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; border-radius: 9999px; border: 1px solid;
  padding: 2px 10px; font-size: 12px; font-weight: 500;
}
.badge-cyan { border-color: rgba(34,211,238,0.4); background: rgba(34,211,238,0.1); color: #67e8f9; }
.badge-green { border-color: rgba(52,211,153,0.4); background: rgba(52,211,153,0.1); color: #6ee7b7; }
.badge-amber { border-color: rgba(251,191,36,0.4); background: rgba(251,191,36,0.1); color: #fcd34d; }
.badge-pink { border-color: rgba(244,114,182,0.4); background: rgba(244,114,182,0.1); color: #f9a8d4; }
.badge-slate { border-color: rgba(100,116,139,0.4); background: rgba(100,116,139,0.1); color: #cbd5e1; }
.badge-rose { border-color: rgba(251,113,133,0.4); background: rgba(251,113,133,0.1); color: #fda4af; }

/* ---------- Alerts ---------- */
.alert-error {
  border: 1px solid rgba(251,113,133,0.4); background: rgba(251,113,133,0.1);
  color: #fda4af; border-radius: 8px; padding: 10px 16px; font-size: 14px; margin-bottom: 20px;
}

/* ---------- Secret field (toolbelt + allocations) ---------- */
.secret-field {
  display: flex; align-items: center; gap: 8px; border-radius: 8px;
  border: 1px solid var(--panel-border); background: rgba(0,0,0,0.3); padding: 8px 12px;
}
.secret-value { flex: 1; font-family: ui-monospace, Consolas, monospace; font-size: 14px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Timeline ---------- */
.timeline { position: relative; display: flex; flex-direction: column; gap: 40px; margin-top: 32px; border-left: 1px solid var(--panel-border); padding-left: 24px; }
.timeline-dot {
  position: absolute; left: -33px; top: 4px; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--panel-border); background: var(--panel);
}
.timeline-dot.today { border-color: var(--neon-green); background: var(--neon-green); box-shadow: 0 0 12px 3px rgba(57,255,143,0.7); }
.timeline-heading { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: #cbd5e1; }
.timeline-day { display: flex; flex-direction: column; gap: 0; border-radius: 16px; overflow: hidden; margin-top: 12px; }
.timeline-item { display: flex; align-items: flex-start; gap: 16px; padding: 16px 20px; border-top: 1px solid var(--panel-border); }
.timeline-day .timeline-item:first-child { border-top: none; }
.timeline-time { display: flex; align-items: center; gap: 6px; width: 112px; flex-shrink: 0; font-size: 14px; color: #67e8f9; }
.tag-today { margin-left: 8px; border-radius: 9999px; border: 1px solid rgba(52,211,153,0.4); background: rgba(52,211,153,0.1); padding: 2px 10px; font-size: 12px; color: #6ee7b7; }

/* ---------- Score / activity rows ---------- */
.score-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 16px; font-size: 14px; border-top: 1px solid var(--panel-border); }
.score-rows { border-radius: 12px; border: 1px solid var(--panel-border); margin-top: 12px; }
.score-rows .score-row:first-child { border-top: none; }
summary.toggle-summary { cursor: pointer; font-size: 14px; font-weight: 500; color: #67e8f9; }

.icon { display: inline-block; vertical-align: middle; }
