/* ══════════════════════════════════════════════════════
   PLN — Goal Plans  (pln_styles.css)
   ══════════════════════════════════════════════════════ */

/* ── Header row ── */
.pln-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 0 0 12px;
}
.pln-eyebrow {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: rgba(255,255,255,0.38);
    text-transform: uppercase;
    margin-bottom: 2px;
}
.pln-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: #fff;
    margin: 0;
    line-height: 1.1;
}
.pln-add-top-btn {
    background: rgba(255,255,255,0.1);
    border: 1.5px solid rgba(255,255,255,0.2);
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 4px;
    transition: background .15s;
    font-family: inherit;
    flex-shrink: 0;
}
.pln-add-top-btn:hover { background: rgba(255,255,255,0.18); }

/* ── 4-tab bar ── */
.pln-tab-bar {
    display: flex;
    gap: 0;
    border-bottom: 1.5px solid rgba(255,255,255,0.1);
    margin-bottom: 16px;
}
.pln-tab {
    flex: 1;
    background: none;
    border: none;
    border-bottom: 2.5px solid transparent;
    color: rgba(255,255,255,0.45);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 8px 4px 9px;
    cursor: pointer;
    font-family: inherit;
    transition: color .15s, border-color .15s;
    margin-bottom: -1.5px;
}
.pln-tab.pln-tab-active {
    color: #fff;
    border-bottom-color: #a8edcb;
}

/* ── Hero card ── */
.pln-hero {
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 14px;
}
.pln-hero-emoji { font-size: 2.4rem; line-height: 1; }
.pln-hero-sub {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.5);
    margin-bottom: 2px;
}
.pln-hero-main {
    font-size: 1.35rem;
    font-weight: 800;
    color: #fff;
}

/* ── Goal plan card ── */
.pln-goal-card {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    padding: 16px 18px 14px;
    margin-bottom: 12px;
    position: relative;
}
.pln-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 6px;
}
.pln-cat-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}
.pln-cat-badge[data-cat="Personal"]  { background: rgba(139,92,246,0.25); color: #c4b5fd; }
.pln-cat-badge[data-cat="Fitness"]   { background: rgba(234,179,8,0.22);  color: #fde68a; }
.pln-cat-badge[data-cat="Health"]    { background: rgba(239,68,68,0.22);  color: #fca5a5; }
.pln-cat-badge[data-cat="Learning"]  { background: rgba(59,130,246,0.22); color: #93c5fd; }
.pln-cat-badge[data-cat="Finance"]   { background: rgba(16,185,129,0.22); color: #6ee7b7; }
.pln-cat-badge[data-cat="Work"]      { background: rgba(249,115,22,0.22); color: #fdba74; }

.pln-pct {
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
    white-space: nowrap;
}
.pln-pct-unit {
    font-size: 0.85rem;
    font-weight: 500;
    color: rgba(255,255,255,0.5);
}
.pln-card-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: #fff;
    margin: 0 0 2px;
}
.pln-card-sub {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.45);
    margin-bottom: 10px;
}

/* progress bar */
.pln-bar-wrap {
    height: 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
}
.pln-bar-fill {
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, #4ade80, #86efac);
    transition: width .4s ease;
}

/* bottom row: deadline + controls */
.pln-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.pln-deadline {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.76rem;
    color: rgba(255,255,255,0.5);
}
.pln-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}
.pln-ctrl-btn {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    border: 1.5px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.07);
    color: rgba(255,255,255,0.7);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s;
}
.pln-ctrl-btn:hover { background: rgba(255,255,255,0.14); }
.pln-ctrl-btn.pln-del-btn { color: rgba(255,100,100,0.7); font-size: 0.75rem; }

/* done badge */
.pln-done-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(74,222,128,0.15);
    border: 1px solid rgba(74,222,128,0.3);
    color: #4ade80;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    padding: 2px 8px;
    border-radius: 20px;
}

/* ── Stats tab ── */
.pln-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 18px;
}
.pln-stat-card {
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 14px;
    padding: 14px 16px;
    text-align: center;
}
.pln-stat-val {
    font-size: 1.6rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 2px;
}
.pln-stat-lbl {
    font-size: 0.68rem;
    color: rgba(255,255,255,0.4);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.pln-stats-section-title {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.35);
    text-transform: uppercase;
    margin: 16px 0 10px;
}
.pln-cat-row {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}
.pln-cat-label {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.7);
    font-weight: 600;
    width: 72px;
    flex-shrink: 0;
}
.pln-cat-bar-wrap {
    flex: 1;
    margin: 0 10px;
    height: 5px;
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
    overflow: hidden;
}
.pln-cat-bar-fill {
    height: 100%;
    border-radius: 3px;
    background: linear-gradient(90deg, #4ade80, #86efac);
}
.pln-cat-pct {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.4);
    min-width: 28px;
    text-align: right;
}

/* ── Ideas tab ── */
.pln-ideas-filter-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.pln-ideas-filter-btn {
    padding: 5px 14px;
    border-radius: 20px;
    border: 1.5px solid rgba(255,255,255,0.15);
    background: transparent;
    color: rgba(255,255,255,0.55);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background .15s, color .15s;
}
.pln-ideas-filter-btn.pln-filter-active {
    background: rgba(168,237,203,0.15);
    border-color: rgba(168,237,203,0.5);
    color: #a8edcb;
}
.pln-idea-card {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    padding: 18px 18px 16px;
    margin-bottom: 12px;
}
.pln-idea-card-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: #fff;
    margin: 6px 0 3px;
}
.pln-idea-card-desc {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.45);
    margin-bottom: 10px;
}
.pln-idea-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}
.pln-idea-meta {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.5);
    display: flex;
    align-items: center;
    gap: 4px;
}
.pln-idea-milestones {
    list-style: none;
    padding: 0;
    margin: 0 0 14px;
}
.pln-idea-milestones li {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.65);
    padding: 3px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.pln-idea-milestones li::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    background: #4ade80;
}
.pln-idea-milestones li[data-cat="Personal"]::before { background: #c4b5fd; }
.pln-idea-milestones li[data-cat="Health"]::before   { background: #fca5a5; }
.pln-idea-milestones li[data-cat="Finance"]::before  { background: #fde68a; }
.pln-idea-milestones li[data-cat="Learning"]::before { background: #93c5fd; }
.pln-idea-milestones li[data-cat="Work"]::before     { background: #fdba74; }

.pln-start-btn {
    display: block;
    width: 100%;
    padding: 13px;
    border-radius: 14px;
    border: none;
    background: rgba(168,237,203,0.15);
    color: #a8edcb;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: background .15s;
}
.pln-start-btn:hover { background: rgba(168,237,203,0.25); }

/* ── Add Plan overlay ── */
.pln-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    z-index: 9995;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}
.pln-sheet {
    background: #111114;
    border-radius: 22px 22px 0 0;
    width: 100%;
    max-width: 520px;
    max-height: 88vh;
    overflow-y: auto;
    padding: 20px 20px calc(max(env(safe-area-inset-bottom,0px),8px) + 20px);
}
.pln-sheet::-webkit-scrollbar { display: none; }
.pln-sheet-hdr {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}
.pln-sheet-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #fff;
}
.pln-sheet-close {
    background: rgba(255,255,255,0.08);
    border: none;
    border-radius: 50%;
    color: rgba(255,255,255,0.6);
    width: 28px;
    height: 28px;
    cursor: pointer;
    font-size: 0.8rem;
    font-family: inherit;
}
.pln-field-label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: rgba(255,255,255,0.4);
    text-transform: uppercase;
    margin: 0 0 5px;
}
.pln-field-input, .pln-field-select {
    width: 100%;
    background: rgba(255,255,255,0.07);
    border: 1.5px solid rgba(255,255,255,0.12);
    border-radius: 10px;
    color: #fff;
    font-size: 0.9rem;
    padding: 10px 12px;
    font-family: inherit;
    margin-bottom: 14px;
    box-sizing: border-box;
    outline: none;
    transition: border-color .15s;
}
.pln-field-input:focus, .pln-field-select:focus { border-color: rgba(168,237,203,0.5); }
.pln-field-input::placeholder { color: rgba(255,255,255,0.25); }
.pln-field-select option { background: #1a1a2e; color: #fff; }
.pln-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.pln-submit-btn {
    display: block;
    width: 100%;
    padding: 14px;
    border-radius: 14px;
    border: none;
    background: linear-gradient(135deg, #4ade80, #22c55e);
    color: #0a1a0f;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    font-family: inherit;
    margin-top: 6px;
}
.pln-submit-btn:active { opacity: 0.85; }

/* ── Empty state ── */
.pln-empty {
    text-align: center;
    padding: 40px 20px;
    color: rgba(255,255,255,0.35);
    font-size: 0.85rem;
}
.pln-empty-icon { font-size: 2.5rem; margin-bottom: 10px; display: block; }
