/* Task Ledger UI styles (kept in sync with base.html markup) */
:root { --pico-font-size: 95%; }

.status-badge { font-size: .75rem; padding: .1rem .5rem; border-radius: 1rem; }
.status-open, .status-pending, .status-in_progress { background: var(--pico-color-blue-50); color: var(--pico-color-blue-700); }
.status-done { background: var(--pico-color-green-50); color: var(--pico-color-green-700); }
.step-done { opacity: .6; text-decoration: line-through; }

.comment { padding: .4rem 0; border-top: 1px solid var(--pico-color-surface); }
[data-theme="dark"] .comment { border-top-color: var(--pico-primary-border); }
.comment .kind { font-size: .7rem; text-transform: uppercase; font-weight: bold; }
.kind-decision { color: var(--pico-color-amber-600); }
.kind-artifact { color: var(--pico-color-purple-500); }

/* Task cards: real links (open in new tab works), styled as cards */
.task-card { display: block; text-decoration: none; color: inherit; cursor: pointer; }
.task-card article { margin-bottom: var(--pico-spacing, 1rem); }
.task-card:hover article { background: var(--pico-color-zinc-100); }
[data-theme="dark"] .task-card:hover article { background: var(--pico-color-zinc-800); }

/* Steps progress bar inside a task card */
.steps-progress { height: .3rem; border-radius: 1rem; margin-top: .5rem;
  background: var(--pico-color-zinc-200); overflow: hidden; }
[data-theme="dark"] .steps-progress { background: var(--pico-color-zinc-700); }
.steps-progress-fill { height: 100%; border-radius: 1rem;
  background: var(--pico-color-green-500); }

/* Theme toggle: bare button, fits Pico nav */
.theme-toggle { font-size: 1.1rem; line-height: 1; padding: .2rem .4rem; margin: 0;
  background: transparent; border: none; color: inherit; cursor: pointer; }
.theme-toggle:hover { opacity: .8; }
[data-theme="light"] .theme-toggle .icon-dark { display: none; }
[data-theme="dark"] .theme-toggle .icon-light { display: none; }

.row-form { margin: 0; }
.row-form input, .row-form select { margin: 0; }
.inline-form { display: inline; }
.form-error { color: var(--pico-color-red-500); font-size: .8rem; display: block; margin: .25rem 0; }

/* Global HTMX request indicator (spinner in the navbar) */
#global-spinner.htmx-request, #global-spinner.htmx-indicator.htmx-request { display: inline-block; }
#global-spinner { display: none; width: 1rem; height: 1rem;
  border: 2px solid var(--pico-color-zinc-300); border-top-color: var(--pico-color-primary);
  border-radius: 50%; animation: spin .6s linear infinite; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Success toast (triggered via HX-Trigger: showToast) */
#toast { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 1000;
  background: var(--pico-color-green-600); color: #fff; padding: .6rem 1rem;
  border-radius: .4rem; box-shadow: 0 .2rem .5rem rgba(0,0,0,.2);
  opacity: 0; transition: opacity .25s; pointer-events: none; }
#toast.show { opacity: 1; }

/* Search input on the tasks page */
#task-search { margin-bottom: 1rem; }
