:root {
  --bg: #000;
  --text: #fff;
  --muted: #aaa;
  --accent: #fff;
  --accent-text: #000;
  --border: #333;
  --hover: rgba(255, 255, 255, 0.1);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.muted { color: var(--muted); }

/* --- login --- */
.login-body {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}
.login-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px 28px;
  width: 300px;
  text-align: center;
}
.login-logo { width: 78px; height: 78px; margin: 0 0 12px; border-radius: 50%; }
.login-sub { color: var(--muted); margin: 0 0 20px; font-size: 14px; }
.login-card input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  margin-bottom: 12px;
}
.login-card button {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: none;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 600;
  cursor: pointer;
  font-size: 15px;
}
.login-card button:hover { opacity: 0.85; }
.login-error { color: #ff8080; font-size: 13px; margin: 12px 0 0; }

/* --- app shell --- */
.app { display: flex; height: 100vh; }

.sidebar {
  width: 260px;
  flex-shrink: 0;
  background: var(--bg);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  padding: 16px;
}
.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.sidebar-header h1 { font-size: 18px; margin: 0; }
.link-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
  padding: 5px 10px;
  border-radius: 6px;
}
.link-btn:hover { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }

.year-block { margin-bottom: 6px; }
.year-btn {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  padding: 8px 6px;
  cursor: pointer;
  border-radius: 6px;
  display: flex;
  justify-content: space-between;
}
.year-btn:hover { background: var(--hover); }
.months { display: none; flex-direction: column; padding-left: 10px; }
.months.open { display: flex; }
.month-btn {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 13.5px;
  padding: 6px 8px;
  cursor: pointer;
  border-radius: 6px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.month-btn:hover { background: var(--hover); color: var(--text); }
.month-btn.active { background: var(--accent); color: var(--accent-text); font-weight: 600; }

.sidebar-toggle {
  display: none;
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 20;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 38px;
  height: 38px;
  font-size: 16px;
  cursor: pointer;
}
.sidebar-toggle:hover { background: var(--accent); color: var(--accent-text); }

.content { flex: 1; overflow-y: auto; padding: 24px 28px; background: var(--bg); }
.content-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 18px;
}
.content-header h2 { margin: 0; font-size: 20px; text-transform: capitalize; }

.day-heading {
  font-size: 14px;
  color: var(--muted);
  margin: 22px 0 10px;
  text-transform: capitalize;
}
.day-heading:first-child { margin-top: 0; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 6px;
}
.grid img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  background: var(--bg);
  border: 1px solid var(--border);
  display: block;
}
.grid img:hover { outline: 2px solid var(--accent); }

/* --- lightbox --- */
.lightbox {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
}
.lightbox[hidden] { display: none; }
.lightbox img {
  max-width: 90vw;
  max-height: 86vh;
  object-fit: contain;
  border-radius: 4px;
}
.lb-close, .lb-nav {
  position: absolute;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lb-close:hover, .lb-nav:hover { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.lb-close { top: 18px; right: 18px; }
.lb-prev { left: 18px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 18px; top: 50%; transform: translateY(-50%); }
.lb-caption {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.lb-caption .lb-name { color: var(--text); }

@media (max-width: 760px) {
  .sidebar {
    position: fixed;
    inset: 0 25% 0 0;
    z-index: 15;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-toggle { display: flex; }
  .content { padding: 60px 14px 24px; }
  .lb-prev { left: 6px; }
  .lb-next { right: 6px; }
}
