/* Task cards, modal, buttons, filters, progress bar */

/* ── Buttons ─────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  border-radius: var(--radius);
  font-size: var(--text-sm);
  font-weight: 500;
  padding: var(--sp-2) var(--sp-3);
  transition: background var(--duration) var(--ease), color var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}

.btn--icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius);
  color: var(--text-secondary);
  background: var(--bg);
}

.btn--icon:hover {
  background: var(--border);
  color: var(--text);
}

.btn--small {
  padding: var(--sp-1) var(--sp-3);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--blue);
  background: var(--blue-light);
  border-radius: var(--radius-full);
}

.btn--small:hover {
  background: var(--blue);
  color: #fff;
}

.btn--primary {
  background: var(--blue);
  color: #fff;
  padding: var(--sp-2) var(--sp-5);
}

.btn--primary:hover {
  background: var(--blue-dark);
}

.btn--secondary {
  background: var(--bg);
  color: var(--text-secondary);
  padding: var(--sp-2) var(--sp-5);
}

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

.btn--danger {
  background: var(--danger-light);
  color: var(--danger);
  padding: var(--sp-2) var(--sp-4);
}

.btn--danger:hover {
  background: var(--danger);
  color: #fff;
}

/* ── View toggle ─────────────────────────── */
.view-toggle {
  display: inline-flex;
  background: var(--bg);
  border-radius: var(--radius-full);
  padding: 2px;
  border: 1px solid var(--border);
}

.view-toggle__btn {
  padding: var(--sp-1) var(--sp-3);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-secondary);
  background: none;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--duration) var(--ease);
}

.view-toggle__btn:hover {
  color: var(--text);
}

.view-toggle__btn--active {
  background: var(--blue);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.view-toggle__btn--active:hover {
  background: var(--blue-dark);
  color: #fff;
}

/* ── Task dots (month view) ──────────────── */
.task-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

.task-dot--done {
  opacity: 0.35;
}

/* ── Filter pills ────────────────────────── */
.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: var(--sp-1) var(--sp-3);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--duration) var(--ease);
}

.filter-pill:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.filter-pill--active {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}

.filter-pill--active:hover {
  background: var(--blue-dark);
  color: #fff;
}

/* ── Category dot ────────────────────────── */
.cat-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Category-specific colors are injected dynamically by Categories.applyColors() */

/* ── Task card ───────────────────────────── */
.task-card {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
  background: var(--surface);
  border-radius: var(--radius);
  border-left: 3px solid var(--priority-medium);
  cursor: pointer;
  transition: box-shadow var(--duration) var(--ease), opacity var(--duration) var(--ease);
}

.task-card:hover {
  box-shadow: var(--shadow);
}

.task-card--done {
  opacity: 0.55;
}

.task-card--done .task-card__title {
  text-decoration: line-through;
  color: var(--text-muted);
}

/* Checkbox */
.task-card__check {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  padding-top: 1px;
}

.task-card__check input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.task-card__checkbox {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all var(--duration) var(--ease);
  background: var(--surface);
}

.task-card__check input:checked + .task-card__checkbox {
  background: var(--blue);
  border-color: var(--blue);
}

.task-card__check input:checked + .task-card__checkbox::after {
  content: '';
  display: block;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  margin-top: -1px;
}

.task-card__check input:focus-visible + .task-card__checkbox {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

/* Content */
.task-card__content {
  flex: 1;
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  min-width: 0;
}

.task-card__title {
  font-size: var(--text-sm);
  line-height: 1.4;
  color: var(--text);
  word-break: break-word;
  flex: 1;
}

/* ── Add button ──────────────────────────── */
.add-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: var(--sp-2);
  border-radius: var(--radius);
  color: var(--text-muted);
  border: 1px dashed var(--border);
  cursor: pointer;
  transition: all var(--duration) var(--ease);
  margin-top: auto;
}

.add-btn:hover {
  color: var(--blue);
  border-color: var(--blue);
  background: var(--blue-light);
}

/* ── Modal ───────────────────────────────── */
.modal {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: min(440px, calc(100vw - 32px));
  animation: modalIn 200ms var(--ease);
  border-top: 3px solid;
  border-image: linear-gradient(90deg, #4A8ED9, #FFB8CF, #D4B830) 1;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal__form {
  padding: var(--sp-6);
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.modal__title {
  font-size: var(--text-lg);
  font-weight: 700;
}

/* Form elements */
.form-label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--sp-1);
  display: block;
}

.form-input {
  width: 100%;
  padding: var(--sp-2) var(--sp-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: var(--text-base);
  background: var(--bg);
  transition: border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}

.form-input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(74, 142, 217, 0.15);
}

.form-fieldset {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

/* Radio pill group */
.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

.radio-pill {
  cursor: pointer;
}

.radio-pill input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.radio-pill__label {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: var(--sp-1) var(--sp-3);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  transition: all var(--duration) var(--ease);
}

.radio-pill input:checked + .radio-pill__label {
  background: var(--blue-light);
  border-color: var(--blue);
  color: var(--blue-dark);
}

.radio-pill input:focus-visible + .radio-pill__label {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.radio-pill__label--high {
  border-color: var(--priority-high);
  color: var(--priority-high);
}

.radio-pill input:checked + .radio-pill__label--high {
  background: #F5DDD8;
  border-color: var(--priority-high);
  color: var(--priority-high);
}

.radio-pill__label--medium {
  border-color: var(--priority-medium);
  color: var(--priority-medium);
}

.radio-pill input:checked + .radio-pill__label--medium {
  background: #F5F0D8;
  border-color: var(--priority-medium);
  color: var(--priority-medium);
}

.radio-pill__label--low {
  border-color: var(--priority-low);
  color: var(--priority-low);
}

.radio-pill input:checked + .radio-pill__label--low {
  background: var(--bg);
  border-color: var(--priority-low);
  color: var(--text-secondary);
}

/* Modal actions */
.modal__actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-3);
  margin-top: var(--sp-2);
}

.modal__actions-right {
  display: flex;
  gap: var(--sp-2);
  margin-left: auto;
}

/* ── Drag & Drop ────────────────────────── */
.task-card[draggable="true"] {
  cursor: grab;
}

.task-card[draggable="true"]:active {
  cursor: grabbing;
}

.task-card--dragging {
  opacity: 0.3;
}

.day-col--dragover .day-col__body {
  background: var(--blue-light);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  outline: 2px dashed var(--blue);
  outline-offset: -2px;
  transition: background var(--duration) var(--ease);
}

/* ── Sticker notification ───────────────── */
.sticker-toast {
  position: fixed;
  top: var(--sp-6);
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  background: linear-gradient(135deg, #FAF8F5, #FFF3B0, #FFD9E6);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--sp-4) var(--sp-6);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  z-index: 1000;
  opacity: 0;
  transition: transform 500ms var(--ease), opacity 500ms var(--ease);
  pointer-events: none;
  border-bottom: 3px solid;
  border-image: linear-gradient(90deg, #D4B830, #FFB8CF, #4A8ED9) 1;
}

.sticker-toast--visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.sticker-toast__emoji {
  font-size: 2.5rem;
  line-height: 1;
  animation: stickerBounce 600ms var(--ease) 300ms both;
}

.sticker-toast__text {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text);
}

.sticker-toast__sub {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  font-weight: 400;
}

@keyframes stickerBounce {
  0% { transform: scale(0.5) rotate(-10deg); }
  50% { transform: scale(1.3) rotate(5deg); }
  100% { transform: scale(1) rotate(0deg); }
}

/* ── Sticker book button ────────────────── */
.sticker-book-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-1) var(--sp-3);
  font-size: var(--text-sm);
  font-weight: 600;
  background: linear-gradient(135deg, #F0DCC4, #DBB08A);
  color: #6B3E1F;
  border-radius: var(--radius-full);
  cursor: pointer;
  border: none;
  transition: all var(--duration) var(--ease);
}

.sticker-book-btn__icon {
  width: 1.5em;
  height: 1.5em;
  object-fit: contain;
  vertical-align: middle;
}

.sticker-book__title-icon {
  width: 1.2em;
  height: 1.2em;
  object-fit: contain;
  vertical-align: middle;
}

.sticker-book-btn:hover {
  background: linear-gradient(135deg, #DBB08A, #C49A6E);
  transform: scale(1.05);
}

.sticker-book-btn__count {
  background: #6B3E1F;
  color: #F0DCC4;
  font-size: var(--text-xs);
  padding: 1px 6px;
  border-radius: var(--radius-full);
  font-weight: 700;
}

/* ── Sticker book modal ─────────────────── */
.sticker-book {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: min(560px, calc(100vw - 32px));
  max-height: min(600px, calc(100vh - 64px));
  animation: modalIn 200ms var(--ease);
  overflow: hidden;
}

.sticker-book[open] {
  display: flex;
  flex-direction: column;
}

.sticker-book__header {
  padding: var(--sp-6);
  padding-bottom: var(--sp-4);
  border-bottom: 1px solid var(--border-light);
  background: linear-gradient(135deg, #FAF8F5, #FFF3B0 50%, #FAF8F5);
}

.sticker-book__title {
  font-size: var(--text-xl);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.sticker-book__subtitle {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-top: var(--sp-1);
}

.sticker-book__body {
  padding: var(--sp-6);
  overflow-y: auto;
  flex: 1;
}

.sticker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: var(--sp-4);
}

.sticker-slot {
  position: relative;
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-1);
  background: var(--bg);
  border-radius: var(--radius-lg);
  border: 2px dashed var(--border);
  transition: all var(--duration) var(--ease);
}

.sticker-slot--earned {
  border: none;
  background: none;
  box-shadow: none;
}

.sticker-slot--earned:hover {
  transform: scale(1.08);
}

.sticker-slot__delete {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border: none;
  background: rgba(0,0,0,0.12);
  color: var(--text-secondary);
  border-radius: 50%;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  transition: background var(--duration) var(--ease);
  display: flex;
  align-items: center;
  justify-content: center;
}

.sticker-slot__delete:hover {
  background: var(--danger);
  color: white;
}

.sticker-slot__emoji {
  font-size: 2.5rem;
  line-height: 1;
}

.sticker-slot__img {
  width: 4rem;
  height: 4rem;
  object-fit: contain;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.15));
}

.sticker-slot__empty {
  font-size: 1.5rem;
  color: var(--text-muted);
  opacity: 0.3;
}

.sticker-slot__week {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  font-weight: 500;
  text-align: center;
}

.sticker-slot__pct {
  font-size: 0.625rem;
  color: var(--text-muted);
}

.sticker-book__empty {
  text-align: center;
  padding: var(--sp-8) var(--sp-4);
  color: var(--text-secondary);
}

.sticker-book__empty-icon {
  font-size: 3rem;
  margin-bottom: var(--sp-3);
  opacity: 0.5;
}

.sticker-book__empty-text {
  font-size: var(--text-base);
  font-weight: 500;
}

.sticker-book__empty-hint {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-top: var(--sp-1);
}

.sticker-book__footer {
  padding: var(--sp-4) var(--sp-6);
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: flex-end;
}

/* ── AI Planner button ────────────────────── */
.ai-planner-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-1) var(--sp-3);
  font-size: var(--text-sm);
  font-weight: 600;
  background: linear-gradient(135deg, #D8E2F0, #4A8ED9);
  color: #1E3A5F;
  border-radius: var(--radius-full);
  cursor: pointer;
  border: none;
  transition: all var(--duration) var(--ease);
}

.ai-planner-btn:hover {
  background: linear-gradient(135deg, #4A8ED9, #3A7BC8);
  color: #fff;
  transform: scale(1.05);
}

/* ── AI Planner dialog ───────────────────── */
.ai-planner {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: min(560px, calc(100vw - 32px));
  max-height: min(720px, calc(100vh - 64px));
  animation: modalIn 200ms var(--ease);
  padding: 0;
  border: none;
  border-top: 3px solid;
  border-image: linear-gradient(90deg, #D8E2F0, #4A8ED9, #2D6B1E) 1;
  overflow: hidden;
}

.ai-planner[open] {
  display: flex;
  flex-direction: column;
}

.ai-planner::backdrop {
  background: rgba(0, 0, 0, 0.3);
}

.ai-planner__view {
  padding: var(--sp-6);
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  overflow-y: auto;
  max-height: min(700px, calc(100vh - 80px));
}

.ai-planner__header {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}

.ai-planner__title {
  font-size: var(--text-xl);
  font-weight: 700;
}

.ai-planner__subtitle {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

/* Key bar */
.ai-planner__key-bar {
  display: flex;
}

.ai-planner__key-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-1) var(--sp-2);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
  background: none;
  border: none;
  cursor: pointer;
  border-radius: var(--radius);
  transition: background var(--duration) var(--ease);
}

.ai-planner__key-toggle:hover {
  background: var(--bg);
}

.ai-planner__key-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.ai-planner__key-dot--ok {
  background: var(--success);
}

.ai-planner__key-dot--missing {
  background: var(--danger);
}

/* Key section */
.ai-planner__key-section {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  padding: var(--sp-3);
  background: var(--bg);
  border-radius: var(--radius);
}

.ai-planner__key-row {
  display: flex;
  gap: var(--sp-2);
}

.ai-planner__key-row .form-input {
  flex: 1;
}

.btn--small-sq {
  padding: var(--sp-2) var(--sp-3);
  font-size: var(--text-sm);
  border-radius: var(--radius);
}

.ai-planner__key-hint {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* Textarea */
.ai-planner__textarea {
  resize: vertical;
  min-height: 140px;
  font-family: var(--font);
}

/* Options row */
.ai-planner__options {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}

.ai-planner__date-hint {
  width: auto;
  max-width: 180px;
}

/* File upload */
.ai-planner__upload {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.ai-planner__dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: var(--sp-4);
  text-align: center;
  color: var(--text-muted);
  transition: border-color var(--duration) var(--ease), background var(--duration) var(--ease);
  cursor: pointer;
}

.ai-planner__dropzone--active,
.ai-planner__dropzone:hover {
  border-color: var(--blue);
  background: rgba(74, 142, 217, 0.05);
}

.ai-planner__dropzone-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-1);
  font-size: var(--text-sm);
}

.ai-planner__dropzone-content svg {
  color: var(--text-muted);
  margin-bottom: var(--sp-1);
}

.ai-planner__dropzone-hint {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.ai-planner__browse-btn {
  background: none;
  border: none;
  color: var(--blue);
  font-weight: 600;
  cursor: pointer;
  font-size: inherit;
  padding: 0;
  text-decoration: underline;
}

.ai-planner__file-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

.ai-file-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: var(--sp-1) var(--sp-2);
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  color: var(--text-secondary);
}

.ai-file-chip__icon {
  font-size: 0.875rem;
}

.ai-file-chip__name {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-file-chip__remove {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0 2px;
  border-radius: 50%;
}

.ai-file-chip__remove:hover {
  color: var(--danger);
}

/* Error */
.ai-planner__error {
  padding: var(--sp-2) var(--sp-3);
  background: var(--danger-light);
  color: var(--danger);
  font-size: var(--text-sm);
  font-weight: 500;
  border-radius: var(--radius);
}

/* Actions */
.ai-planner__actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--sp-2);
  margin-top: var(--sp-2);
}

.ai-planner__analyze-btn {
  gap: var(--sp-2);
}

/* Loading */
.ai-planner__loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--sp-8) 0;
  gap: var(--sp-4);
}

.ai-planner__spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: aiSpin 0.8s linear infinite;
}

@keyframes aiSpin {
  to { transform: rotate(360deg); }
}

.ai-planner__loading-text {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text);
}

.ai-planner__loading-sub {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

/* Review list */
.ai-planner__review-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  max-height: 400px;
  overflow-y: auto;
}

/* Review card */
.ai-review-card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  padding: var(--sp-3);
  background: var(--surface);
  border-radius: var(--radius);
  border-left: 3px solid var(--priority-medium);
  box-shadow: var(--shadow-sm);
}

.ai-review-card--high {
  border-left-color: var(--priority-high);
}

.ai-review-card--medium {
  border-left-color: var(--priority-medium);
}

.ai-review-card--low {
  border-left-color: var(--priority-low);
}

.ai-review-card__row {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.ai-review-card__title {
  flex: 1;
  border: 1px solid transparent;
  background: none;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text);
  padding: var(--sp-1) var(--sp-2);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  transition: border-color var(--duration) var(--ease);
}

.ai-review-card__title:hover,
.ai-review-card__title:focus {
  border-color: var(--border);
  outline: none;
}

.ai-review-card__title:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(74, 142, 217, 0.15);
}

.ai-review-card__remove {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all var(--duration) var(--ease);
  flex-shrink: 0;
}

.ai-review-card__remove:hover {
  background: var(--danger-light);
  color: var(--danger);
}

.ai-review-card__meta {
  flex-wrap: wrap;
}

.ai-review-card__date {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--sp-1) var(--sp-2);
  font-size: var(--text-xs);
  font-family: var(--font);
  color: var(--text-secondary);
  background: var(--bg);
}

.ai-review-card__select {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--sp-1) var(--sp-2);
  font-size: var(--text-xs);
  font-family: var(--font);
  color: var(--text-secondary);
  background: var(--bg);
  cursor: pointer;
}

/* ── Categories modal ────────────────────── */
.categories-modal {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: min(440px, calc(100vw - 32px));
  animation: modalIn 200ms var(--ease);
  padding: 0;
  border: none;
  border-top: 3px solid;
  border-image: linear-gradient(90deg, #FFB8CF, #D4B830, #2D6B1E) 1;
}

.categories-modal::backdrop {
  background: rgba(0, 0, 0, 0.3);
}

.categories-modal__inner {
  padding: var(--sp-6);
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.categories-modal__title {
  font-size: var(--text-lg);
  font-weight: 700;
}

.categories-modal__list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.category-row {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.category-row__color {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  flex-shrink: 0;
}

.category-row__name {
  flex: 1;
  padding: var(--sp-2) var(--sp-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: var(--text-sm);
  font-family: var(--font);
  background: var(--bg);
  transition: border-color var(--duration) var(--ease);
}

.category-row__name:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(74, 142, 217, 0.15);
}

.category-row__delete {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all var(--duration) var(--ease);
  flex-shrink: 0;
}

.category-row__delete:hover {
  background: var(--danger-light);
  color: var(--danger);
}

.categories-modal__add {
  align-self: flex-start;
  font-size: var(--text-sm);
}

.categories-modal__footer {
  display: flex;
  justify-content: flex-end;
}

/* ── Manage categories button (in filter bar) */
.manage-categories-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--duration) var(--ease);
  flex-shrink: 0;
}

.manage-categories-btn:hover {
  border-color: var(--blue);
  color: var(--blue);
  background: var(--blue-light);
}

/* ── Utility ─────────────────────────────── */
.hidden {
  display: none !important;
}

/* ── Reduced motion ──────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
