:root {
  color-scheme: dark;
  --bg: #11131b;
  --panel: #191c27;
  --panel-2: #202432;
  --line: #2d3242;
  --text: #eef0f7;
  --muted: #9299ac;
  --accent: #a78bfa;
  --accent-soft: #30294c;
  --red: #ff737d;
  --amber: #f5bd65;
  --green: #62d6a5;
  --blue: #6eb8ff;
  --radius: 18px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(ellipse at 85% -10%, #282347 0, transparent 37%), var(--bg); color: var(--text); }
button, input, select { font: inherit; }
button { color: inherit; }
.shell { width: min(1500px, 100%); margin: 0 auto; padding: 30px clamp(16px, 3vw, 42px) 56px; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 30px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { display: grid; place-items: center; width: 46px; height: 46px; overflow: hidden; border: 1px solid #574d83; border-radius: 14px; background: linear-gradient(145deg, #473d70, #28243d); }
.brand-mark img { width: 100%; height: 100%; padding: 4px; object-fit: contain; }
.brand-name { font-weight: 750; letter-spacing: -.035em; font-size: 17px; }
.brand-note { margin-top: 2px; color: var(--muted); font-size: 12px; }
.top-actions { display: flex; gap: 9px; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 39px; padding: 0 13px; border: 1px solid var(--line); border-radius: 11px; background: var(--panel); cursor: pointer; transition: .16s ease; font-size: 13px; font-weight: 650; }
.button:hover { border-color: #5d6380; transform: translateY(-1px); }
.button.primary { background: var(--accent); border-color: var(--accent); color: #171326; }
.button.quiet { background: transparent; }
.button.close-task { color: #c8bbff; border-color: #514478; background: #27223c; }
.hero { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin: 20px 0 24px; }
.eyebrow { color: #b8a7ff; text-transform: uppercase; font-size: 11px; font-weight: 750; letter-spacing: .14em; }
h1 { margin: 8px 0 6px; font-size: clamp(28px, 4vw, 42px); line-height: 1.08; letter-spacing: -.055em; }
.hero p { margin: 0; color: var(--muted); font-size: 14px; }
.today-chip { white-space: nowrap; padding: 9px 12px; background: #1d2030; border: 1px solid var(--line); border-radius: 999px; color: #c4c9d8; font-size: 12px; }
.tabs { display: flex; width: fit-content; max-width: 100%; overflow-x: auto; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 13px; background: #151821; margin-bottom: 18px; }
.tab { padding: 9px 14px; border: 0; border-radius: 9px; color: var(--muted); background: transparent; cursor: pointer; font-size: 13px; font-weight: 700; }
.tab.active { color: var(--text); background: #2a2e3e; box-shadow: inset 0 0 0 1px #3a4052; }
.filter-panel { display: grid; grid-template-columns: minmax(220px, 1.8fr) repeat(4, minmax(125px, 1fr)) auto; gap: 10px; padding: 14px; margin-bottom: 22px; background: rgba(25,28,39,.88); border: 1px solid var(--line); border-radius: 15px; }
.field { min-width: 0; }
.field label { display: block; margin: 0 0 6px 2px; color: var(--muted); font-size: 10px; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; }
.field input, .field select { width: 100%; height: 38px; padding: 0 10px; color: var(--text); border: 1px solid #353a4b; border-radius: 9px; outline: none; background: #141720; font-size: 12px; }
.field input:focus, .field select:focus { border-color: #8270c3; box-shadow: 0 0 0 3px #8f79eb24; }
.date-filter { display: flex; gap: 6px; }
.filter-reset { align-self: end; height: 38px; white-space: nowrap; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; margin-bottom: 22px; }
.stat { position: relative; overflow: hidden; padding: 16px 17px; background: var(--panel); border: 1px solid var(--line); border-radius: 15px; }
.stat::after { content: ""; position: absolute; right: -20px; top: -30px; width: 90px; height: 90px; border-radius: 50%; background: var(--glow, #a78bfa); opacity: .08; filter: blur(8px); }
.stat-label { color: var(--muted); font-size: 12px; }
.stat-number { margin-top: 8px; font-size: 27px; line-height: 1; font-weight: 760; letter-spacing: -.05em; }
.stat-number.red { color: var(--red); }.stat-number.blue { color: var(--blue); }.stat-number.purple { color: #c1adff; }
.stat-detail { margin-top: 7px; color: #777f93; font-size: 11px; }
.section { margin: 0 0 16px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(145deg, #191c27, #171a24); }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-title-wrap { display: flex; align-items: center; gap: 10px; }
.section-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--section-soft); color: var(--section-color); font-size: 15px; }
.section h2 { margin: 0; font-size: 15px; letter-spacing: -.02em; }
.section-subtitle { margin-top: 3px; color: var(--muted); font-size: 11px; }
.count { min-width: 28px; padding: 5px 8px; border-radius: 999px; background: var(--section-soft); color: var(--section-color); text-align: center; font-size: 11px; font-weight: 800; }
.task-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.task-card { min-width: 0; padding: 14px; border: 1px solid #303547; border-radius: 13px; background: #1d202c; transition: border-color .15s, transform .15s; }
.task-card:hover { border-color: #555c75; transform: translateY(-1px); }
.task-card.overdue { border-color: #67343d; background: linear-gradient(130deg,#2a1d26,#201b26); }
.task-card.today { border-color: #344f72; background: linear-gradient(130deg,#1d2939,#1d202d); }
.task-card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.task-id { color: #9991bb; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; }
.task-title { overflow-wrap: anywhere; margin: 8px 0 5px; font-size: 15px; font-weight: 700; letter-spacing: -.02em; }
.task-description { min-height: 17px; margin: 0; color: #a0a6b7; font-size: 12px; line-height: 1.45; }
.task-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 13px; }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border-radius: 7px; background: #292d3a; color: #c1c6d4; font-size: 10px; font-weight: 700; }
.pill.date { background: #2a2d39; color: #ccd0dc; }
.pill.high { color: #ff9ca1; background: #48272f; }.pill.medium { color: #ffd18e; background: #453722; }.pill.low { color: #8ce4bc; background: #203c35; }
.pill.status-not_started { color: #c0c4cf; }.pill.status-in_progress { color: #9bcfff; background: #20374e; }.pill.status-wait { color: #ffe08b; background: #463d23; }
.category-tag { margin-left: auto; color: #a5aabd; font-size: 10px; }
.task-card-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; padding-top: 11px; border-top: 1px solid #303444; }
.estimate { color: #8f96aa; font-size: 11px; }
.empty-state { padding: 18px 12px; border: 1px dashed #34394a; border-radius: 12px; color: #858da1; text-align: center; font-size: 12px; }
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
table { width: 100%; min-width: 1800px; border-collapse: collapse; font-size: 11px; }
th { position: sticky; top: 0; z-index: 1; padding: 12px 10px; background: #232735; color: #aeb4c4; text-align: left; font-size: 10px; font-weight: 750; letter-spacing: .045em; text-transform: uppercase; white-space: nowrap; }
td { padding: 10px; border-top: 1px solid #292e3c; color: #d9dce6; vertical-align: middle; }
tbody tr:hover td { background: #202432; }
td.id-cell { color: #b4a7e6; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; white-space: nowrap; }
td.title-cell { min-width: 180px; font-weight: 650; }
td.description-cell { min-width: 220px; max-width: 300px; color: #a5abbb; }
.table-status { min-width: 125px; padding: 6px 8px; color: var(--text); border: 1px solid #3a4052; border-radius: 8px; background: #171a23; font-size: 10px; }
.table-status.status-done { color: #80dfb3; border-color: #31614e; }.table-status.status-wait { color: #f9d36f; }.table-status.status-in_progress { color: #91caff; }
.priority-text.high { color: #ff9298; }.priority-text.medium { color: #ffd18e; }.priority-text.low { color: #81ddb0; }
.table-footer { display: flex; justify-content: space-between; gap: 12px; padding: 12px 3px 0; color: var(--muted); font-size: 11px; }
.hidden { display: none !important; }
.page-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; margin: 4px 0 17px; }
.page-heading h2 { margin:0; font-size:21px; letter-spacing:-.035em; }.page-heading p { margin:5px 0 0; color:var(--muted); font-size:12px; }
.project-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.project-card { padding:17px; border:1px solid var(--line); border-radius:16px; background:linear-gradient(145deg,#1c202c,#181b25); }
.project-card-top { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; }
.project-name { margin:0; font-size:16px; letter-spacing:-.025em; }.project-id { color:#a99bdd; font:11px ui-monospace,monospace; }
.project-desc { margin:8px 0 13px; color:#a3a9b9; font-size:12px; line-height:1.5; white-space:pre-wrap; }
.project-meta { display:flex; flex-wrap:wrap; gap:7px; margin:12px 0; }
.project-progress { height:6px; overflow:hidden; border-radius:99px; background:#303444; }.project-progress span { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,#9276ec,#64d3aa); }
.project-card-foot { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:12px; color:var(--muted); font-size:11px; }
.project-status { color:#90dfb8; }.project-status.paused { color:#f4ca77; }.project-status.completed { color:#9ba4b7; }.project-status.cancelled { color:#f08b92; }
.form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:11px; }
.form-grid .field.full,.form-grid.full { grid-column:1 / -1; }.form-grid textarea { width:100%; min-height:74px; resize:vertical; padding:10px; color:var(--text); border:1px solid #353a4b; border-radius:9px; outline:none; background:#141720; font:inherit; font-size:12px; }
.form-actions { display:flex; justify-content:flex-end; gap:8px; margin-top:14px; }.form-actions.full { grid-column:1 / -1; }
dialog { width:min(620px,calc(100% - 26px)); padding:0; color:var(--text); border:1px solid #42485c; border-radius:17px; background:#1b1e29; box-shadow:0 28px 90px #000b; }
dialog::backdrop { background:#090a10bb; backdrop-filter:blur(4px); }.dialog-body { padding:20px; }.dialog-title { margin:0 0 16px; font-size:18px; }
.project-view-select { min-width:min(360px,55vw); height:39px; padding:0 10px; color:var(--text); border:1px solid #3c4254; border-radius:9px; background:#171a24; }
.project-summary { display:grid; grid-template-columns:1.4fr 1fr; gap:13px; margin-bottom:15px; }
.project-hero-card,.metric-card { padding:17px; border:1px solid var(--line); border-radius:15px; background:var(--panel); }
.project-hero-card h3 { margin:0 0 6px; font-size:19px; }.project-hero-card p { margin:0; color:#a5abbb; font-size:12px; line-height:1.5; white-space:pre-wrap; }
.project-hero-details { display:flex; flex-wrap:wrap; gap:8px; margin:12px 0; }.definition { margin-top:12px!important; padding-top:11px; border-top:1px solid var(--line); }
.progress-line { display:flex; justify-content:space-between; margin:12px 0 6px; color:#aeb4c4; font-size:11px; }
.metric-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
.metric { padding:12px; border:1px solid #303547; border-radius:11px; background:#1d202c; }.metric strong { display:block; font-size:18px; letter-spacing:-.04em; }.metric span { display:block; margin-top:4px; color:var(--muted); font-size:10px; }
.subsection { margin-top:15px; padding:16px; border:1px solid var(--line); border-radius:15px; background:#191c27; }
.subsection-head { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:12px; }.subsection-head h3 { margin:0; font-size:14px; }.subsection-head small { color:var(--muted); }
.milestone-list { display:grid; gap:8px; }.milestone-row { display:grid; grid-template-columns:40px minmax(160px,1.3fr) minmax(90px,.7fr) minmax(120px,1.2fr) 105px 72px; align-items:center; gap:9px; padding:10px; border:1px solid #303546; border-radius:10px; background:#1e222e; font-size:11px; }
.milestone-order { color:#9c91c5; font-family:ui-monospace,monospace; }.milestone-title { display:block; font-weight:700; }.milestone-criterion { display:block; margin-top:4px; color:#a7adbd; font-size:10px; line-height:1.4; white-space:pre-wrap; }.milestone-next,.milestone-date { color:#a4aabc; }.milestone-row select { min-width:0; padding:6px; color:var(--text); border:1px solid #3a4052; border-radius:7px; background:#171a23; font-size:10px; }
.milestone-row { cursor:default; }.milestone-row.selected { border-color:#8171bd; background:#252337; }.milestone-open-link { cursor:pointer; }.milestone-open-link:hover .milestone-title { color:#c7b8ff; }
.milestone-detail { margin-top:12px; padding:15px; border:1px solid #514773; border-radius:13px; background:#201e2e; }
.milestone-detail-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin-bottom:12px; }.milestone-detail-head h4 { margin:0; font-size:15px; }.milestone-detail-head p { margin:5px 0 0; color:#a6adbd; font-size:11px; white-space:pre-wrap; }
.milestone-detail-stats { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:8px; margin:12px 0; }
.milestone-detail-stat { padding:10px; border:1px solid #39364d; border-radius:9px; background:#272437; }.milestone-detail-stat strong { display:block; font-size:16px; }.milestone-detail-stat span { display:block; margin-top:3px; color:#a3a0b2; font-size:9px; }
.stage-task-list { display:grid; gap:6px; margin-top:12px; }.stage-task-row { display:grid; grid-template-columns:minmax(130px,1fr) 100px 100px 80px 75px 130px; align-items:center; gap:8px; padding:9px; border:1px solid #353447; border-radius:9px; background:#252333; font-size:10px; }
.stage-task-head { color:#9694a8; font-size:9px; text-transform:uppercase; letter-spacing:.05em; }.stage-task-title { font-weight:650; }.stage-task-row select { min-width:0; padding:6px; color:var(--text); border:1px solid #454158; border-radius:7px; background:#191823; font-size:10px; }
.stage-task-actions,.milestone-row-actions,.table-actions { display:flex; align-items:center; justify-content:center; gap:6px; }.stage-task-actions .button,.milestone-row-actions .button,.table-actions .button { min-height:30px; padding:0 8px; font-size:10px; }
.plan-list { display:grid; gap:7px; }.plan-row { display:grid; grid-template-columns:96px minmax(150px,1fr) 120px 74px 115px; align-items:center; gap:9px; padding:9px 10px; border-radius:9px; background:#202431; font-size:11px; }.plan-row .plan-title { font-weight:650; }.plan-row .plan-milestone { color:#a5aabd; }
.project-empty { padding:30px 18px; border:1px dashed #373c4c; border-radius:14px; color:#9299ac; text-align:center; font-size:13px; line-height:1.6; }
.habit-summary { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin-bottom:15px; }
.habit-summary-card { padding:13px 15px; border:1px solid var(--line); border-radius:13px; background:var(--panel); }.habit-summary-card strong { display:block; font-size:20px; }.habit-summary-card span { color:var(--muted); font-size:11px; }
.habit-list { display:grid; gap:13px; }.habit-card { padding:17px; border:1px solid var(--line); border-radius:16px; background:linear-gradient(145deg,#1b1e2a,#171a24); }
.habit-card-head { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; }.habit-name { margin:0; font-size:16px; letter-spacing:-.025em; }.habit-description { margin:5px 0 0; color:#a0a7b8; font-size:12px; white-space:pre-wrap; }
.habit-rule { margin-top:9px; color:#b5a8e8; font-size:11px; }.habit-actions { display:flex; gap:6px; }
.habit-stats { display:flex; flex-wrap:wrap; gap:8px; margin:13px 0 12px; }.habit-stat { padding:6px 9px; border:1px solid #323748; border-radius:8px; background:#202432; color:#aeb4c4; font-size:10px; }.habit-stat strong { margin-right:4px; color:var(--text); }
.habit-strip-top { display:flex; align-items:center; justify-content:space-between; gap:8px; margin:12px 0 8px; }.habit-period-label { color:#d3d6e1; font-size:11px; font-weight:700; }.habit-period-nav { display:flex; gap:5px; }
.habit-period-nav .button { width:30px; min-height:29px; padding:0; border-radius:8px; }
.habit-strip { display:flex; gap:6px; overflow-x:auto; padding:2px 1px 8px; scrollbar-color:#474d63 transparent; }
.habit-day { display:flex; flex:0 0 60px; min-height:75px; flex-direction:column; align-items:center; justify-content:center; gap:5px; border:1px solid #34394a; border-radius:10px; background:#202431; }
.habit-day.done { border-color:#32715b; background:#1c3a31; }.habit-day.failed { border-color:#783b47; background:#42232c; }.habit-day.today { box-shadow:0 0 0 1px #aa94ff inset; }.habit-day.future { opacity:.58; }.habit-day.before-start { opacity:.25; }
.habit-day-name { color:#969db0; font-size:9px; text-transform:uppercase; }.habit-day-date { font-size:15px; font-weight:750; }.habit-day-actions { display:flex; gap:4px; }
.habit-mark { display:grid; place-items:center; width:20px; height:18px; padding:0; border:0; border-radius:5px; background:#333849; color:#afb6c7; cursor:pointer; font-size:11px; }
.habit-mark:hover { background:#4b526a; }.habit-mark.mark-done.active { background:#31815e; color:#fff; }.habit-mark.mark-failed.active { background:#ae4352; color:#fff; }.habit-mark:disabled { cursor:not-allowed; opacity:.3; }
.habit-day-status { color:#82899b; font-size:8px; }.habit-day.done .habit-day-status { color:#85dfb4; }.habit-day.failed .habit-day-status { color:#ff9aa1; }
.habit-progress-line { height:5px; overflow:hidden; margin-top:3px; border-radius:99px; background:#303546; }.habit-progress-line span { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,#9276ec,#69d5a9); }
.habit-form-rule { display:flex; align-items:end; gap:8px; }.habit-form-rule .field { flex:1; }.habit-form-rule .field.compact { flex:0 0 100px; }
@media (max-width:680px) { .habit-summary { grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; }.habit-summary-card { padding:10px; }.habit-summary-card strong { font-size:17px; }.habit-card { padding:13px; }.habit-form-rule { align-items:stretch; flex-direction:column; }.habit-form-rule .field.compact { flex:auto; } }
.toast { position: fixed; right: 22px; bottom: 22px; z-index: 5; padding: 12px 16px; border: 1px solid #4e4770; border-radius: 12px; background: #26233a; box-shadow: 0 12px 40px #0006; color: #e9e4ff; font-size: 13px; opacity: 0; transform: translateY(8px); pointer-events: none; transition: .2s; }
.toast.show { opacity: 1; transform: translateY(0); }
@media (max-width: 1050px) { .filter-panel { grid-template-columns: repeat(3, minmax(0,1fr)); }.search-field { grid-column: span 2; } }
@media (max-width: 680px) { .shell { padding-top: 18px; }.topbar { align-items: flex-start; }.brand-note { display: none; }.top-actions .button span { display: none; }.hero { align-items: flex-start; flex-direction: column; }.today-chip { font-size: 11px; }.filter-panel { grid-template-columns: repeat(2, minmax(0,1fr)); padding: 11px; }.search-field { grid-column: span 2; }.date-fields { grid-column: span 2; }.filter-reset { grid-column: span 2; }.task-grid,.project-grid { grid-template-columns: 1fr; }.section { padding: 13px; }.section-title-wrap { align-items: flex-start; }.top-actions { gap: 6px; }.button { padding: 0 10px; }.project-summary { grid-template-columns:1fr; }.metric-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }.milestone-row { grid-template-columns:30px 1fr 82px; }.milestone-next,.milestone-date { display:none; }.milestone-row-actions { grid-column:3; flex-wrap:wrap; }.milestone-detail-stats { grid-template-columns:repeat(2,minmax(0,1fr)); }.stage-task-row { grid-template-columns:minmax(100px,1fr) 100px; }.stage-task-row .stage-date,.stage-task-row .stage-plan,.stage-task-row .stage-priority,.stage-task-row .stage-est,.stage-task-head { display:none; }.stage-task-actions { grid-column:2; flex-wrap:wrap; }.plan-row { grid-template-columns:60px minmax(90px,1fr) auto; }.plan-row .plan-milestone,.plan-row .plan-est { display:none; }.page-heading { align-items:flex-start; flex-direction:column; }.project-view-select { min-width:100%; } }
