:root {
  --bg: #0f1115;
  --card-bg: #1a1d24;
  --border: #2c2f38;
  --accent: #4f8cff;
  --text: #e6e8eb;
  --text-muted: #9aa0ab;
  --error: #ff6b6b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.upload-card {
  width: 100%;
  max-width: 480px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
}

.upload-card:has(.compare-block) {
  max-width: 800px;
}

h1 {
  margin: 0 0 0.25rem;
  font-size: 1.4rem;
}

.subtitle {
  margin: 0 0 1.5rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.drop-zone {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  min-height: 120px;
  border: 2px dashed var(--border);
  border-radius: 10px;
  cursor: pointer;
  text-align: center;
  padding: 1rem;
  transition:
    border-color 0.15s ease,
    background 0.15s ease;
  overflow: hidden;
}

.drop-zone.dragover {
  border-color: var(--accent);
  background: rgba(79, 140, 255, 0.08);
}

#drop-zone-text {
  color: var(--text-muted);
  font-size: 0.9rem;
}

#preview-img {
  max-width: 100%;
  max-height: 260px;
  border-radius: 6px;
}

#image-input {
  display: none;
}

.file-info {
  margin: 0.75rem 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.error-msg {
  margin: 0.75rem 0 0;
  font-size: 0.85rem;
  color: var(--error);
}

button {
  width: 100%;
  margin-top: 1.25rem;
  padding: 0.75rem;
  border: none;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.server-message {
  margin-top: 1.25rem;
  font-size: 0.9rem;
  text-align: center;
}

.top-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 1.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

.top-bar a {
  color: var(--accent);
  text-decoration: none;
}

.page-content {
  display: flex;
  justify-content: center;
  padding: 1rem;
}

.result-block {
  margin-top: 1.25rem;
  text-align: center;
}

.result-block h2 {
  font-size: 1rem;
  margin-bottom: 0.75rem;
  color: var(--text-muted);
}

.result-img {
  max-width: 100%;
  max-height: 35vh;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.compare-block {
  margin-top: 1.25rem;
  display: flex;
  gap: 0.75rem;
}

.compare-item {
  flex: 1;
  min-width: 0; /* allows flex children to shrink below image's natural width */
  text-align: center;
}

.compare-item h2 {
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
  color: var(--text-muted);
}

.plan-nav {
  display: flex;
  gap: 1rem;
  justify-self: start;
}

.account-info {
  justify-self: end;
}

a.brand-name {
  color: var(--text) !important;
}

.plan-nav a,
.account-info a {
  color: var(--accent);
  text-decoration: none;
}

.brand-name {
  justify-self: center;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.page-shell {
  display: grid;
  grid-template-columns: 180px 1fr 220px;
  gap: 1rem;
  align-items: start;
  padding: 1.5rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

.side-nav {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem;
  font-size: 0.85rem;
}

.left-nav {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.left-nav a {
  color: var(--text-muted);
  text-decoration: none;
}

.left-nav a:hover {
  color: var(--accent);
}

.right-nav h2 {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0 0 0.5rem;
}

.credits-placeholder {
  color: var(--text);
  line-height: 1.5;
}

.credits-placeholder .subtitle {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.shell-content {
  display: flex;
  justify-content: center;
}

.upload-tnc {
  margin-top: 0.75rem;
  font-size: 0.7rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.upload-tnc a {
  color: var(--accent);
}

.static-page {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  max-width: 600px;
  width: 100%;
}

.plans-page .plan-card {
  border-top: 1px solid var(--border);
  padding: 1rem 0;
}

.plan-btn {
  margin-top: 0.5rem;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 6px;
  background: var(--border);
  color: var(--text-muted);
  cursor: pointer;
}

.plan-btn:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.plan-tnc-note {
  margin-top: 1rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.tnc-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.tnc-modal.is-open {
  display: flex;
}

.tnc-modal-box {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  max-width: 420px;
  width: 90%;
}

.tnc-modal-box h2 {
  margin-top: 0;
  font-size: 1.1rem;
}

.tnc-modal-box ul {
  font-size: 0.85rem;
  color: var(--text-muted);
  padding-left: 1.2rem;
}

.tnc-modal-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.plan-btn-primary {
  background: var(--accent);
  color: white;
  cursor: pointer;
}

.plan-amount-input {
  width: 80px;
  padding: 0.4rem;
  margin-right: 0.5rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
}

.plan-buy-btn {
  cursor: pointer;
}

.feedback-block {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.feedback-block h2 {
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.feedback-comments {
  width: 100%;
  min-height: 60px;
  margin: 0.75rem 0;
  padding: 0.5rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-family: inherit;
}

/* Add these rules to style.css -- styling for standalone auth pages
   (login/register), which don't extend base.html and so need their own
   centering rather than relying on .page-shell. */

.auth-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background:
    radial-gradient(circle at top, rgba(79, 140, 255, 0.1), transparent 60%),
    var(--bg);
}

.auth-brand {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  margin-bottom: 1.75rem;
  letter-spacing: 0.02em;
}

.auth-card {
  width: 100%;
  max-width: 380px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 2rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.auth-card h1 {
  margin: 0 0 1.5rem;
  font-size: 1.3rem;
}

.auth-card form p {
  margin: 0 0 1rem;
}

.auth-card label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.auth-card input[type="text"],
.auth-card input[type="password"],
.auth-card input[type="email"] {
  width: 100%;
  box-sizing: border-box;
  padding: 0.65rem 0.75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.9rem;
}

.auth-card input:focus {
  outline: none;
  border-color: var(--accent);
}

.auth-card button[type="submit"] {
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.75rem;
  border: none;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

.auth-footer {
  margin-top: 1.25rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
}

.auth-footer a {
  color: var(--accent);
}

.auth-card select {
  width: 100%;
  box-sizing: border-box;
  padding: 0.65rem 0.75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.9rem;
}

.auth-card select:focus {
  outline: none;
  border-color: var(--accent);
}

/* --- Gallery & storage tiers (2026-09-23) --- */
.gallery-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem;
  margin: 1rem 0 0.5rem;
}

.gallery-filter label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.gallery-filter input[type="date"] {
  padding: 0.45rem 0.6rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  color-scheme: dark;
}

.gallery-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1rem;
}

.gallery-item {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
}

.gallery-item-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
}

.gallery-item-head strong {
  overflow-wrap: anywhere;
}

.gallery-item-head .subtitle {
  margin: 0;
}

.gallery-item .compare-block {
  margin-top: 0.75rem;
}

.gallery-actions {
  margin-top: 0.75rem;
  text-align: right;
}

.gallery-actions a.plan-btn,
a.plan-btn {
  display: inline-block;
  text-decoration: none;
}

.storage-note {
  margin: 0.75rem 0 0;
}

.table-scroll {
  overflow-x: auto;
}

.tier-table {
  border-collapse: collapse;
  width: 100%;
  margin: 0.5rem 0 0.75rem;
  font-size: 0.9rem;
}

.tier-table th,
.tier-table td {
  border: 1px solid var(--border);
  padding: 0.5rem 0.65rem;
  text-align: left;
}

.tier-table th {
  background: var(--card-bg);
  color: var(--text-muted);
  font-weight: 600;
}

.admin-stats td:first-child {
  color: var(--text-muted);
}

.plan-storage {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
}

.gallery-zip-link {
  margin-right: 0.9rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}
