        :root {
            --bg: #ffffff;
            --bg-elevated: #f4f9fd;
            --bg-card: #ffffff;
            --bg-hover: #eaf3fb;
            --border: #d7e6f2;
            --border-light: #c3daec;
            --text-primary: #16232e;
            --text-secondary: #57697a;
            --text-muted: #93a5b3;
            --accent: #2e86d6;
            --accent-light: #1a6fb0;
            --accent-dark: #1e5f94;
            --success: #2fa84f;
            --warning: #1e5f94;
            --danger: #e0433d;
            --info: #2e86d6;
            --purple: #5fa8e0;
            --pink: #e0433d;
            --teal: #2fa84f;
            --orange: #1e5f94;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
            background: var(--bg);
            color: var(--text-primary);
            min-height: 100vh;
            overflow-x: hidden;
        }

        /* Login / lock screen */
        .login-screen {
            position: fixed;
            inset: 0;
            z-index: 500;
            background: linear-gradient(135deg, rgba(46,134,214,0.06), rgba(47,168,79,0.06)), var(--bg);
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 20px;
        }
        .login-card {
            width: 100%;
            max-width: 400px;
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 16px;
            padding: 32px;
            box-shadow: 0 12px 40px rgba(16,35,46,0.10);
        }
        .login-title {
            font-size: 19px;
            font-weight: 700;
            text-align: center;
            margin: 10px 0 6px;
        }
        .login-sub {
            font-size: 12.5px;
            color: var(--text-secondary);
            text-align: center;
            line-height: 1.5;
            margin-bottom: 20px;
        }
        .login-error {
            font-size: 12.5px;
            color: var(--danger);
            margin-bottom: 10px;
            min-height: 16px;
        }

        /* Scrollbar */
        ::-webkit-scrollbar {
            width: 6px;
            height: 6px;
        }
        ::-webkit-scrollbar-track {
            background: var(--bg);
        }
        ::-webkit-scrollbar-thumb {
            background: var(--border-light);
            border-radius: 3px;
        }
        ::-webkit-scrollbar-thumb:hover {
            background: var(--text-muted);
        }

        /* Sidebar */
        .sidebar {
            position: fixed;
            left: 0;
            top: 0;
            width: 260px;
            height: 100vh;
            background: var(--bg-elevated);
            border-right: 1px solid var(--border);
            z-index: 100;
            display: flex;
            flex-direction: column;
            transition: transform 0.3s ease;
        }

        .sidebar-header {
            padding: 24px 20px;
            border-bottom: 1px solid var(--border);
        }

        .logo {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .logo-icon {
            width: 36px;
            height: 36px;
            background: linear-gradient(135deg, var(--accent), var(--purple));
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 18px;
            overflow: hidden;
            flex-shrink: 0;
        }
        .logo-icon img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .logo-text {
            font-size: 18px;
            font-weight: 800;
            letter-spacing: -0.3px;
            line-height: 1.15;
        }

        .logo-caption {
            font-size: 11px;
            color: var(--text-muted);
            font-weight: 500;
            letter-spacing: 0.3px;
            margin-top: 1px;
        }

        .nav-section {
            padding: 16px 12px;
            flex: 1;
            overflow-y: auto;
        }

        .nav-label {
            font-size: 11px;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 1px;
            color: var(--text-muted);
            padding: 8px 16px;
            margin-bottom: 4px;
        }

        .nav-item {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 10px 16px;
            margin: 2px 0;
            border-radius: 10px;
            cursor: pointer;
            transition: all 0.2s ease;
            color: var(--text-secondary);
            font-size: 14px;
            font-weight: 500;
            position: relative;
        }

        .nav-item:hover {
            background: var(--bg-hover);
            color: var(--text-primary);
        }

        .nav-item.active {
            background: rgba(46, 134, 214, 0.12);
            color: var(--accent-dark);
        }

        .nav-item .nav-icon {
            width: 20px;
            text-align: center;
            font-size: 16px;
        }

        .nav-badge {
            margin-left: auto;
            background: var(--accent);
            color: white;
            font-size: 11px;
            font-weight: 600;
            padding: 2px 8px;
            border-radius: 10px;
        }

        .sidebar-footer {
            padding: 16px;
            border-top: 1px solid var(--border);
        }

        .storage-bar {
            height: 4px;
            background: var(--border);
            border-radius: 2px;
            overflow: hidden;
            margin-bottom: 8px;
        }

        .storage-fill {
            height: 100%;
            background: linear-gradient(90deg, var(--accent), var(--purple));
            border-radius: 2px;
            transition: width 0.5s ease;
        }

        .storage-text {
            font-size: 12px;
            color: var(--text-muted);
        }

        /* Main Content */
        .main {
            margin-left: 260px;
            min-height: 100vh;
            padding: 24px 32px;
        }

        .top-bar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 32px;
        }

        .page-title {
            font-size: 28px;
            font-weight: 800;
            letter-spacing: -0.5px;
        }

        .page-subtitle {
            font-size: 14px;
            color: var(--text-secondary);
            margin-top: 4px;
        }

        .top-actions {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .btn {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 10px 20px;
            border-radius: 10px;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            border: none;
            transition: all 0.2s ease;
            font-family: inherit;
        }

        .btn-primary {
            background: linear-gradient(135deg, var(--accent), var(--accent-dark));
            color: white;
            box-shadow: 0 4px 14px rgba(46, 134, 214, 0.3);
        }

        .btn-primary:hover {
            transform: translateY(-1px);
            box-shadow: 0 6px 20px rgba(46, 134, 214, 0.4);
        }

        .btn-ghost {
            background: var(--bg-card);
            color: var(--text-secondary);
            border: 1px solid var(--border);
        }

        .btn-ghost:hover {
            background: var(--bg-hover);
            color: var(--text-primary);
        }

        .btn-icon {
            width: 40px;
            height: 40px;
            padding: 0;
            justify-content: center;
            border-radius: 10px;
        }

        /* Stats Cards */
        .stats-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 16px;
            margin-bottom: 32px;
        }

        .stat-card {
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 16px;
            padding: 20px;
            position: relative;
            overflow: hidden;
            transition: all 0.3s ease;
        }

        .stat-card:hover {
            border-color: var(--border-light);
            transform: translateY(-2px);
        }

        .stat-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 3px;
            border-radius: 16px 16px 0 0;
        }

        .stat-card:nth-child(1)::before { background: linear-gradient(90deg, var(--accent), var(--purple)); }
        .stat-card:nth-child(2)::before { background: linear-gradient(90deg, var(--success), var(--teal)); }
        .stat-card:nth-child(3)::before { background: linear-gradient(90deg, var(--warning), var(--orange)); }
        .stat-card:nth-child(4)::before { background: linear-gradient(90deg, var(--pink), var(--danger)); }

        .stat-label {
            font-size: 13px;
            color: var(--text-secondary);
            font-weight: 500;
            margin-bottom: 8px;
        }

        .stat-value {
            font-size: 32px;
            font-weight: 800;
            letter-spacing: -1px;
        }

        .stat-change {
            font-size: 12px;
            font-weight: 600;
            margin-top: 4px;
        }

        .stat-change.positive { color: var(--success); }
        .stat-change.negative { color: var(--danger); }

        /* Section */
        .section {
            margin-bottom: 32px;
        }

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

        .section-title {
            font-size: 18px;
            font-weight: 700;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .section-actions {
            display: flex;
            gap: 8px;
        }

        .filter-pill {
            padding: 6px 14px;
            border-radius: 20px;
            font-size: 13px;
            font-weight: 500;
            cursor: pointer;
            border: 1px solid var(--border);
            background: transparent;
            color: var(--text-secondary);
            transition: all 0.2s ease;
            font-family: inherit;
        }

        .filter-pill:hover, .filter-pill.active {
            background: var(--accent);
            color: white;
            border-color: var(--accent);
        }

        /* Goal Cards */
        .goals-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
            gap: 16px;
        }

        .goal-card {
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 16px;
            padding: 20px;
            cursor: pointer;
            transition: all 0.3s ease;
            position: relative;
        }

        .goal-card:hover {
            border-color: var(--border-light);
            transform: translateY(-2px);
            box-shadow: 0 8px 32px rgba(16,35,46,0.10);
        }

        .goal-card.completed {
            opacity: 0.7;
        }

        .goal-card.completed .goal-title {
            text-decoration: line-through;
            color: var(--text-muted);
        }

        .goal-header {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            margin-bottom: 12px;
        }

        .goal-category {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 4px 10px;
            border-radius: 20px;
            font-size: 11px;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .cat-career { background: rgba(46, 134, 214, 0.15); color: var(--accent-light); }
        .cat-health { background: rgba(47, 168, 79, 0.15); color: var(--success); }
        .cat-finance { background: rgba(30, 95, 148, 0.15); color: var(--warning); }
        .cat-learning { background: rgba(95, 168, 224, 0.15); color: var(--accent-dark); }
        .cat-personal { background: rgba(224, 67, 61, 0.15); color: var(--pink); }
        .cat-relationship { background: rgba(89, 199, 115, 0.15); color: var(--info); }

        .goal-menu {
            background: none;
            border: none;
            color: var(--text-muted);
            cursor: pointer;
            padding: 4px;
            border-radius: 6px;
            font-size: 16px;
        }

        .goal-menu:hover {
            background: var(--bg-hover);
            color: var(--text-primary);
        }

        .goal-header-actions {
            display: flex;
            align-items: center;
            gap: 2px;
        }

        .goal-edit-btn {
            background: none;
            border: none;
            color: var(--text-muted);
            cursor: pointer;
            padding: 4px 6px;
            border-radius: 6px;
            font-size: 14px;
        }

        .goal-edit-btn:hover {
            background: var(--bg-hover);
            color: var(--accent);
        }

        .goal-title {
            font-size: 16px;
            font-weight: 700;
            margin-bottom: 8px;
            line-height: 1.4;
        }

        .goal-desc {
            font-size: 13px;
            color: var(--text-secondary);
            line-height: 1.5;
            margin-bottom: 16px;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }

        .goal-meta {
            display: flex;
            align-items: center;
            gap: 16px;
            margin-bottom: 16px;
            flex-wrap: wrap;
        }

        .meta-item {
            display: flex;
            align-items: center;
            gap: 6px;
            font-size: 12px;
            color: var(--text-muted);
        }

        .priority-badge {
            padding: 2px 8px;
            border-radius: 4px;
            font-size: 11px;
            font-weight: 600;
        }

        .priority-high { background: rgba(224, 67, 61, 0.15); color: var(--danger); }
        .priority-medium { background: rgba(30, 95, 148, 0.15); color: var(--warning); }
        .priority-low { background: rgba(47, 168, 79, 0.15); color: var(--success); }

        /* Progress */
        .progress-section {
            margin-bottom: 12px;
        }

        .progress-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 8px;
        }

        .progress-label {
            font-size: 12px;
            color: var(--text-secondary);
            font-weight: 500;
        }

        .progress-value {
            font-size: 12px;
            font-weight: 700;
        }

        .progress-bar {
            height: 6px;
            background: var(--bg);
            border-radius: 3px;
            overflow: hidden;
        }

        .progress-fill {
            height: 100%;
            border-radius: 3px;
            transition: width 0.5s ease;
            position: relative;
        }

        .progress-fill::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
            animation: shimmer 2s infinite;
        }

        @keyframes shimmer {
            0% { transform: translateX(-100%); }
            100% { transform: translateX(100%); }
        }

        .goal-footer {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding-top: 12px;
            border-top: 1px solid var(--border);
        }

        .milestones-count {
            font-size: 12px;
            color: var(--text-muted);
        }

        .milestones-count span {
            color: var(--text-secondary);
            font-weight: 600;
        }

        .check-btn {
            width: 32px;
            height: 32px;
            border-radius: 8px;
            border: 2px solid var(--border-light);
            background: transparent;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--text-muted);
            transition: all 0.2s ease;
            font-size: 14px;
        }

        .check-btn:hover {
            border-color: var(--success);
            color: var(--success);
        }

        .check-btn.checked {
            background: var(--success);
            border-color: var(--success);
            color: white;
        }

        /* Milestones List */
        .milestones-list {
            margin-top: 12px;
            padding-top: 12px;
            border-top: 1px solid var(--border);
        }

        .milestone-item {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 8px 0;
            font-size: 13px;
        }

        .milestone-check {
            width: 18px;
            height: 18px;
            border-radius: 4px;
            border: 2px solid var(--border-light);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            transition: all 0.2s ease;
            font-size: 10px;
        }

        .milestone-check:hover {
            border-color: var(--accent);
        }

        .milestone-check.done {
            background: var(--success);
            border-color: var(--success);
            color: white;
        }

        .milestone-text {
            color: var(--text-secondary);
            transition: all 0.2s ease;
        }

        .milestone-text.done {
            text-decoration: line-through;
            color: var(--text-muted);
        }

        /* Modal */
        .modal-overlay {
            position: fixed;
            inset: 0;
            background: rgba(0,0,0,0.7);
            backdrop-filter: blur(8px);
            z-index: 1000;
            display: none;
            align-items: center;
            justify-content: center;
            padding: 20px;
        }

        .modal-overlay.active {
            display: flex;
        }

        .modal {
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 20px;
            width: 100%;
            max-width: 600px;
            max-height: 90vh;
            overflow-y: auto;
            animation: modalIn 0.3s ease;
        }

        @keyframes modalIn {
            from { opacity: 0; transform: scale(0.95) translateY(10px); }
            to { opacity: 1; transform: scale(1) translateY(0); }
        }

        .modal-header {
            padding: 24px 24px 0;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .modal-title {
            font-size: 20px;
            font-weight: 800;
        }

        .modal-close {
            background: none;
            border: none;
            color: var(--text-muted);
            font-size: 24px;
            cursor: pointer;
            width: 36px;
            height: 36px;
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s ease;
        }

        .modal-close:hover {
            background: var(--bg-hover);
            color: var(--text-primary);
        }

        .modal-body {
            padding: 20px 24px;
        }

        .form-group {
            margin-bottom: 20px;
        }

        .form-label {
            display: block;
            font-size: 13px;
            font-weight: 600;
            margin-bottom: 8px;
            color: var(--text-secondary);
        }

        .form-input, .form-textarea, .form-select {
            width: 100%;
            padding: 12px 16px;
            background: var(--bg);
            border: 1px solid var(--border);
            border-radius: 10px;
            color: var(--text-primary);
            font-size: 14px;
            font-family: inherit;
            transition: all 0.2s ease;
        }

        .form-input:focus, .form-textarea:focus, .form-select:focus {
            outline: none;
            border-color: var(--accent);
            box-shadow: 0 0 0 3px rgba(46, 134, 214, 0.15);
        }

        .form-textarea {
            min-height: 80px;
            resize: vertical;
        }

        .form-row {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 16px;
        }

        .category-options {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
        }

        .cat-option {
            padding: 8px 14px;
            border-radius: 8px;
            border: 2px solid var(--border);
            background: transparent;
            color: var(--text-secondary);
            font-size: 13px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s ease;
            font-family: inherit;
        }

        .cat-option:hover, .cat-option.selected {
            border-color: var(--accent);
            color: var(--accent-light);
            background: rgba(46, 134, 214, 0.08);
        }

        .priority-options {
            display: flex;
            gap: 8px;
        }

        .priority-option {
            flex: 1;
            padding: 10px;
            border-radius: 10px;
            border: 2px solid var(--border);
            background: transparent;
            cursor: pointer;
            text-align: center;
            transition: all 0.2s ease;
            font-family: inherit;
        }

        .priority-option:hover, .priority-option.selected {
            border-color: var(--accent);
        }

        .priority-option .p-label {
            font-size: 12px;
            font-weight: 600;
            display: block;
            margin-bottom: 4px;
        }

        .priority-option .p-dot {
            width: 10px;
            height: 10px;
            border-radius: 50%;
            display: inline-block;
        }

        .milestones-input-area {
            margin-top: 12px;
        }

        .milestone-input-row {
            display: flex;
            gap: 8px;
            margin-bottom: 8px;
        }

        .milestone-input-row input {
            flex: 1;
            padding: 10px 14px;
            background: var(--bg);
            border: 1px solid var(--border);
            border-radius: 8px;
            color: var(--text-primary);
            font-size: 13px;
            font-family: inherit;
        }

        .milestone-input-row input:focus {
            outline: none;
            border-color: var(--accent);
        }

        .milestone-remove {
            background: none;
            border: none;
            color: var(--text-muted);
            cursor: pointer;
            padding: 4px 8px;
            border-radius: 6px;
            font-size: 16px;
        }

        .milestone-remove:hover {
            color: var(--danger);
            background: rgba(224, 67, 61, 0.1);
        }

        .add-milestone-btn {
            background: none;
            border: 1px dashed var(--border-light);
            color: var(--text-muted);
            padding: 10px;
            border-radius: 8px;
            width: 100%;
            cursor: pointer;
            font-size: 13px;
            font-weight: 500;
            transition: all 0.2s ease;
            font-family: inherit;
        }

        .add-milestone-btn:hover {
            border-color: var(--accent);
            color: var(--accent-light);
        }

        .modal-footer {
            padding: 16px 24px 24px;
            display: flex;
            justify-content: flex-end;
            gap: 10px;
        }

        /* Empty State */
        .empty-state {
            text-align: center;
            padding: 60px 20px;
            color: var(--text-muted);
        }

        .empty-icon {
            font-size: 48px;
            margin-bottom: 16px;
            opacity: 0.5;
        }

        .empty-title {
            font-size: 18px;
            font-weight: 700;
            color: var(--text-secondary);
            margin-bottom: 8px;
        }

        .empty-desc {
            font-size: 14px;
            margin-bottom: 20px;
        }

        /* Toast */
        .toast-container {
            position: fixed;
            top: 24px;
            right: 24px;
            z-index: 2000;
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .toast {
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 12px;
            padding: 14px 20px;
            display: flex;
            align-items: center;
            gap: 12px;
            box-shadow: 0 8px 32px rgba(16,35,46,0.14);
            animation: toastIn 0.3s ease;
            min-width: 280px;
        }

        @keyframes toastIn {
            from { opacity: 0; transform: translateX(20px); }
            to { opacity: 1; transform: translateX(0); }
        }

        .toast-icon {
            font-size: 20px;
        }

        .toast-text {
            font-size: 14px;
            font-weight: 500;
        }

        /* Dropdown Menu */
        .dropdown {
            position: relative;
        }

        .dropdown-menu {
            position: absolute;
            top: 100%;
            right: 0;
            margin-top: 4px;
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 10px;
            padding: 6px;
            min-width: 160px;
            box-shadow: 0 8px 32px rgba(16,35,46,0.14);
            z-index: 50;
            display: none;
        }

        .dropdown-menu.show {
            display: block;
            animation: dropdownIn 0.15s ease;
        }

        @keyframes dropdownIn {
            from { opacity: 0; transform: scale(0.95); }
            to { opacity: 1; transform: scale(1); }
        }

        .dropdown-item {
            padding: 8px 12px;
            border-radius: 6px;
            font-size: 13px;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 8px;
            transition: all 0.15s ease;
            color: var(--text-secondary);
        }

        .dropdown-item:hover {
            background: var(--bg-hover);
            color: var(--text-primary);
        }

        .dropdown-item.danger {
            color: var(--danger);
        }

        .dropdown-item.danger:hover {
            background: rgba(224, 67, 61, 0.1);
        }

        /* Responsive */
        @media (max-width: 1024px) {
            .stats-grid {
                grid-template-columns: repeat(2, 1fr);
            }
        }

        @media (max-width: 768px) {
            .sidebar {
                transform: translateX(-100%);
            }
            .sidebar.open {
                transform: translateX(0);
            }
            .main {
                margin-left: 0;
                padding: 16px;
            }
            .stats-grid {
                grid-template-columns: 1fr;
            }
            .goals-grid {
                grid-template-columns: 1fr;
            }
            .form-row {
                grid-template-columns: 1fr;
            }
        }

        /* Mobile menu toggle */
        .mobile-toggle {
            display: none;
            background: none;
            border: none;
            color: var(--text-primary);
            font-size: 24px;
            cursor: pointer;
            padding: 8px;
        }

        @media (max-width: 768px) {
            .mobile-toggle {
                display: block;
            }
        }

        /* Animations */
        .fade-in {
            animation: fadeIn 0.4s ease;
        }

        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(10px); }
            to { opacity: 1; transform: translateY(0); }
        }

        /* Confetti */
        .confetti {
            position: fixed;
            width: 10px;
            height: 10px;
            pointer-events: none;
            z-index: 3000;
        }

        /* Page sections */
        .page-section {
            display: none;
        }

        .page-section.active {
            display: block;
            animation: fadeIn 0.3s ease;
        }

        /* Vision Board */
        .vision-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
            gap: 20px;
        }

        .vision-card {
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 16px;
            overflow: hidden;
            transition: all 0.3s ease;
            position: relative;
        }

        .vision-card:hover {
            transform: translateY(-4px);
            box-shadow: 0 12px 40px rgba(16,35,46,0.10);
        }

        .vision-image {
            width: 100%;
            height: 180px;
            background: linear-gradient(135deg, var(--accent), var(--purple));
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 48px;
            position: relative;
            overflow: hidden;
        }

        .vision-image img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
        }

        .vision-card-actions {
            position: absolute;
            top: 10px;
            right: 10px;
            display: flex;
            gap: 6px;
            z-index: 2;
        }

        .vision-icon-btn {
            width: 28px;
            height: 28px;
            border-radius: 8px;
            border: none;
            background: rgba(22, 35, 46, 0.55);
            color: #fff;
            cursor: pointer;
            font-size: 13px;
            display: flex;
            align-items: center;
            justify-content: center;
            backdrop-filter: blur(2px);
        }
        .vision-icon-btn:hover { background: rgba(22, 35, 46, 0.8); }
        .vision-icon-btn.danger:hover { background: var(--danger); }

        .vision-content {
            padding: 16px;
        }

        .vision-title {
            font-size: 15px;
            font-weight: 700;
            margin-bottom: 4px;
        }

        .vision-desc {
            font-size: 13px;
            color: var(--text-secondary);
            margin-bottom: 10px;
            line-height: 1.5;
        }

        .vision-why {
            font-size: 12.5px;
            color: var(--text-secondary);
            font-style: italic;
            border-left: 2px solid var(--accent-light);
            padding-left: 10px;
            margin-bottom: 10px;
            line-height: 1.5;
        }

        .vision-meta {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
            align-items: center;
        }

        .vision-tag {
            font-size: 10.5px;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.04em;
            padding: 3px 9px;
            border-radius: 20px;
            background: var(--bg-elevated);
            color: var(--text-secondary);
        }
        .vision-tag.date { color: var(--accent-dark); }
        .vision-tag.date.overdue { color: var(--danger); }

        /* Calendar View */
        .calendar-grid {
            display: grid;
            grid-template-columns: repeat(7, 1fr);
            gap: 8px;
        }

        .calendar-day-header {
            text-align: center;
            font-size: 12px;
            font-weight: 600;
            color: var(--text-muted);
            padding: 8px;
            text-transform: uppercase;
        }

        .calendar-day {
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 10px;
            padding: 8px;
            cursor: pointer;
            transition: all 0.2s ease;
            position: relative;
            min-height: 96px;
            display: flex;
            flex-direction: column;
        }

        .calendar-day:hover {
            border-color: var(--accent);
        }

        .calendar-day-notes-preview {
            display: flex;
            flex-direction: column;
            gap: 2px;
            margin-top: 4px;
            overflow: hidden;
        }
        .calendar-day-note-line {
            font-size: 10px;
            color: var(--text-secondary);
            background: var(--bg-elevated);
            border-radius: 4px;
            padding: 2px 5px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            line-height: 1.4;
        }

        .calendar-day-number {
            font-size: 14px;
            font-weight: 600;
            margin-bottom: 4px;
        }

        .calendar-day-today {
            background: rgba(46, 134, 214, 0.1);
            border-color: var(--accent);
        }

        .calendar-day-today .calendar-day-number {
            color: var(--accent-light);
        }

        .calendar-dot {
            width: 6px;
            height: 6px;
            border-radius: 50%;
            display: inline-block;
            margin-right: 2px;
        }

        .calendar-note-icon {
            position: absolute;
            top: 6px;
            right: 6px;
            font-size: 11px;
        }

        .calendar-view-switch {
            display: flex;
            gap: 6px;
        }

        /* Week view */
        .calendar-week-grid {
            display: grid;
            grid-template-columns: repeat(7, 1fr);
            gap: 8px;
        }
        .calendar-week-day {
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 10px;
            padding: 10px;
            cursor: pointer;
            min-height: 160px;
            display: flex;
            flex-direction: column;
            gap: 6px;
            transition: border-color 0.15s ease;
        }
        .calendar-week-day:hover { border-color: var(--accent); }
        .calendar-week-day.today { background: rgba(46,134,214,0.1); border-color: var(--accent); }
        .calendar-week-day-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; font-weight: 600; }
        .calendar-week-day-number { font-size: 18px; font-weight: 700; }
        .calendar-week-item { font-size: 11px; padding: 3px 6px; border-radius: 6px; background: var(--bg-elevated); color: var(--text-secondary); line-height: 1.3; }
        .calendar-week-note { font-size: 11px; padding: 3px 6px; border-radius: 6px; background: rgba(46,134,214,0.1); color: var(--accent-dark); line-height: 1.3; }

        /* Year view */
        .calendar-year-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
            gap: 16px;
        }
        .calendar-year-month {
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 12px;
            padding: 12px;
        }
        .calendar-year-month-title {
            font-size: 13px;
            font-weight: 700;
            margin-bottom: 8px;
            text-align: center;
        }
        .calendar-year-mini-grid {
            display: grid;
            grid-template-columns: repeat(7, 1fr);
            gap: 3px;
        }
        .calendar-year-mini-day {
            aspect-ratio: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 9px;
            border-radius: 4px;
            color: var(--text-muted);
            cursor: pointer;
            position: relative;
        }
        .calendar-year-mini-day:hover { background: var(--bg-hover); }
        .calendar-year-mini-day.has-activity { background: rgba(46,134,214,0.15); color: var(--accent-dark); font-weight: 700; }
        .calendar-year-mini-day.is-today { outline: 1.5px solid var(--accent); color: var(--accent-dark); font-weight: 700; }

        /* Analytics */
        .chart-container {
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 16px;
            padding: 24px;
            margin-bottom: 20px;
        }

        .chart-title {
            font-size: 16px;
            font-weight: 700;
            margin-bottom: 20px;
        }

        .bar-chart {
            display: flex;
            align-items: flex-end;
            gap: 12px;
            height: 200px;
            padding-bottom: 30px;
            border-bottom: 1px solid var(--border);
            position: relative;
        }

        .bar-item {
            flex: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 8px;
        }

        .bar {
            width: 100%;
            max-width: 40px;
            background: linear-gradient(to top, var(--accent), var(--purple));
            border-radius: 6px 6px 0 0;
            transition: height 0.5s ease;
            position: relative;
        }

        .bar-label {
            font-size: 11px;
            color: var(--text-muted);
            font-weight: 500;
        }

        .bar-value {
            position: absolute;
            top: -20px;
            left: 50%;
            transform: translateX(-50%);
            font-size: 11px;
            font-weight: 700;
            color: var(--text-secondary);
            white-space: nowrap;
        }

        /* Habit Tracker */
        .habit-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
            gap: 16px;
        }

        .habit-card {
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 16px;
            padding: 20px;
        }

        .habit-header {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            margin-bottom: 12px;
            gap: 10px;
        }

        .habit-name {
            font-size: 15px;
            font-weight: 700;
        }

        .habit-streak {
            font-size: 12px;
            color: var(--warning);
            font-weight: 600;
            white-space: nowrap;
        }

        .habit-header-actions {
            display: flex;
            align-items: center;
            gap: 2px;
            flex-shrink: 0;
        }

        .habit-icon-btn {
            background: none;
            border: none;
            color: var(--text-muted);
            cursor: pointer;
            padding: 4px 6px;
            border-radius: 6px;
            font-size: 13px;
        }
        .habit-icon-btn:hover { background: var(--bg-hover); color: var(--accent); }
        .habit-icon-btn.danger:hover { color: var(--danger); }

        .habit-meta-row {
            display: flex;
            gap: 8px;
            align-items: flex-start;
            font-size: 12px;
            color: var(--text-secondary);
            margin-bottom: 6px;
            line-height: 1.4;
        }
        .habit-meta-row .tag-icon { flex-shrink: 0; }
        .habit-meta-row b { color: var(--text-primary); font-weight: 600; }

        .habit-consistency-row {
            display: flex;
            align-items: center;
            gap: 8px;
            margin: 12px 0;
        }
        .habit-consistency-bar {
            flex: 1;
            height: 6px;
            background: var(--bg-elevated);
            border-radius: 4px;
            overflow: hidden;
        }
        .habit-consistency-fill { height: 100%; border-radius: 4px; }
        .habit-consistency-label { font-size: 11px; color: var(--text-muted); font-weight: 600; white-space: nowrap; }

        .habit-days {
            display: flex;
            gap: 6px;
            flex-wrap: wrap;
        }

        .habit-day {
            width: 32px;
            height: 32px;
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 11px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s ease;
            border: 1px solid var(--border);
            background: var(--bg);
            color: var(--text-muted);
        }

        .habit-day.done {
            background: var(--success);
            border-color: var(--success);
            color: white;
        }

        .habit-day:hover {
            border-color: var(--accent);
        }

        /* Compounding callout */
        .compound-note {
            display: flex;
            align-items: flex-start;
            gap: 14px;
            background: rgba(46, 134, 214, 0.08);
            border: 1px solid var(--border);
            border-left: 3px solid var(--accent);
            border-radius: 12px;
            padding: 16px 18px;
            margin-bottom: 28px;
            font-size: 13.5px;
            color: var(--text-secondary);
            line-height: 1.55;
        }
        .compound-icon { font-size: 18px; flex-shrink: 0; }
        .compound-note b { color: var(--text-primary); }

        /* Identity layers */
        .identity-layers {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 16px;
        }
        .layer-card {
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 14px;
            padding: 20px;
        }
        .layer-eyebrow {
            font-size: 11px;
            text-transform: uppercase;
            letter-spacing: 0.06em;
            color: var(--text-muted);
            font-weight: 600;
            margin-bottom: 8px;
        }
        .layer-title {
            font-size: 15px;
            font-weight: 700;
            margin-bottom: 8px;
        }
        .layer-desc {
            font-size: 13px;
            color: var(--text-secondary);
            line-height: 1.55;
        }

        /* Identity statement list */
        .identity-list { display: flex; flex-direction: column; gap: 8px; }
        .identity-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 10px;
            padding: 12px 16px;
            font-size: 14px;
        }
        .identity-item .del-btn {
            background: none;
            border: none;
            color: var(--text-muted);
            cursor: pointer;
            font-size: 16px;
            line-height: 1;
            flex-shrink: 0;
        }
        .identity-item .del-btn:hover { color: var(--danger); }

        /* Four laws grid */
        .laws-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 16px;
        }
        .law-card {
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 14px;
            padding: 20px;
        }
        .law-number {
            font-size: 22px;
            font-weight: 800;
            font-family: monospace;
            margin-bottom: 6px;
        }
        .law-title {
            font-size: 14.5px;
            font-weight: 700;
            margin-bottom: 8px;
        }
        .law-desc {
            font-size: 12.5px;
            color: var(--text-secondary);
            line-height: 1.5;
        }

        /* Trend sparkline */
        .trend-chart-svg { width: 100%; height: 140px; display: block; }

        /* Identity page: hero stat */
        .power-stat-wrap {
            display: flex;
            align-items: center;
            gap: 24px;
            background: linear-gradient(135deg, rgba(46,134,214,0.06), rgba(47,168,79,0.06));
            border: 1px solid var(--border);
            border-radius: 16px;
            padding: 24px 28px;
            margin-bottom: 24px;
            flex-wrap: wrap;
        }
        .power-stat-number {
            font-size: 42px;
            font-weight: 800;
            font-family: monospace;
            color: var(--accent);
            line-height: 1;
            flex-shrink: 0;
        }
        .power-stat-text {
            font-size: 13.5px;
            color: var(--text-secondary);
            line-height: 1.6;
            max-width: 560px;
        }
        .power-stat-text b { color: var(--text-primary); }

        /* Law card tip list */
        .law-tips {
            margin: 10px 0 0;
            padding-left: 18px;
            font-size: 12px;
            color: var(--text-secondary);
            line-height: 1.65;
        }
        .law-tips li { margin-bottom: 3px; }

        /* Loop steps / inversion cards reuse .laws-grid; step badges */
        .step-badge {
            display: inline-block;
            font-size: 10.5px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.06em;
            color: var(--text-muted);
            margin-bottom: 6px;
        }

        /* Valley of latent potential chart */
        .valley-wrap {
            display: flex;
            gap: 24px;
            align-items: center;
            flex-wrap: wrap;
        }
        .valley-svg { width: 100%; max-width: 460px; height: 200px; flex-shrink: 0; }
        .valley-legend {
            display: flex;
            flex-direction: column;
            gap: 10px;
            font-size: 13px;
            color: var(--text-secondary);
            flex: 1;
            min-width: 220px;
        }
        .valley-legend .dot {
            display: inline-block;
            width: 10px; height: 10px;
            border-radius: 50%;
            margin-right: 8px;
        }

        .callout-tip {
            display: flex;
            align-items: flex-start;
            gap: 14px;
            background: rgba(47, 168, 79, 0.08);
            border: 1px solid var(--border);
            border-left: 3px solid var(--success);
            border-radius: 12px;
            padding: 16px 18px;
            font-size: 13.5px;
            color: var(--text-secondary);
            line-height: 1.55;
        }
        .callout-tip b { color: var(--text-primary); }

        @media (max-width: 900px) {
            .identity-layers, .laws-grid { grid-template-columns: 1fr; }
        }

        /* Search */
        .search-bar {
            position: relative;
            margin-bottom: 24px;
        }

        .search-input {
            width: 100%;
            padding: 14px 20px 14px 48px;
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 12px;
            color: var(--text-primary);
            font-size: 14px;
            font-family: inherit;
            transition: all 0.2s ease;
        }

        .search-input:focus {
            outline: none;
            border-color: var(--accent);
            box-shadow: 0 0 0 3px rgba(46, 134, 214, 0.15);
        }

        .search-icon {
            position: absolute;
            left: 18px;
            top: 50%;
            transform: translateY(-50%);
            color: var(--text-muted);
            font-size: 16px;
        }

        /* Export/Import */
        .settings-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
            gap: 20px;
        }

        .settings-card {
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 16px;
            padding: 24px;
        }

        .settings-card h3 {
            font-size: 16px;
            font-weight: 700;
            margin-bottom: 8px;
        }

        .settings-card p {
            font-size: 13px;
            color: var(--text-secondary);
            margin-bottom: 16px;
            line-height: 1.5;
        }

        .file-input-wrapper {
            position: relative;
            overflow: hidden;
            display: inline-block;
        }

        .file-input-wrapper input[type=file] {
            position: absolute;
            left: -9999px;
        }

        .file-input-label {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 10px 20px;
            background: var(--bg-hover);
            border: 1px solid var(--border);
            border-radius: 10px;
            cursor: pointer;
            font-size: 14px;
            font-weight: 500;
            color: var(--text-secondary);
            transition: all 0.2s ease;
        }

        .file-input-label:hover {
            border-color: var(--accent);
            color: var(--accent-light);
        }

        /* Export format picker */
        .export-format-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 12px;
        }
        .export-format-btn {
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            gap: 4px;
            text-align: left;
            background: var(--bg-elevated);
            border: 1px solid var(--border);
            border-radius: 12px;
            padding: 14px 16px;
            cursor: pointer;
            transition: all 0.15s ease;
            font-family: inherit;
        }
        .export-format-btn:hover {
            border-color: var(--accent);
            background: var(--bg-hover);
            transform: translateY(-1px);
        }
        .export-format-icon { font-size: 20px; }
        .export-format-name { font-size: 14px; font-weight: 700; color: var(--text-primary); }
        .export-format-desc { font-size: 11.5px; color: var(--text-muted); line-height: 1.4; }

        @media (max-width: 560px) {
            .export-format-grid { grid-template-columns: 1fr; }
        }
