/* Base layout */
body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    margin: 0;
    padding: 0;
    background: #020617;
    color: #e5e7eb;
}
.page {
    min-height: 100vh;
    padding: 2.5rem 1.5rem;
    display: flex;
    justify-content: center;
}
.shell {
    max-width: 1280px;
    width: 100%;
}
.card {
    background: #020617;
    border-radius: 1.5rem;
    padding: 2rem 1.75rem;
    border: 1px solid rgba(148,163,184,0.25);
    box-shadow: 0 24px 60px rgba(15,23,42,0.9);
}
h1 {
    margin: 0 0 .5rem;
    font-size: 1.6rem;
    letter-spacing: -.03em;
}
.subtitle {
    margin: 0 0 1.5rem;
    color: #9ca3af;
    font-size: .95rem;
}

/* Header / navigation */
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}
.header-nav {
    display: flex;
    align-items: center;
    gap: .75rem;
    font-size: .85rem;
}
.header-burger {
    display: none;
}

@media (max-width: 768px) {
    .header-inner {
        flex-wrap: wrap;
        align-items: center;
    }
    .header-burger {
        display: inline-flex !important;
    }
    .header-nav {
        display: none !important;
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        margin-top: .6rem;
    }
    .header-nav--open {
        display: flex !important;
    }
    .header-nav-user {
        margin-bottom: .25rem;
    }
    .header-link {
        width: 100%;
    }
}

/* Today (mood) page */
.question-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-top: 1rem;
}
.question {
    padding: 1rem 1rem 1.1rem;
    border-radius: 1rem;
    background: rgba(15,23,42,0.95);
    border: 1px solid rgba(148,163,184,0.3);
}
.q-label {
    font-size: .95rem;
    margin-bottom: .4rem;
}
.q-meta {
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #6b7280;
    margin-bottom: .35rem;
}
.q-meta--ok {
    color: #4ade80;
}
.q-meta--pending {
    color: #f97373;
}
.q-input input[type="text"],
.q-input input[type="number"],
.q-input select,
.q-input textarea {
    width: 100%;
    padding: .55rem .65rem;
    border-radius: .6rem;
    border: 1px solid rgba(148,163,184,0.45);
    background: #020617;
    color: #e5e7eb;
    font-size: .9rem;
}
.q-input textarea {
    min-height: 70px;
    resize: vertical;
}
.q-input input[type="range"] {
    width: 100%;
    margin-top:.35rem;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
}
.q-input input[type="range"]:focus { outline: none; }
.q-input input[type="range"]::-webkit-slider-runnable-track {
    height: .4rem;
    border-radius: 999px;
    background: linear-gradient(90deg,#22c55e,#38bdf8);
    box-shadow: 0 0 0 1px rgba(15,23,42,1);
}
.q-input input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    margin-top: -.25rem;
    width: 1rem;
    height: 1rem;
    border-radius: 999px;
    background: #e5e7eb;
    border: 2px solid #22c55e;
    box-shadow: 0 0 0 2px rgba(34,197,94,0.5);
    cursor: pointer;
}
.q-input input[type="range"]::-moz-range-track {
    height: .4rem;
    border-radius: 999px;
    background: linear-gradient(90deg,#22c55e,#38bdf8);
    box-shadow: 0 0 0 1px rgba(15,23,42,1);
}
.q-input input[type="range"]::-moz-range-thumb {
    width: 1rem;
    height: 1rem;
    border-radius: 999px;
    background: #e5e7eb;
    border: 2px solid #22c55e;
    box-shadow: 0 0 0 2px rgba(34,197,94,0.5);
    cursor: pointer;
}
.actions {
    margin-top: 2rem;
    display: flex;
    gap: .75rem;
}
.btn-primary {
    border-radius: 999px;
    padding: .75rem 1.5rem;
    border: none;
    cursor: pointer;
    font-size: .9rem;
    background: linear-gradient(135deg, #6366f1, #22c55e);
    color: #0f172a;
    font-weight: 600;
}
.info {
    margin-top: 1rem;
    font-size: .85rem;
    color: #9ca3af;
}
.tag {
    display:inline-flex;
    align-items:center;
    gap:.4rem;
    padding:.2rem .7rem;
    border-radius:999px;
    border:1px solid rgba(148,163,184,0.4);
    font-size:.75rem;
    color:#9ca3af;
}
.slider-label {
    display:flex;
    justify-content:space-between;
    align-items:center;
}
.slider-value {
    font-size:.8rem;
    color:#9ca3af;
    margin-left:.5rem;
}
.loader {
    margin-top:1rem;
    font-size:.85rem;
    color:#9ca3af;
    display:none;
    align-items:center;
    gap:.5rem;
}
.loader-dot {
    width:.5rem;
    height:.5rem;
    border-radius:999px;
    background:#22c55e;
    animation:pulse 1s infinite ease-in-out;
}
@keyframes pulse {
    0%{transform:scale(1);opacity:1;}
    50%{transform:scale(1.6);opacity:.4;}
    100%{transform:scale(1);opacity:1;}
}

/* Day plan shared styles (today plan & tomorrow) */
.day-plan {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    margin-top:.75rem;
}
.day-plan-block {
    padding:.75rem .85rem;
    border-radius:.9rem;
    background: rgba(15,23,42,0.96);
    border:1px solid rgba(30,64,175,0.4);
    box-shadow: 0 10px 30px rgba(15,23,42,0.9);
    transition: background .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.day-plan-block-time {
    font-size: .9rem;
    color: #6ee7b7;
    margin-bottom:.2rem;
    letter-spacing:.08em;
    font-weight:600;
}
.day-plan-main {
    display:flex;
    align-items:center;
    gap:.6rem;
}
.day-plan-text {
    display:flex;
    flex-direction:column;
    gap:.1rem;
}
.day-plan-block-activity {
    font-size: .95rem;
    font-weight: 600;
    display:flex;
    align-items:center;
    gap:.55rem;
    flex-wrap:wrap;
}
.day-plan-block-details {
    font-size: .82rem;
    color: #9ca3af;
    margin-top: .1rem;
    line-height:1.55;
}
.badge-cal {
    display:inline-flex;
    align-items:center;
    gap:.3rem;
    padding:.1rem .6rem;
    border-radius:999px;
    border:1px solid rgba(52,211,153,0.6);
    font-size:.7rem;
    color:#bbf7d0;
    margin-left:.4rem;
}
.badge-cat {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:1.9rem;
    min-height:1.9rem;
    border-radius:999px;
    font-size:.8rem;
    font-weight:600;
    box-shadow:0 0 0 1px rgba(15,23,42,0.9);
}
.badge-cat img {
    width:1.25rem;
    height:1.25rem;
    display:block;
    filter:invert(1) brightness(2);
}
.badge-cat--work { background:rgba(56,189,248,0.18); color:#ffffff; }
.badge-cat--deep_work { background:rgba(14,165,233,0.18); color:#ffffff; }
.badge-cat--admin { background:rgba(168,85,247,0.18); color:#ffffff; }
.badge-cat--learning { background:rgba(34,197,94,0.18); color:#ffffff; }
.badge-cat--health { background:rgba(248,113,113,0.18); color:#ffffff; }
.badge-cat--sport { background:rgba(52,211,153,0.18); color:#ffffff; }
.badge-cat--rest { background:rgba(148,163,184,0.18); color:#ffffff; }
.badge-cat--family { background:rgba(249,115,22,0.18); color:#ffffff; }
.badge-cat--social { background:rgba(250,204,21,0.18); color:#ffffff; }
.badge-cat--meal { background:rgba(245,158,11,0.18); color:#ffffff; }
.badge-cat--other { background:rgba(107,114,128,0.18); color:#ffffff; }

/* Today plan specific */
.day-plan-block--current {
    background: radial-gradient(circle at top left, rgba(22,163,74,0.22), rgba(15,23,42,0.98));
    border-color: rgba(34,197,94,0.85);
    box-shadow: 0 0 0 1px rgba(34,197,94,0.9), 0 18px 40px rgba(4,120,87,0.35);
}
.day-plan-block--current .day-plan-block-time { color:#bbf7d0; }
.day-plan-block--current .day-plan-block-activity { color:#ecfeff; }
.day-plan-block--current .badge-cat {
    box-shadow:0 0 0 1px rgba(34,197,94,0.9), 0 0 0 3px rgba(16,185,129,0.45);
}
.day-separator {
    margin-top:.85rem;
    margin-bottom:.25rem;
    font-size:.75rem;
    text-transform:uppercase;
    letter-spacing:.12em;
    color:#6b7280;
}

/* Misc */
.empty {
    margin-top:1.5rem;
    font-size:.9rem;
    color:#9ca3af;
}

/* Actions for day plans */
.actions {
    margin-top:1.5rem;
    display:flex;
    gap:.75rem;
    font-size:.8rem;
    align-items:center;
}
.btn-sm {
    border-radius:999px;
    border:none;
    cursor:pointer;
    padding:.45rem 1rem;
    font-size:.8rem;
    display:inline-flex;
    align-items:center;
    gap:.25rem;
}
.btn-accept {
    background:linear-gradient(135deg,#22c55e,#4ade80);
    color:#022c22;
}
.btn-reject {
    background:transparent;
    color:#fca5a5;
    border:1px solid rgba(248,113,113,0.6);
}

.loader--inline {
    margin-top:.5rem;
    font-size:.8rem;
    color:#9ca3af;
    display:none;
    align-items:center;
    gap:.5rem;
}

/* Toolbar (compact/detailed toggle) */
.toolbar-display {
    display:flex;
    justify-content:flex-end;
    align-items:center;
    gap:.5rem;
    font-size:.8rem;
    color:#9ca3af;
    margin-bottom:.5rem;
}
.toolbar-display button {
    border-radius:999px;
    border:1px solid rgba(148,163,184,0.5);
    background:transparent;
    color:#e5e7eb;
    padding:.25rem .9rem;
    cursor:pointer;
    font-size:.78rem;
}

/* Auth (login & register) */
.page-auth {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}
.card-auth {
    max-width: 420px;
    width: 100%;
    background: #020617;
    border-radius: 1.5rem;
    padding: 2rem 1.75rem;
    border: 1px solid rgba(148,163,184,0.25);
    box-shadow: 0 24px 60px rgba(15,23,42,0.9);
}
.auth-label { display:block;font-size:.85rem;margin-bottom:.25rem; }
.auth-input {
    width: 100%;
    padding: .6rem .7rem;
    border-radius: .6rem;
    border: 1px solid rgba(148,163,184,0.45);
    background: #020617;
    color: #e5e7eb;
    font-size: .9rem;
    margin-bottom: .75rem;
}
.auth-btn {
    width: 100%;
    border-radius: 999px;
    padding: .7rem 1.2rem;
    border: none;
    cursor: pointer;
    font-size: .9rem;
    background: linear-gradient(135deg, #6366f1, #22c55e);
    color: #0f172a;
    font-weight: 600;
    margin-top: .5rem;
}
.auth-error { color: #fca5a5; font-size: .8rem; margin-bottom: .75rem; }
.auth-meta { margin-top: 1rem; font-size: .85rem; color: #9ca3af; }
.auth-meta a { color: #a5b4fc; text-decoration: none; }
.auth-meta a:hover { text-decoration: underline; }

/* Home dashboard */
.hero-card {
    background: radial-gradient(circle at top left, rgba(59,130,246,0.2), transparent), #020617;
    border-radius: 1.5rem;
    padding: 2rem 2rem 1.75rem;
    box-shadow: 0 24px 60px rgba(15,23,42,0.9);
    border: 1px solid rgba(148,163,184,0.25);
}
.badge-hero {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .25rem .75rem;
    border-radius: 999px;
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    background: rgba(15,23,42,0.9);
    border: 1px solid rgba(148,163,184,0.4);
    color: #e5e7eb;
}
.badge-dot {
    width: .5rem;
    height: .5rem;
    border-radius: 999px;
    background: #22c55e;
    box-shadow: 0 0 0 .25rem rgba(34,197,94,.35);
}
.dashboard-grid {
    margin-top: 1.75rem;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
}
.dashboard-mood-chart {
    margin-top: 1.75rem;
}
.tile {
    padding: 1rem 1rem 1.1rem;
    border-radius: 1rem;
    background: rgba(15,23,42,0.98);
    border: 1px solid rgba(148,163,184,0.35);
    display:flex;
    flex-direction:column;
    gap:.4rem;
}
.tile-title { font-size:.95rem;font-weight:600;display:flex;justify-content:space-between;align-items:center; }
.tile-status { font-size:.75rem;text-transform:uppercase;letter-spacing:.08em;color:#9ca3af; }
.tile-body { font-size:.85rem;color:#9ca3af; }
.tile-link { margin-top:auto;font-size:.8rem;color:#a5b4fc;text-decoration:none; }
.tile-link:hover { text-decoration:underline; }
.tile-status--ok { color:#4ade80; text-shadow:0 0 8px rgba(74,222,128,0.8); }
.tile-status--pending { color:#f97373; text-shadow:0 0 8px rgba(248,113,113,0.8); }
.slot-current { font-size:.85rem;color:#e5e7eb; }
.slot-time { font-size:.8rem;color:#9ca3af;margin-bottom:.1rem; }
.slot-title { font-size:.9rem;font-weight:600; }
.slot-details { font-size:.8rem;color:#9ca3af;margin-top:.1rem; }
.btn { border-radius: 999px; padding: .65rem 1.4rem; border: none; cursor: pointer; font-size: .9rem; display: inline-flex; align-items: center; gap: .5rem; text-decoration: none; }
.btn-primary-hero { background: linear-gradient(135deg, #6366f1, #22c55e); color: #0f172a; font-weight: 600; }
.btn-ghost { background: transparent; border: 1px solid rgba(148,163,184,0.35); color: #e5e7eb; }
.hint { margin-top: 1rem; font-size: .75rem; color: #6b7280; }

/* Home landing visuals */
.hero-illustration {
    width: 100%;
    border-radius: 1rem;
    border: 1px solid rgba(148,163,184,0.5);
    box-shadow: 0 24px 60px rgba(15,23,42,0.95);
    display:block;
}
.step-illustration,
.persona-illustration {
    width: 100%;
    border-radius: .9rem;
    border: 1px solid rgba(30,64,175,0.5);
    box-shadow: 0 18px 40px rgba(15,23,42,0.9);
    margin-bottom:.6rem;
    display:block;
}
.tile-icon-badge {
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    background: radial-gradient(circle at 30% 0, rgba(59,130,246,0.9), rgba(15,23,42,1));
    display:inline-flex;
    align-items:center;
    justify-content:center;
    box-shadow: 0 0 0 1px rgba(15,23,42,1), 0 0 24px rgba(59,130,246,0.45);
    margin-bottom:.6rem;
}
.tile-icon-badge img {
    width:1.1rem;
    height:1.1rem;
    display:block;
    filter:invert(1) brightness(2);
}
.hero-plan-badge {
    display:inline-flex;
    align-items:center;
    gap:.35rem;
    padding:.18rem .65rem;
    border-radius:999px;
    border:1px solid rgba(148,163,184,0.5);
    font-size:.7rem;
    text-transform:uppercase;
    letter-spacing:.08em;
    color:#9ca3af;
    margin-bottom:.6rem;
}
.hero-plan-badge-dot {
    width:.4rem;
    height:.4rem;
    border-radius:999px;
    background:#22c55e;
}

@media (max-width: 768px) {
    .page {
        padding: 1.25rem 1rem;
    }
    .hero-card {
        padding: 1.5rem 1.25rem 1.35rem;
    }
    .dashboard-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}
.steps-line {
    position:relative;
    margin-bottom:1.25rem;
}
.steps-line::before {
    content:"";
    position:absolute;
    left:0;
    right:0;
    top:50%;
    height:1px;
    background:linear-gradient(90deg,rgba(55,65,81,0),rgba(55,65,81,0.9),rgba(55,65,81,0));
}
.steps-line-dots {
    position:relative;
    display:flex;
    justify-content:space-between;
}
.steps-line-dot {
    width:.55rem;
    height:.55rem;
    border-radius:999px;
    background:#22c55e;
    box-shadow:0 0 0 .18rem rgba(34,197,94,0.4);
}

/* Onboarding */
.link-back { color: #a5b4fc; text-decoration: none; }
.link-back:hover { text-decoration: underline; }
.back-link { font-size: .85rem; display: inline-flex; align-items: center; gap: .4rem; color: #9ca3af; margin-bottom: 1.5rem; }
.onboarding-question-list { display: flex; flex-direction: column; gap: 1.25rem; margin-top: 1rem; }
.onboarding-question { padding: 1rem 1rem 1.1rem; border-radius: 1rem; background: rgba(15,23,42,0.95); border: 1px solid rgba(148,163,184,0.3); }
.onboarding-q-label { font-size: .95rem; margin-bottom: .4rem; }
.onboarding-q-meta { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: #6b7280; margin-bottom: .35rem; }
.onboarding-q-input { margin-top: .1rem; }
.onboarding-q-input input[type="text"],
.onboarding-q-input textarea,
.onboarding-q-input select,
.onboarding-q-input input[type="number"],
.onboarding-q-input input[type="range"] {
    width: 100%;
    padding: .55rem .65rem;
    border-radius: .6rem;
    border: 1px solid rgba(148,163,184,0.45);
    background: #020617;
    color: #e5e7eb;
    font-size: .9rem;
}
.onboarding-q-input textarea { min-height: 80px; resize: vertical; }

/* Reuse neon slider style for onboarding scales */
.onboarding-q-input input[type="range"] {
    margin-top:.35rem;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
}
.onboarding-q-input input[type="range"]:focus { outline: none; }
.onboarding-q-input input[type="range"]::-webkit-slider-runnable-track {
    height: .4rem;
    border-radius: 999px;
    background: linear-gradient(90deg,#22c55e,#38bdf8);
    box-shadow: 0 0 0 1px rgba(15,23,42,1);
}
.onboarding-q-input input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    margin-top: -.25rem;
    width: 1rem;
    height: 1rem;
    border-radius: 999px;
    background: #e5e7eb;
    border: 2px solid #22c55e;
    box-shadow: 0 0 0 2px rgba(34,197,94,0.5);
    cursor: pointer;
}
.onboarding-q-input input[type="range"]::-moz-range-track {
    height: .4rem;
    border-radius: 999px;
    background: linear-gradient(90deg,#22c55e,#38bdf8);
    box-shadow: 0 0 0 1px rgba(15,23,42,1);
}
.onboarding-q-input input[type="range"]::-moz-range-thumb {
    width: 1rem;
    height: 1rem;
    border-radius: 999px;
    background: #e5e7eb;
    border: 2px solid #22c55e;
    box-shadow: 0 0 0 2px rgba(34,197,94,0.5);
    cursor: pointer;
}

/* Settings & Google events */
.settings-shell { max-width: 960px; width: 100%; }
.section-title { font-size:.9rem;text-transform:uppercase;letter-spacing:.08em;color:#9ca3af;margin-top:1.5rem;margin-bottom:.5rem; }
.settings-row { display:flex;justify-content:space-between;align-items:center;gap:1rem;padding:1rem 0;border-top:1px solid rgba(31,41,55,0.9); }
.settings-row:first-of-type { border-top:none; }
.btn-settings { border-radius:999px;border:none;cursor:pointer;padding:.45rem 1.1rem;font-size:.85rem;display:inline-flex;align-items:center;gap:.25rem; }
.btn-settings-primary { background:linear-gradient(135deg,#6366f1,#22c55e);color:#0f172a;font-weight:600; }
.badge-settings { display:inline-flex;align-items:center;gap:.3rem;padding:.15rem .7rem;border-radius:999px;border:1px solid rgba(148,163,184,0.4);font-size:.75rem;color:#9ca3af; }

.table-events { width:100%; border-collapse: collapse; font-size:.85rem; }
.table-events th,
.table-events td { padding:.5rem .6rem; border-bottom:1px solid rgba(31,41,55,0.9); vertical-align:top; }
.table-events th { text-align:left; color:#9ca3af; font-weight:500; }
.table-events td strong { color:#e5e7eb; }

/* Recipes list */
.recipes-list {
    margin-top: 1rem;
}
.recipes-item {
    padding: .9rem 1rem;
    border-radius: 1rem;
    background: rgba(15,23,42,0.96);
    border: 1px solid rgba(51,65,85,0.9);
    box-shadow: 0 12px 30px rgba(15,23,42,0.9);
    margin-bottom: .9rem;
}
.recipes-item-main {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: .75rem;
}
.recipes-item-title {
    font-weight: 600;
    font-size: .98rem;
}
.recipes-item-meta {
    font-size: .8rem;
    color: #9ca3af;
    margin-top: .15rem;
}
.recipes-item-meta strong {
    color: #bbf7d0;
}
.recipes-tag {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .08rem .6rem;
    border-radius: 999px;
    border: 1px solid rgba(52,211,153,0.5);
    font-size: .7rem;
    color: #a7f3d0;
    background: radial-gradient(circle at top left, rgba(16,185,129,0.2), rgba(15,23,42,1));
}
.recipes-tag-dot {
    width: .35rem;
    height: .35rem;
    border-radius: 999px;
    background: #22c55e;
}
.recipes-description {
    margin-top: .25rem;
}
.recipes-used {
    margin-top: .35rem;
    font-size: .8rem;
}
.recipes-used-title {
    font-weight: 500;
    margin-bottom: .15rem;
}
.recipes-used-list {
    margin: 0;
    padding-left: 1.1rem;
}

.recipes-rating {
    margin-top: .5rem;
    font-size: .8rem;
    display: flex;
    flex-direction: column;
    gap: .35rem;
}
.recipes-stars {
    display: inline-flex;
    gap: .1rem;
}
.recipes-star {
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 1rem;
    color: #4b5563;
    padding: 0;
}
.recipes-star--active {
    color: #fbbf24;
    text-shadow: 0 0 10px rgba(251,191,36,0.8);
}
.recipes-notes {
    width: 100%;
    min-height: 60px;
    border-radius: .6rem;
    border: 1px solid rgba(148,163,184,0.45);
    background: #020617;
    color: #e5e7eb;
    font-size: .8rem;
    padding: .45rem .55rem;
    resize: vertical;
}
