:root{font-family:Segoe UI,system-ui,-apple-system,sans-serif;color:#e2e8f0;background-color:#0f172a}*{box-sizing:border-box}::-webkit-scrollbar{width:12px;height:12px}::-webkit-scrollbar-track{background:#1f2937;border-radius:6px}::-webkit-scrollbar-thumb{background:#4b5563;border-radius:6px;border:2px solid #1f2937}::-webkit-scrollbar-thumb:hover{background:#6b7280}*{scrollbar-width:thin;scrollbar-color:#4b5563 #1f2937}body{margin:0;min-height:100vh}a{color:inherit;text-decoration:none}.app-shell{min-height:100vh;background:#0b1221;color:#e2e8f0}.topbar{display:flex;align-items:center;justify-content:space-between;padding:12px 20px;background:#111827;border-bottom:1px solid #1f2937}.topbar nav a{margin-right:12px;padding:6px 10px;border-radius:6px;background:#1f2937}.user-tag{font-size:14px;color:#a5b4fc}main{padding:20px}.page{max-width:1100px;margin:0 auto;display:flex;flex-direction:column;gap:16px}.card{background:#111827;border:1px solid #1f2937;border-radius:12px;padding:16px}.cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:12px}.card h3,.card h4{margin:0 0 8px}.metric{font-size:24px;margin:0}.sub{margin:4px 0 0;color:#94a3b8}.form label,.toolbar label{display:flex;flex-direction:column;gap:6px;color:#cbd5e1}input,button{font:inherit;padding:10px 12px;border-radius:8px;border:1px solid #1f2937;background:#0b1221;color:#e2e8f0}button{cursor:pointer;background:#2563eb;border-color:#1d4ed8}button.ghost{background:transparent;border:1px solid #374151}button.link{background:none;border:none;color:#93c5fd;padding:6px 0}.toolbar{display:flex;gap:12px;align-items:flex-end}.habit-list{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:10px}.habit-item{display:flex;justify-content:space-between;align-items:center;padding:10px 0;border-bottom:1px solid #1f2937}.habit-name{margin:0;font-weight:600}.habit-meta{margin:2px 0 0;color:#94a3b8;font-size:14px}.habit-actions{display:flex;align-items:center;gap:10px}.toggle{display:flex;align-items:center;gap:6px}.charts-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:12px}.chart-card{background:#111827;border:1px solid #1f2937;border-radius:12px;padding:12px}.auth-card{max-width:360px;margin:40px auto;background:#111827;padding:20px;border:1px solid #1f2937;border-radius:12px;display:flex;flex-direction:column;gap:10px}.auth-card form{display:flex;flex-direction:column;gap:12px}.auth-card .error{color:#fca5a5;margin:0}.auth-card .success{color:#86efac;margin:0}.page{max-width:1400px;margin:0 auto;display:flex;flex-direction:column;gap:20px}.cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:16px}.card{background:#1f2937;border:1px solid #374151;border-radius:12px;padding:20px;box-shadow:0 4px 6px #0000004d}.card h3{margin:0 0 12px;color:#9ca3af;font-size:14px;font-weight:500}.metric{font-size:32px;font-weight:700;color:#f3f4f6;margin:0}.sub{margin:8px 0 0;color:#6b7280;font-size:14px}.progress-chart-section{width:100%}.progress-chart-card{background:#1f2937;border:1px solid #374151;border-radius:12px;padding:20px;box-shadow:0 4px 6px #0000004d}.progress-chart-card h3{margin:0 0 16px;color:#f3f4f6;font-size:16px;font-weight:600}.charts-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:16px}.chart-card{background:#1f2937;border:1px solid #374151;border-radius:12px;padding:16px;box-shadow:0 4px 6px #0000004d}.chart-card h4{margin:0 0 12px;color:#f3f4f6;font-size:14px;font-weight:600}.habit-tracker-dashboard{background:#1f2937;border-radius:12px;padding:20px;box-shadow:0 4px 6px #0000004d;margin-bottom:20px}.month-header-dashboard{display:flex;justify-content:space-between;align-items:center;padding:16px 20px;background:#374151;border-radius:8px;margin-bottom:20px}.month-header-dashboard .month-nav{display:flex;align-items:center;gap:16px}.month-header-dashboard .month-nav h2{margin:0;font-size:20px;color:#f3f4f6;min-width:150px;text-align:center}.month-header-dashboard .month-nav button{background:#1f2937;border:1px solid #4b5563;padding:6px 12px;border-radius:6px;cursor:pointer;font-size:16px;color:#e5e7eb;transition:all .2s}.month-header-dashboard .month-nav button:hover{background:#4b5563;color:#fff}.month-header-dashboard .progress-bar-container{display:flex;align-items:center;gap:12px}.month-header-dashboard .progress-label{font-weight:500;color:#e5e7eb;min-width:70px}.month-header-dashboard .progress-bar{width:200px;height:24px;background:#111827;border-radius:12px;overflow:hidden;border:1px solid #4b5563}.month-header-dashboard .progress-fill{height:100%;background:linear-gradient(90deg,#86efac,#22c55e);transition:width .3s}.month-header-dashboard .progress-percent{font-weight:500;color:#e5e7eb}.month-header-dashboard .progress-percent-value{font-weight:600;color:#86efac;min-width:60px}.calendar-table-dashboard{overflow-x:auto}.calendar-table-dashboard table{width:100%;border-collapse:collapse;background:#1f2937}.calendar-table-dashboard th,.calendar-table-dashboard td{border:1px solid #374151;text-align:center;padding:8px}.habits-col-dashboard{min-width:200px;background:#374151!important}.habits-header-dashboard{font-weight:600;color:#f3f4f6;padding:8px}.week-header-dashboard{background:#2d3748;font-weight:600;color:#93c5fd;padding:12px 8px!important}.day-header-dashboard{background:#2d3748;font-size:11px;padding:4px!important}.day-label-dashboard{font-weight:500;color:#93c5fd}.day-num-dashboard{font-weight:600;color:#bfdbfe;margin-top:2px}.habit-name-cell-dashboard{text-align:left!important;background:#374151;padding:12px!important}.habit-name-dashboard{display:block;font-weight:500;color:#f3f4f6}.day-cell-dashboard{padding:4px!important;background:#1f2937}.day-cell-dashboard input[type=checkbox]{width:18px;height:18px;cursor:pointer;accent-color:#22c55e}.analysis-col-dashboard{min-width:180px;background:#4b5563!important}.analysis-header-dashboard{background:#4b5563}.analysis-cols-dashboard{display:grid;grid-template-columns:1fr 1fr 2fr;gap:8px;font-weight:600;color:#fde68a;font-size:12px}.analysis-cell-dashboard{background:#374151}.analysis-data-dashboard{display:grid;grid-template-columns:1fr 1fr 2fr;gap:8px;align-items:center;font-weight:500;color:#e5e7eb}.mini-bar-dashboard{height:16px;background:#1f2937;border-radius:8px;overflow:hidden;border:1px solid #4b5563}.mini-bar-fill-dashboard{height:100%;background:linear-gradient(90deg,#86efac,#22c55e);transition:width .3s}.empty-state-dashboard{padding:40px!important;text-align:center;color:#9ca3af;font-size:14px}@media (max-width: 768px){main{padding:12px}.page{gap:12px}.topbar{padding:10px 12px;flex-wrap:wrap}.topbar nav{display:flex;flex-wrap:wrap;gap:8px}.topbar nav a{margin-right:0;padding:6px 10px;font-size:14px}.charts-grid{grid-template-columns:1fr;gap:12px}.chart-card{padding:12px}.chart-card h4{font-size:13px}.cards{grid-template-columns:1fr;gap:12px}.card{padding:16px}.metric{font-size:28px}.month-header-dashboard{flex-direction:column;gap:16px;padding:12px}.month-header-dashboard .month-nav{width:100%;justify-content:center}.month-header-dashboard .month-nav h2{font-size:18px;min-width:auto}.month-header-dashboard .progress-bar-container{width:100%;flex-direction:column;align-items:stretch}.month-header-dashboard .progress-label{text-align:center;min-width:auto}.month-header-dashboard .progress-bar{width:100%}.month-header-dashboard .progress-percent-value{text-align:center;min-width:auto}.habit-tracker-dashboard{padding:12px}.calendar-table-dashboard{margin:0 -12px}.habits-col-dashboard{min-width:120px}.habit-name-dashboard{font-size:13px}.week-header-dashboard{font-size:11px;padding:8px 4px!important}.day-header-dashboard{font-size:10px;padding:2px!important}.day-label-dashboard{font-size:10px}.day-num-dashboard{font-size:11px}.analysis-col-dashboard{min-width:140px}.analysis-cols-dashboard{font-size:10px;gap:4px}.analysis-data-dashboard{font-size:12px;gap:4px}.day-cell-dashboard input[type=checkbox]{width:16px;height:16px}.progress-chart-card{padding:12px}.progress-chart-card h3{font-size:14px}.auth-card{margin:20px auto;padding:16px}}@media (max-width: 480px){.month-header-dashboard .month-nav h2{font-size:16px}.month-header-dashboard .month-nav button{padding:4px 10px;font-size:14px}.habits-col-dashboard{min-width:100px}.habit-name-dashboard{font-size:12px}.day-cell-dashboard{padding:2px!important}.calendar-table-dashboard th,.calendar-table-dashboard td{padding:4px 2px}.metric{font-size:24px}.card h3{font-size:13px}}
