/* The growth plan: My day, the team board and the plan page. Built on the app.css tokens.
   One dark teal hero per page, lime only as a fill with teal ink, red only for late work. */
:root {
  --p-late: #B3261E;
  --p-late-bg: #FBEDEB;
  --p-met: #E9F7C4;
  --p-track: #E7ECE9;
  --p-display: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif;
}

.p-display { font-family: var(--p-display); letter-spacing: -0.01em; }
.p-num { font-variant-numeric: tabular-nums; }
.p-section { margin-top: 22px; }
.p-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 10px; flex-wrap: wrap; }
.p-section-head h2 { margin: 0; font-size: 17px; }
.p-section-head .meta { margin: 0; }

/* ---- Hero ---- */
.p-hero {
  position: relative; overflow: hidden;
  background: var(--jezero); color: #EAF3EF; border-radius: 20px;
  padding: 26px 28px; display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center;
}
.p-hero::after {
  content: ""; position: absolute; right: -80px; top: -120px; width: 340px; height: 340px; border-radius: 50%;
  background: radial-gradient(circle, rgba(204, 239, 104, 0.16), rgba(204, 239, 104, 0) 70%); pointer-events: none;
}
.p-hero .eyebrow { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: #9FC3BD; font-weight: 600; }
.p-hero h2 { color: #fff; font-family: var(--p-display); font-size: clamp(26px, 3.4vw, 36px); line-height: 1.08; margin: 8px 0 10px; font-weight: 800; }
.p-hero .say { color: #D4E6E0; font-size: 15px; max-width: 52ch; margin: 0; }
.p-hero .say b { color: #fff; }
.p-hero .chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.p-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); color: #EAF3EF; border: 1px solid rgba(255, 255, 255, 0.12); }
.p-chip svg { width: 15px; height: 15px; }
.p-chip.lime { background: var(--sonce); color: var(--jezero); border-color: var(--sonce); }
.p-chip.late { background: #5B1F1B; border-color: #7A2A24; color: #FFD9D4; }

.p-ring { position: relative; width: 132px; height: 132px; flex: none; z-index: 1; }
.p-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.p-ring .track { stroke: rgba(255, 255, 255, 0.12); }
.p-ring .fill { stroke: var(--sonce); stroke-linecap: round; transition: stroke-dashoffset .7s cubic-bezier(.2, .8, .2, 1); }
.p-ring .p-ring-c { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.p-ring .p-ring-c b { font-family: var(--p-display); font-size: 34px; color: #fff; line-height: 1; font-weight: 800; }
.p-ring .p-ring-c span { font-size: 12px; color: #9FC3BD; margin-top: 4px; }
.p-ring.small { width: 64px; height: 64px; }
.p-ring.small .p-ring-c b { font-size: 17px; }
.p-ring.small .p-ring-c span { display: none; }
.p-ring.light .track { stroke: var(--p-track); }
.p-ring.light .fill { stroke: var(--jezero); }
.p-ring.light.done .fill { stroke: #8DBE2A; }
.p-ring.light .p-ring-c b { color: var(--jezero); }

/* ---- Quotas ---- */
.p-quotas { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.p-quota {
  background: var(--card); border-radius: 16px; box-shadow: var(--elevation-card); padding: 16px 16px 14px;
  display: grid; gap: 10px; align-content: start; border: 1px solid transparent; transition: background .3s, border-color .3s;
}
.p-quota.met { background: var(--p-met); border-color: #D6EE8F; }
.p-quota .q-label { font-size: 14px; font-weight: 600; color: var(--jezero); display: flex; justify-content: space-between; gap: 8px; }
.p-quota .q-label small { font-weight: 500; color: var(--kamen); font-size: 12px; white-space: nowrap; }
.p-quota .q-count { display: flex; align-items: baseline; gap: 6px; }
.p-quota .q-count b { font-family: var(--p-display); font-size: 34px; line-height: 1; font-weight: 800; color: var(--jezero); font-variant-numeric: tabular-nums; }
.p-quota .q-count span { color: var(--kamen); font-size: 15px; }
.p-bar { height: 8px; background: var(--p-track); border-radius: 999px; overflow: hidden; }
.p-bar i { display: block; height: 100%; width: 0; background: var(--jezero); border-radius: 999px; transition: width .5s cubic-bezier(.2, .8, .2, 1); }
.p-quota.met .p-bar { background: rgba(7, 63, 67, 0.1); }
.p-quota.met .p-bar i { background: var(--jezero); }
.p-step { display: flex; gap: 8px; align-items: center; }
.p-step button { width: 44px; height: 40px; padding: 0; font-size: 20px; line-height: 1; border-radius: 12px; display: grid; place-items: center; }
.p-step button.plus { flex: 1; background: var(--jezero); color: #fff; border-color: var(--jezero); font-size: 15px; font-weight: 600; }
.p-step button.plus:hover { background: var(--jezero-2); }
.p-step input { width: 64px; text-align: center; padding: 8px 6px; font-variant-numeric: tabular-nums; }
.p-quota .q-auto { font-size: 13px; color: var(--kamen); }
.p-quota .q-auto a { font-weight: 600; }

/* ---- Tasks ---- */
.p-tasks { background: var(--card); border-radius: 16px; box-shadow: var(--elevation-card); overflow: hidden; }
.p-group-head {
  display: flex; align-items: center; gap: 8px; padding: 10px 18px; font-size: 12px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; color: var(--kamen); background: #F6F8F5; border-bottom: 1px solid var(--line);
}
.p-group-head .n { margin-left: auto; font-variant-numeric: tabular-nums; }
.p-group-head.late { color: var(--p-late); background: var(--p-late-bg); }
.p-task { display: grid; grid-template-columns: 30px 1fr auto; gap: 12px; align-items: start; padding: 12px 18px; border-bottom: 1px solid var(--line); position: relative; }
.p-task:last-child { border-bottom: 0; }
.p-task.is-late::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--p-late); }
.p-check {
  width: 26px; height: 26px; border-radius: 50%; border: 2px solid #9FB8B1; background: var(--card); padding: 0;
  display: grid; place-items: center; cursor: pointer; margin-top: 1px; transition: background .2s, border-color .2s, transform .15s;
}
.p-check svg { width: 15px; height: 15px; opacity: 0; transform: scale(.4); transition: opacity .2s, transform .25s cubic-bezier(.2, 1.6, .4, 1); }
.p-check:hover { border-color: var(--jezero); }
.p-check:active { transform: scale(.9); }
.p-check.on { background: var(--sonce); border-color: var(--sonce); }
.p-check.on svg { opacity: 1; transform: scale(1); }
.p-check:disabled { cursor: default; opacity: .6; }
.p-task .t-title { font-weight: 600; color: var(--jezero); line-height: 1.35; }
.p-task.done .t-title { text-decoration: line-through; color: var(--kamen); font-weight: 500; }
.p-task .t-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: 12.5px; color: var(--kamen); margin-top: 4px; }
.p-task .t-note { font-size: 13.5px; color: var(--jezero-700); margin-top: 6px; line-height: 1.45; }
.p-tag { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 2px 7px; border-radius: 6px; background: #EEF3EF; color: var(--jezero); }
.p-tag.late { background: var(--p-late); color: #fff; }
.p-tag.week { background: var(--sonce); }
.p-task .t-actions { display: flex; gap: 2px; }
.p-task .t-actions button { font-size: 12.5px; padding: 4px 8px; border: 0; background: transparent; color: var(--kamen); }
.p-task .t-actions button:hover { color: var(--p-late); }
.p-drop { grid-column: 2 / -1; display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.p-drop input { flex: 1; min-width: 200px; }
.p-empty { padding: 16px 18px; color: var(--kamen); font-size: 14px; }
.p-more { display: block; width: 100%; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: #FBFCFA; padding: 10px 18px; text-align: left; font-size: 13px; color: var(--jezero-700); }

.p-add { display: grid; grid-template-columns: 1fr 160px 150px auto; gap: 8px; padding: 14px 18px; background: #FBFCFA; border-top: 1px solid var(--line); align-items: center; }
.p-add input, .p-add select { margin: 0; }

/* ---- Team board ---- */
.p-team { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; align-items: start; }
.p-member { background: var(--card); border-radius: 18px; box-shadow: var(--elevation-card); padding: 18px; display: grid; gap: 14px; }
.p-member-head { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; }
.p-avatar { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-family: var(--p-display); font-weight: 800; font-size: 19px; background: var(--jezero); color: var(--sonce); }
.p-avatar.agent { background: var(--sonce); color: var(--jezero); }
.p-member-head h3 { margin: 0; font-size: 17px; }
.p-member-head .meta { margin: 2px 0 0; }
.p-minis { display: grid; gap: 9px; }
.p-mini { display: grid; gap: 4px; }
.p-mini .row-l { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--jezero); }
.p-mini .row-l b { font-variant-numeric: tabular-nums; }
.p-mini.met .p-bar i { background: #8DBE2A; }
.p-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.p-kpi { background: var(--apno); border-radius: 12px; padding: 10px; text-align: center; }
.p-kpi b { display: block; font-family: var(--p-display); font-size: 22px; line-height: 1.1; color: var(--jezero); font-variant-numeric: tabular-nums; }
.p-kpi span { font-size: 12px; color: var(--kamen); }
.p-kpi.late { background: var(--p-late-bg); }
.p-kpi.late b { color: var(--p-late); }
.p-latelist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 13.5px; }
.p-latelist li { display: flex; gap: 8px; align-items: baseline; }
.p-latelist li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--p-late); flex: none; transform: translateY(-1px); }
.p-latelist li span { color: var(--p-late); font-size: 12px; white-space: nowrap; margin-left: auto; }
.p-dropped { font-size: 13px; color: var(--kamen); border-top: 1px dashed var(--line); padding-top: 10px; }
.p-dropped b { color: var(--jezero); font-weight: 600; }
.p-member a.open { font-size: 13px; font-weight: 600; text-decoration: none; }

/* ---- Plan page ---- */
.p-targets { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; min-width: 760px; }
.p-targets th, .p-targets td { padding: 11px 12px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; vertical-align: middle; }
.p-targets th:first-child, .p-targets td:first-child { text-align: left; white-space: normal; }
.p-targets thead th { font-size: 12px; color: var(--kamen); font-weight: 600; }
.p-targets thead th small { display: block; font-weight: 400; }
.p-targets td.now { font-weight: 700; color: var(--jezero); background: #F3F8EA; }
.p-targets td .why { display: block; font-size: 12px; color: var(--kamen); margin-top: 2px; }
.p-targets td .p-bar { height: 4px; margin-top: 5px; }
.p-targets tr:last-child td { border-bottom: 0; }
.p-scroll { overflow-x: auto; }
.p-hit { color: #3D6B00; font-weight: 700; }

.p-miles { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; position: relative; }
.p-mile { padding: 18px 14px 4px 0; position: relative; border-top: 3px solid var(--p-track); }
.p-mile.past { border-top-color: var(--jezero); }
.p-mile.current { border-top-color: var(--sonce); }
.p-mile::before { content: ""; position: absolute; top: -9px; left: 0; width: 15px; height: 15px; border-radius: 50%; background: var(--card); border: 3px solid var(--p-track); }
.p-mile.past::before { background: var(--jezero); border-color: var(--jezero); }
.p-mile.current::before { background: var(--sonce); border-color: var(--jezero); }
.p-mile .d { font-size: 12px; color: var(--kamen); font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.p-mile h3 { margin: 4px 0 6px; font-size: 15px; }
.p-mile ul { margin: 0; padding-left: 16px; font-size: 13px; color: var(--jezero-700); display: grid; gap: 3px; }
.p-mile .tasks { font-size: 12.5px; color: var(--kamen); margin-top: 8px; }

.p-weeks td input { width: 90px; text-align: right; padding: 5px 7px; font-size: 13px; }
.p-weeks td.filled { color: var(--jezero-700); }
.p-weeks td.filled::after { content: " ·"; color: #8DBE2A; font-weight: 800; }
.p-legend { font-size: 12.5px; color: var(--kamen); }
.p-legend i { color: #8DBE2A; font-style: normal; font-weight: 800; }

.p-channels { display: grid; gap: 0; }
.p-channel { display: grid; grid-template-columns: 40px 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.p-channel:last-child { border-bottom: 0; }
.p-channel .rk { font-family: var(--p-display); font-weight: 800; font-size: 24px; color: var(--jezero); }
.p-channel h3 { margin: 0 0 4px; font-size: 15px; }
.p-channel p { margin: 0 0 6px; font-size: 14px; color: var(--jezero-700); max-width: 75ch; }
.p-channel .first { font-size: 13px; }

.p-seasons { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.p-season { background: var(--card); border-radius: 14px; box-shadow: var(--elevation-card); padding: 14px; display: grid; gap: 6px; align-content: start; }
.p-season.peak { background: var(--sonce); }
.p-season h3 { margin: 0; font-size: 15px; }
.p-season ul { margin: 0; padding-left: 16px; font-size: 13px; display: grid; gap: 2px; }
.p-season .pub { font-size: 12px; color: var(--kamen); }
.p-season.peak .pub { color: var(--jezero); }

.p-secret { font-family: ui-monospace, Consolas, monospace; background: var(--apno); border: 1px dashed var(--jezero-700); border-radius: 10px; padding: 10px 12px; font-size: 15px; word-break: break-all; }

@keyframes p-pop { 0% { transform: scale(1); } 40% { transform: scale(1.06); } 100% { transform: scale(1); } }
.p-pop { animation: p-pop .35s ease-out; }

@media (max-width: 860px) {
  .p-hero { grid-template-columns: 1fr; padding: 22px 18px; }
  .p-hero .p-ring { width: 108px; height: 108px; }
  .p-add { grid-template-columns: 1fr 1fr; }
  .p-add input[type="text"] { grid-column: 1 / -1; }
  .p-miles { grid-template-columns: 1fr; }
  .p-mile { border-top: 0; border-left: 3px solid var(--p-track); padding: 0 0 16px 18px; }
  .p-mile.past { border-left-color: var(--jezero); }
  .p-mile.current { border-left-color: var(--sonce); }
  .p-mile::before { top: 0; left: -9px; }
  .p-seasons { grid-template-columns: 1fr 1fr; }
  .p-task { padding: 12px 14px; grid-template-columns: 30px 1fr; }
  .p-task .t-actions { grid-column: 2; }
}
@media (prefers-reduced-motion: reduce) {
  .p-ring .fill, .p-bar i, .p-check svg, .p-quota { transition: none; }
  .p-pop { animation: none; }
}
.p-weeks td:first-child { min-width: 200px; }
.p-weeks td:first-child .why { white-space: normal; }
