/* EtsyMan — etsyman.cc */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --orange:  #F16521;
  --orange-d:#c24f15;
  --blue:    #3b82f6;
  --green:   #22c55e;
  --red:     #ef4444;
  --gray:    #6b7280;
  --bg:      #f5f6f8;
  --card-bg: #ffffff;
  --border:  #e5e7eb;
  --text:    #1f2937;
  --muted:   #6b7280;
  --radius:  8px;
  --shadow:  0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
}

body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.5; }

/* ── header ── */
header { background: #fff; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; }
.header-inner { max-width: 1200px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; gap: 32px; height: 56px; }
.logo { font-size: 20px; font-weight: 700; color: var(--text); text-decoration: none; }
.logo-e { color: var(--orange); }
nav { display: flex; gap: 4px; }
nav a { padding: 6px 12px; border-radius: 6px; color: var(--muted); text-decoration: none; font-weight: 500; transition: background .15s, color .15s; }
nav a:hover { background: var(--bg); color: var(--text); }
nav a.active { background: #fff3ec; color: var(--orange); }

/* ── main ── */
main { max-width: 1200px; margin: 0 auto; padding: 24px; }

/* ── page header ── */
.page-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 24px; gap: 16px; }
.page-header h1 { font-size: 22px; font-weight: 700; }
.subtitle { color: var(--muted); font-size: 13px; margin-top: 2px; }

/* ── disclaimer banner ── */
.disclaimer-banner { background: var(--orange); color: #fff; padding: 14px 24px; display: flex; align-items: center; justify-content: center; }
.disclaimer-banner .disclaimer-text { text-align: center; font-size: 14px; line-height: 1.6; }
.disclaimer-banner strong { font-weight: 700; }

/* ── alerts ── */
.alert { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 20px; font-size: 13px; }
.alert-success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.alert-warn { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.alert-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert-info  { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }
.alert a { color: inherit; font-weight: 600; }
.muted-badge { font-size: 13px; color: var(--muted); font-weight: 600; }

/* ── 3-column dashboard ── */
.columns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 900px) { .columns { grid-template-columns: 1fr; } }

.column { display: flex; flex-direction: column; gap: 10px; }

.col-header { display: flex; align-items: center; justify-content: space-between; padding-bottom: 10px; border-bottom: 2px solid var(--border); margin-bottom: 4px; }
.col-header h2 { font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }

/* ── badge ── */
.badge { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; }
.badge-orange { background: #fff3ec; color: var(--orange); }
.badge-blue   { background: #eff6ff; color: var(--blue); }
.badge-green  { background: #f0fdf4; color: var(--green); }
.badge-gray   { background: var(--bg); color: var(--gray); }

/* ── card ── */
.card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 6px; }
.card-title { font-weight: 600; font-size: 13px; }
.card-meta { color: var(--muted); font-size: 12px; }
.card-row { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--muted); }
.card-date { font-size: 11px; color: var(--muted); }
.amount { font-weight: 700; color: var(--text); }
.unread-badge { display: inline-block; background: var(--blue); color: #fff; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 99px; }
.stars { color: var(--orange); font-size: 15px; letter-spacing: 1px; }
.review-text { font-size: 12px; color: #555; font-style: italic; }

.empty-state { color: var(--muted); font-size: 13px; padding: 20px 0; text-align: center; }

/* ── buttons ── */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 6px; border: none; cursor: pointer; font-size: 13px; font-weight: 600; background: var(--orange); color: #fff; text-decoration: none; transition: background .15s; }
.btn:hover { background: var(--orange-d); }
.btn-secondary { background: #fff; color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--bg); }
.btn-etsy { background: var(--orange); }
.btn-danger { background: var(--red); }
.btn-danger:hover { background: #dc2626; }

/* ── settings ── */
.settings-section { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-bottom: 20px; box-shadow: var(--shadow); }
.settings-section h2 { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.settings-desc { color: var(--muted); font-size: 13px; margin-bottom: 18px; }
.settings-form { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field label { font-weight: 600; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.field input { padding: 9px 12px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; width: 100%; max-width: 480px; transition: border-color .15s; }
.field input:focus { outline: none; border-color: var(--orange); }
.hint { font-weight: 400; text-transform: none; letter-spacing: 0; }
.oauth-row { display: flex; align-items: center; gap: 16px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.connected-badge { color: #166534; font-weight: 600; font-size: 13px; }

/* ── footer ── */
footer { text-align: center; padding: 20px; color: var(--muted); font-size: 12px; border-top: 1px solid var(--border); margin-top: 32px; }

/* ── rich site footer (public pages) ── */
.site-footer { background: var(--text); color: #9ca3af; padding: 40px 24px 24px; margin-top: 48px; }
.footer-inner { max-width: 960px; margin: 0 auto; }
.footer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-bottom: 32px; }
@media (max-width: 640px) { .footer-grid { grid-template-columns: 1fr; gap: 20px; } }
.footer-col h4 { font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #fff; margin-bottom: 10px; }
.footer-col a { display: block; color: #9ca3af; text-decoration: none; font-size: 12px; line-height: 2.1; transition: color .12s; }
.footer-col a:hover { color: var(--orange); }
.footer-bottom { border-top: 1px solid #374151; padding-top: 20px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 10px; font-size: 11px; color: #6b7280; }
.footer-brand { font-size: 16px; font-weight: 700; color: #fff; margin-bottom: 3px; }
.footer-brand span { color: var(--orange); }

/* ── header user ── */
.header-user { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.user-email { font-size: 12px; color: var(--muted); }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-full { width: 100%; justify-content: center; }

/* ── auth pages ── */
body.auth-page { display: flex; flex-direction: column; min-height: 100vh; background: linear-gradient(135deg, #fff7f2 0%, #f5f6f8 60%); }
.auth-center { flex: 1; display: flex; align-items: center; justify-content: center; }
.auth-wrap { display: flex; flex-direction: column; align-items: center; gap: 24px; width: 100%; max-width: 420px; padding: 24px 16px; }
.auth-brand { text-align: center; }
.auth-logo-large { font-size: 36px; font-weight: 800; color: var(--text); letter-spacing: -1px; }
.auth-tagline { color: var(--muted); font-size: 14px; margin-top: 4px; }
.auth-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: 12px; padding: 36px 32px; width: 100%; box-shadow: 0 4px 24px rgba(0,0,0,.08); display: flex; flex-direction: column; gap: 20px; }
.auth-card h1 { font-size: 20px; font-weight: 700; text-align: center; color: var(--text); }
.auth-card form { display: flex; flex-direction: column; gap: 14px; }
.auth-card .field input { max-width: 100%; }
.auth-footer { text-align: center; font-size: 12px; color: var(--muted); }
.auth-footer a { color: var(--orange); text-decoration: none; font-weight: 600; }
.btn-lg { padding: 11px 20px; font-size: 14px; }

/* ── admin table ── */
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th { text-align: left; padding: 8px 12px; border-bottom: 2px solid var(--border); color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .4px; }
.admin-table td { padding: 8px 12px; border-bottom: 1px solid var(--border); }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table .used-row td { color: var(--muted); }

/* ── select fields ── */
.field select { padding: 9px 12px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; width: 100%; max-width: 480px; background: #fff; transition: border-color .15s; }
.field select:focus { outline: none; border-color: var(--orange); }

/* ── blog ── */
.blog-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; margin-top: 1.5rem; }
.blog-card { display: flex; flex-direction: column; gap: 0.5rem; }
.blog-card .card-title { font-size: 1.1rem; font-weight: 600; color: var(--text); text-decoration: none; }
.blog-card .card-title:hover { color: var(--orange); }
.blog-card .card-meta { font-size: 0.82rem; color: var(--gray); }
.blog-card .card-excerpt { font-size: 0.93rem; color: #374151; flex: 1; }
.tag-pill { display: inline-block; background: #f3f4f6; color: var(--gray); font-size: 0.75rem; padding: 2px 8px; border-radius: 999px; margin: 2px 2px 0 0; }
.blog-hero { margin-bottom: 1.5rem; }
.blog-hero h1 { font-size: 2rem; font-weight: 700; }
.blog-hero p { color: var(--gray); margin-top: 0.25rem; }
.rss-link { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.85rem; color: #f97316; text-decoration: none; border: 1px solid #fed7aa; background: #fff7ed; padding: 4px 10px; border-radius: 6px; }
.rss-link:hover { background: #ffedd5; }
.breadcrumb { font-size: 0.85rem; color: var(--gray); margin-bottom: 1rem; }
.breadcrumb a { color: var(--gray); text-decoration: none; }
.breadcrumb a:hover { color: var(--orange); }
.prose { max-width: 720px; line-height: 1.75; }
.prose h2 { font-size: 1.3rem; font-weight: 600; margin: 1.75rem 0 0.5rem; color: var(--text); }
.prose p { margin-bottom: 1rem; color: #374151; }
.prose ul, .prose ol { padding-left: 1.5rem; margin-bottom: 1rem; color: #374151; }
.prose li { margin-bottom: 0.3rem; }
.prose strong { color: var(--text); font-weight: 600; }
.prose blockquote { border-left: 3px solid var(--orange); padding: 0.5rem 1rem; margin: 1rem 0; background: #fff7ed; border-radius: 0 4px 4px 0; }
.prose blockquote p { color: #92400e; }
@media (max-width: 700px) { .blog-grid { grid-template-columns: 1fr; } .blog-hero h1 { font-size: 1.5rem; } }
