/* public/style.css */
:root {
  --cream: #F3EFE6;
  --charcoal: #1A2B3C;
  --charcoal-m: #223347;
  --gray: #5C5F60;
  --gray-light: #9A9D9E;
  --border: #D4CCBC;
  --pink: #ED1566;
  --pink-soft: rgba(237,21,102,0.10);
  --green: #16A34A;
  --green-soft: rgba(22,163,74,0.10);
  --amber: #D97706;
  --blue: #116dff;
  --white: #fff;
  --radius: 12px;
  --font-head: 'Inter', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', -apple-system, sans-serif; background: var(--cream); color: var(--charcoal); min-height: 100vh; }
a { color: var(--pink); }

/* ── Layout ── */
.page { display: flex; min-height: 100vh; }
.sidebar { width: 220px; background: var(--charcoal); padding: 24px 0; flex-shrink: 0; }
.main { flex: 1; padding: 32px; overflow-y: auto; }

/* ── Sidebar ── */
.sidebar-brand { color: white; font-size: 14px; font-weight: 700; padding: 0 20px 24px; border-bottom: 1px solid rgba(255,255,255,0.1); letter-spacing: .04em; }
.sidebar-sub { color: rgba(255,255,255,0.4); font-size: 11px; margin-top: 2px; font-weight: 400; }
.sidebar-nav { padding: 16px 0; }
.nav-item { display: block; padding: 10px 20px; color: rgba(255,255,255,0.6); font-size: 13px; text-decoration: none; cursor: pointer; border: none; background: none; width: 100%; text-align: left; transition: all .15s; }
.nav-item:hover, .nav-item.active { color: white; background: rgba(255,255,255,0.08); }
.sidebar-footer { padding: 16px 20px; border-top: 1px solid rgba(255,255,255,0.1); margin-top: auto; }
.logout-btn { color: rgba(255,255,255,0.4); font-size: 12px; text-decoration: none; }

/* ── Page header ── */
.page-title { font-size: 22px; font-weight: 700; color: var(--charcoal); margin-bottom: 4px; }
.page-sub { font-size: 13px; color: var(--gray); margin-bottom: 24px; }

/* ── Tabs ── */
.tabs { display: flex; gap: 4px; margin-bottom: 24px; border-bottom: 1px solid var(--border); padding-bottom: 0; }
.tab { padding: 8px 16px; font-size: 13px; font-weight: 500; color: var(--gray); cursor: pointer; border: none; background: none; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab.active { color: var(--pink); border-bottom-color: var(--pink); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── Cards ── */
.card { background: white; border-radius: var(--radius); border: 1px solid var(--border); padding: 20px; margin-bottom: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.card-type { font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: 3px 8px; border-radius: 100px; }
.type-blog { background: rgba(17,109,255,0.1); color: var(--blue); }
.type-instagram { background: var(--pink-soft); color: var(--pink); }
.type-tiktok { background: rgba(0,0,0,0.06); color: var(--charcoal); }
.type-linkedin { background: rgba(17,109,255,0.1); color: #0077b5; }
.type-gbp { background: var(--green-soft); color: var(--green); }

.card-title { font-size: 14px; font-weight: 600; color: var(--charcoal); margin-bottom: 8px; }
.card-body { font-size: 13px; color: var(--gray); line-height: 1.6; white-space: pre-wrap; }
.card-body textarea { width: 100%; border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; font-size: 13px; line-height: 1.6; resize: vertical; min-height: 120px; font-family: inherit; color: var(--charcoal); background: var(--cream); }
.card-body textarea:focus { outline: none; border-color: var(--pink); }

.card-meta { font-size: 11px; color: var(--gray-light); margin-top: 8px; }
.card-actions { display: flex; gap: 8px; margin-top: 16px; }

/* ── Buttons ── */
.btn { padding: 8px 16px; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; border: none; transition: opacity .15s; }
.btn:hover { opacity: .85; }
.btn-primary { background: var(--pink); color: white; }
.btn-secondary { background: var(--charcoal); color: white; }
.btn-ghost { background: transparent; color: var(--gray); border: 1px solid var(--border); }
.btn-success { background: var(--green); color: white; }
.btn-danger { background: #dc2626; color: white; }
.btn-sm { padding: 5px 12px; font-size: 12px; }

/* ── Top bar ── */
.top-bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 32px; }

/* ── Generate button ── */
.generate-btn { display: flex; align-items: center; gap: 8px; background: var(--charcoal); color: white; padding: 10px 20px; border-radius: 100px; font-size: 13px; font-weight: 600; border: none; cursor: pointer; }
.generate-btn:hover { background: var(--charcoal-m); }

/* ── Brand voice table ── */
.bv-table { width: 100%; border-collapse: collapse; }
.bv-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--gray-light); padding: 8px 12px; border-bottom: 1px solid var(--border); }
.bv-table td { padding: 8px 12px; border-bottom: 1px solid var(--border); font-size: 13px; vertical-align: top; }
.bv-table td:first-child { color: var(--gray); font-family: monospace; font-size: 12px; white-space: nowrap; }
.bv-table td input { width: 100%; border: none; background: transparent; font-size: 13px; color: var(--charcoal); font-family: inherit; }
.bv-table td input:focus { outline: 1px solid var(--pink); border-radius: 4px; }

/* ── Feedback box ── */
.feedback-box { display: none; margin-top: 10px; }
.feedback-box textarea { width: 100%; border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; font-size: 13px; resize: vertical; min-height: 70px; font-family: inherit; }
.feedback-box textarea:focus { outline: none; border-color: var(--pink); }

/* ── Empty state ── */
.empty { text-align: center; padding: 60px 20px; color: var(--gray-light); }
.empty-icon { font-size: 40px; margin-bottom: 12px; }

/* ── Login ── */
.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: var(--cream); }
.login-box { background: white; border-radius: var(--radius); border: 1px solid var(--border); padding: 40px; width: 360px; text-align: center; }
.login-logo { font-size: 18px; font-weight: 700; color: var(--charcoal); margin-bottom: 4px; }
.login-sub { font-size: 13px; color: var(--gray); margin-bottom: 28px; }
.login-box input[type=password] { width: 100%; border: 1px solid var(--border); border-radius: 8px; padding: 10px 14px; font-size: 14px; margin-bottom: 14px; }
.login-box input:focus { outline: none; border-color: var(--pink); }
.login-box .btn { width: 100%; padding: 12px; font-size: 15px; }
.login-error { color: #dc2626; font-size: 13px; margin-top: 10px; }

/* ── Onboarding ── */
.onboarding { max-width: 700px; margin: 0 auto; padding: 40px 20px; }
.ob-header { margin-bottom: 40px; }
.ob-header h1 { font-size: 26px; font-weight: 700; color: var(--charcoal); margin-bottom: 6px; }
.ob-header p { color: var(--gray); font-size: 14px; }
.ob-section { background: white; border-radius: var(--radius); border: 1px solid var(--border); padding: 24px; margin-bottom: 20px; }
.ob-section h3 { font-size: 14px; font-weight: 700; color: var(--charcoal); margin-bottom: 4px; }
.ob-section p { font-size: 13px; color: var(--gray); margin-bottom: 14px; }
.ob-section textarea, .ob-section input[type=text], .ob-section input[type=url] {
  width: 100%; border: 1px solid var(--border); border-radius: 8px;
  padding: 9px 12px; font-size: 13px; margin-bottom: 8px; font-family: inherit;
}
.ob-section textarea { resize: vertical; min-height: 90px; }
.ob-section textarea:focus, .ob-section input:focus { outline: none; border-color: var(--pink); }
.ob-section label { font-size: 12px; color: var(--gray); display: block; margin-bottom: 4px; margin-top: 8px; }
.url-row { display: flex; gap: 8px; margin-bottom: 8px; }
.url-row input[type=url] { flex: 1; margin-bottom: 0; }
.url-row input[type=text] { width: 160px; margin-bottom: 0; }
.project-row { display: grid; grid-template-columns: 1fr 2fr; gap: 8px; margin-bottom: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.chip { padding: 5px 12px; border-radius: 100px; border: 1px solid var(--border); font-size: 12px; cursor: pointer; user-select: none; background: white; color: var(--charcoal); }
.chip.selected { background: var(--pink); color: white; border-color: var(--pink); }
.ob-submit { margin-top: 32px; text-align: center; }
.ob-submit .btn { padding: 14px 48px; font-size: 15px; }

/* ── History table ── */
.history-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.history-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--gray-light); padding: 8px 12px; border-bottom: 2px solid var(--border); }
.history-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); color: var(--charcoal); }
.status-badge { font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 100px; text-transform: uppercase; letter-spacing: .06em; }
.status-james_approved, .status-published { background: var(--green-soft); color: var(--green); }
.status-rejected { background: rgba(220,38,38,0.1); color: #dc2626; }
.status-james_queue { background: rgba(217,119,6,0.1); color: var(--amber); }
