/* ═══════════════════════════════════════════════
   Goal Navigator — Design System
   ═══════════════════════════════════════════════ */

:root {
    --bg: #FAF9F7;
    --bg-warm: #F5F3EF;
    --surface: #FFFFFF;
    --surface-warm: #FBF9F6;
    --surface-hover: #F3F1ED;
    --text: #2D2A26;
    --text-2: #6B665E;
    --text-3: #9B9690;
    --text-4: #C4BFB8;
    --border: #ECEAE5;
    --border-hover: #DDD9D3;
    --accent: #6C5CE7;
    --accent-hover: #5A4BD6;
    --accent-soft: #F0EDFC;
    --accent-text: #5B4CC7;
    --teal: #1ABC9C;
    --teal-soft: #E8FBF5;
    --teal-text: #148F76;
    --amber: #E8A817;
    --amber-soft: #FDF6E3;
    --amber-text: #A47712;
    --rose: #E8574A;
    --green: #27AE60;
    --green-soft: #EDF9F0;
    --green-text: #1E8B4D;
    --r: 8px;
    --r-lg: 12px;
    --r-xl: 16px;
    --r-full: 999px;
    --ease: cubic-bezier(.4, 0, .2, 1);
}

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
    font-size: 14px;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    min-height: 100vh;
    margin: 0;
    padding: 0;
    background: var(--bg);
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color .12s var(--ease);
}

a:hover {
    color: var(--accent-hover);
    text-decoration: none;
}

/* ───── TOP BAR ───── */
.topbar {
    height: 56px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.topbar-l {
    display: flex;
    align-items: center;
    gap: 10px;
}

.topbar-logo svg {
    width: 28px;
    height: 28px;
    display: block;
}

.topbar-brand {
    display: flex;
    align-items: baseline;
    gap: 5px;
}

.topbar-brand-a {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.3px;
}

.topbar-brand-b {
    font-size: 15px;
    font-weight: 400;
    color: var(--text-2);
    letter-spacing: -0.3px;
}

.topbar-date {
    font-size: 12.5px;
    color: var(--text-4);
    margin-left: 16px;
    padding-left: 16px;
    border-left: 1px solid var(--border);
}

.topbar-r {
    display: flex;
    align-items: center;
    gap: 4px;
}

.tb {
    width: 36px;
    height: 36px;
    border-radius: var(--r);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-3);
    transition: all .12s var(--ease);
    position: relative;
    border: none;
    background: none;
    cursor: pointer;
}

.tb:hover {
    background: var(--surface-hover);
    color: var(--text);
}

.tb .dot {
    position: absolute;
    top: 7px;
    right: 7px;
    width: 6px;
    height: 6px;
    background: var(--rose);
    border-radius: 50%;
}

/* User avatar + dropdown */
.user-wrap {
    position: relative;
    margin-left: 8px;
}

.user-av {
    width: 34px;
    height: 34px;
    border-radius: var(--r-full);
    background: linear-gradient(135deg, #6C5CE7, #A29BFE);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    transition: box-shadow .12s var(--ease);
}

.user-av:hover {
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.user-dd {
    display: none;
    position: absolute;
    top: 42px;
    right: 0;
    width: 220px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    box-shadow: 0 8px 24px rgba(45, 42, 38, 0.1);
    padding: 6px;
    z-index: 200;
}

.user-dd.open {
    display: block;
}

.user-dd-header {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 4px;
}

.user-dd-name {
    font-size: 13px;
    font-weight: 500;
}

.user-dd-email {
    font-size: 11.5px;
    color: var(--text-3);
}

.user-dd a,
.user-dd button[type="submit"] {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: var(--r);
    font-size: 12.5px;
    color: var(--text-2);
    transition: all .12s var(--ease);
    width: 100%;
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
    text-decoration: none;
}

.user-dd a:hover,
.user-dd button[type="submit"]:hover {
    background: var(--surface-hover);
    color: var(--text);
}

.user-dd a i,
.user-dd button[type="submit"] i {
    font-size: 16px;
    width: 18px;
    text-align: center;
}

.user-dd-sep {
    height: 1px;
    background: var(--border);
    margin: 4px 0;
}

/* ───── MAIN CONTENT ───── */
.gn-content {
    max-width: 1120px;
    margin: 0 auto;
    padding: 28px 32px 60px;
}

/* ───── AUTH PAGES ───── */
.auth-wrapper {
    min-height: calc(100vh - 56px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    padding: 40px;
    box-shadow: 0 4px 24px rgba(45, 42, 38, 0.06);
}

.auth-logo {
    text-align: center;
    margin-bottom: 28px;
}

.auth-logo svg {
    width: 44px;
    height: 44px;
    margin-bottom: 12px;
}

.auth-logo h1 {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.3px;
    margin: 0;
    color: var(--text);
}

.auth-logo p {
    font-size: 13px;
    color: var(--text-3);
    margin: 4px 0 0;
}

/* ───── FORMS ───── */
.gn-form-group {
    margin-bottom: 18px;
}

.gn-form-group label {
    display: block;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--text-2);
    margin-bottom: 6px;
}

.gn-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--r);
    font-size: 13.5px;
    font-family: inherit;
    color: var(--text);
    background: var(--surface);
    outline: none;
    transition: all .12s var(--ease);
}

.gn-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.08);
}

.gn-input::placeholder {
    color: var(--text-4);
}

.gn-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 24px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--r);
    font-size: 13.5px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all .12s var(--ease);
    text-decoration: none;
    width: 100%;
}

.gn-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(108, 92, 231, 0.2);
    color: #fff;
}

.gn-btn-outline {
    background: transparent;
    color: var(--accent);
    border: 1px solid rgba(108, 92, 231, 0.25);
}

.gn-btn-outline:hover {
    background: var(--accent-soft);
    color: var(--accent);
    border-color: var(--accent);
    box-shadow: none;
    transform: none;
}

.gn-btn-sm {
    padding: 7px 16px;
    font-size: 12.5px;
    width: auto;
}

.gn-btn-danger {
    background: var(--rose);
}

.gn-btn-danger:hover {
    background: #d14940;
    box-shadow: 0 4px 12px rgba(232, 87, 74, 0.2);
}

.auth-links {
    text-align: center;
    margin-top: 20px;
    font-size: 12.5px;
    color: var(--text-3);
}

.auth-links a {
    color: var(--accent);
    font-weight: 500;
}

.auth-links a:hover {
    text-decoration: underline;
}

.auth-divider {
    display: flex;
    align-items: center;
    margin: 20px 0;
    color: var(--text-4);
    font-size: 11.5px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.auth-divider span {
    padding: 0 12px;
}

/* ───── FORM CHECKBOX ───── */
.gn-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: var(--text-2);
    cursor: pointer;
}

.gn-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    border: 1px solid var(--border);
    border-radius: 4px;
    accent-color: var(--accent);
}

/* ───── VALIDATION ───── */
.text-danger,
.validation-summary-errors,
.field-validation-error {
    color: var(--rose) !important;
    font-size: 12px;
}

.validation-summary-errors ul {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
}

.validation-summary-errors ul li {
    padding: 4px 0;
}

.input-validation-error {
    border-color: var(--rose) !important;
}

/* ───── ALERTS ───── */
.gn-alert {
    padding: 12px 16px;
    border-radius: var(--r);
    font-size: 12.5px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.gn-alert-success {
    background: var(--green-soft);
    color: var(--green-text);
    border: 1px solid rgba(39, 174, 96, 0.15);
}

.gn-alert-error {
    background: #FDF0EF;
    color: var(--rose);
    border: 1px solid rgba(232, 87, 74, 0.15);
}

.gn-alert-info {
    background: var(--accent-soft);
    color: var(--accent-text);
    border: 1px solid rgba(108, 92, 231, 0.15);
}

/* ───── ADMIN TABLE ───── */
.gn-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    overflow: hidden;
}

.gn-table th {
    background: var(--bg-warm);
    padding: 12px 16px;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.gn-table td {
    padding: 12px 16px;
    font-size: 13px;
    color: var(--text);
    border-bottom: 1px solid var(--border);
}

.gn-table tr:last-child td {
    border-bottom: none;
}

.gn-table tr:hover td {
    background: var(--surface-hover);
}

/* ───── BADGES ───── */
.gn-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: var(--r-full);
    font-size: 11px;
    font-weight: 500;
}

.gn-badge-active {
    background: var(--green-soft);
    color: var(--green-text);
}

.gn-badge-disabled {
    background: #FDF0EF;
    color: var(--rose);
}

.gn-badge-pending {
    background: var(--amber-soft);
    color: var(--amber-text);
}

.gn-badge-admin {
    background: var(--accent-soft);
    color: var(--accent-text);
}

/* ───── CARDS ───── */
.gn-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    padding: 24px;
    transition: all .15s var(--ease);
}

.gn-card:hover {
    border-color: var(--border-hover);
    box-shadow: 0 2px 8px rgba(45, 42, 38, 0.04);
}

.gn-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.gn-card-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.gn-card-title i {
    font-size: 18px;
    color: var(--accent);
}

/* ───── WELCOME / LANDING ───── */
.welcome-hero {
    text-align: center;
    padding: 80px 20px;
    max-width: 600px;
    margin: 0 auto;
}

.welcome-hero h1 {
    font-size: 36px;
    font-weight: 600;
    letter-spacing: -0.5px;
    margin-bottom: 12px;
    color: var(--text);
}

.welcome-hero p {
    font-size: 15px;
    color: var(--text-2);
    line-height: 1.6;
    margin-bottom: 28px;
}

.welcome-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.welcome-actions .gn-btn {
    width: auto;
    padding: 12px 32px;
}

/* ───── DASHBOARD PLACEHOLDER ───── */
.dashboard-placeholder {
    text-align: center;
    padding: 60px 20px;
}

.dashboard-placeholder i {
    font-size: 48px;
    color: var(--accent);
    margin-bottom: 16px;
}

.dashboard-placeholder h2 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 8px;
}

.dashboard-placeholder p {
    font-size: 14px;
    color: var(--text-3);
}

/* ───── TOPBAR AUTH LINKS (unauthenticated) ───── */
.topbar-auth-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.topbar-auth-links a {
    font-size: 13px;
    font-weight: 500;
    padding: 7px 16px;
    border-radius: var(--r);
    transition: all .12s var(--ease);
}

.topbar-auth-links a.auth-login {
    color: var(--text-2);
}

.topbar-auth-links a.auth-login:hover {
    color: var(--text);
    background: var(--surface-hover);
}

.topbar-auth-links a.auth-register {
    background: var(--accent);
    color: #fff;
}

.topbar-auth-links a.auth-register:hover {
    background: var(--accent-hover);
}

/* ───── RESPONSIVE ───── */
@media (max-width: 600px) {
    .topbar {
        padding: 0 16px;
    }

    .topbar-date {
        display: none;
    }

    .gn-content {
        padding: 16px 16px 48px;
    }

    .auth-card {
        padding: 28px 24px;
    }

    .welcome-hero {
        padding: 40px 16px;
    }

    .welcome-hero h1 {
        font-size: 28px;
    }
}

/* ───── NEW GOAL BUTTON ───── */
.btn-new {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 7px 16px;
    margin-left: 4px;
    background: var(--accent);
    color: #fff;
    border-radius: var(--r);
    font-size: 12.5px;
    font-weight: 500;
    transition: all .12s var(--ease);
    text-decoration: none;
}

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

.btn-new i {
    font-size: 15px;
}

/* ───── ROSE SOFT ───── */
:root {
    --rose-soft: #FDF0EE;
}

/* ───── ANIMATIONS ───── */
@keyframes breathe {
    0%, 100% { opacity: .4; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

@keyframes pulse-stripe {
    0%, 100% { opacity: .7; }
    50% { opacity: 1; }
}

@keyframes sparkle-rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fade-in-up {
    0% { opacity: 0; transform: translateY(6px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes fade-in {
    0% { opacity: 0; transform: translateY(10px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes compass-spin {
    0% { transform: rotate(0deg); }
    25% { transform: rotate(15deg); }
    50% { transform: rotate(0deg); }
    75% { transform: rotate(-15deg); }
    100% { transform: rotate(0deg); }
}

/* ───── DASHBOARD ───── */
.page { max-width: 1120px; margin: 0 auto; padding: 28px 32px 60px; display: flex; gap: 32px; }
.col-main { flex: 1; min-width: 0; }
.col-right { width: 300px; flex-shrink: 0; }

.hello { margin-bottom: 28px; }
.hello h1 { font-size: 24px; font-weight: 600; letter-spacing: -0.5px; margin-bottom: 4px; }
.hello-sub { color: var(--text-3); font-size: 13px; display: flex; align-items: center; gap: 6px; }
.hello-sub i { font-size: 15px; color: var(--accent); }

.sec { margin-bottom: 24px; }
.sec-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.sec-lbl { font-size: 12px; font-weight: 500; color: var(--text-3); letter-spacing: 0.3px; }
.sec-act { font-size: 12px; color: var(--accent); font-weight: 500; cursor: pointer; display: flex; align-items: center; gap: 3px; text-decoration: none; }
.sec-act:hover { text-decoration: underline; color: var(--accent); }

.btn-details {
    display: inline-flex; align-items: center; gap: 5px; padding: 7px 16px;
    border: 1px solid rgba(108,92,231,0.25); border-radius: var(--r);
    font-size: 12.5px; font-weight: 500; color: var(--accent); background: var(--accent-soft);
    transition: all .12s var(--ease); text-decoration: none;
}
.btn-details:hover { background: var(--accent); color: #fff; border-color: var(--accent); transform: translateY(-1px); box-shadow: 0 3px 8px rgba(108,92,231,0.15); }
.btn-details i { font-size: 14px; }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); transition: all .15s var(--ease); }
.card:hover { border-color: var(--border-hover); box-shadow: 0 2px 8px rgba(45,42,38,0.04); }
.card-p { border-color: rgba(108,92,231,0.25); }
.card-p:hover { border-color: rgba(108,92,231,0.4); box-shadow: 0 4px 16px rgba(108,92,231,0.06); }
.card-inner { padding: 22px 24px; }
.card-s .card-inner { padding: 16px 20px; }

.c-top { display: flex; align-items: flex-start; gap: 18px; margin-bottom: 18px; }
.c-info { flex: 1; min-width: 0; }
.c-tags { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.tag { font-size: 11px; font-weight: 500; padding: 3px 10px; border-radius: var(--r-full); display: inline-flex; align-items: center; gap: 4px; }
.tag-p { background: var(--accent-soft); color: var(--accent-text); }
.tag-s { background: var(--amber-soft); color: var(--amber-text); }
.tag-b { background: var(--bg-warm); color: var(--text-3); }
.tag-active { background: var(--green-soft); color: var(--green-text); }
.tag-m { font-size: 11.5px; color: var(--text-3); display: inline-flex; align-items: center; gap: 3px; }
.tag-m i { font-size: 13px; }
.c-title { font-size: 18px; font-weight: 600; letter-spacing: -0.3px; margin-bottom: 4px; }
.c-sub { font-size: 12.5px; color: var(--text-2); display: flex; align-items: center; gap: 5px; }
.c-sub i { font-size: 14px; color: var(--teal); }

/* Progress ring */
.ring-w { flex-shrink: 0; text-align: center; }
.ring { position: relative; width: 62px; height: 62px; }
.ring svg { transform: rotate(-90deg); width: 62px; height: 62px; }
.ring-b { fill: none; stroke: var(--bg-warm); stroke-width: 5; }
.ring-v { fill: none; stroke-width: 5; stroke-linecap: round; transition: stroke-dashoffset .7s var(--ease); }
.ring-n { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 600; }
.ring-l { font-size: 10.5px; color: var(--text-4); margin-top: 3px; }
.ring-sm { position: relative; width: 40px; height: 40px; flex-shrink: 0; }
.ring-sm svg { transform: rotate(-90deg); width: 40px; height: 40px; }
.ring-sm .ring-n { font-size: 11px; }

/* Route dots */
.route { display: flex; align-items: stretch; margin: 0 0 18px; }
.route-step { flex: 1; display: flex; flex-direction: column; align-items: center; position: relative; }
.route-step::before { content: ''; position: absolute; top: 13px; left: 50%; right: -50%; height: 2px; background: var(--border); z-index: 0; }
.route-step:last-child::before { display: none; }
.route-step.active::before { background: linear-gradient(90deg, var(--accent) 40%, var(--border) 100%); }
.r-dot { width: 26px; height: 26px; border-radius: 50%; background: var(--surface); border: 2.5px solid var(--border); display: flex; align-items: center; justify-content: center; position: relative; z-index: 1; }
.route-step.active .r-dot { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.route-step.active .r-dot i { color: #fff; }
.route-step.done .r-dot { border-color: var(--teal); background: var(--teal); }
.route-step.done .r-dot i { color: #fff; }
.r-dot i { font-size: 11px; color: var(--text-4); }
.r-label { font-size: 10.5px; color: var(--text-4); margin-top: 6px; text-align: center; max-width: 120px; line-height: 1.3; }
.route-step.active .r-label { color: var(--accent); font-weight: 500; }

/* Focus / mission */
.focus { background: var(--teal-soft); border-radius: var(--r-lg); padding: 13px 16px; display: flex; align-items: flex-start; gap: 10px; margin-bottom: 16px; }
.focus i { color: var(--teal); font-size: 18px; margin-top: 1px; flex-shrink: 0; }
.focus-lbl { font-size: 10px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.7px; color: var(--teal-text); margin-bottom: 2px; }
.focus-txt { font-size: 13px; color: var(--text); font-weight: 500; }

.mission { background: var(--surface-warm); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 16px 18px; position: relative; overflow: hidden; }
.mission::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent); border-radius: 3px 0 0 3px; }
.m-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px; }
.m-lbl { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.6px; color: var(--accent); display: flex; align-items: center; gap: 4px; }
.m-lbl i { font-size: 14px; }
.m-time { font-size: 11.5px; color: var(--text-3); display: flex; align-items: center; gap: 3px; }
.m-time i { font-size: 14px; }
.mission h3 { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.mission p { font-size: 12.5px; color: var(--text-2); line-height: 1.6; margin-bottom: 14px; }
.m-foot { display: flex; align-items: center; justify-content: space-between; }
.m-tasks { font-size: 12px; color: var(--text-3); display: flex; align-items: center; gap: 4px; }
.m-tasks i { font-size: 15px; }
.btn-go { display: inline-flex; align-items: center; gap: 6px; padding: 9px 22px; background: var(--accent); color: #fff; border-radius: var(--r); font-size: 12.5px; font-weight: 500; transition: all .12s var(--ease); text-decoration: none; }
.btn-go:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(108,92,231,0.2); color: #fff; }
.btn-go i { font-size: 15px; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 16px; }
.st { background: var(--bg-warm); border-radius: var(--r-lg); padding: 12px; text-align: center; }
.st-v { font-size: 16px; font-weight: 600; margin-bottom: 1px; }
.st-l { font-size: 10.5px; color: var(--text-3); }
.st-v.ok { color: var(--green); }

/* Secondary goals */
.s-top { display: flex; align-items: center; gap: 12px; }
.s-info { flex: 1; min-width: 0; }
.s-title { font-size: 14.5px; font-weight: 600; margin-bottom: 2px; }
.s-meta { font-size: 12px; color: var(--text-2); display: flex; align-items: center; gap: 5px; }
.s-meta i { font-size: 13px; color: var(--teal); }
.s-miss { border-top: 1px solid var(--border); margin-top: 12px; padding-top: 12px; display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; }
.s-miss-active { color: var(--text-2); }
.s-miss-active i { color: var(--accent); margin-right: 4px; font-size: 14px; vertical-align: -1px; }
.s-miss-none { color: var(--text-4); }
.s-miss-none i { margin-right: 3px; font-size: 14px; vertical-align: -1px; }
.s-miss-time { color: var(--text-4); font-size: 11.5px; }

/* Backlog */
.bl { display: flex; flex-direction: column; gap: 5px; }
.bl-row { display: flex; align-items: center; gap: 10px; padding: 11px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); transition: all .12s var(--ease); text-decoration: none; }
.bl-row:hover { border-color: var(--accent); background: var(--accent-soft); }
.bl-row i.bl-ic { font-size: 16px; color: var(--text-4); }
.bl-row:hover i.bl-ic { color: var(--accent); }
.bl-main { flex: 1; }
.bl-nm { font-size: 13px; font-weight: 500; }
.bl-dt { font-size: 11px; color: var(--text-4); }
.btn-a { padding: 5px 13px; border: 1px solid var(--border); border-radius: var(--r); font-size: 11.5px; font-weight: 500; color: var(--text-3); transition: all .12s var(--ease); text-decoration: none; }
.btn-a:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

/* ───── RIGHT PANEL ───── */
.right-panel { position: sticky; top: 72px; }
.rp-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); padding: 20px; margin-bottom: 16px; }
.rp-title { font-size: 12px; font-weight: 500; color: var(--text-3); letter-spacing: 0.3px; margin-bottom: 14px; display: flex; align-items: center; gap: 6px; }
.rp-title i { font-size: 15px; }

.streak { display: flex; align-items: center; gap: 12px; padding: 14px; background: var(--accent-soft); border-radius: var(--r-lg); margin-bottom: 16px; }
.streak-fire { font-size: 28px; flex-shrink: 0; }
.streak-info { flex: 1; }
.streak-num { font-size: 20px; font-weight: 600; color: var(--accent-text); }
.streak-sub { font-size: 11px; color: var(--text-2); margin-top: 1px; }
.streak-days { display: flex; gap: 4px; margin-top: 8px; }
.streak-day { width: 22px; height: 22px; border-radius: var(--r-full); background: var(--bg-warm); display: flex; align-items: center; justify-content: center; font-size: 8px; color: var(--text-4); font-weight: 500; }
.streak-day.hit { background: var(--teal); color: #fff; }
.streak-day.today { border: 2px solid var(--accent); color: var(--accent); background: var(--surface); }

.wp-row { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.wp-label { font-size: 12px; color: var(--text-2); width: 50px; flex-shrink: 0; }
.wp-bar { flex: 1; height: 6px; background: var(--bg-warm); border-radius: 3px; overflow: hidden; }
.wp-fill { height: 100%; border-radius: 3px; transition: width .5s var(--ease); }
.wp-fill.done { background: var(--teal); }
.wp-fill.partial { background: var(--amber); }
.wp-count { font-size: 11px; color: var(--text-3); width: 28px; text-align: right; flex-shrink: 0; }

.done-list { display: flex; flex-direction: column; gap: 10px; }
.done-item { display: flex; align-items: flex-start; gap: 9px; padding: 10px 12px; background: var(--green-soft); border-radius: var(--r); border: 1px solid rgba(39,174,96,0.1); }
.done-item i { font-size: 16px; color: var(--green); margin-top: 1px; flex-shrink: 0; }
.done-info { flex: 1; }
.done-name { font-size: 12.5px; font-weight: 500; margin-bottom: 2px; }
.done-detail { font-size: 11px; color: var(--text-3); }
.done-date { font-size: 10.5px; color: var(--green-text); font-weight: 500; }

.note-item { padding: 10px 12px; background: var(--bg-warm); border-radius: var(--r); margin-bottom: 8px; }
.note-quote { font-size: 12px; color: var(--text-2); font-style: italic; line-height: 1.5; margin-bottom: 4px; }
.note-meta { font-size: 10.5px; color: var(--text-4); }

.ts { font-size: 10px; color: var(--text-4); display: inline-flex; align-items: center; gap: 3px; }
.ts i { font-size: 11px; }

/* ───── GOAL DETAIL PAGE ───── */
.page-detail { max-width: 1120px; margin: 0 auto; padding: 0 32px 60px; }

.breadcrumb-gn { padding: 16px 0; display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-3); margin: 0; background: none; }
.breadcrumb-gn a { color: var(--accent); font-weight: 500; text-decoration: none; }
.breadcrumb-gn a:hover { text-decoration: underline; }
.breadcrumb-gn i { font-size: 12px; }

.goal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.goal-header-info { flex: 1; }
.goal-header-tags { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.goal-header h1 { font-size: 26px; font-weight: 600; letter-spacing: -0.5px; margin-bottom: 6px; }

.goal-header-actions { display: flex; gap: 6px; flex-shrink: 0; flex-wrap: wrap; }
.btn-outline { display: inline-flex; align-items: center; gap: 5px; padding: 8px 16px; border: 1px solid var(--border); border-radius: var(--r); font-size: 12.5px; font-weight: 500; color: var(--text-2); transition: all .12s var(--ease); text-decoration: none; background: none; cursor: pointer; font-family: inherit; }
.btn-outline:hover { border-color: var(--border-hover); color: var(--text); background: var(--surface-hover); }
.btn-outline i { font-size: 15px; }
.btn-accent { display: inline-flex; align-items: center; gap: 5px; padding: 8px 16px; background: var(--accent); color: #fff; border-radius: var(--r); font-size: 12.5px; font-weight: 500; transition: all .12s var(--ease); border: none; cursor: pointer; font-family: inherit; text-decoration: none; }
.btn-accent:hover { background: var(--accent-hover); color: #fff; }
.btn-accent i { font-size: 15px; }

/* Nav pulse */
.nav-pulse { display: flex; align-items: center; gap: 8px; padding: 10px 14px; margin-top: 12px; background: var(--surface-warm); border-radius: var(--r); border: 1px solid var(--border); }
.nav-pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); animation: breathe 2.5s ease-in-out infinite; flex-shrink: 0; }
.nav-pulse-text { font-size: 11.5px; color: var(--text-2); flex: 1; transition: opacity .3s var(--ease); }
.nav-pulse-text b { font-weight: 500; color: var(--teal-text); }

/* AI sparkle badge */
.ai-badge { display: inline-flex; align-items: center; gap: 3px; font-size: 10px; color: var(--accent-text); font-weight: 500; vertical-align: middle; }
.ai-badge .sparkle { font-size: 12px; display: inline-block; animation: sparkle-rotate 4s linear infinite; }

.persona-compass { animation: compass-spin 6s ease-in-out infinite; }

/* Two columns (detail page) */
.cols { display: flex; gap: 28px; }
.col-l { flex: 1; min-width: 0; }
.col-r { width: 320px; flex-shrink: 0; }

/* Card title */
.card-title { font-size: 12px; font-weight: 500; color: var(--text-3); letter-spacing: 0.3px; margin-bottom: 14px; display: flex; align-items: center; gap: 6px; }
.card-title i { font-size: 15px; }

/* Milestone containers */
.ms-container { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); margin-bottom: 16px; overflow: hidden; transition: all .15s var(--ease); }
.ms-container:hover { box-shadow: 0 2px 8px rgba(45,42,38,0.04); }
.ms-active { border-color: rgba(108,92,231,0.25); }
.ms-active:hover { border-color: rgba(108,92,231,0.4); box-shadow: 0 4px 16px rgba(108,92,231,0.06); }
.ms-header { display: flex; align-items: center; gap: 12px; padding: 16px 20px; cursor: pointer; transition: background .12s var(--ease); }
.ms-header:hover { background: var(--surface-hover); }
.ms-indicator { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ms-indicator.active { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.ms-indicator.done { background: var(--teal); box-shadow: 0 0 0 4px var(--teal-soft); }
.ms-indicator.upcoming { background: var(--bg-warm); border: 2px solid var(--border); }
.ms-info { flex: 1; min-width: 0; }
.ms-label { font-size: 10.5px; font-weight: 500; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 1px; }
.ms-name { font-size: 15px; font-weight: 600; letter-spacing: -0.1px; }
.ms-active .ms-name { color: var(--accent-text); }
.ms-progress-wrap { display: flex; align-items: center; gap: 8px; flex-shrink: 0; width: 120px; }
.ms-bar { flex: 1; height: 5px; background: var(--bg-warm); border-radius: 3px; overflow: hidden; }
.ms-bar-fill { height: 100%; border-radius: 3px; }
.ms-pct { font-size: 12px; font-weight: 600; color: var(--text-2); min-width: 30px; text-align: right; }
.ms-meta-right { flex-shrink: 0; }
.ms-chevron { font-size: 16px; color: var(--text-4); transition: transform .2s var(--ease); flex-shrink: 0; }
.ms-container.collapsed .ms-chevron { transform: rotate(-90deg); }
.ms-body { padding: 0 20px 20px; }
.ms-container.collapsed .ms-body { display: none; }
.ms-detail { display: flex; gap: 16px; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--border); font-size: 11.5px; color: var(--text-3); flex-wrap: wrap; }
.ms-detail span { display: flex; align-items: center; gap: 4px; }
.ms-detail i { font-size: 14px; }
.ms-empty { text-align: center; padding: 24px 16px; color: var(--text-3); font-size: 12.5px; line-height: 1.6; }
.ms-empty i { margin-bottom: 8px; display: block; }

/* Missions list */
.missions-list { display: flex; flex-direction: column; gap: 10px; }
.mi { background: var(--surface-warm); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; transition: all .12s var(--ease); }
.mi:hover { border-color: var(--border-hover); }
.mi.today { border-left: 3px solid var(--accent); }
.mi.today::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent); border-radius: 3px 0 0 3px; animation: pulse-stripe 2.5s ease-in-out infinite; }
.mi-top { padding: 14px 16px; display: flex; align-items: center; gap: 12px; cursor: pointer; }
.mi-check { width: 22px; height: 22px; border-radius: var(--r-full); border: 2px solid var(--border); display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: all .12s var(--ease); }
.mi-check:hover { border-color: var(--accent); }
.mi-check.done { background: var(--teal); border-color: var(--teal); }
.mi-check.done i { color: #fff; font-size: 11px; }
.mi-body { flex: 1; min-width: 0; }
.mi-num { font-size: 10px; font-weight: 500; color: var(--text-4); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 1px; }
.mi-title { font-size: 13.5px; font-weight: 500; margin-bottom: 2px; }
.mi.completed .mi-title { text-decoration: line-through; color: var(--text-3); }
.mi-mi-meta { font-size: 11.5px; color: var(--text-3); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mi-mi-meta span { display: flex; align-items: center; gap: 3px; }
.mi-mi-meta i { font-size: 13px; }
.mi-status { font-size: 11px; font-weight: 500; padding: 2px 8px; border-radius: var(--r-full); }
.mi-status.scheduled { background: var(--accent-soft); color: var(--accent-text); }
.mi-status.done { background: var(--green-soft); color: var(--green-text); }
.mi-status.partial { background: var(--amber-soft); color: var(--amber-text); }
.mi-status.in-progress { background: var(--teal-soft); color: var(--teal-text); }
.mi-status.skipped { background: var(--bg-warm); color: var(--text-3); }
.mi-status.deferred { background: var(--amber-soft); color: var(--amber-text); }

/* Expanded mission */
.mi-expand { display: none; padding: 0 16px 16px; border-top: 1px solid var(--border); }
.mi.open .mi-expand { display: block; }
.mi-purpose { font-size: 12.5px; color: var(--text-2); line-height: 1.6; padding: 12px 0; margin-left: 34px; }
.mi-tasks-list { margin-left: 34px; }
.task { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.task:last-child { border-bottom: none; }
.task-check { width: 18px; height: 18px; border-radius: 4px; border: 2px solid var(--border); display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 1px; cursor: pointer; transition: all .12s var(--ease); }
.task-check:hover { border-color: var(--accent); }
.task-check.done { background: var(--teal); border-color: var(--teal); }
.task-check.done i { color: #fff; font-size: 9px; }
.task-info { flex: 1; }
.task-title { font-size: 12.5px; font-weight: 450; margin-bottom: 1px; }
.task.completed .task-title { text-decoration: line-through; color: var(--text-3); }
.task-detail { font-size: 11px; color: var(--text-3); }
.task-time { font-size: 11px; color: var(--text-4); flex-shrink: 0; }
.mi-actions { display: flex; gap: 6px; margin-top: 12px; margin-left: 34px; }
.mi-btn { padding: 7px 14px; border-radius: var(--r); font-size: 12px; font-weight: 500; transition: all .12s var(--ease); display: flex; align-items: center; gap: 4px; border: none; cursor: pointer; font-family: inherit; }
.mi-btn i { font-size: 14px; }
.mi-btn-primary { background: var(--accent); color: #fff; }
.mi-btn-primary:hover { background: var(--accent-hover); }
.mi-btn-secondary { border: 1px solid var(--border); color: var(--text-2); background: none; }
.mi-btn-secondary:hover { background: var(--surface-hover); }

/* Navigator notes */
.notes-list { display: flex; flex-direction: column; gap: 10px; }
.note { padding: 12px 14px; background: var(--bg-warm); border-radius: var(--r-lg); border: 1px solid var(--border); }
.note-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.note-mission { font-size: 11.5px; font-weight: 500; color: var(--text-2); }
.note-date { font-size: 10.5px; color: var(--text-4); }
.note-actions { display: flex; gap: 2px; opacity: 0; transition: opacity .12s var(--ease); }
.note:hover .note-actions { opacity: 1; }
.note-act-btn { width: 28px; height: 28px; border-radius: var(--r); display: flex; align-items: center; justify-content: center; color: var(--text-4); transition: all .12s var(--ease); border: none; background: none; cursor: pointer; }
.note-act-btn:hover { background: var(--surface-hover); color: var(--text-2); }
.note-act-btn.del:hover { color: var(--rose); background: var(--rose-soft); }
.note-text { font-size: 12.5px; color: var(--text-2); font-style: italic; line-height: 1.55; margin-bottom: 6px; }
.note-ai { font-size: 11.5px; color: var(--accent-text); background: var(--accent-soft); padding: 6px 10px; border-radius: var(--r); display: flex; align-items: flex-start; gap: 6px; }
.note-ai i { font-size: 14px; margin-top: 1px; flex-shrink: 0; }
.add-note { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border: 1px dashed var(--border); border-radius: var(--r-lg); color: var(--text-3); font-size: 12.5px; cursor: pointer; transition: all .12s var(--ease); background: none; font-family: inherit; }
.add-note:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.add-note i { font-size: 15px; }

/* Nav insight */
.nav-insight { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; background: linear-gradient(135deg, var(--accent-soft), #F5EDFC); border: 1px solid rgba(108,92,231,0.08); border-radius: var(--r-lg); margin: 10px 0; animation: fade-in-up .4s var(--ease); }
.nav-insight-icon { width: 28px; height: 28px; border-radius: var(--r-full); background: var(--accent); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.nav-insight-icon i { color: #fff; font-size: 13px; }
.nav-insight-text { font-size: 12px; color: var(--text-2); line-height: 1.5; flex: 1; }
.nav-insight-text b { font-weight: 500; color: var(--accent-text); }
.nav-insight-dismiss { color: var(--text-4); font-size: 14px; cursor: pointer; flex-shrink: 0; padding: 2px; border: none; background: none; }
.nav-insight-dismiss:hover { color: var(--text-2); }

/* Big ring (detail page) */
.big-ring { text-align: center; margin-bottom: 16px; }
.big-ring-wrap { position: relative; width: 100px; height: 100px; margin: 0 auto 8px; }
.big-ring-wrap svg { transform: rotate(-90deg); width: 100px; height: 100px; }
.big-ring-bg { fill: none; stroke: var(--bg-warm); stroke-width: 7; }
.big-ring-val { fill: none; stroke-width: 7; stroke-linecap: round; }
.big-ring-num { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.big-ring-pct { font-size: 24px; font-weight: 600; }
.big-ring-lbl { font-size: 10.5px; color: var(--text-3); }
.big-ring-sub { font-size: 11.5px; color: var(--text-3); }

/* Detail stats */
.ds { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ds-item { background: var(--bg-warm); border-radius: var(--r); padding: 10px 12px; text-align: center; }
.ds-v { font-size: 16px; font-weight: 600; margin-bottom: 1px; }
.ds-l { font-size: 10.5px; color: var(--text-3); }
.ds-v.ok { color: var(--green); }
.ds-v.warn { color: var(--amber); }

/* Success criteria */
.sc-list { display: flex; flex-direction: column; gap: 8px; }
.sc-item { display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; }
.sc-check { width: 18px; height: 18px; border-radius: var(--r-full); border: 2px solid var(--border); display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 1px; cursor: pointer; transition: all .12s var(--ease); }
.sc-check.done { background: var(--teal); border-color: var(--teal); }
.sc-check.done i { color: #fff; font-size: 9px; }
.sc-text { color: var(--text-2); line-height: 1.4; flex: 1; }
.sc-item.done .sc-text { text-decoration: line-through; color: var(--text-4); }
.sc-actions { display: flex; gap: 1px; opacity: 0; transition: opacity .12s var(--ease); }
.sc-item:hover .sc-actions { opacity: 1; }
.sc-add { display: flex; align-items: center; gap: 6px; margin-top: 10px; }
.sc-input { flex: 1; padding: 8px 12px; border: 1px dashed var(--border); border-radius: var(--r); font-size: 12.5px; outline: none; background: transparent; color: var(--text); transition: all .12s var(--ease); font-family: inherit; }
.sc-input:focus { border-style: solid; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(108,92,231,0.08); }
.sc-input::placeholder { color: var(--text-4); }
.sc-add-btn { width: 32px; height: 32px; border-radius: var(--r); background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; transition: all .12s var(--ease); flex-shrink: 0; border: none; cursor: pointer; }
.sc-add-btn:hover { background: var(--accent); color: #fff; }

/* Preferences */
.pref-row { display: flex; align-items: center; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--border); }
.pref-row:last-child { border-bottom: none; }
.pref-label { font-size: 12px; color: var(--text-3); }
.pref-value { font-size: 12px; font-weight: 500; }

/* Priority dropdown */
.priority-wrap { position: relative; display: inline-flex; }
.priority-btn { cursor: pointer; display: inline-flex; align-items: center; gap: 4px; transition: all .12s var(--ease); border-radius: var(--r-full); padding-right: 6px; }
.priority-btn:hover { opacity: .8; }
.priority-btn .caret { font-size: 10px; color: var(--accent-text); }
.priority-dd { display: none; position: absolute; top: calc(100% + 4px); left: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: 0 8px 24px rgba(45,42,38,0.1); padding: 4px; z-index: 50; min-width: 160px; }
.priority-dd.open { display: block; }
.priority-opt { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: var(--r); font-size: 12.5px; color: var(--text-2); transition: all .12s var(--ease); cursor: pointer; }
.priority-opt:hover { background: var(--surface-hover); color: var(--text); }
.priority-opt i { font-size: 15px; }
.priority-opt.active { background: var(--accent-soft); color: var(--accent-text); font-weight: 500; }
.priority-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.priority-dot.p { background: var(--accent); }
.priority-dot.s { background: var(--amber); }
.priority-dot.b { background: var(--text-4); }

/* Save bar */
.save-bar { position: fixed; bottom: 0; left: 0; right: 0; z-index: 150; background: var(--surface); border-top: 1px solid var(--border); box-shadow: 0 -4px 20px rgba(45,42,38,0.08); padding: 12px 32px; display: none; align-items: center; justify-content: space-between; transform: translateY(100%); transition: transform .2s var(--ease); }
.save-bar.visible { display: flex; transform: translateY(0); }
.save-bar-text { font-size: 13px; color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.save-bar-text i { font-size: 16px; color: var(--amber); }
.save-bar-actions { display: flex; gap: 8px; }
.btn-cancel { padding: 8px 20px; border: 1px solid var(--border); border-radius: var(--r); font-size: 12.5px; font-weight: 500; color: var(--text-2); transition: all .12s var(--ease); background: none; cursor: pointer; font-family: inherit; }
.btn-cancel:hover { background: var(--surface-hover); color: var(--text); }
.btn-save { padding: 8px 24px; background: var(--accent); color: #fff; border-radius: var(--r); font-size: 12.5px; font-weight: 500; transition: all .12s var(--ease); display: flex; align-items: center; gap: 5px; border: none; cursor: pointer; font-family: inherit; }
.btn-save:hover { background: var(--accent-hover); }
.btn-save i { font-size: 15px; }

/* Modal */
.modal-bg { display: none; position: fixed; inset: 0; background: rgba(45,42,38,0.3); z-index: 300; align-items: center; justify-content: center; }
.modal-bg.open { display: flex; }
.modal-content { background: var(--surface); border-radius: var(--r-xl); width: 480px; max-width: 90vw; max-height: 80vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(45,42,38,0.15); }
.modal-head { padding: 20px 24px 0; display: flex; align-items: center; justify-content: space-between; }
.modal-head h2 { font-size: 18px; font-weight: 600; }
.modal-close { font-size: 20px; color: var(--text-4); cursor: pointer; padding: 4px; border: none; background: none; }
.modal-close:hover { color: var(--text); }
.modal-body { padding: 16px 24px 24px; }
.modal-footer { padding: 0 24px 20px; display: flex; justify-content: flex-end; gap: 8px; }
.refine-options { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.refine-opt { padding: 7px 14px; border: 1px solid var(--border); border-radius: var(--r-full); font-size: 12.5px; color: var(--text-2); transition: all .12s var(--ease); cursor: pointer; background: none; font-family: inherit; }
.refine-opt:hover, .refine-opt.selected { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.refine-textarea { width: 100%; padding: 12px; border: 1px solid var(--border); border-radius: var(--r); font-size: 13px; min-height: 80px; resize: vertical; outline: none; color: var(--text); font-family: inherit; }
.refine-textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(108,92,231,0.08); }
.refine-textarea::placeholder { color: var(--text-4); }

/* ───── CHAT WIDGET ───── */
.chat-fab { position: fixed; bottom: 20px; right: 20px; width: 50px; height: 50px; background: var(--accent); color: #fff; border-radius: var(--r-full); display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 20px rgba(108,92,231,0.3); z-index: 200; transition: all .15s var(--ease); border: none; cursor: pointer; }
.chat-fab:hover { transform: scale(1.06); box-shadow: 0 6px 24px rgba(108,92,231,0.35); }
.chat-fab i { font-size: 22px; }
.chat-panel { position: fixed; bottom: 80px; right: 20px; width: 370px; height: 510px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); box-shadow: 0 20px 60px rgba(45,42,38,0.12); z-index: 200; display: none; flex-direction: column; overflow: hidden; }
.chat-panel.open { display: flex; }
.ch-head { padding: 14px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 10px; }
.ch-ic { width: 30px; height: 30px; border-radius: var(--r); background: linear-gradient(135deg, #6C5CE7, #A29BFE); display: flex; align-items: center; justify-content: center; }
.ch-ic i { color: #fff; font-size: 14px; }
.ch-info { flex: 1; }
.ch-t { font-size: 13.5px; font-weight: 600; }
.ch-s { font-size: 10.5px; color: var(--text-3); }
.ch-x { font-size: 18px; color: var(--text-4); cursor: pointer; padding: 4px; border: none; background: none; }
.ch-x:hover { color: var(--text); }
.ch-msgs { flex: 1; padding: 16px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.ch-m { max-width: 82%; padding: 10px 14px; border-radius: var(--r-lg); font-size: 12.5px; line-height: 1.55; }
.ch-m.bot { background: var(--bg-warm); align-self: flex-start; border-bottom-left-radius: 4px; }
.ch-m.user { background: var(--accent); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.ch-chips { padding: 0 16px 10px; display: flex; flex-wrap: wrap; gap: 5px; }
.ch-chip { padding: 6px 12px; border: 1px solid var(--border); border-radius: var(--r-full); font-size: 11.5px; color: var(--text-2); transition: all .12s var(--ease); background: none; cursor: pointer; font-family: inherit; }
.ch-chip:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.ch-in-row { padding: 12px 16px; border-top: 1px solid var(--border); display: flex; gap: 7px; }
.ch-in { flex: 1; padding: 8px 14px; border: 1px solid var(--border); border-radius: var(--r); font-size: 12.5px; outline: none; background: var(--surface); color: var(--text); font-family: inherit; }
.ch-in:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(108,92,231,0.08); }
.ch-send { width: 34px; height: 34px; background: var(--accent); color: #fff; border-radius: var(--r); display: flex; align-items: center; justify-content: center; transition: all .12s var(--ease); border: none; cursor: pointer; }
.ch-send:hover { background: var(--accent-hover); }

/* ───── CREATE GOAL WIZARD ───── */
.page-create { max-width: 720px; margin: 0 auto; padding: 0 32px 80px; }

.create-header { text-align: center; margin-bottom: 32px; }
.create-header h1 { font-size: 26px; font-weight: 600; letter-spacing: -0.5px; margin-bottom: 6px; }
.create-header p { font-size: 14px; color: var(--text-2); line-height: 1.6; max-width: 480px; margin: 0 auto; }

.steps { display: flex; align-items: center; justify-content: center; gap: 0; margin-bottom: 36px; padding: 0 20px; }
.step { display: flex; align-items: center; gap: 0; }
.step-dot { width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; color: var(--text-4); background: var(--surface); transition: all .2s var(--ease); flex-shrink: 0; position: relative; }
.step-dot.active { border-color: var(--accent); background: var(--accent); color: #fff; box-shadow: 0 0 0 4px var(--accent-soft); }
.step-dot.done { border-color: var(--teal); background: var(--teal); color: #fff; }
.step-dot.done i { font-size: 14px; }
.step-line { width: 48px; height: 2px; background: var(--border); flex-shrink: 0; }
.step-line.done { background: var(--teal); }
.step-line.active { background: linear-gradient(90deg, var(--teal), var(--border)); }
.step-labels { display: flex; justify-content: center; gap: 42px; margin-top: 8px; margin-bottom: 0; }
.step-label { font-size: 10px; color: var(--text-4); text-align: center; width: 50px; }
.step-label.active { color: var(--accent); font-weight: 500; }
.step-label.done { color: var(--teal-text); }

.form-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); padding: 32px; margin-bottom: 20px; transition: all .15s var(--ease); }
.form-card:hover { box-shadow: 0 2px 8px rgba(45,42,38,0.04); }
.form-section { margin-bottom: 28px; }
.form-section:last-child { margin-bottom: 0; }
.form-label { font-size: 13px; font-weight: 500; color: var(--text); margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }
.form-label i { font-size: 16px; color: var(--accent); }
.form-label .required { color: var(--rose); font-size: 11px; }
.form-hint { font-size: 11.5px; color: var(--text-3); margin-bottom: 8px; line-height: 1.5; }
.form-input { width: 100%; padding: 11px 14px; border: 1px solid var(--border); border-radius: var(--r); font-size: 14px; outline: none; background: var(--surface); color: var(--text); transition: all .12s var(--ease); font-family: inherit; }
.form-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(108,92,231,0.08); }
.form-input::placeholder { color: var(--text-4); }
textarea.form-input { min-height: 80px; resize: vertical; line-height: 1.6; }
.form-input-lg { font-size: 18px; font-weight: 500; padding: 14px 16px; }

.chip-group { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chip { padding: 7px 14px; border: 1px solid var(--border); border-radius: var(--r-full); font-size: 12.5px; color: var(--text-2); transition: all .12s var(--ease); cursor: pointer; display: inline-flex; align-items: center; gap: 5px; background: none; font-family: inherit; }
.chip:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.chip.selected { border-color: var(--accent); color: var(--accent-text); background: var(--accent-soft); font-weight: 500; }
.chip i { font-size: 14px; }

.form-date { max-width: 200px; }
.form-row { display: flex; gap: 16px; }
.form-row > * { flex: 1; }

.range-wrap { display: flex; align-items: center; gap: 12px; }
.range-wrap input[type=range] { flex: 1; accent-color: var(--accent); }
.range-val { font-size: 14px; font-weight: 600; color: var(--accent-text); min-width: 50px; text-align: center; }

.day-picker { display: flex; gap: 6px; flex-wrap: wrap; }
.day-btn { width: 40px; height: 40px; border-radius: var(--r-full); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 500; color: var(--text-3); transition: all .12s var(--ease); cursor: pointer; background: none; font-family: inherit; }
.day-btn:hover { border-color: var(--accent); color: var(--accent); }
.day-btn.selected { background: var(--accent); border-color: var(--accent); color: #fff; }

.persona-preview { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--teal-soft); border-radius: var(--r-lg); margin-top: 12px; }
.persona-icon { width: 40px; height: 40px; border-radius: 50%; background: var(--surface); border: 2px solid var(--teal); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.persona-icon i { font-size: 20px; color: var(--teal); }
.persona-name { font-size: 13px; font-weight: 500; color: var(--teal-text); }
.persona-desc { font-size: 11.5px; color: var(--text-2); }

.ai-assist { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: linear-gradient(135deg, var(--accent-soft), #F5EDFC); border: 1px solid rgba(108,92,231,0.08); border-radius: var(--r-lg); margin-bottom: 20px; }
.ai-assist-icon { width: 32px; height: 32px; border-radius: var(--r); background: var(--accent); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ai-assist-icon i { color: #fff; font-size: 15px; }
.ai-assist-text { flex: 1; font-size: 12.5px; color: var(--text-2); line-height: 1.5; }
.ai-assist-text b { font-weight: 500; color: var(--accent-text); }

.sc-builder { display: flex; flex-direction: column; gap: 6px; }
.sc-row { display: flex; align-items: center; gap: 8px; }
.sc-row input { flex: 1; }
.sc-remove { width: 28px; height: 28px; border-radius: var(--r); display: flex; align-items: center; justify-content: center; color: var(--text-4); transition: all .12s var(--ease); border: none; background: none; cursor: pointer; }
.sc-remove:hover { background: var(--rose-soft); color: var(--rose); }
.sc-add-row { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.sc-add-row input { flex: 1; }

.form-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 24px; }
.btn-back { display: flex; align-items: center; gap: 5px; padding: 10px 20px; border: 1px solid var(--border); border-radius: var(--r); font-size: 13px; font-weight: 500; color: var(--text-2); transition: all .12s var(--ease); text-decoration: none; background: none; cursor: pointer; font-family: inherit; }
.btn-back:hover { background: var(--surface-hover); color: var(--text); }
.btn-back i { font-size: 15px; }
.btn-next { display: flex; align-items: center; gap: 5px; padding: 10px 24px; background: var(--accent); color: #fff; border-radius: var(--r); font-size: 13px; font-weight: 500; transition: all .12s var(--ease); border: none; cursor: pointer; font-family: inherit; }
.btn-next:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(108,92,231,0.2); color: #fff; }
.btn-next i { font-size: 15px; }
.btn-generate { display: flex; align-items: center; gap: 6px; padding: 12px 28px; background: var(--accent); color: #fff; border-radius: var(--r); font-size: 14px; font-weight: 500; transition: all .12s var(--ease); border: none; cursor: pointer; font-family: inherit; }
.btn-generate:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(108,92,231,0.25); color: #fff; }
.btn-generate i { font-size: 18px; }

.wizard-step { display: none; }
.wizard-step.active { display: block; animation: fade-in .3s var(--ease); }

/* ───── EMPTY STATE ───── */
.empty-state { text-align: center; padding: 60px 20px; }
.empty-state i { font-size: 48px; color: var(--accent); margin-bottom: 16px; display: block; }
.empty-state h2 { font-size: 22px; font-weight: 600; margin-bottom: 8px; }
.empty-state p { font-size: 14px; color: var(--text-3); margin-bottom: 24px; }

/* ───── DASHBOARD + DETAIL RESPONSIVE ───── */
@media (max-width: 1024px) {
    .col-right { width: 260px; }
    .col-r { width: 260px; }
}

@media (max-width: 900px) {
    .page { flex-direction: column; gap: 0; padding: 20px 20px 48px; }
    .col-right { width: 100%; }
    .right-panel { position: static; }
    .rp-card:not(:first-child) { display: none; }
    .cols { flex-direction: column; gap: 0; }
    .col-r { width: 100%; }
}

@media (max-width: 600px) {
    .btn-new span { display: none; }
    .page { padding: 16px 16px 48px; }
    .page-detail { padding: 0 16px 48px; }
    .page-create { padding: 0 16px 60px; }
    .stats { grid-template-columns: repeat(2, 1fr); }
    .route { display: none; }
    .c-top { flex-direction: column; gap: 10px; }
    .m-foot { flex-direction: column; gap: 8px; align-items: stretch; }
    .btn-go { justify-content: center; }
    .chat-panel { width: calc(100vw - 24px); right: 12px; bottom: 78px; height: 55vh; }
    .goal-header { flex-direction: column; }
    .goal-header-actions { width: 100%; }
    .ds { grid-template-columns: 1fr 1fr; }
    .form-card { padding: 20px; }
    .form-row { flex-direction: column; gap: 12px; }
    .steps { padding: 0; }
    .step-line { width: 24px; }
    .step-labels { gap: 18px; }
    .ai-assist { flex-direction: column; text-align: center; }
}

/* ───── BOOTSTRAP OVERRIDES ───── */
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.1);
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--text-4);
}

/* ═══════════════════════════════════════════════
   AI Review / Refine Modal
   ═══════════════════════════════════════════════ */

.review-modal {
    max-width: 680px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}

.review-modal .modal-body {
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

/* Loading */
.review-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 20px;
    gap: 20px;
}

.review-loading-anim {
    display: flex;
    gap: 8px;
}

.loading-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent);
    animation: loadingPulse 1.4s ease-in-out infinite;
}

.loading-dot:nth-child(2) { animation-delay: 0.2s; }
.loading-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes loadingPulse {
    0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); }
    40% { opacity: 1; transform: scale(1.1); }
}

.review-loading-text {
    font-size: 13px;
    color: var(--text-2);
    text-align: center;
}

.review-loading-steps {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 300px;
}

.loading-step {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: var(--text-4);
    transition: all 0.3s var(--ease);
}

.loading-step i {
    font-size: 14px;
    transition: all 0.3s var(--ease);
}

.loading-step.active {
    color: var(--accent);
    font-weight: 500;
}

.loading-step.active i {
    animation: spin 1s linear infinite;
    color: var(--accent);
}

.loading-step.done {
    color: var(--green-text);
}

.loading-step.done i {
    color: var(--green);
    animation: none;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Summary */
.review-summary {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: linear-gradient(135deg, var(--green-soft), #E8FBF5);
    border-radius: var(--r-lg);
    margin-bottom: 16px;
}

.review-summary-icon {
    color: var(--green);
    font-size: 20px;
    flex-shrink: 0;
    margin-top: 1px;
}

.review-summary-text {
    font-size: 13px;
    color: var(--text);
    line-height: 1.55;
}

/* Milestone Preview */
.review-milestones {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.review-ms {
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    overflow: hidden;
    transition: all 0.2s var(--ease);
}

.review-ms.active {
    border-color: rgba(108, 92, 231, 0.25);
}

.review-ms-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    cursor: pointer;
    transition: background 0.15s var(--ease);
}

.review-ms-header:hover {
    background: var(--surface-hover);
}

.review-ms-indicator {
    width: 28px;
    height: 28px;
    border-radius: var(--r-full);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.review-ms-indicator.active {
    background: var(--accent);
}

.review-ms-indicator.planned {
    background: var(--bg-warm);
    border: 1px solid var(--border);
}

.review-ms-info {
    flex: 1;
    min-width: 0;
}

.review-ms-label {
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-4);
    margin-bottom: 2px;
}

.review-ms-name {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text);
}

.review-ms-meta {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.review-ms-meta span {
    font-size: 11px;
    color: var(--text-3);
    display: flex;
    align-items: center;
    gap: 3px;
}

.review-ms-chevron {
    font-size: 14px;
    color: var(--text-4);
    transition: transform 0.2s var(--ease);
    flex-shrink: 0;
}

.review-ms.collapsed .review-ms-chevron {
    transform: rotate(-90deg);
}

.review-ms-body {
    padding: 0 14px 14px 52px;
    transition: all 0.2s var(--ease);
}

.review-ms.collapsed .review-ms-body {
    display: none;
}

.review-ms-objective {
    font-size: 12.5px;
    color: var(--text-2);
    line-height: 1.5;
    margin: 0 0 12px;
    font-style: italic;
}

/* Mission Preview */
.review-mi {
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.review-mi:last-child {
    border-bottom: none;
}

.review-mi-num {
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--accent-text);
    margin-bottom: 3px;
}

.review-mi-title {
    font-size: 13px;
    font-weight: 550;
    color: var(--text);
    margin-bottom: 5px;
}

.review-mi-meta {
    display: flex;
    gap: 12px;
    margin-bottom: 8px;
}

.review-mi-meta span {
    font-size: 11px;
    color: var(--text-3);
    display: flex;
    align-items: center;
    gap: 3px;
}

.review-task {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 4px 0;
    font-size: 12px;
    color: var(--text-2);
    line-height: 1.4;
}

.review-task-type {
    font-size: 10px;
    padding: 1px 7px;
    border-radius: var(--r-full);
    background: var(--bg-warm);
    color: var(--text-3);
    flex-shrink: 0;
    text-transform: capitalize;
}

/* Refine chat area */
.review-refine {
    border-top: 1px solid var(--border);
    padding-top: 14px;
}

.review-chat-history {
    max-height: 160px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
}

.review-chat-msg {
    padding: 8px 12px;
    border-radius: var(--r-lg);
    font-size: 12.5px;
    line-height: 1.5;
    max-width: 85%;
}

.review-chat-msg.user {
    background: var(--accent-soft);
    color: var(--accent-text);
    align-self: flex-end;
}

.review-chat-msg.bot {
    background: var(--bg-warm);
    color: var(--text-2);
    align-self: flex-start;
}

.review-chat-msg.bot.loading {
    animation: loadingPulse 1.4s ease-in-out infinite;
}

.review-chat-msg.bot.error {
    background: #FEF0EE;
    color: var(--rose);
}

.review-chips {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.refine-chip {
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: var(--r-full);
    padding: 5px 14px;
    font-size: 11.5px;
    color: var(--text-2);
    cursor: pointer;
    transition: all 0.15s var(--ease);
    font-family: inherit;
}

.refine-chip:hover {
    background: var(--accent-soft);
    border-color: var(--accent);
    color: var(--accent-text);
}

.review-input-row {
    display: flex;
    gap: 8px;
}

.review-input {
    flex: 1;
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 9px 14px;
    font-size: 13px;
    font-family: inherit;
    color: var(--text);
    background: var(--surface);
    outline: none;
    transition: border-color 0.15s var(--ease);
}

.review-input:focus {
    border-color: var(--accent);
}

.review-input::placeholder {
    color: var(--text-4);
}

.review-send-btn {
    width: 38px;
    height: 38px;
    border-radius: var(--r-lg);
    background: var(--accent);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s var(--ease);
    flex-shrink: 0;
}

.review-send-btn:hover {
    background: var(--accent-hover);
}

.review-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Error State */
.review-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 40px 20px;
    text-align: center;
}

.review-error p {
    font-size: 13px;
    color: var(--text-2);
}

/* Spinning icon animation for saving state */
.ph-spin {
    animation: spin 1s linear infinite;
}

/* Review modal responsive */
@media (max-width: 600px) {
    .review-modal {
        max-width: 100%;
        margin: 8px;
        max-height: 92vh;
    }

    .review-ms-meta {
        display: none;
    }

    .review-chips {
        gap: 4px;
    }

    .refine-chip {
        font-size: 10.5px;
        padding: 4px 10px;
    }
}

/* ── Toast Notifications ── */
.gn-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    opacity: 0;
    padding: 12px 22px;
    border-radius: var(--r-lg, 12px);
    font-family: 'DM Sans', sans-serif;
    font-size: 13.5px;
    font-weight: 500;
    color: #fff;
    background: var(--green, #27AE60);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

.gn-toast.error {
    background: var(--rose, #E8574A);
}

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