:root {
  color-scheme: dark;
  --ph-background: #14110e;
  --ph-surface: #1e1914;
  --ph-elevated: #2a231c;
  --ph-border: #3d3228;
  --ph-text: #f6f1e4;
  --ph-text-muted: #b7a894;
  --ph-accent: #f0c93a;
  --ph-accent-foreground: #1a140c;
  --ph-secondary: #8a6244;
  --ph-danger: #c45c3e;
}

body {
  margin: 0;
  min-height: 100vh;
  font: 500 15px/1.45 Nunito, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top, rgb(240 201 58 / 16%), transparent 42%),
    var(--ph-background);
  color: var(--ph-text);
}

header, main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

h1, h2 {
  font-size: 20px;
  font-weight: 800;
  margin: 0;
}

h2 { font-size: 16px; margin-bottom: 12px; }

.who { display: flex; align-items: center; gap: 10px; color: var(--ph-text-muted); font-weight: 700; }

section, .login {
  background: var(--ph-surface);
  border: 1px solid var(--ph-border);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 16px;
}

.login {
  max-width: 380px;
  margin: 48px auto;
}

.lead { margin: 6px 0 16px; color: var(--ph-text-muted); }

label {
  display: grid;
  gap: 4px;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 700;
}

input {
  font: inherit;
  padding: 8px 10px;
  border: 1px solid var(--ph-border);
  border-radius: 12px;
  background: var(--ph-elevated);
  color: var(--ph-text);
  width: 100%;
  box-sizing: border-box;
}

input[type="file"] {
  padding: 6px;
  font-size: 13px;
}

button {
  font: inherit;
  font-weight: 800;
  padding: 8px 14px;
  background: var(--ph-accent);
  color: var(--ph-accent-foreground);
  border: 1px solid var(--ph-accent);
  border-radius: 12px;
  cursor: pointer;
}

button:hover { filter: brightness(1.06); }

button.ghost {
  background: transparent;
  color: var(--ph-text);
  border: 1px solid var(--ph-border);
  font-weight: 700;
}

button.ghost:hover {
  background: var(--ph-elevated);
  filter: none;
}

.login button { width: 100%; }

.actions, td .row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.hint {
  color: var(--ph-text-muted);
  font-size: 12px;
  font-weight: 800;
}

.error { min-height: 1.2em; color: var(--ph-danger); font-weight: 700; }

.thumb {
  display: block;
  width: 72px;
  height: 48px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--ph-border);
  background: var(--ph-background);
}

table { width: 100%; border-collapse: collapse; }

th, td {
  text-align: left;
  padding: 8px;
  border-bottom: 1px solid var(--ph-border);
  vertical-align: top;
  word-break: break-word;
}

th { font-size: 12px; color: var(--ph-text-muted); font-weight: 800; }

:focus-visible {
  outline: 2px solid var(--ph-accent);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

@media (max-width: 720px) {
  header { align-items: flex-start; flex-direction: column; }
  table { display: block; overflow-x: auto; }
}
