/* OpenArtRoom — minimalistisches Basis-Stylesheet */
:root {
  --fg: #111;
  --fg-muted: #666;
  --bg: #fff;
  --border: #e5e5e5;
  --accent: #111;
  --radius: 4px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: Georgia, 'Times New Roman', serif;
  color: var(--fg);
  background: var(--bg);
  line-height: 1.6;
  font-size: 17px;
}
a { color: var(--fg); text-decoration: none; border-bottom: 1px solid transparent; }
a:hover { border-bottom-color: var(--fg); }

.site-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 24px 40px; border-bottom: 1px solid var(--border);
}
.site-header .brand {
  display: inline-flex;
  align-items: center;
  border: none;
}
.site-header .brand img {
  height: 32px;
  width: auto;
  display: block;
}
.site-header nav a { margin-left: 24px; }

.nav-toggle {
  display: none;
  background: none; border: none; padding: 8px;
  width: 40px; height: 40px; cursor: pointer;
  flex-direction: column; justify-content: center; gap: 5px;
}
.nav-toggle span {
  display: block; height: 2px; width: 22px;
  background: var(--fg); transition: transform 0.2s, opacity 0.2s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.site-main { max-width: 960px; margin: 0 auto; padding: 48px 40px 96px; }
.site-footer {
  text-align: center; padding: 32px; color: var(--fg-muted);
  font-size: 0.85rem; border-top: 1px solid var(--border);
}
.lang-switch { margin-left: 12px; }
.lang-btn {
  background: none; border: none; color: var(--fg-muted); cursor: pointer;
  font-size: 0.85rem; font-family: inherit; padding: 0; text-decoration: underline;
}
.lang-btn:hover { color: var(--fg); }

h1 { font-size: 2.25rem; margin: 0 0 24px; font-weight: 400; }
h2 { font-size: 1.5rem; margin: 48px 0 16px; font-weight: 400; }
h3 { font-size: 1.15rem; margin: 24px 0 8px; font-weight: 600; }
p  { margin: 0 0 16px; }
.muted { color: var(--fg-muted); }

/* ========== BUTTONS ==========
   Three variants:
   .btn          — primary, solid (dark background, light text). Default for <button> and submit.
   .btn-secondary — outlined (light background, dark border+text). Secondary action.
   .btn-link      — textual button (no border, no bg). Tertiary action.
   All three share the same geometry and hover transition. */

.btn,
button,
input[type=submit] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border: 1px solid var(--fg);
  border-radius: var(--radius);
  background: var(--fg);
  color: var(--bg);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn:hover,
button:hover,
input[type=submit]:hover,
.btn:focus-visible,
button:focus-visible {
  background: #333;
  border-color: #333;
  color: var(--bg);
  outline: none;
}

.btn-secondary {
  background: var(--bg);
  color: var(--fg);
  border-color: var(--fg);
}
.btn-secondary:hover,
.btn-secondary:focus-visible {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}

.btn-link {
  background: transparent;
  color: var(--fg-muted);
  border-color: transparent;
  padding: 11px 8px;
}
.btn-link:hover,
.btn-link:focus-visible {
  background: transparent;
  color: var(--fg);
  border-color: transparent;
}

.btn:disabled,
button:disabled,
input[type=submit]:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: var(--fg);
  color: var(--bg);
}

form label { display: block; margin: 16px 0 4px; font-size: 0.9rem; color: var(--fg-muted); }
form input[type=text], form input[type=email], form input[type=password],
form input[type=number], form input[type=url], form textarea, form select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border);
  border-radius: var(--radius); font-size: 1rem; font-family: inherit;
  background: var(--bg);
}
form textarea { min-height: 120px; resize: vertical; }
form .actions { margin-top: 24px; display: flex; gap: 12px; }

/* Password visibility toggle */
.password-input { position: relative; }
.password-input input { width: 100%; padding-right: 48px; }
.password-toggle {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: var(--fg-muted); cursor: pointer; padding: 0; z-index: 10;
}
.password-toggle svg { width: 18px; height: 18px; }
.password-toggle:hover { color: var(--fg); }

/* Styled file input — hide the native widget, use a label as button */
.file-input {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  margin: 0;
}
.file-input input[type=file] {
  position: absolute;
  width: 1px; height: 1px;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
}
/* .file-input-button mirrors .btn-secondary (same geometry + hover). */
.file-input-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 22px;
  border: 1px solid var(--fg);
  background: var(--bg);
  color: var(--fg);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-family: inherit;
  line-height: 1.2;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.file-input:hover .file-input-button,
.file-input input[type=file]:focus + .file-input-button {
  background: var(--fg);
  color: var(--bg);
}
.file-input-name {
  font-size: 0.9rem;
  color: var(--fg-muted);
  font-style: italic;
}
.file-input-name.has-file {
  color: var(--fg);
  font-style: normal;
}

.flashes { margin-bottom: 24px; }
.flash { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 8px; border: 1px solid var(--border); }
.flash-error { border-color: #c44; color: #c44; }
.flash-success { border-color: #363; color: #363; }
.flash-warning { border-color: #c84; color: #c84; }
.flash-info { border-color: #468; color: #468; }

.grid-works {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 24px; margin-top: 32px;
}
.grid-works .card {
  border: 1px solid var(--border); padding: 12px; border-radius: var(--radius);
}
.grid-works .card img { width: 100%; height: auto; display: block; }
.grid-works .card .meta { font-size: 0.85rem; color: var(--fg-muted); margin-top: 8px; }

.quota-bar {
  height: 6px; background: var(--border); border-radius: 3px; overflow: hidden;
  margin: 8px 0 24px;
}
.quota-bar > div { height: 100%; background: var(--fg); }

@media (max-width: 640px) {
  .site-header { padding: 16px 20px; flex-direction: row; gap: 12px; flex-wrap: wrap; }
  .site-main { padding: 24px 20px 64px; }
  h1 { font-size: 1.75rem; }

  .nav-toggle { display: flex; }
  .site-header nav {
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    align-items: flex-start;
    padding-top: 8px;
    border-top: 1px solid var(--border);
  }
  .site-header nav.is-open { display: flex; }
  .site-header nav a {
    margin: 0; padding: 12px 0;
    width: 100%;
    border-bottom: 1px solid var(--border);
  }
  .site-header nav a:last-child { border-bottom: none; }
  .site-header nav a.btn {
    margin-top: 8px;
    width: auto;
    border-bottom: none;
  }
}

/* ========== LANDING PAGE ========== */

.hero { padding: 64px 0 48px; text-align: left; border-bottom: 1px solid var(--border); }
.hero-claim { font-size: 3rem; font-weight: 300; letter-spacing: -0.01em; margin: 0 0 16px; max-width: 720px; }
.hero-sub { font-size: 1.1rem; color: var(--fg-muted); max-width: 640px; margin: 0; }

/* Spotlight */
.spotlight { margin: 64px 0; }
.spotlight-label {
  text-transform: uppercase; letter-spacing: 0.15em; font-size: 0.75rem;
  color: var(--fg-muted); margin-bottom: 16px;
}
.spotlight-image-link { display: block; border: none; }
.spotlight-image {
  width: 100%; height: auto; display: block; max-height: 80vh; object-fit: contain;
  background: #fafafa;
}
.spotlight-meta { margin-top: 24px; max-width: 640px; }
.spotlight-name { font-size: 1.75rem; margin: 0 0 8px; font-weight: 400; }
.spotlight-name a { border: none; }
.spotlight-work { color: var(--fg-muted); margin: 0 0 16px; }
.spotlight-intro { font-size: 1.05rem; margin: 0 0 16px; }
.spotlight-cta { font-size: 0.95rem; }

/* Sections */
.section { margin: 80px 0; }
.section-title {
  font-size: 1.5rem; font-weight: 400; margin: 0 0 8px;
}
.section-sub { margin: 0 0 32px; }

/* Discover grid */
.discover-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 32px 24px;
  margin-top: 24px;
}
.discover-card { display: block; border: none; }
.discover-card:hover { border: none; }
.discover-card img {
  width: 100%; height: auto; display: block;
  background: #fafafa;
  transition: opacity 0.2s ease;
}
.discover-card:hover img { opacity: 0.85; }
.discover-meta {
  margin-top: 10px; font-size: 0.85rem; display: flex; flex-direction: column; gap: 2px;
}
.discover-artist { color: var(--fg); }
.discover-title { color: var(--fg-muted); font-style: italic; }

/* Inline CTA */
.cta-inline {
  text-align: center; padding: 32px 0; margin: 48px 0;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  color: var(--fg-muted); font-size: 0.95rem;
}
.cta-inline p { margin: 0; }

/* Curated shows */
.curated-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
}
.curated-card { display: block; border: 1px solid var(--border); padding: 0; border-radius: 4px; }
.curated-card:hover { border-color: var(--fg); }
.curated-card img { width: 100%; height: 200px; object-fit: cover; display: block; background: #fafafa; }
.curated-card h3 { margin: 16px 20px 4px; }
.curated-card p { margin: 0 20px 20px; }

/* Medium list */
.medium-list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-wrap: wrap; gap: 8px 24px;
}
.medium-list a { font-size: 1.05rem; }

/* ========== ADMIN TABLES ========== */

.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 0.9rem;
}
.admin-table th,
.admin-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}
.admin-table th {
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--fg-muted);
}
.admin-table select {
  padding: 6px 8px;
  font-size: 0.85rem;
}
.admin-flags {
  display: flex; gap: 6px; flex-wrap: wrap;
}

/* Smaller button variant for table rows */
.btn-small {
  padding: 6px 12px;
  font-size: 0.8rem;
}

/* ========== LEGAL PAGES ========== */

.legal-content {
  max-width: 720px;
  line-height: 1.75;
}
.legal-content h1 {
  margin-bottom: 32px;
}
.legal-content h2 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 40px 0 12px;
}
.legal-content p {
  margin: 0 0 16px;
  color: var(--fg);
}
.legal-content code {
  font-size: 0.9em;
  background: #f4f4f4;
  padding: 1px 6px;
  border-radius: 3px;
}
.legal-content ul {
  margin: 0 0 16px 0;
  padding-left: 24px;
  color: var(--fg);
}
.legal-content ul li { padding: 4px 0; }
.legal-content a { color: var(--fg); }

/* ========== ANALYTICS ========== */

.analytics-kpis {
  display: flex; gap: 48px; margin: 24px 0 48px; flex-wrap: wrap;
}
.analytics-kpis > div { display: flex; flex-direction: column; }
.kpi-number { font-size: 2.5rem; font-weight: 300; line-height: 1; }
.kpi-label { font-size: 0.85rem; color: var(--fg-muted); margin-top: 4px; }

.analytics-chart {
  display: flex; align-items: flex-end; gap: 2px;
  height: 160px; margin-top: 16px;
  border-bottom: 1px solid var(--border);
}
.analytics-chart .bar {
  flex: 1;
  background: var(--fg);
  min-height: 1px;
  position: relative;
  transition: background 0.15s ease;
}
.analytics-chart .bar:hover { background: #333; }
.analytics-chart .bar-value {
  display: none;
}
.analytics-axis {
  display: flex; justify-content: space-between;
  font-size: 0.75rem; color: var(--fg-muted);
  margin-top: 4px; margin-bottom: 32px;
}

.top-list { list-style: none; padding: 0; }
.top-list li { padding: 8px 0; border-bottom: 1px solid var(--border); }
.top-list li > .muted:first-child { display: inline-block; width: 48px; }

.kind-list { list-style: none; padding: 0; }
.kind-list li { padding: 6px 0; font-size: 0.95rem; }

.analytics-geo {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px;
  margin-top: 16px; margin-bottom: 32px;
}
.revenue-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 32px; margin-top: 16px;
}
.revenue-grid h3 {
  font-size: 1rem; font-weight: 400; color: var(--fg-muted);
  margin: 0 0 8px;
}
@media (max-width: 768px) {
  .revenue-grid { grid-template-columns: 1fr; gap: 24px; }
}
.analytics-geo h3 {
  font-size: 1rem; font-weight: 400; margin: 0 0 12px;
  color: var(--fg-muted);
}
@media (max-width: 768px) {
  .analytics-geo { grid-template-columns: 1fr; gap: 24px; }
}

/* ========== PRICING ========== */

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 48px;
}
.pricing-card {
  border: 1px solid var(--border);
  padding: 32px 28px;
  border-radius: 4px;
  display: flex; flex-direction: column;
}
.pricing-card-featured { border-color: var(--fg); border-width: 2px; }
.pricing-card h2 { margin: 0 0 4px; font-size: 1.4rem; font-weight: 500; }
.pricing-tagline { margin: 0 0 24px; font-size: 0.9rem; font-style: italic; }
.pricing-price { font-size: 1.8rem; margin: 0 0 24px; }
.pricing-price .muted { font-size: 0.9rem; }
.pricing-features {
  list-style: none; padding: 0; margin: 0 0 32px;
  flex: 1;
}
.pricing-features li {
  padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 0.95rem;
}
.pricing-features li:last-child { border-bottom: none; }
.pricing-features .planned { color: var(--fg-muted); }
.pricing-features .marker { display: inline-block; width: 1.2em; color: var(--fg-muted); }
.pricing-card .btn { text-align: center; }
.pricing-cta { display: flex; flex-direction: column; }
.pricing-meta {
  font-size: 0.8rem; text-align: center;
  margin: 8px 0 0; min-height: 1.2em;
}

/* ========== SEARCH ========== */

.search-form { margin: 32px 0 8px; }

.search-row {
  display: flex; gap: 12px; max-width: 720px;
}
.search-row input[type=text] {
  flex: 1; font-size: 1.05rem;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
  transition: border-color 0.15s ease;
}
.search-row input[type=text]:focus {
  outline: none;
  border-color: var(--fg);
}
.search-row button {
  padding: 14px 28px;
  white-space: nowrap;
}

.search-filters {
  display: flex; flex-wrap: wrap;
  gap: 24px;
  margin-top: 32px; max-width: 720px;
}

.filter-field {
  display: flex; flex-direction: column;
  gap: 8px;
}
.filter-field > label {
  margin: 0;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.filter-field select,
.filter-field input[type=number] {
  padding: 0 14px;
  height: 42px;
  font-size: 0.95rem;
  font-family: inherit;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
  box-sizing: border-box;
  transition: border-color 0.15s ease;
}
.filter-field select:focus,
.filter-field input[type=number]:focus {
  outline: none; border-color: var(--fg);
}
.filter-field--year input[type=number] { width: 110px; }

/* Checkbox cell: match the other fields' total height so the checkbox
   aligns vertically with the middle of the input boxes. */
.filter-field--checkbox {
  justify-content: flex-end;
}
.filter-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 42px;
  margin: 0;
  font-size: 0.95rem;
  color: var(--fg);
  cursor: pointer;
  text-transform: none;
  letter-spacing: normal;
}
.filter-checkbox input[type=checkbox] {
  width: 18px; height: 18px; margin: 0;
  accent-color: var(--fg);
  cursor: pointer;
}

.search-reset {
  align-self: flex-end;
  height: 42px;
  display: flex; align-items: center;
  font-size: 0.9rem;
}

.artist-matches {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px; margin-top: 16px;
}
.artist-match-card {
  display: flex; gap: 12px; align-items: center;
  border: 1px solid var(--border); padding: 12px; border-radius: 4px;
}
.artist-match-card:hover { border-color: var(--fg); }
.artist-match-card img { width: 48px; height: 48px; object-fit: cover; border-radius: 50%; }
.artist-match-card strong { display: block; }
.artist-match-card span { font-size: 0.8rem; display: block; }

/* ========== PUBLIC ARTIST PAGES ========== */

body.public-page { font-size: 16px; }

/* Owner mode — only shown when the logged-in user owns the profile */
.owner-bar {
  max-width: 1080px; margin: 16px auto 0; padding: 10px 40px;
  background: #fff8dc;
  border: 1px solid #e8dca0;
  border-radius: 4px;
  font-size: 0.85rem;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 8px 16px;
}
.owner-bar span { color: #6b5a20; }
.owner-bar nav a {
  color: #6b5a20; border-bottom: 1px solid transparent;
  margin-left: 16px;
}
.owner-bar nav a:hover { border-bottom-color: #6b5a20; }

.owner-placeholder {
  display: block;
  padding: 20px 24px;
  border: 1px dashed #c9c9c9;
  background: #fafafa;
  color: var(--fg-muted);
  font-style: italic;
  border-radius: 4px;
  margin: 16px 0;
  text-align: left;
  transition: all 0.15s ease;
}
.owner-placeholder:hover {
  border-color: var(--fg);
  color: var(--fg);
  background: #fff;
}
.owner-placeholder-large {
  padding: 48px 32px;
  font-size: 1.05rem;
  text-align: center;
  margin: 48px 0;
}
.owner-portrait-ph {
  width: 200px; height: 200px;
  display: flex; align-items: center; justify-content: center;
  text-align: center; font-size: 0.85rem;
  margin-bottom: 32px;
}

.owner-edit {
  display: inline-block;
  margin-left: 12px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #8a7820;
  border-bottom: 1px solid transparent;
  vertical-align: middle;
}
.owner-edit:hover { border-bottom-color: #8a7820; }


.public-topstrip {
  max-width: 1080px; margin: 0 auto;
  padding: 20px 40px 0;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
}
.public-topstrip a {
  color: var(--fg-muted); border: none;
}
.public-topstrip a:hover { color: var(--fg); }

.public-header {
  max-width: 1080px; margin: 0 auto;
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 40px 40px 24px;
}
.public-brand {
  font-size: 1.4rem; font-weight: 400; border: none;
  letter-spacing: 0.01em;
}
.public-nav a { margin-left: 24px; font-size: 0.95rem; color: var(--fg-muted); }
.public-nav a:hover { color: var(--fg); border-bottom-color: var(--fg); }

.public-main { max-width: 1080px; margin: 0 auto; padding: 24px 40px 96px; }

.public-hero { margin: 24px 0 48px; }
.public-hero img {
  width: 100%; max-height: 85vh; object-fit: contain; display: block; background: #fafafa;
}

.public-statement {
  font-size: 1.15rem; max-width: 560px; margin: 32px 0 48px; line-height: 1.7;
}

.public-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 56px 32px; margin-top: 48px;
}
.public-card { display: block; border: none; }
.public-card img { width: 100%; height: auto; display: block; background: #fafafa; }
.public-card-meta { margin-top: 12px; font-size: 0.9rem; display: flex; justify-content: space-between; }

/* Artwork detail */
.public-artwork { max-width: 960px; margin: 0 auto; }
.public-artwork-image { background: #fafafa; padding: 24px 0; text-align: center; }
.public-artwork-image img { max-width: 100%; max-height: 85vh; display: inline-block; }
.public-artwork-meta { max-width: 560px; margin: 48px auto 0; }
.public-artwork-meta h1 { font-size: 1.75rem; font-weight: 400; margin: 0 0 24px; }
.public-artwork-meta dl { display: grid; grid-template-columns: 100px 1fr; gap: 4px 16px; font-size: 0.95rem; }
.public-artwork-meta dt { color: var(--fg-muted); }
.public-artwork-meta dd { margin: 0; }
.public-artwork-text { margin: 32px 0; line-height: 1.75; }
.public-artwork-nav { margin-top: 64px; font-size: 0.9rem; }

/* About */
.public-about { max-width: 640px; }
.public-portrait { width: 200px; height: auto; display: block; margin-bottom: 32px; }
.public-about h1 { font-size: 2rem; font-weight: 400; margin: 0 0 16px; }
.public-bio { line-height: 1.75; margin: 24px 0; }
.public-exhibitions { list-style: none; padding: 0; margin: 24px 0; }
.public-exhibitions li { display: grid; grid-template-columns: 60px 1fr; gap: 16px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.public-exhibitions .year { color: var(--fg-muted); }

/* Contact */
.public-contact { max-width: 560px; }
.public-contact h1 { font-size: 2rem; font-weight: 400; margin: 0 0 24px; }
.public-links { list-style: none; padding: 0; }
.public-links li { padding: 4px 0; }

.public-footer {
  max-width: 1080px; margin: 0 auto; padding: 48px 40px;
  border-top: 1px solid var(--border); font-size: 0.8rem; color: var(--fg-muted);
  text-align: center;
}
.public-footer a { color: var(--fg-muted); }

@media (max-width: 640px) {
  .hero-claim { font-size: 2rem; }
  .section { margin: 48px 0; }
  .public-header { flex-direction: column; padding: 24px 20px 16px; align-items: flex-start; gap: 12px; }
  .public-nav a { margin: 0 16px 0 0; }
  .public-main { padding: 16px 20px 64px; }
  .public-artwork-meta dl { grid-template-columns: 80px 1fr; }
}
