/**
 * Visitor Log — front-end (scoped with .vl-*).
 */

:root {
  --vl-bg: #0f1419;
  --vl-surface: #1a2332;
  --vl-surface-hover: #243044;
  --vl-border: #2d3a4d;
  --vl-text: #e8eef5;
  --vl-muted: #8b9cb3;
  --vl-accent: #3d9cf0;
  --vl-accent-dim: #2a7fc9;
  --vl-success: #4ade80;
  --vl-warn: #fbbf24;
  --vl-radius: 12px;
  --vl-font: system-ui, -apple-system, "Segoe UI", sans-serif;
}

body .vl-wrap,
body .vl-archive,
body .vl-register,
body .vl-directory,
body .vl-visitor-log {
  font-family: var(--vl-font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--vl-text);
}

.vl-wrap a {
  color: var(--vl-accent);
  text-decoration: none;
}

.vl-wrap a:hover {
  text-decoration: underline;
}

.vl-wrap {
  max-width: 880px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}

.vl-app-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--vl-border);
}

.vl-app-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.vl-nav {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.vl-nav a {
  font-size: 0.95rem;
  font-weight: 500;
}

.vl-card {
  background: var(--vl-surface);
  border: 1px solid var(--vl-border);
  border-radius: var(--vl-radius);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}

.vl-card-title {
  margin: 0 0 1rem;
  font-size: 1.1rem;
  font-weight: 600;
}

.vl-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--vl-muted);
  margin-bottom: 0.35rem;
}

.vl-input,
.vl-textarea,
.vl-card select.vl-input {
  width: 100%;
  padding: 0.65rem 0.85rem;
  margin-bottom: 1rem;
  border-radius: 8px;
  border: 1px solid var(--vl-border);
  background: var(--vl-bg);
  color: var(--vl-text);
  font-family: inherit;
  font-size: 1rem;
}

.vl-input:focus,
.vl-textarea:focus,
.vl-card select.vl-input:focus {
  outline: 2px solid var(--vl-accent);
  outline-offset: 1px;
}

.vl-textarea {
  min-height: 88px;
  resize: vertical;
}

.vl-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 1rem;
}

@media (max-width: 560px) {
  .vl-row {
    grid-template-columns: 1fr;
  }
}

.vl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border-radius: 8px;
  border: none;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

.vl-btn-primary {
  background: var(--vl-accent);
  color: #fff;
}

.vl-btn-primary:hover {
  background: var(--vl-accent-dim);
}

.vl-btn-ghost {
  background: transparent;
  color: var(--vl-muted);
  border: 1px solid var(--vl-border);
}

.vl-btn-ghost:hover {
  background: var(--vl-surface-hover);
  color: var(--vl-text);
}

.vl-btn-small {
  padding: 0.35rem 0.65rem;
  font-size: 0.85rem;
}

.vl-flash {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.vl-flash-ok {
  background: rgba(74, 222, 128, 0.12);
  border: 1px solid rgba(74, 222, 128, 0.35);
  color: var(--vl-success);
}

.vl-flash-err {
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.35);
  color: #fca5a5;
}

.vl-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.vl-list-item {
  display: block;
  padding: 1rem 1.15rem;
  background: var(--vl-bg);
  border: 1px solid var(--vl-border);
  border-radius: 10px;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
}

.vl-list-item:hover {
  border-color: var(--vl-accent);
  background: var(--vl-surface-hover);
  text-decoration: none;
}

.vl-list-name {
  font-weight: 600;
  font-size: 1.05rem;
  margin-bottom: 0.25rem;
}

.vl-list-meta {
  font-size: 0.88rem;
  color: var(--vl-muted);
}

.vl-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: rgba(61, 156, 240, 0.15);
  color: var(--vl-accent);
  margin-left: 0.5rem;
  vertical-align: middle;
}

.vl-muted {
  color: var(--vl-muted);
  font-size: 0.92rem;
}

.vl-empty {
  text-align: center;
  padding: 2rem;
  color: var(--vl-muted);
}

.vl-bio-name {
  font-weight: 600;
  font-size: 1.1rem;
  margin: 0 0 0.5rem;
}

.vl-bio-lines {
  margin: 0;
}

.vl-bio-notes {
  margin: 1rem 0 0;
  white-space: pre-wrap;
}

.vl-log-entry {
  padding: 1rem;
  background: var(--vl-bg);
  border: 1px solid var(--vl-border);
  border-radius: 10px;
  margin-bottom: 0.65rem;
}

.vl-log-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  margin-bottom: 0.5rem;
}

.vl-tag {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
}

.vl-tag.call {
  background: rgba(251, 191, 36, 0.15);
  color: var(--vl-warn);
}

.vl-tag.contact {
  background: rgba(61, 156, 240, 0.15);
  color: var(--vl-accent);
}

.vl-log-date {
  font-size: 0.9rem;
  color: var(--vl-muted);
}

.vl-log-notes {
  margin: 0;
  font-size: 0.95rem;
  white-space: pre-wrap;
}

.vl-inline-form {
  margin-left: auto;
}

.vl-back {
  margin: 0 0 1rem;
}

.vl-visitor-back .vl-wrap {
  padding-bottom: 0;
}
