/* Thư viện, đăng nhập/đăng ký, phân trang & trạng thái (phần 6/9, tách từ main.css). */
/* Thứ tự nạp (cascade) của bộ: base → hero → cards → movie → watch → account → categories → search → chrome → motion. */
/* ============ Thư viện (Stitch p06) ============ */
.lib-head { display: flex; align-items: center; gap: var(--space-lg); }
.lib-tabs { display: flex; gap: 8px; margin-bottom: var(--space-lg); flex-wrap: wrap; }
.lib-tab {
  padding: 8px 16px;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 13px;
  background: transparent;
  border-radius: var(--radius-sm);
  transition: color 200ms ease, background 200ms ease;
}
.lib-tab:hover { color: var(--text); background: var(--interactive); }
.lib-tab.is-active { color: var(--gold-bright); background: var(--surface); font-weight: 700; }
.tab-count { font-size: 12px; color: var(--text-muted); font-weight: 500; }

/* ============ Xác thực / tài khoản ============ */
.auth-wrap { display: grid; place-items: center; padding: var(--space-xl) var(--gutter); }
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
}
.auth-title { font-size: 24px; font-weight: 800; }
.auth-form { display: flex; flex-direction: column; gap: var(--space-md); }
.auth-alt { margin-top: var(--space-lg); font-size: 13px; color: var(--text-secondary); }

.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field label { font-size: 13px; font-weight: 600; color: var(--text-secondary); }
.form-field input[type="text"],
.form-field input[type="password"],
.form-field input[type="number"],
.form-field input[type="search"],
.form-field input[type="url"],
.form-field select,
.form-field textarea {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-md);
  padding: 11px 14px;
  font: inherit;
  font-size: 14px;
  min-height: 44px;
  width: 100%;
}
.form-field textarea { resize: vertical; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  outline: none;
  border-color: var(--gold-deep);
}
/* Ô chọn file: mặc định trình duyệt vẽ nền sáng chói lệch với theme tối */
.form-field input[type="file"] {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-md);
  padding: 7px 10px;
  font: inherit;
  font-size: 13px;
  width: 100%;
}
.form-field input[type="file"]::file-selector-button {
  background: var(--interactive);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 14px;
  margin-right: 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.form-field input::placeholder { color: var(--text-muted); }
.form-field input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--gold); }
.field-hint { font-size: 12px; color: var(--text-muted); }
.form-error {
  background: rgba(239, 83, 80, 0.12);
  border: 1px solid rgba(239, 83, 80, 0.4);
  color: var(--error);
  font-size: 13px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
}
.form-success {
  background: rgba(76, 175, 128, 0.12);
  border: 1px solid rgba(76, 175, 128, 0.4);
  color: var(--success);
  font-size: 13px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
}

.account-card { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-lg); margin-bottom: var(--space-lg); }
.account-row { display: flex; align-items: center; gap: var(--space-md); margin-bottom: var(--space-lg); }
.account-name { font-weight: 700; font-size: 17px; }
.account-meta { color: var(--text-muted); font-size: 13px; }
.account-actions { display: flex; flex-wrap: wrap; gap: var(--space-md); }

/* ============ Phân trang / trạng thái ============ */
.pagination { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: var(--space-xl); }
.page-btn {
  min-width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--card);
  border: none;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  padding: 0 8px;
}
.page-btn:hover { background: var(--interactive); color: var(--text); }
.page-btn.is-active { background: var(--gold); color: var(--on-gold); font-weight: 700; box-shadow: 0 0 12px rgba(255, 184, 0, 0.3); }
.page-ellipsis { color: var(--text-muted); align-self: center; padding: 0 4px; }

/* ============ Card Thông báo (trang Tài khoản) ============ */
.notify-channel {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-md);
  padding: var(--space-md) 0; border-top: 1px solid var(--graphite);
}
.notify-channel-head { display: flex; align-items: center; gap: var(--space-md); color: var(--gold); }
.notify-channel-head .icon { flex: 0 0 auto; }
.notify-channel-name { font-weight: 600; font-size: 15px; color: var(--text); margin: 0; }
.notify-channel-state { font-size: 13px; color: var(--text-muted); margin: 0; }
.notify-channel-note { font-size: 13px; color: var(--text-muted); margin: 0; text-align: right; max-width: 55%; }
.notify-code { border: 1px dashed var(--border); border-radius: var(--radius-md); padding: var(--space-md); margin: var(--space-sm) 0; }
.notify-code-label { font-size: 13px; color: var(--text-secondary); margin: 0 0 6px; }
.notify-code-value { font-size: 28px; font-weight: 800; letter-spacing: 0.35em; color: var(--gold); margin: 0 0 6px; }
.notify-code-meta { display: flex; justify-content: space-between; gap: var(--space-sm); font-size: 12px; color: var(--text-muted); margin: 0; }
.notify-code-meta a { color: var(--gold); }

.notify-toggles { display: flex; flex-direction: column; gap: var(--space-xs); margin-top: var(--space-md); border-top: 1px solid var(--graphite); padding-top: var(--space-md); }
.notify-toggle-row {
  display: flex; align-items: center; gap: var(--space-md);
  padding: 10px 8px; border-radius: var(--radius-md); cursor: pointer;
}
.notify-toggle-row:hover { background: var(--surface); }
.notify-toggle-row input { position: absolute; opacity: 0; pointer-events: none; }
.notify-toggle-text { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.notify-toggle-label { font-size: 14px; font-weight: 600; color: var(--text); }
.notify-toggle-hint { font-size: 12px; color: var(--text-muted); }
/* Switch: input ẩn (vẫn focus/keyboard được qua label), span vẽ hình nút */
.notify-switch {
  flex: 0 0 auto; width: 42px; height: 24px; border-radius: 999px;
  background: var(--graphite); border: 1px solid var(--border);
  position: relative; transition: background 0.2s ease;
}
.notify-switch::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--text-muted); transition: transform 0.2s ease, background 0.2s ease;
}
.notify-toggle-row input:checked ~ .notify-switch { background: var(--gold); border-color: var(--gold); }
.notify-toggle-row input:checked ~ .notify-switch::after { transform: translateX(18px); background: var(--on-gold); }
.notify-toggle-row input:focus-visible ~ .notify-switch { outline: 2px solid var(--gold-bright); outline-offset: 2px; }
.notify-toggle-row input:disabled ~ .notify-switch { opacity: 0.5; }
