﻿/* =====================================================================
   Growora Life – design system
   ===================================================================== */
/* Poppins' web subset draws the rupee sign oddly; take it from Segoe UI instead. */
@font-face { font-family: 'RupeeFix'; src: local('Segoe UI'), local('Arial'); unicode-range: U+20B9; }
:root {
    --bg: #f5f1ff;
    --bg2: #fbf9ff;
    --card: #ffffff;
    --card-2: #faf8ff;
    --line: #ece7fb;
    --line-2: #e3dcf8;
    --text: #1d1a33;
    --text-2: #4a4566;
    --muted: #8a85a3;
    --primary: #6d4aff;
    --primary-2: #8b6dff;
    --primary-soft: #efeaff;
    --primary-grad: linear-gradient(135deg, #7b5cff 0%, #5d3df2 100%);
    --green: #22c55e;
    --red: #ef4444;
    --orange: #f97316;
    --amber: #f59e0b;
    --blue: #3b82f6;
    --pink: #ec4899;
    --shadow: 0 6px 24px rgba(72, 52, 160, .07);
    --shadow-lg: 0 18px 50px rgba(52, 32, 140, .18);
    --radius: 16px;
    --radius-sm: 10px;
    --font: 'RupeeFix', 'Poppins', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --hand: 'Caveat', 'Segoe Print', cursive;
}

[data-theme="dark"] {
    --bg: #12101f;
    --bg2: #171428;
    --card: #1e1a33;
    --card-2: #241f3d;
    --line: #2e2850;
    --line-2: #383062;
    --text: #f1eeff;
    --text-2: #c9c3e6;
    --muted: #8f88b3;
    --primary-soft: #2c2454;
    --shadow: 0 6px 24px rgba(0, 0, 0, .35);
    --shadow-lg: 0 18px 50px rgba(0, 0, 0, .5);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
    font-family: var(--font);
    font-size: 13px;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    overflow: hidden;
}
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; }
p { margin: 0; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #d9d1f5; border-radius: 8px; }
[data-theme="dark"] ::-webkit-scrollbar-thumb { background: #3a3366; }
.ico { flex: none; }

.boot { height: 100vh; display: grid; place-items: center; align-content: center; gap: 12px; color: #6d4aff; font: 600 18px var(--font); background: #f5f1ff; }
.boot-logo { width: 48px; height: 48px; border-radius: 14px; background: linear-gradient(135deg,#9b7bff,#5d3df2); animation: pulse 1.2s infinite ease-in-out; }
@keyframes pulse { 50% { transform: scale(.85); opacity: .6; } }

#blazor-error-ui { display: none; position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); background: #fff1f2; color: #b91c1c; padding: 10px 16px; border-radius: 10px; box-shadow: var(--shadow-lg); z-index: 9999; }
#blazor-error-ui .reload { margin-left: 10px; text-decoration: underline; }
#blazor-error-ui .dismiss { margin-left: 10px; cursor: pointer; }

/* ------------------------------ shell ------------------------------ */
.shell {
    height: 100vh;
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 14px;
    padding: 12px 14px 12px 12px;
    background:
        radial-gradient(900px 500px at 105% -10%, rgba(196, 167, 255, .35), transparent 60%),
        radial-gradient(700px 500px at -10% 110%, rgba(168, 230, 207, .30), transparent 60%),
        radial-gradient(600px 400px at 60% 120%, rgba(255, 200, 220, .25), transparent 60%),
        var(--bg);
    color: var(--text);
}
[data-theme="dark"].shell {
    background:
        radial-gradient(900px 500px at 105% -10%, rgba(109, 74, 255, .18), transparent 60%),
        radial-gradient(700px 500px at -10% 110%, rgba(34, 197, 94, .08), transparent 60%),
        var(--bg);
}
.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.page { flex: 1; overflow: auto; padding: 2px 2px 8px; min-height: 0; }

/* ------------------------------ sidebar ------------------------------ */
.sidebar {
    background: var(--card);
    border-radius: 20px;
    box-shadow: var(--shadow);
    display: flex; flex-direction: column;
    padding: 16px 12px 12px;
    min-height: 0;
}
.brand-row { display: flex; align-items: center; gap: 10px; padding: 0 8px 14px; }
.brand-row .logo { width: 44px; height: 44px; flex: none; }
.brand-row .name { font-size: 21px; font-weight: 700; letter-spacing: -.3px; line-height: 1.1; color: var(--text); }
.brand-row .tag { font-size: 9px; color: var(--muted); margin-top: 3px; white-space: nowrap; }
.side-scroll { flex: 1; overflow: auto; margin: 0 -4px; padding: 0 4px; }
.nav-item {
    display: flex; align-items: center; gap: 12px;
    padding: 7px 12px; margin: 1px 0; white-space: nowrap;
    border-radius: 10px; color: var(--text-2); font-size: 13px; font-weight: 500;
    transition: background .15s, color .15s; width: 100%; text-align: left;
}
.nav-item .ico { color: var(--text-2); }
.nav-item:hover { background: var(--primary-soft); color: var(--primary); }
.nav-item:hover .ico { color: var(--primary); }
.nav-item.active { background: var(--primary-grad); color: #fff; box-shadow: 0 8px 18px rgba(109, 74, 255, .3); }
.nav-item.active .ico { color: #fff; }
.side-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 12px 6px; font-size: 13.5px; font-weight: 600; color: var(--text); }
.side-head button { color: var(--muted); border-radius: 6px; padding: 2px; }
.side-head button:hover { color: var(--primary); background: var(--primary-soft); }
.ws-item { display: flex; align-items: center; gap: 10px; padding: 5px 12px; border-radius: 10px; font-size: 13px; color: var(--text-2); width: 100%; text-align: left; }
.ws-item:hover { background: var(--primary-soft); }
.ws-item.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; box-shadow: inset 0 0 0 1px #ddd3ff; }
.ws-avatar { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 11px; font-weight: 600; flex: none; }
.ws-item .count { margin-left: auto; font-size: 11px; color: var(--muted); }
.promo {
    position: relative; margin: 12px 2px 8px; padding: 16px 14px; border-radius: 16px; overflow: hidden;
    background: linear-gradient(135deg, #efe8ff 0%, #f6f1ff 60%, #e9f8ef 100%);
    min-height: 118px;
}
[data-theme="dark"] .promo { background: linear-gradient(135deg, #2a2350, #1f2b2a); }
.promo p { font-size: 15px; font-weight: 500; line-height: 1.35; color: #3b2b7a; max-width: 120px; position: relative; z-index: 1; }
[data-theme="dark"] .promo p { color: #ddd5ff; }
.promo svg { position: absolute; right: -6px; bottom: -4px; }
.side-foot { display: flex; justify-content: space-between; padding: 8px 6px 0; border-top: 1px solid var(--line); }
.side-foot a { display: flex; align-items: center; gap: 6px; color: var(--text-2); font-size: 11.5px; padding: 6px 4px; border-radius: 8px; white-space: nowrap; }
.side-foot a:hover { color: var(--primary); background: var(--primary-soft); }

/* ------------------------------ top bar ------------------------------ */
.topbar { display: flex; align-items: center; gap: 12px; padding: 0 2px 12px; }
.search {
    flex: 1; max-width: 532px; position: relative;
    display: flex; align-items: center; gap: 10px;
    background: var(--card); border-radius: 12px; padding: 0 8px 0 14px; height: 40px;
    box-shadow: var(--shadow); border: 1px solid transparent;
}
.search:focus-within { border-color: #cfc2ff; }
.search input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 13px; }
.search input::placeholder { color: var(--muted); }
.kbd { font-size: 11px; color: var(--muted); border: 1px solid var(--line-2); border-radius: 6px; padding: 2px 7px; background: var(--card-2); }
.search-pop { position: absolute; top: 46px; left: 0; right: 0; background: var(--card); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 60; max-height: 420px; overflow: auto; }
.search-hit { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; width: 100%; text-align: left; }
.search-hit:hover, .search-hit.sel { background: var(--primary-soft); }
.search-hit .t { font-weight: 500; }
.search-hit .s { font-size: 11px; color: var(--muted); }
.search-hit .k { margin-left: auto; font-size: 11px; color: var(--muted); }
.top-spacer { flex: 1; }
.btn-primary {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    background: var(--primary-grad); color: #fff; font-weight: 500; font-size: 14px;
    height: 40px; padding: 0 20px; border-radius: 11px; box-shadow: 0 8px 18px rgba(109, 74, 255, .28);
    transition: transform .12s, box-shadow .12s;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(109, 74, 255, .36); }
.btn-primary:disabled { opacity: .55; transform: none; cursor: default; }
.btn-primary.sm { height: 30px; padding: 0 12px; font-size: 12.5px; border-radius: 9px; gap: 6px; }
.btn-soft {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--primary-soft); color: var(--text); font-weight: 500; font-size: 14px;
    height: 40px; padding: 0 16px; border-radius: 11px;
}
.btn-soft .ico { color: var(--primary); }
.btn-soft:hover { background: #e4dcff; }
[data-theme="dark"] .btn-soft:hover { background: #352c66; }
.btn-soft.sm { height: 30px; padding: 0 12px; font-size: 12.5px; border-radius: 9px; }
.btn-ghost { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 9px; color: var(--text-2); border: 1px solid var(--line-2); background: var(--card); font-size: 12.5px; }
.btn-ghost:hover { border-color: #cfc2ff; color: var(--primary); }
.btn-danger { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 9px; color: #fff; background: #ef4444; font-size: 12.5px; }
.icon-btn { width: 40px; height: 40px; display: inline-grid; vertical-align: middle; place-items: center; border-radius: 12px; color: var(--text-2); position: relative; }
.icon-btn:hover { background: var(--card); color: var(--primary); }
.icon-btn.sm { width: 28px; height: 28px; border-radius: 8px; }
.icon-btn .badge { position: absolute; top: 4px; right: 5px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: #ef4444; color: #fff; font-size: 10px; font-weight: 600; display: grid; place-items: center; border: 2px solid var(--bg); }
.sun-btn { color: #f5b301; }
.user-btn { display: flex; align-items: center; gap: 10px; padding: 3px 8px 3px 3px; border-radius: 24px; font-weight: 600; font-size: 14px; }
.user-btn:hover { background: var(--card); }
.avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; display: grid; place-items: center; color: #fff; font-weight: 600; background: linear-gradient(135deg, #f59e9e, #a77bff); box-shadow: 0 0 0 2px #fff; }
.avatar.sm { width: 28px; height: 28px; font-size: 11px; }
.avatar.lg { width: 72px; height: 72px; font-size: 26px; }
.dropdown { position: absolute; top: 48px; right: 0; background: var(--card); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 60; min-width: 230px; }
.dropdown .dd-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; width: 100%; text-align: left; font-size: 13px; }
.dropdown .dd-item:hover { background: var(--primary-soft); color: var(--primary); }
.dropdown .dd-head { padding: 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.dropdown .dd-head .n { font-weight: 600; }
.dropdown .dd-head .r { font-size: 11px; color: var(--muted); }
.rel { position: relative; }
.backdrop-click { position: fixed; inset: 0; z-index: 50; }

/* ------------------------------ cards ------------------------------ */
.card {
    background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
    padding: 14px 16px; min-width: 0; border: 1px solid rgba(124, 92, 255, .05);
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.card-head h3 { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.card-head .link { color: var(--primary); font-size: 12px; font-weight: 500; }
.card-head .link:hover { text-decoration: underline; }
.card-head .tools { display: flex; gap: 2px; color: var(--text-2); }
.muted { color: var(--muted); }
.small { font-size: 11.5px; }
.empty { color: var(--muted); font-size: 12.5px; text-align: center; padding: 18px 8px; }
.empty-page { margin: 40px auto; max-width: 520px; text-align: center; padding: 40px; }

.tabs { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.tab {
    height: 26px; padding: 0 14px; border-radius: 8px; font-size: 12px; color: var(--text-2);
    border: 1px solid var(--line-2); background: var(--card); white-space: nowrap;
}
.tab:hover { border-color: #cbbcff; color: var(--primary); }
.tab.active { background: var(--primary-grad); color: #fff; border-color: transparent; box-shadow: 0 4px 10px rgba(109, 74, 255, .25); }
.tab.flat.active { background: var(--primary-soft); color: var(--primary); box-shadow: none; }

.chip { display: inline-flex; align-items: center; height: 20px; padding: 0 9px; border-radius: 6px; font-size: 11px; font-weight: 500; white-space: nowrap; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }

.check {
    width: 18px; height: 18px; border-radius: 5px; border: 1.8px solid #b9b2d3; display: grid; place-items: center;
    flex: none; color: #fff; transition: all .12s; background: var(--card);
}
.check:hover { border-color: var(--primary); }
.check.on { background: #22c55e; border-color: #22c55e; }
.check.on.purple { background: var(--primary); border-color: var(--primary); }
.check.red { border-color: #ef4444; }
.check.round { border-radius: 50%; }

.bar { height: 6px; background: #eeeaf9; border-radius: 6px; overflow: hidden; }
[data-theme="dark"] .bar { background: #2d2752; }
.bar > i { display: block; height: 100%; border-radius: 6px; background: var(--primary-grad); transition: width .4s; }

.row { display: flex; align-items: center; gap: 10px; }
.grow { flex: 1; min-width: 0; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.right { margin-left: auto; }
.gap4 { gap: 4px; } .gap6 { gap: 6px; } .gap16 { gap: 16px; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; } .mb8 { margin-bottom: 8px; } .mb12 { margin-bottom: 12px; }

/* ------------------------------ home grid ------------------------------ */
.home { display: grid; grid-template-columns: minmax(0, 1fr) 268px; gap: 14px; }
.home-left { display: grid; gap: 14px; min-width: 0; align-content: start; }
.home-right { display: grid; gap: 14px; align-content: start; }
.home-row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.home-row3b { display: grid; grid-template-columns: 1fr 1.02fr 1.05fr; gap: 14px; }

/* hero */
.hero {
    position: relative; border-radius: 20px; overflow: hidden; min-height: 408px;
    background: #f7c9a8; box-shadow: var(--shadow);
}
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-text { position: absolute; left: 32%; top: 50px; right: 300px; z-index: 2; text-shadow: 0 1px 12px rgba(255, 245, 235, .55); }
.hero-text h1 { font-size: clamp(18px, 1.6vw, 26px); font-weight: 700; color: #1d1442; letter-spacing: -.4px; display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.hero-text .sub { margin-top: 10px; font-size: 14.5px; line-height: 1.4; color: #2b2147; }
.hero-quote { margin-top: 20px; font-family: var(--hand); font-size: 23px; line-height: 1.05; color: #2c1f4b; text-align: center; max-width: 340px; padding-left: 40px; }
.hero-side { position: absolute; top: 14px; right: 14px; bottom: 14px; width: 270px; display: grid; grid-template-rows: auto auto; gap: 12px; z-index: 3; align-content: start; }
.glass { background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px); border-radius: 16px; padding: 14px 16px; box-shadow: 0 10px 30px rgba(60, 30, 120, .12); color: #1d1a33; }
[data-theme="dark"] .glass { background: rgba(30, 26, 51, .9); color: var(--text); }
.glass h3 { font-size: 15.5px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.poem { font-size: 12px; line-height: 1.5; color: #3b3555; margin: 8px 0 8px 32px; white-space: pre-line; }
[data-theme="dark"] .poem { color: var(--text-2); }
.glass .foot { display: flex; align-items: center; justify-content: space-between; font-size: 11.5px; color: var(--muted); }
.mot-text { font-size: 13px; line-height: 1.45; color: #3b3555; margin: 10px 0 12px 32px; }
[data-theme="dark"] .mot-text { color: var(--text-2); }

/* stats strip */
.stats { display: grid; grid-template-columns: repeat(7, 1fr); background: var(--card); border-radius: 16px; box-shadow: var(--shadow); padding: 12px 6px; }
.stat { display: flex; align-items: center; gap: 12px; padding: 2px 10px; border-right: 1px solid var(--line); min-width: 0; cursor: pointer; border-radius: 10px; }
.stat:last-child { border-right: 0; }
.stat:hover { background: var(--card-2); }
.stat-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.stat .lbl { font-size: 11.5px; color: var(--text-2); }
.stat .val { font-size: 16px; font-weight: 600; line-height: 1.3; white-space: nowrap; }
.stat .sub { font-size: 11px; color: var(--muted); }
.stat .mini { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.stat .mini .bar { width: 52px; height: 4px; }
.stat .mini span { font-size: 10px; color: var(--muted); }

/* list rows */
.list-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 12.5px; border-radius: 8px; }
.list-row + .list-row { border-top: 1px solid transparent; }
.list-row .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.list-row .t.done { text-decoration: line-through; color: var(--muted); }
.list-row .time { font-size: 10.5px; color: var(--text-2); width: 54px; text-align: right; flex: none; white-space: nowrap; }
.list-row .dur { font-size: 11px; color: var(--text-2); width: 50px; text-align: right; flex: none; }
.list-row .go { color: #b9b3cf; }
.list-row:hover .go { color: var(--primary); }
.scroll-list { max-height: 190px; overflow: auto; margin-right: -8px; padding-right: 6px; }

/* focus */
.focus-box {
    position: relative; border-radius: 14px; overflow: hidden; height: 158px;
    background: linear-gradient(180deg, #2b2d6e 0%, #3a3f8f 55%, #1d4d4d 100%);
}
.focus-box .scene { position: absolute; inset: 0; width: 100%; height: 100%; }
.ring-wrap { position: absolute; left: 50%; top: 8px; transform: translateX(-50%); width: 124px; height: 124px; }
.ring-wrap > svg { position: absolute; inset: 0; }
.ring-center { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; color: #fff; }
.ring-center .tm { font-size: 24px; font-weight: 600; letter-spacing: .5px; }
.ring-center .lb { font-size: 11px; opacity: .9; margin-bottom: 4px; }
.play-btn { width: 30px; height: 30px; border-radius: 50%; background: #fff; color: var(--primary); display: grid; place-items: center; box-shadow: 0 4px 12px rgba(0, 0, 0, .25); }
.play-btn .ico { margin-left: 2px; }
.focus-caption { position: absolute; left: 10px; right: 10px; bottom: 8px; display: flex; align-items: center; gap: 8px; color: #fff; font-size: 12.5px; font-weight: 500; }
.focus-caption .ic { width: 22px; height: 22px; border-radius: 6px; background: rgba(255, 255, 255, .2); display: grid; place-items: center; }
.focus-caption .leaf { margin-left: auto; width: 24px; height: 24px; border-radius: 50%; background: #22c55e; display: grid; place-items: center; }
.select-row { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.select-row select { flex: 1; }

/* memory of the day */
.mem-hero { position: relative; border-radius: 12px; overflow: hidden; height: 162px; cursor: pointer; }
.mem-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mem-hero .cap { position: absolute; left: 10px; bottom: 10px; color: #fff; text-shadow: 0 2px 8px rgba(0, 0, 0, .5); }
.mem-hero .cap b { font-size: 15px; font-weight: 500; display: block; }
.mem-hero .cap span { font-size: 13px; }
.mem-hero .pin { position: absolute; right: 8px; bottom: 8px; width: 24px; height: 24px; border-radius: 50%; background: rgba(255, 255, 255, .85); display: grid; place-items: center; color: var(--primary); }
.thumbs { display: flex; align-items: center; gap: 6px; margin-top: 10px; }
.thumbs .t { flex: 1; height: 34px; border-radius: 6px; overflow: hidden; cursor: pointer; border: 2px solid transparent; }
.thumbs .t.sel { border-color: var(--primary); }
.thumbs .t img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* photo grid */
.photo-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.photo { position: relative; border-radius: 8px; overflow: hidden; aspect-ratio: 1.35; cursor: pointer; background: var(--card-2); }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.photo:hover img { transform: scale(1.06); }
.photo .fav { position: absolute; top: 4px; right: 4px; color: #fff; filter: drop-shadow(0 1px 2px rgba(0,0,0,.5)); }
.upload-tile { border: 1.5px dashed #cbbcff; border-radius: 8px; display: grid; place-items: center; align-content: center; gap: 2px; color: var(--primary); font-size: 12px; aspect-ratio: 1.35; background: var(--card); }
.upload-tile:hover { background: var(--primary-soft); }

/* goals */
.goal-row { display: grid; grid-template-columns: 18px 1fr 70px 34px; align-items: center; gap: 10px; padding: 5.5px 0; font-size: 12.5px; }
.goal-row .pct { font-size: 11px; color: var(--text-2); text-align: right; }
.goal-ic { width: 18px; height: 18px; border-radius: 5px; display: grid; place-items: center; color: #fff; }

/* notes */
.note-row { display: flex; align-items: center; gap: 10px; padding: 5px 0; }
.note-ic { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; flex: none; }
.note-row .t { font-size: 12px; font-weight: 500; }
.note-row .s { font-size: 10.5px; color: var(--muted); }

/* passwords */
.pw-row { display: flex; align-items: center; gap: 12px; padding: 7px 0; }
.pw-row .t { font-size: 12.5px; font-weight: 500; }
.pw-row .s { font-size: 11px; color: var(--muted); }
.pw-row .dots { letter-spacing: 1px; font-size: 12px; color: var(--text); margin-left: auto; }
.brand { display: inline-grid; place-items: center; flex: none; }
.brand-letter { width: 100%; height: 100%; border-radius: 8px; color: #fff; font-weight: 600; display: grid; place-items: center; font-size: 13px; }

/* calendar widget */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-head .d { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 12.5px; }
.today-pill { font-size: 11px; color: var(--primary); background: var(--primary-soft); padding: 3px 9px; border-radius: 7px; }
.cal-nav { display: flex; justify-content: space-between; align-items: center; margin: 4px 0 8px; font-size: 12.5px; font-weight: 600; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); row-gap: 4px; text-align: center; }
.cal-grid .dow { font-size: 10px; color: var(--muted); padding-bottom: 6px; }
.cal-grid .day { font-size: 11.5px; height: 24px; width: 24px; margin: 0 auto; display: grid; place-items: center; border-radius: 50%; position: relative; color: var(--text); }
.cal-grid .day.out { color: #c2bdd6; }
.cal-grid .day:hover { background: var(--primary-soft); }
.cal-grid .day.today { background: var(--primary-grad); color: #fff; font-weight: 600; box-shadow: 0 4px 10px rgba(109,74,255,.35); }
.cal-grid .day.has::after { content: ''; position: absolute; bottom: 1px; width: 4px; height: 4px; border-radius: 50%; background: var(--primary); }
.cal-grid .day.today.has::after { background: #fff; }

/* quick add */
.qa-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px 6px; }
.qa { display: grid; justify-items: center; gap: 6px; font-size: 11.5px; color: var(--text-2); }
.qa .box { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; transition: transform .12s; }
.qa:hover .box { transform: translateY(-2px); }

/* ------------------------------ pages ------------------------------ */
.page-head { display: flex; align-items: center; gap: 14px; margin: 2px 0 14px; }
.page-head .ph-ic { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; color: #fff; box-shadow: 0 8px 18px rgba(0, 0, 0, .12); }
.page-head h1 { font-size: 21px; font-weight: 700; }
.page-head .sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar .tabs { margin: 0; }
.inp {
    height: 36px; border: 1px solid var(--line-2); border-radius: 10px; padding: 0 12px; background: var(--card);
    outline: none; transition: border-color .15s, box-shadow .15s; width: 100%; color: var(--text);
}
.inp:focus { border-color: #b8a6ff; box-shadow: 0 0 0 3px rgba(109, 74, 255, .12); }
textarea.inp { height: auto; padding: 10px 12px; resize: vertical; line-height: 1.5; }
select.inp { padding-right: 8px; }
.inp.sm { height: 30px; font-size: 12.5px; border-radius: 8px; }
.inp-icon { position: relative; }
.inp-icon .ico { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.inp-icon .inp { padding-left: 34px; }
.field { display: grid; gap: 5px; }
.field > label { font-size: 11.5px; color: var(--text-2); font-weight: 500; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.form-grid .full { grid-column: 1 / -1; }
.switch { position: relative; width: 36px; height: 20px; border-radius: 12px; background: #d6d0ea; transition: background .2s; flex: none; }
.switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch.on { background: var(--primary); }
.switch.on::after { left: 18px; }

.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.entry-card { cursor: pointer; transition: transform .12s, box-shadow .12s; display: flex; flex-direction: column; gap: 8px; }
.entry-card:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(72, 52, 160, .12); }
.entry-card .title { font-weight: 600; font-size: 14px; }
.entry-card .body { font-size: 12px; color: var(--text-2); white-space: pre-line; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; }
.entry-card .meta { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--muted); flex-wrap: wrap; }

table.grid { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12.5px; }
table.grid th { text-align: left; font-size: 11px; font-weight: 500; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.grid td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.grid tr:last-child td { border-bottom: 0; }
table.grid tbody tr:hover td { background: var(--card-2); }
table.grid .num { text-align: right; font-variant-numeric: tabular-nums; }
table.grid tr.clickable { cursor: pointer; }

.split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 14px; align-items: start; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 14px; }
.kpi { display: flex; align-items: center; gap: 12px; }
.kpi .v { font-size: 20px; font-weight: 700; }
.kpi .l { font-size: 11.5px; color: var(--muted); }

/* habits */
.habit-card { display: grid; grid-template-columns: 42px 1fr auto; gap: 12px; align-items: center; }
.habit-days { display: flex; gap: 5px; }
.habit-day { width: 26px; height: 26px; border-radius: 8px; border: 1.5px solid var(--line-2); display: grid; place-items: center; font-size: 10px; color: var(--muted); }
.habit-day.on { background: #22c55e; border-color: #22c55e; color: #fff; }
.habit-day.today { box-shadow: 0 0 0 2px var(--primary-soft); border-color: var(--primary); }
.big-check { width: 42px; height: 42px; border-radius: 12px; border: 2px solid var(--line-2); display: grid; place-items: center; color: #fff; }
.big-check.on { background: #22c55e; border-color: #22c55e; }
.streak { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; color: #f97316; font-weight: 600; }

/* calendar page */
.month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.month .h { background: var(--card-2); font-size: 11px; color: var(--muted); padding: 8px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: center; }
.month .c { min-height: 96px; padding: 6px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); cursor: pointer; display: flex; flex-direction: column; gap: 3px; }
.month .c:hover { background: var(--card-2); }
.month .c.out { background: rgba(0,0,0,.015); }
.month .c.out .n { color: #c2bdd6; }
.month .c.sel { box-shadow: inset 0 0 0 2px var(--primary); }
.month .c .n { font-size: 12px; font-weight: 600; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; }
.month .c.today .n { background: var(--primary-grad); color: #fff; }
.ev { display: block; font-size: 10.5px; padding: 2px 6px; border-radius: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev.done { text-decoration: line-through; opacity: .6; }

/* charts */
.chart-bars { display: flex; align-items: flex-end; gap: 6px; height: 160px; padding-top: 10px; }
.chart-bars .b { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; }
.chart-bars .b i { width: 100%; max-width: 26px; border-radius: 6px 6px 3px 3px; background: var(--primary-grad); min-height: 2px; }
.chart-bars .b span { font-size: 9.5px; color: var(--muted); }
.legend { display: grid; gap: 8px; }
.legend .li { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.legend .li b { margin-left: auto; font-weight: 600; }

/* modal */
.modal-back { position: fixed; inset: 0; background: rgba(28, 18, 66, .35); backdrop-filter: blur(3px); z-index: 100; display: grid; place-items: center; padding: 24px; animation: fade .15s; }
.modal { background: var(--card); border-radius: 20px; box-shadow: var(--shadow-lg); width: 620px; max-width: 100%; max-height: calc(100vh - 48px); display: flex; flex-direction: column; animation: pop .18s ease-out; }
.modal.wide { width: 860px; }
.modal.narrow { width: 420px; }
.modal-head { display: flex; align-items: center; gap: 12px; padding: 18px 20px 10px; }
.modal-head h2 { font-size: 17px; }
.modal-head .ph-ic { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; color: #fff; }
.modal-body { padding: 8px 20px 16px; overflow: auto; }
.modal-foot { display: flex; align-items: center; gap: 8px; padding: 12px 20px 18px; border-top: 1px solid var(--line); }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }

.lines { display: grid; gap: 6px; }
.line-row { display: flex; align-items: center; gap: 8px; }
.line-row input.inp { height: 32px; }

/* toasts */
.toasts { position: fixed; right: 20px; bottom: 20px; display: grid; gap: 8px; z-index: 200; }
.toast { display: flex; align-items: center; gap: 10px; background: #1f1a3a; color: #fff; padding: 10px 14px; border-radius: 12px; box-shadow: var(--shadow-lg); font-size: 13px; animation: pop .2s; max-width: 380px; }
.toast.error { background: #b91c1c; }
.toast .ico { color: #86efac; }
.toast.error .ico { color: #fecaca; }

/* AI panel */
.ai-panel { position: absolute; top: 48px; right: 0; width: 380px; background: var(--card); border-radius: 16px; box-shadow: var(--shadow-lg); z-index: 60; padding: 14px; }
.ai-panel .ai-head { display: flex; align-items: center; gap: 8px; font-weight: 600; margin-bottom: 10px; }
.insight { display: flex; gap: 10px; padding: 10px; border-radius: 12px; cursor: pointer; }
.insight:hover { background: var(--card-2); }
.insight .ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.insight .t { font-weight: 600; font-size: 12.5px; }
.insight .s { font-size: 11.5px; color: var(--text-2); margin-top: 2px; }

/* login */
.login-wrap { height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; background: var(--bg); }
.login-art { position: relative; overflow: hidden; }
.login-art img { width: 100%; height: 100%; object-fit: cover; }
.login-art .q { position: absolute; left: 48px; top: 140px; right: 48px; font-family: var(--hand); font-size: 38px; color: #2c1f4b; line-height: 1.1; text-shadow: 0 2px 16px rgba(255,240,230,.6); }
.login-form { display: grid; place-items: center; padding: 40px; }
.login-card { width: 380px; }
.login-card h1 { font-size: 26px; margin: 22px 0 4px; }
.err { color: #dc2626; font-size: 12.5px; background: #fef2f2; padding: 8px 12px; border-radius: 10px; }
[data-theme="dark"] .err { background: #3b1520; color: #fca5a5; }

/* settings */
.settings { display: grid; grid-template-columns: 220px 1fr; gap: 14px; align-items: start; }
.settings-nav { padding: 8px; }
.matrix td .check { margin: 0 auto; }
.color-dot { width: 22px; height: 22px; border-radius: 7px; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line-2); cursor: pointer; }
.swatches { display: flex; gap: 6px; flex-wrap: wrap; }
.swatches .color-dot.sel { box-shadow: 0 0 0 2px var(--primary); }

@media (max-width: 1360px) {
    .home { grid-template-columns: minmax(0, 1fr) 250px; }
    .stats { grid-template-columns: repeat(4, 1fr); row-gap: 10px; }
    .stat:nth-child(4) { border-right: 0; }
    .hero-text { left: 30%; }
}
@media (max-width: 1180px) {
    .shell { grid-template-columns: 76px 1fr; }
    .sidebar .label, .brand-row .txt, .side-head, .ws-item span:not(.ws-avatar), .promo, .side-foot span { display: none; }
    .home-row3, .home-row3b { grid-template-columns: 1fr 1fr; }
    .split { grid-template-columns: 1fr; }
}

.row > .bar, .select-row > .bar { flex: 1; min-width: 40px; }

/* ---------- projects → sections → tasks ---------- */
a.project-card { display: grid; gap: 10px; color: inherit; text-decoration: none; transition: border-color .15s, transform .15s; }
a.project-card:hover { border-color: #cbbcff; transform: translateY(-1px); }
.board { display: flex; gap: 12px; align-items: flex-start; overflow-x: auto; padding-bottom: 12px; }
.board-col { flex: 0 0 280px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px; display: flex; flex-direction: column; gap: 8px; max-height: calc(100vh - 260px); transition: border-color .15s, background .15s; }
.board-col.over { border-color: var(--primary); background: var(--primary-soft); }
.board-col.add-col { background: transparent; border-style: dashed; }
.board-col-head { display: flex; align-items: center; gap: 6px; min-height: 30px; }
.board-col-title { font-weight: 600; font-size: 13.5px; cursor: text; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-col-head .count { font-size: 11px; color: var(--text-2); background: var(--bg); border-radius: 10px; padding: 1px 8px; }
.board-col-head .col-tools { display: flex; opacity: 0; transition: opacity .15s; }
.board-col:hover .col-tools { opacity: 1; }
.board-cards { display: flex; flex-direction: column; gap: 8px; overflow-y: auto; min-height: 24px; }
.task-card { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px; cursor: pointer; display: grid; gap: 6px; }
.task-card:hover { border-color: #cbbcff; }
.task-card.dragging { opacity: .45; }
.task-card[draggable="true"] { cursor: grab; }
.task-card .task-title { font-size: 13px; line-height: 1.35; word-break: break-word; }
.task-card.done .task-title { text-decoration: line-through; color: var(--muted); }
.task-card .task-meta { gap: 8px; flex-wrap: wrap; padding-left: 28px; }
.task-card .task-meta:empty { display: none; }
.board-add .inp { width: 100%; }
.parent-tag { font-size: 10.5px; color: var(--primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 640px) { .board-col { flex-basis: 85vw; max-height: none; } .board-col-head .col-tools { opacity: 1; } }
