/* === Gallery Planner — Global Styles === */
:root {
  --gold: #C8A96E;
  --gold-dark: #a88c4a;
  --charcoal: #2C2C2C;
  --charcoal-light: #3a3a3a;
  --bg: #f5f3ef;
  --white: #ffffff;
  --text: #333;
  --text-light: #888;
  --border: #e0dcd4;
  --error: #c0392b;
  --success: #2d7a3a;
  --radius: 10px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Noto Sans JP', -apple-system, 'Hiragino Kaku Gothic Pro', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}
a { color: var(--gold-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

/* --- Nav --- */
#nav { background: var(--charcoal); border-bottom: 2px solid var(--gold); }
.nav-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; padding: 0 20px; height: 56px; gap: 24px;
}
.nav-logo { display: flex; align-items: center; gap: 8px; color: #fff; font-size: 15px; font-weight: 600; letter-spacing: .03em; }
.nav-logo:hover { text-decoration: none; }
.nav-icon { width: 32px; height: 32px; border-radius: 6px; object-fit: cover; }
.nav-links { display: flex; gap: 4px; flex: 1; }
.nav-links a {
  color: #bbb; font-size: 13px; padding: 6px 14px; border-radius: 6px; transition: .2s;
}
.nav-links a:hover { color: #fff; background: rgba(255,255,255,.08); text-decoration: none; }
.nav-links a.active { color: var(--gold); background: rgba(200,169,110,.12); }
.nav-separator { width: 1px; height: 20px; background: #555; margin: 0 4px; align-self: center; }
.nav-user { display: flex; align-items: center; gap: 12px; }
.nav-username { color: #aaa; font-size: 12px; }
.nav-logout {
  background: none; border: 1px solid #555; color: #aaa; font-size: 11px;
  padding: 4px 12px; border-radius: 20px; cursor: pointer; transition: .2s;
}
.nav-logout:hover { border-color: var(--gold); color: var(--gold); }

/* --- Page Container --- */
.page { max-width: 1100px; margin: 0 auto; padding: 32px 20px; }
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.page-title { font-size: 22px; font-weight: 700; color: var(--charcoal); }

/* --- Cards --- */
.card {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; margin-bottom: 16px; transition: box-shadow .2s;
}
.card:hover { box-shadow: 0 2px 12px rgba(0,0,0,.06); }
.card-title { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.card-meta { font-size: 12px; color: var(--text-light); }

/* --- Buttons --- */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 20px; border: none; border-radius: var(--radius); font-size: 13px;
  cursor: pointer; transition: .2s; font-weight: 500;
}
.btn-primary { background: var(--gold); color: #fff; }
.btn-primary:hover { background: var(--gold-dark); }
.btn-secondary { background: var(--white); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--gold); }
.btn-danger { background: var(--error); color: #fff; }
.btn-danger:hover { background: #a93226; }
.btn-sm { padding: 5px 12px; font-size: 11px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* --- Forms --- */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 12px; font-weight: 600; color: var(--text-light); margin-bottom: 4px; text-transform: uppercase; letter-spacing: .05em; }
.form-input {
  width: 100%; padding: 10px 14px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 14px; color: var(--text); background: var(--white); transition: border .2s;
}
.form-input:focus { outline: none; border-color: var(--gold); }
.form-row { display: flex; gap: 12px; }
.form-row > * { flex: 1; }
select.form-input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23888' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }

/* --- Grid --- */
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

/* --- Empty State --- */
.empty-state {
  text-align: center; padding: 60px 20px;
  border: 2px dashed var(--border); border-radius: var(--radius);
  background: rgba(200,169,110,.03);
}
.empty-state h3 { font-size: 18px; color: var(--charcoal); margin-bottom: 8px; }
.empty-state p { font-size: 13px; color: var(--text-light); margin-bottom: 20px; }

/* --- Onboarding --- */
.onboarding {
  background: var(--white); border: 2px solid var(--gold); border-radius: var(--radius);
  padding: 32px; margin-bottom: 28px;
}
.onboarding h2 { font-size: 20px; margin-bottom: 4px; }
.onboarding .subtitle { font-size: 13px; color: var(--text-light); margin-bottom: 24px; }
.step { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 20px; padding: 12px; border-radius: 8px; background: var(--bg); }
.step-num {
  width: 32px; height: 32px; border-radius: 50%; background: var(--border); color: var(--text-light);
  display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; flex-shrink: 0;
}
.step-num.done { background: var(--success); color: #fff; }
.step-num.active { background: var(--gold); color: #fff; }
.step-body h4 { font-size: 14px; margin-bottom: 4px; }
.step-body p { font-size: 12px; color: var(--text-light); }

/* --- Badge --- */
.badge {
  display: inline-block; padding: 2px 8px; border-radius: 10px;
  font-size: 10px; font-weight: 600; text-transform: uppercase;
}
.badge-draft { background: #eee; color: #888; }
.badge-active { background: #d4edda; color: #155724; }
.badge-archived { background: #f0e6d3; color: #856404; }
.badge-sold { background: #f8d7da; color: #721c24; }
.badge-admin { background: var(--gold); color: #fff; }
.badge-user { background: #e0e0e0; color: #555; }
.badge-inactive { background: #f8d7da; color: #721c24; }

/* --- Artwork Thumbnail --- */
.artwork-thumb {
  width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 8px;
  background: #eee; border: 1px solid var(--border);
}
.artwork-placeholder {
  width: 100%; aspect-ratio: 4/3; border-radius: 8px; background: #e8e4dc;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-light); font-size: 12px; border: 1px solid var(--border);
}

/* --- Modal --- */
.modal-overlay {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5);
  z-index: 1000; justify-content: center; align-items: center;
}
.modal-overlay.show { display: flex; }
.modal {
  background: var(--white); border-radius: var(--radius); padding: 28px;
  min-width: 400px; max-width: 90vw; max-height: 90vh; overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0,0,0,.2);
}
.modal h2 { font-size: 18px; margin-bottom: 20px; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 20px; }

/* --- Login Page --- */
.login-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: var(--charcoal);
}
.login-card {
  background: var(--white); border-radius: 16px; padding: 48px 40px;
  width: 400px; max-width: 90vw; text-align: center;
  box-shadow: 0 8px 40px rgba(0,0,0,.3);
}
.login-logo { width: 200px; margin-bottom: 8px; }
.login-subtitle { font-size: 13px; color: var(--text-light); margin-bottom: 32px; }
.login-error { color: var(--error); font-size: 12px; margin-bottom: 12px; min-height: 18px; }

/* --- Admin Table --- */
.admin-table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.admin-table th { background: var(--charcoal); color: #fff; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; padding: 10px 14px; text-align: left; }
.admin-table td { padding: 12px 14px; font-size: 13px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: rgba(200,169,110,.04); }
.admin-table .actions { display: flex; gap: 4px; }
.stat-card { text-align: center; cursor: default; }
.stat-card .stat-value { font-size: 36px; font-weight: 700; color: var(--gold); margin: 8px 0 4px; }
.stat-card .stat-label { font-size: 12px; color: var(--text-light); }

/* --- Responsive --- */
@media (max-width: 768px) {
  .nav-inner { padding: 0 12px; }
  .nav-links a { padding: 6px 8px; font-size: 11px; }
  .nav-username { display: none; }
  .page { padding: 20px 12px; }
  .form-row { flex-direction: column; }
  .modal { min-width: auto; margin: 12px; }
  .login-card { padding: 32px 24px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}
