/* ============================================
   CSS Custom Properties
   ============================================ */
:root {
  --sidebar-width: 252px;
  --sidebar-bg: #0f172a;
  --sidebar-border: rgba(255,255,255,0.06);
  --sidebar-text: #94a3b8;
  --sidebar-text-hover: #e2e8f0;
  --sidebar-active-bg: rgba(59,130,246,0.14);
  --sidebar-active-text: #60a5fa;
  --sidebar-active-border: #3b82f6;

  --header-height: 60px;

  --primary: #3b82f6;
  --primary-dark: #2563eb;
  --primary-light: #eff6ff;
  --danger: #ef4444;
  --danger-dark: #dc2626;
  --danger-light: #fef2f2;
  --success: #22c55e;
  --success-light: #f0fdf4;
  --warning: #f59e0b;
  --warning-light: #fffbeb;

  --bg: #f1f5f9;
  --card-bg: #ffffff;
  --text-primary: #0f172a;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --border: #e2e8f0;
  --border-dark: #cbd5e1;

  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.05);

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: ui-monospace, 'SFMono-Regular', 'Cascadia Code', monospace;
}

/* ============================================
   Reset & Base
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ============================================
   App Layout
   ============================================ */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* ============================================
   Sidebar
   ============================================ */
.sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 100;
  overflow: hidden;
  transition: transform 0.25s ease;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--sidebar-border);
  text-decoration: none;
}

.sidebar-brand-icon {
  width: 30px;
  height: 30px;
  background: var(--primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: white;
  font-weight: 800;
  flex-shrink: 0;
  letter-spacing: -0.5px;
}

.sidebar-brand-name {
  font-size: 17px;
  font-weight: 700;
  color: #f1f5f9;
  letter-spacing: -0.4px;
}

.sidebar-nav {
  flex: 1;
  padding: 14px 10px;
  overflow-y: auto;
  scrollbar-width: none;
}

.sidebar-nav::-webkit-scrollbar { display: none; }

.nav-section-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--sidebar-text);
  padding: 6px 10px 4px;
  opacity: 0.5;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  color: var(--sidebar-text);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  transition: all 0.14s ease;
  margin-bottom: 1px;
  border-left: 2px solid transparent;
}

.nav-item:hover {
  background: rgba(255,255,255,0.06);
  color: var(--sidebar-text-hover);
  text-decoration: none;
}

.nav-item.active {
  background: var(--sidebar-active-bg);
  color: var(--sidebar-active-text);
  border-left-color: var(--sidebar-active-border);
}

.nav-item .material-icons {
  font-size: 18px;
  flex-shrink: 0;
  opacity: 0.85;
}

.nav-item.active .material-icons { opacity: 1; }

/* ---- Sidebar Footer ---- */
.sidebar-footer {
  padding: 12px 10px;
  border-top: 1px solid var(--sidebar-border);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px 10px;
}

.sidebar-avatar {
  width: 30px;
  height: 30px;
  background: linear-gradient(135deg, var(--primary), #818cf8);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.sidebar-user-info { flex: 1; min-width: 0; }

.sidebar-user-name {
  font-size: 13px;
  font-weight: 600;
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.sidebar-user-role {
  font-size: 11px;
  color: var(--sidebar-text);
  line-height: 1.3;
}

.btn-logout {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 10px;
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.15);
  border-radius: var(--radius-sm);
  color: #fca5a5;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.14s ease;
  font-family: var(--font);
  text-align: left;
}

.btn-logout:hover {
  background: rgba(239,68,68,0.16);
  color: #fecaca;
}

.btn-logout .material-icons { font-size: 15px; }

/* ============================================
   Main Wrapper
   ============================================ */
.main-wrapper {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ============================================
   Page Header
   ============================================ */
.page-header {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  padding: 0 28px;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
}

.page-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.2px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.generation-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.generation-form label {
  white-space: nowrap;
}

.generation-form select {
  width: auto;
  min-width: 180px;
}

/* ============================================
   Page Content
   ============================================ */
.page-content {
  flex: 1;
  padding: 24px 28px;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 500;
  font-family: var(--font);
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.14s ease;
  text-decoration: none;
  line-height: 1.4;
  white-space: nowrap;
}

.btn:hover { text-decoration: none; }
.btn .material-icons { font-size: 15px; }

.btn-primary { background: var(--primary); color: white; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: white; }

.btn-secondary {
  background: white;
  color: var(--text-secondary);
  border-color: var(--border-dark);
}
.btn-secondary:hover { background: var(--bg); color: var(--text-primary); }

.btn-danger { background: var(--danger); color: white; border-color: var(--danger); }
.btn-danger:hover { background: var(--danger-dark); border-color: var(--danger-dark); color: white; }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: transparent;
  padding: 5px 6px;
}
.btn-ghost:hover { background: var(--bg); color: var(--text-primary); }
.btn-ghost.danger:hover { background: var(--danger-light); color: var(--danger); }

.btn-sm { padding: 5px 11px; font-size: 12.5px; }
.btn-sm .material-icons { font-size: 14px; }

/* ============================================
   Cards
   ============================================ */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
}

.card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.card-body { padding: 20px; }

/* ============================================
   Table
   ============================================ */
.table-wrapper {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.data-table thead { background: #f8fafc; }

.data-table th {
  padding: 10px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table td {
  padding: 12px 16px;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr { transition: background 0.1s ease; }
.data-table tbody tr:hover { background: #f8fafc; }

.data-table .td-actions {
  display: flex;
  align-items: center;
  gap: 2px;
}

.col-id {
  color: var(--text-muted);
  font-size: 12.5px;
  font-family: var(--font-mono);
  width: 56px;
}

.col-actions { width: 90px; }

/* ============================================
   Badges
   ============================================ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 100px;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.badge-success { background: var(--success-light); color: #15803d; }
.badge-warning { background: var(--warning-light); color: #92400e; }
.badge-secondary { background: #f1f5f9; color: var(--text-secondary); }
.badge-primary { background: var(--primary-light); color: var(--primary-dark); }

/* ============================================
   Empty State
   ============================================ */
.empty-state {
  text-align: center;
  padding: 52px 24px;
  color: var(--text-muted);
}

.empty-state .material-icons {
  font-size: 44px;
  opacity: 0.35;
  display: block;
  margin-bottom: 10px;
}

.empty-state-text { font-size: 13.5px; line-height: 1.6; }

/* ============================================
   Forms
   ============================================ */
.form-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
}

.form-group { margin-bottom: 18px; }

.form-label {
  display: block;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 5px;
}

.form-control {
  width: 100%;
  padding: 8px 11px;
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-family: var(--font);
  color: var(--text-primary);
  background: white;
  transition: border-color 0.14s ease, box-shadow 0.14s ease;
  outline: none;
  line-height: 1.5;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

select.form-control {
  appearance: none;
  min-height: 34px;
  padding-right: 36px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='m4 6 4 4 4-4' stroke='%2364748b' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  padding-top: 6px;
  padding-bottom: 6px;
}

select.form-control:hover {
  border-color: var(--text-muted);
}

select.form-control:focus {
  border-color: var(--primary);
}

.form-control-sm, select.form-control-sm {
    padding-top: 4px;
    padding-bottom: 4px;
    max-height: 30px;
    min-height: auto;
}

.form-control::placeholder { color: var(--text-muted); }

.form-control[type="datetime-local"] {
    color-scheme: light;
    cursor: pointer;
}

.form-control[type="datetime-local"]::-webkit-calendar-picker-indicator {
    opacity: 0.5;
    cursor: pointer;
    border-radius: 3px;
    padding: 2px;
}

.form-control[type="datetime-local"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
    background: var(--bg);
}

.form-control[readonly] {
  background: var(--bg);
  color: var(--text-secondary);
  cursor: default;
}

.form-hint {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 4px;
}

.post-image-preview {
  display: none;
  margin-top: 10px;
  max-width: 360px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
}

.post-image-paste-target {
  margin-top: 8px;
  margin-bottom: 8px;
  padding: 12px;
  border: 1px dashed var(--border-dark);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  background: var(--bg);
  cursor: text;
}

.post-image-paste-target:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.post-image-preview.has-image {
  display: block;
}

.post-image-preview img {
  display: block;
  width: 100%;
  height: auto;
}

.slug-preview {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: var(--text-muted);
    font-family: var(--font-mono, ui-monospace, monospace);
    letter-spacing: 0.01em;
    transition: color 0.15s;
}

.slug-preview::before {
    content: 'URL preview: ';
    font-family: var(--font);
    color: var(--text-secondary);
    font-size: 11px;
    font-style: normal;
    letter-spacing: 0;
}

.form-row {
  display: grid;
  gap: 16px;
}

.form-row.cols-2 { grid-template-columns: 1fr 1fr; }
.form-row.cols-3 { grid-template-columns: 1fr 1fr 1fr; }

.form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 18px;
  margin-top: 20px;
  border-top: 1px solid var(--border);
}

/* Checkbox */
.checkbox-group { display: flex; flex-direction: column; gap: 8px; }

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.category-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
}

.checkbox-item input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--primary);
  cursor: pointer;
  flex-shrink: 0;
}

.checkbox-item span { font-size: 13.5px; color: var(--text-primary); }

.tag-editor {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tag-editor-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-editor-badges:empty {
    display: none;
}

.tag-editor-suggestions {
    display: flex;
    flex-direction: column;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-sm);
    background: white;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}

.tag-editor-suggestions[hidden] {
    display: none;
}

.tag-editor-suggestion {
    padding: 8px 11px;
    border: 0;
    background: white;
    color: var(--text-primary);
    cursor: pointer;
    font: inherit;
    text-align: left;
}

.tag-editor-suggestion:hover,
.tag-editor-suggestion.active {
    background: var(--primary-light);
    color: var(--primary-dark);
}

.tag-editor-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    max-width: 100%;
    padding: 3px 6px 3px 10px;
    border-radius: 100px;
    background: var(--primary-light);
    color: var(--primary-dark);
    font-size: 12.5px;
    overflow-wrap: anywhere;
}

.tag-editor-badge > span {
    min-width: 0;
}

.tag-editor-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 19px;
    height: 19px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}

.tag-editor-remove:hover,
.tag-editor-remove:focus-visible {
    background: color-mix(in srgb, var(--primary) 15%, transparent);
}

/* ============================================
   Publish Mode Radio Group
   ============================================ */
.publish-mode-group {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.publish-mode-option {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 14px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--surface);
    cursor: pointer;
    user-select: none;
    font-size: 13.5px;
    color: var(--text-secondary);
    transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.publish-mode-option:hover {
    border-color: var(--primary);
    color: var(--text-primary);
}

.publish-mode-option.active {
    border-color: var(--primary);
    background: color-mix(in srgb, var(--primary) 10%, var(--surface));
    color: var(--primary);
    font-weight: 500;
}

.publish-mode-option input[type="radio"] {
    display: none;
}

/* ============================================
   Language Tabs
   ============================================ */
.lang-tabs {
  display: flex;
  gap: 2px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 20px;
}

.lang-tab {
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.14s ease;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  text-decoration: none;
  display: block;
  background: transparent;
  border-top: none;
  border-left: none;
  border-right: none;
  font-family: var(--font);
}

.lang-tab:hover { color: var(--primary); text-decoration: none; }
.lang-tab.active { color: var(--primary); border-bottom-color: var(--primary); }

.lang-panel { display: none; }
.lang-panel.active { display: block; }

/* ============================================
   Rich Text Editor (Quill)
   ============================================ */
.editor-wrap {
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color 0.14s ease, box-shadow 0.14s ease;
}

.editor-wrap:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

.editor-wrap .ql-toolbar.ql-snow {
  border: none;
  border-bottom: 1px solid var(--border);
  background: #f8fafc;
  padding: 8px 10px;
}

.editor-wrap .ql-container.ql-snow { border: none; }

.editor-wrap .ql-editor {
  min-height: 260px;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
}

/* ============================================
   Alerts / Errors
   ============================================ */
.alert {
  display: flex;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 13.5px;
  margin-bottom: 20px;
}

.alert .material-icons { font-size: 17px; flex-shrink: 0; margin-top: 1px; }
.alert ul { list-style: none; }
.alert li + li { margin-top: 3px; }

.alert-error {
  background: var(--danger-light);
  border: 1px solid #fecaca;
  color: #991b1b;
}

.alert-success {
  background: var(--success-light);
  border: 1px solid #bbf7d0;
  color: #166534;
}

/* ============================================
   Delete Confirm Modal
   ============================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.45);
  backdrop-filter: blur(3px);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: white;
  border-radius: var(--radius-lg);
  padding: 24px;
  width: 360px;
  max-width: calc(100vw - 32px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.22);
  transform: scale(0.94) translateY(-6px);
  transition: transform 0.2s ease;
}

.modal-overlay.open .modal { transform: scale(1) translateY(0); }

.modal-icon {
  width: 40px;
  height: 40px;
  background: var(--danger-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.modal-icon .material-icons { color: var(--danger); font-size: 20px; }

.modal-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.modal-body {
  font-size: 13.5px;
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.6;
}

.modal-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

/* ============================================
   Admin Stats
   ============================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  transition: box-shadow 0.14s ease, border-color 0.14s ease;
}

.stat-card:hover {
  border-color: var(--border-dark);
  box-shadow: var(--shadow);
  text-decoration: none;
}

.stat-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon.blue { background: var(--primary-light); color: var(--primary); }
.stat-icon.green { background: var(--success-light); color: #15803d; }
.stat-icon.yellow { background: var(--warning-light); color: #92400e; }
.stat-icon.purple { background: #f5f3ff; color: #7c3aed; }
.stat-icon .material-icons { font-size: 20px; }

.stat-value {
  font-size: 21px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.1;
  margin-bottom: 3px;
  letter-spacing: -0.5px;
}

.stat-label { font-size: 12.5px; color: var(--text-secondary); }

/* ============================================
   Auth / Login Page
   ============================================ */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  padding: 24px;
}

.auth-card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 80px rgba(0,0,0,0.3);
  padding: 36px 40px;
  width: 100%;
  max-width: 380px;
}

.auth-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 28px;
}

.auth-brand-icon {
  width: 36px;
  height: 36px;
  background: var(--primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: white;
  font-weight: 800;
}

.auth-brand-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.4px;
}

.auth-title {
  font-size: 19px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
  letter-spacing: -0.3px;
}

.auth-subtitle {
  font-size: 13.5px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.auth-submit {
  width: 100%;
  justify-content: center;
  padding: 9px 16px;
  font-size: 14px;
  margin-top: 4px;
}

/* ============================================
   Breadcrumb / Page subtitle
   ============================================ */
.page-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ============================================
   Section header
   ============================================ */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

/* ============================================
   Pagination
   ============================================ */
.pagination {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 14px 16px;
  border-top: 1px solid var(--border);
}

/* ============================================
   Responsive / Mobile
   ============================================ */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    box-shadow: 0 0 40px rgba(0,0,0,0.3);
  }

  .sidebar.open { transform: translateX(0); }

  .main-wrapper { margin-left: 0; }

  .page-content { padding: 16px; }
  .page-header { padding: 8px 16px; height: auto; min-height: var(--header-height); flex-wrap: wrap; gap: 8px; }
  .header-actions, .generation-form { flex-wrap: wrap; }

  .form-row.cols-2,
  .form-row.cols-3 { grid-template-columns: 1fr; }

  .stats-grid { grid-template-columns: 1fr 1fr; }
}
