/* Author pages */
.author-page { min-height: 100vh; background: var(--bg); }
.author-body { padding: 48px 40px; max-width: 860px; margin: 0 auto; }
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 40px; background: var(--bg); }
.auth-card { background: #fff; border: 1px solid var(--cream-dark); border-radius: 4px; padding: 48px; width: 100%; max-width: 440px; }
.auth-card h1 { font-family: var(--font-display); font-size: 28px; font-weight: 600; color: var(--fg); margin-bottom: 8px; }
.auth-card p { font-family: var(--font-ui); font-size: 14px; color: var(--fg-muted); margin-bottom: 32px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-family: var(--font-ui); font-size: 13px; font-weight: 500; color: var(--fg-muted); letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select { width: 100%; padding: 10px 14px; border: 1px solid var(--cream-dark); border-radius: 3px; font-family: var(--font-body); font-size: 15px; background: var(--bg); color: var(--fg); transition: border-color 0.2s; outline: none; }
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { border-color: var(--accent); }
.form-group textarea { resize: vertical; min-height: 100px; }
.form-group .hint { font-family: var(--font-ui); font-size: 12px; color: var(--fg-muted); margin-top: 4px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 22px; border-radius: 3px; font-family: var(--font-ui); font-size: 14px; font-weight: 500; text-decoration: none; border: none; cursor: pointer; transition: all 0.2s; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-light); }
.btn-secondary { background: transparent; color: var(--fg-muted); border: 1px solid var(--cream-dark); }
.btn-secondary:hover { border-color: var(--fg-muted); }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-full { width: 100%; justify-content: center; }
.btn-danger { background: #7B2D26; color: #fff; }
.error-msg { background: #FEF2F0; border: 1px solid #F5C3BB; border-radius: 3px; padding: 10px 14px; font-family: var(--font-ui); font-size: 13px; color: var(--accent); margin-bottom: 16px; display: none; }
.form-error { display: block; }
.auth-footer { margin-top: 24px; text-align: center; font-family: var(--font-ui); font-size: 13px; color: var(--fg-muted); }
.auth-footer a { color: var(--accent); text-decoration: none; }

/* Dashboard */
.dashboard-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 40px; }
.dashboard-header h1 { font-family: var(--font-display); font-size: 36px; font-weight: 600; }
.dashboard-header .author-pen { font-family: var(--font-ui); font-size: 15px; color: var(--fg-muted); margin-top: 4px; }
.dashboard-actions { display: flex; gap: 12px; margin-top: 12px; }
.dashboard-grid { display: grid; grid-template-columns: 1fr 320px; gap: 32px; }
.stories-section h2 { font-family: var(--font-display); font-size: 22px; font-weight: 600; margin-bottom: 20px; }
.story-list { display: flex; flex-direction: column; gap: 12px; }
.story-item { background: #fff; border: 1px solid var(--cream-dark); border-radius: 4px; padding: 20px; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.story-item-left { flex: 1; min-width: 0; }
.story-item-left h3 { font-family: var(--font-display); font-size: 18px; font-weight: 500; margin-bottom: 4px; }
.story-item-left .meta { font-family: var(--font-ui); font-size: 13px; color: var(--fg-muted); }
.story-item-left .synopsis { font-size: 14px; color: var(--fg-muted); margin-top: 8px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.story-item-right { display: flex; flex-direction: column; gap: 8px; flex-shrink: 0; }
.draft-badge { font-family: var(--font-ui); font-size: 11px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; padding: 3px 8px; border-radius: 2px; background: var(--bg-alt); color: var(--fg-muted); border: 1px solid var(--cream-dark); }
.published-badge { background: #E8F5E9; color: #2E7D32; border-color: #A5D6A7; }
.stats-section { background: #fff; border: 1px solid var(--cream-dark); border-radius: 4px; padding: 24px; }
.stats-section h2 { font-family: var(--font-display); font-size: 20px; font-weight: 600; margin-bottom: 20px; }
.stat-item { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--cream-dark); }
.stat-item:last-child { border-bottom: none; }
.stat-label { font-family: var(--font-ui); font-size: 13px; color: var(--fg-muted); }
.stat-value { font-family: var(--font-display); font-size: 22px; font-weight: 600; color: var(--fg); }
.empty-dash { text-align: center; padding: 60px 20px; color: var(--fg-muted); }
.empty-dash h3 { font-family: var(--font-display); font-size: 24px; font-weight: 500; margin-bottom: 8px; }
.empty-dash p { font-family: var(--font-ui); font-size: 14px; }

/* New story / write chapter */
.author-form-card { background: #fff; border: 1px solid var(--cream-dark); border-radius: 4px; padding: 40px; max-width: 720px; margin: 0 auto; }
.author-form-card h1 { font-family: var(--font-display); font-size: 28px; font-weight: 600; margin-bottom: 8px; }
.author-form-card .subtitle { font-family: var(--font-ui); font-size: 14px; color: var(--fg-muted); margin-bottom: 32px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-actions { display: flex; gap: 12px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--cream-dark); }
#content-editor { min-height: 400px; }
.chapter-nav { display: flex; align-items: center; gap: 12px; margin-bottom: 32px; font-family: var(--font-ui); font-size: 13px; color: var(--fg-muted); }
.chapter-nav a { color: var(--accent); text-decoration: none; }
.words-count { font-family: var(--font-ui); font-size: 12px; color: var(--fg-muted); margin-top: 4px; text-align: right; }
.success-toast { background: #E8F5E9; border: 1px solid #A5D6A7; color: #2E7D32; padding: 12px 18px; border-radius: 3px; font-family: var(--font-ui); font-size: 14px; margin-bottom: 20px; display: none; }
@media (max-width: 640px) {
  .dashboard-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .auth-card { padding: 28px; }
  .author-body { padding: 24px 20px; }
}