/* Premium Obsidian & Alternate Themes Configuration */
:root {
    --bg-color: #06090F;
    --sidebar-color: #080C13;
    --panel-color: #0C121C;
    --panel-sec-color: #111925;
    --text-primary: #F4F7FB;
    --text-muted: #778398;
    --border-color: #1B2737;
    --accent: #58E6B2;
    --accent-dark: #21B981;
    --accent-glow: rgba(88, 230, 178, 0.2);
    --font-stack: 'Manrope', 'Noto Sans Bengali', sans-serif;
    --anim-duration: 0.3s;
    --transition-curve: cubic-bezier(0.16, 1, 0.3, 1);
}

.theme-arctic {
    --bg-color: #F3F5F9;
    --sidebar-color: #FFFFFF;
    --panel-color: #FFFFFF;
    --panel-sec-color: #EDEFF4;
    --text-primary: #1C2330;
    --text-muted: #64738C;
    --border-color: #D3DCE6;
    --accent: #3296FA;
    --accent-dark: #1973D2;
    --accent-glow: rgba(50, 150, 250, 0.15);
}

.theme-emerald {
    --bg-color: #030A07;
    --sidebar-color: #05120C;
    --panel-color: #091B12;
    --panel-sec-color: #0F2E1E;
    --text-primary: #E6F3EC;
    --text-muted: #6C8E7E;
    --border-color: #1A3E2C;
    --accent: #10B981;
    --accent-dark: #059669;
    --accent-glow: rgba(16, 185, 129, 0.2);
}

.theme-violet {
    --bg-color: #0B0714;
    --sidebar-color: #110B1E;
    --panel-color: #19112B;
    --panel-sec-color: #241A3B;
    --text-primary: #F3EFFF;
    --text-muted: #8E7CAE;
    --border-color: #332650;
    --accent: #8B5CF6;
    --accent-dark: #7C3AED;
    --accent-glow: rgba(139, 92, 246, 0.2);
}

/* Global resets and typography */
*, *::before, *::after {
    box-sizing: border-box;
}

body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-stack);
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Premium Boot Loader Screen */
#boot-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #06090F;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 1;
    transition: opacity 0.5s var(--transition-curve);
}

#boot-loader.fade-out {
    opacity: 0;
    pointer-events: none;
}

.boot-logo-container {
    text-align: center;
}

.boot-logo {
    width: 80px;
    height: 80px;
    color: var(--accent);
    margin: 0 auto 20px;
}

.boot-title {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.15em;
    color: #F4F7FB;
    margin: 0 0 4px;
}

.boot-subtitle {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3em;
    color: var(--text-muted);
    margin: 0 0 30px;
}

.boot-progress-wrapper {
    width: 180px;
    height: 3px;
    background-color: #1B2737;
    border-radius: 2px;
    margin: 0 auto 15px;
    overflow: hidden;
    position: relative;
}

.boot-progress-bar {
    width: 100%;
    height: 100%;
    background-color: var(--accent);
    box-shadow: 0 0 10px var(--accent);
    transform: translateX(-100%);
    animation: boot-load-anim 1.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.boot-status {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.12em;
    color: var(--accent);
    text-transform: uppercase;
}

@keyframes boot-load-anim {
    0% { transform: translateX(-100%); }
    60% { transform: translateX(-30%); }
    100% { transform: translateX(0%); }
}

/* Master Grid Structure */
.app-container {
    display: flex;
    width: 100%;
    height: 100%;
}

/* Fixed Navigation Sidebar */
.sidebar {
    width: 270px;
    background-color: var(--sidebar-color);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    padding: 24px 16px;
    z-index: 100;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px 24px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-logo {
    width: 32px;
    height: 32px;
    color: var(--accent);
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.brand-subtitle {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--text-muted);
}

.sidebar-nav {
    flex-grow: 1;
    margin-top: 32px;
}

.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    transition: all var(--anim-duration) var(--transition-curve);
    margin-bottom: 6px;
    position: relative;
}

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

.nav-item.active {
    color: var(--accent);
    background-color: var(--panel-color);
    box-shadow: inset 3px 0 0 var(--accent);
}

.nav-icon {
    width: 20px;
    height: 20px;
    stroke-width: 2;
    stroke: currentColor;
    fill: none;
}

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

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background-color: var(--panel-color);
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    color: #06090F;
    font-weight: 800;
    font-size: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 10px var(--accent-glow);
}

.user-meta {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 13px;
    font-weight: 700;
}

.user-status {
    font-size: 9px;
    font-weight: 800;
    color: var(--accent);
    letter-spacing: 0.05em;
}

/* Workspace main canvas */
.main-workspace {
    flex-grow: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 30px 40px;
}

/* System Top Status Bar */
.system-status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.keyboard-shortcut-hint {
    font-size: 11px;
    color: var(--text-muted);
}

.keyboard-shortcut-hint kbd {
    background-color: var(--panel-sec-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 2px 6px;
    font-family: monospace;
    font-size: 10px;
    color: var(--text-primary);
}

.status-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.level-badge {
    font-size: 11px;
    font-weight: 800;
    color: var(--accent);
    background-color: var(--accent-glow);
    border: 1px solid var(--accent);
    padding: 4px 10px;
    border-radius: 20px;
    letter-spacing: 0.1em;
}

.xp-progress-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 160px;
}

.xp-numbers {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-align: right;
}

.xp-numbers span {
    color: var(--text-primary);
}

.xp-bar-track {
    width: 100%;
    height: 4px;
    background-color: var(--panel-sec-color);
    border-radius: 2px;
    overflow: hidden;
}

.xp-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent) 0%, var(--accent-dark) 100%);
    border-radius: 2px;
    transition: width 0.4s var(--transition-curve);
}

.focus-mode-btn {
    background-color: var(--panel-color);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font-stack);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all var(--anim-duration) var(--transition-curve);
}

.focus-mode-btn:hover {
    border-color: var(--accent);
    box-shadow: 0 0 12px var(--accent-glow);
}

.focus-mode-btn .btn-icon {
    stroke: var(--accent);
    fill: none;
    stroke-width: 2;
}

/* Page Views structure */
.app-view {
    display: none;
    flex-direction: column;
    animation: viewFadeIn 0.4s var(--transition-curve) forwards;
}

.app-view.active {
    display: flex;
}

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

/* Premium Mission Hero Card */
.hero-card {
    background: linear-gradient(135deg, var(--panel-color) 0%, var(--panel-sec-color) 100%);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    margin-bottom: 30px;
}

.hero-card::after {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background-color: var(--accent);
    filter: blur(100px);
    opacity: 0.12;
    pointer-events: none;
}

.hero-left {
    flex-grow: 1;
    max-width: 60%;
}

.hero-label {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.15em;
    color: var(--accent);
    text-transform: uppercase;
}

.hero-headline {
    font-size: 26px;
    font-weight: 800;
    margin: 10px 0;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.hero-desc {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.hero-actions-container {
    display: flex;
    align-items: center;
    gap: 16px;
}

.btn-primary {
    background-color: var(--accent);
    color: #06090F;
    border: none;
    padding: 12px 24px;
    font-size: 13px;
    font-weight: 750;
    border-radius: 8px;
    cursor: pointer;
    font-family: var(--font-stack);
    transition: all var(--anim-duration) var(--transition-curve);
}

.btn-primary:hover {
    background-color: var(--accent-dark);
    box-shadow: 0 0 15px var(--accent-glow);
}

.btn-secondary {
    background-color: var(--panel-sec-color);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 12px 24px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    font-family: var(--font-stack);
    transition: all var(--anim-duration) var(--transition-curve);
}

.btn-secondary:hover {
    border-color: var(--text-muted);
}

.streak-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: var(--panel-sec-color);
    border: 1px solid var(--border-color);
    padding: 10px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    color: var(--accent);
}

.streak-pill svg {
    stroke: var(--accent);
}

/* Progress Ring Visual */
.progress-ring-container {
    position: relative;
    width: 140px;
    height: 140px;
}

.progress-ring-svg {
    transform: rotate(-90deg);
}

.progress-ring-indicator {
    transition: stroke-dashoffset 0.6s var(--transition-curve);
}

.progress-ring-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.ring-percentage {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.ring-sub {
    font-size: 9px;
    font-weight: 800;
    color: var(--text-muted);
    letter-spacing: 0.08em;
}

/* Metrics Dashboard Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.metric-card {
    background-color: var(--panel-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.metric-title {
    font-size: 10px;
    font-weight: 800;
    color: var(--text-muted);
    letter-spacing: 0.1em;
}

.metric-val {
    font-size: 26px;
    font-weight: 800;
}

/* Split Columns */
.dashboard-split {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 30px;
}

.dashboard-main-col {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.dashboard-side-col {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.panel-card {
    background-color: var(--panel-color);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 24px;
}

.panel-header {
    margin-bottom: 20px;
}

.panel-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 4px;
}

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

/* Today Habits Checklist */
.today-habits-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.habit-row {
    background-color: var(--panel-sec-color);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all var(--anim-duration) var(--transition-curve);
    cursor: pointer;
}

.habit-row:hover {
    border-color: var(--text-muted);
}

.habit-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.habit-icon-box {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: var(--panel-color);
    color: var(--accent);
    display: flex;
    justify-content: center;
    align-items: center;
}

.habit-icon-box svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 1.7;
    fill: none;
}

.habit-details {
    display: flex;
    flex-direction: column;
}

.habit-title {
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 2px;
}

.habit-sub-info {
    font-size: 11px;
    color: var(--text-muted);
}

.habit-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.habit-streak-display {
    font-size: 11px;
    font-weight: 700;
    color: var(--accent);
    background-color: var(--accent-glow);
    padding: 2px 8px;
    border-radius: 10px;
}

/* Double state execution checkbox */
.habit-checkbox {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    border: 1.5px solid var(--border-color);
    background-color: var(--panel-color);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    color: transparent;
    transition: all 0.2s var(--transition-curve);
}

.habit-row.completed .habit-checkbox {
    background-color: var(--accent);
    border-color: var(--accent);
    color: #06090F;
}

.habit-checkbox svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    stroke-width: 3;
    fill: none;
}

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

/* 180-day Contribution Heatmap style */
.heatmap-outer {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.heatmap-wrapper {
    display: grid;
    grid-auto-flow: column;
    grid-template-columns: repeat(26, 1fr);
    grid-template-rows: repeat(7, 1fr);
    gap: 4px;
}

.heatmap-cell {
    width: 100%;
    aspect-ratio: 1;
    background-color: var(--panel-sec-color);
    border-radius: 2px;
    position: relative;
    cursor: pointer;
}

.heatmap-cell.level-0 { background-color: var(--panel-sec-color); }
.heatmap-cell.level-1 { background-color: rgba(88, 230, 178, 0.15); }
.heatmap-cell.level-2 { background-color: rgba(88, 230, 178, 0.35); }
.heatmap-cell.level-3 { background-color: rgba(88, 230, 178, 0.6); }
.heatmap-cell.level-4 { background-color: var(--accent); }

/* Heatmap Tooltip */
.heatmap-cell::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 5px);
    left: 50%;
    transform: translateX(-50%) scale(0.9);
    background-color: #0c121c;
    border: 1px solid #1b2737;
    color: #f4f7fb;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 10px;
    white-space: nowrap;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: all 0.15s var(--transition-curve);
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.heatmap-cell:hover::after {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}

.heatmap-legend {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--text-muted);
}

.legend-cell {
    width: 12px;
    height: 12px;
    border-radius: 2px;
}

/* Custom SVG Chart Elements */
.chart-container-7day {
    width: 100%;
    height: 180px;
    margin-bottom: 16px;
}

.bar-rect {
    fill: var(--accent);
    opacity: 0.85;
    transition: opacity 0.2s;
    cursor: pointer;
}

.bar-rect:hover {
    opacity: 1;
}

.smart-insight-box {
    background-color: var(--panel-sec-color);
    border-left: 3px solid var(--accent);
    padding: 12px 16px;
    border-radius: 0 8px 8px 0;
    font-size: 12px;
    line-height: 1.5;
    color: var(--text-primary);
}

/* Category alignment indicators */
.category-mix-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.category-mix-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cat-row-label {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    font-weight: 700;
}

.cat-bar-track {
    width: 100%;
    height: 5px;
    background-color: var(--panel-sec-color);
    border-radius: 3px;
    overflow: hidden;
}

.cat-bar-fill {
    height: 100%;
    background-color: var(--accent);
    border-radius: 3px;
    transition: width 0.5s var(--transition-curve);
}

/* Library View Structures */
.library-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.view-title {
    font-size: 22px;
    font-weight: 800;
    margin: 0 0 4px;
}

.view-subtitle {
    font-size: 13px;
    color: var(--text-muted);
}

.filters-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.search-input-wrapper {
    position: relative;
    width: 280px;
}

.search-input-wrapper svg {
    position: absolute;
    top: 50%;
    left: 12px;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-input-wrapper input {
    width: 100%;
    background-color: var(--panel-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 12px 10px 38px;
    color: var(--text-primary);
    font-family: var(--font-stack);
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s;
}

.search-input-wrapper input:focus {
    border-color: var(--accent);
}

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

.filter-btn {
    background-color: var(--panel-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    font-family: var(--font-stack);
    transition: all 0.2s;
}

.filter-btn:hover {
    border-color: var(--text-primary);
    color: var(--text-primary);
}

.filter-btn.active {
    background-color: var(--accent);
    border-color: var(--accent);
    color: #06090F;
}

/* Habit Library Cards Grid */
.library-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.habit-card {
    background-color: var(--panel-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 180px;
    cursor: pointer;
    transition: all var(--anim-duration) var(--transition-curve);
}

.habit-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

.card-top {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.card-headline {
    font-size: 16px;
    font-weight: 700;
    margin: 0;
}

.card-desc {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
}

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

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

.card-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s;
}

.card-btn:hover {
    color: var(--text-primary);
    background-color: var(--panel-sec-color);
}

.card-btn.delete:hover {
    color: #EF4444;
}

/* Modals System overlay styling */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s var(--transition-curve);
}

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

.modal-window {
    background-color: var(--panel-color);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    width: 100%;
    max-width: 460px;
    padding: 30px;
    transform: scale(0.92);
    transition: transform 0.3s var(--transition-curve);
}

.modal-overlay.active .modal-window {
    transform: scale(1);
}

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

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

.modal-close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.form-group label {
    font-size: 11px;
    font-weight: 800;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.form-group input, .form-group textarea, .custom-select {
    background-color: var(--panel-sec-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
    color: var(--text-primary);
    font-family: var(--font-stack);
    font-size: 13px;
    outline: none;
}

.form-group input:focus, .form-group textarea:focus, .custom-select:focus {
    border-color: var(--accent);
}

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

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}

/* Premium Details Slide Drawer */
.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    display: none;
    justify-content: flex-end;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s var(--transition-curve);
}

.drawer-overlay.active {
    display: flex;
    opacity: 1;
}

.drawer-panel {
    width: 440px;
    max-width: 90%;
    height: 100%;
    background-color: var(--panel-color);
    border-left: 1px solid var(--border-color);
    padding: 40px 30px;
    transform: translateX(100%);
    transition: transform 0.3s var(--transition-curve);
    overflow-y: auto;
}

.drawer-overlay.active .drawer-panel {
    transform: translateX(0);
}

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

.drawer-glyph-container {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background-color: var(--panel-sec-color);
    color: var(--accent);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 16px;
}

.drawer-glyph-container svg {
    width: 32px;
    height: 32px;
    stroke: currentColor;
    stroke-width: 1.7;
    fill: none;
}

.drawer-title {
    font-size: 22px;
    font-weight: 800;
    margin: 0 0 8px;
}

.drawer-category-pill {
    display: inline-block;
    font-size: 11px;
    font-weight: 800;
    color: var(--accent);
    background-color: var(--accent-glow);
    padding: 4px 12px;
    border-radius: 12px;
    margin-bottom: 30px;
    text-transform: uppercase;
}

.drawer-details-section {
    margin-bottom: 24px;
}

.drawer-details-section label {
    display: block;
    font-size: 10px;
    font-weight: 800;
    color: var(--text-muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.drawer-purpose-text {
    font-size: 13px;
    color: var(--text-primary);
    line-height: 1.6;
}

.drawer-stats-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.drawer-stat-box {
    background-color: var(--panel-sec-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
}

.drawer-stat-lbl {
    display: block;
    font-size: 9px;
    font-weight: 800;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.drawer-stat-val {
    font-size: 18px;
    font-weight: 800;
}

.completion-rate-bar-track {
    width: 100%;
    height: 6px;
    background-color: var(--panel-sec-color);
    border-radius: 3px;
}

.completion-rate-bar-fill {
    height: 100%;
    background-color: var(--accent);
    border-radius: 3px;
    transition: width 0.4s;
}

.mini-heatmap-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 6px;
}

.mini-cell {
    aspect-ratio: 1;
    border-radius: 3px;
    background-color: var(--panel-sec-color);
}

.mini-cell.active {
    background-color: var(--accent);
}

/* History Calendar Matrix design */
.calendar-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.calendar-nav-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.calendar-current-month {
    font-size: 14px;
    font-weight: 800;
}

.nav-arrow {
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-arrow svg {
    stroke-width: 2.5;
}

.calendar-card {
    background-color: var(--panel-color);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
}

.calendar-days-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 11px;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 16px;
}

.calendar-grid-cells {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
}

.calendar-day-cell {
    aspect-ratio: 1.1;
    background-color: var(--panel-sec-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.2s;
}

.calendar-day-cell:hover {
    border-color: var(--text-primary);
}

.calendar-day-cell.today {
    border-color: var(--accent);
    box-shadow: 0 0 10px var(--accent-glow);
}

.day-num {
    font-size: 13px;
    font-weight: 700;
}

.day-completion-rate {
    font-size: 10px;
    font-weight: 800;
    color: var(--accent);
    text-align: right;
}

.day-progress-line-track {
    width: 100%;
    height: 3px;
    background-color: var(--panel-color);
    border-radius: 1px;
    overflow: hidden;
}

.day-progress-line-fill {
    height: 100%;
    background-color: var(--accent);
    border-radius: 1px;
}

/* System achievements showcase layout */
.achievements-showcase-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.achievement-card {
    background-color: var(--panel-color);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    transition: all var(--anim-duration) var(--transition-curve);
    opacity: 0.55;
    filter: grayscale(100%);
}

.achievement-card.unlocked {
    opacity: 1;
    filter: none;
    box-shadow: 0 4px 20px var(--accent-glow);
    border-color: var(--accent);
}

.badge-wrapper {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background-color: var(--panel-sec-color);
    border: 2px solid var(--border-color);
    color: var(--text-muted);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all var(--anim-duration);
}

.achievement-card.unlocked .badge-wrapper {
    border-color: var(--accent);
    color: var(--accent);
    background-color: var(--accent-glow);
}

.badge-wrapper svg {
    width: 32px;
    height: 32px;
    stroke: currentColor;
    stroke-width: 1.7;
    fill: none;
}

.achievement-title {
    font-size: 15px;
    font-weight: 800;
    margin: 0;
}

.achievement-desc {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Review Questionnaire components */
.review-panel-container {
    max-width: 640px;
}

.review-question-card {
    background-color: var(--panel-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.question-num {
    font-size: 20px;
    font-weight: 800;
    color: var(--accent);
}

.question-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.question-label {
    font-size: 14px;
    font-weight: 700;
}

.rating-button-scale {
    display: flex;
    gap: 10px;
}

.rating-btn {
    flex-grow: 1;
    background-color: var(--panel-sec-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 10px;
    font-family: var(--font-stack);
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
}

.rating-btn:hover {
    border-color: var(--text-primary);
    color: var(--text-primary);
}

.rating-btn.active {
    background-color: var(--accent);
    border-color: var(--accent);
    color: #06090F;
}

.custom-textarea {
    width: 100%;
    background-color: var(--panel-sec-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
    color: var(--text-primary);
    font-family: var(--font-stack);
    font-size: 13px;
    outline: none;
    resize: none;
}

.custom-textarea:focus {
    border-color: var(--accent);
}

/* Systems Control Configuration forms */
.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding: 20px 0;
}

.setting-row:last-child {
    border-bottom: none;
}

.setting-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-width: 60%;
}

.setting-label {
    font-size: 14px;
    font-weight: 700;
}

.setting-desc {
    font-size: 11px;
    color: var(--text-muted);
}

/* Premium Custom Toggle slider */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--panel-sec-color);
    border: 1px solid var(--border-color);
    transition: .3s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: var(--text-muted);
    transition: .3s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: var(--accent-glow);
    border-color: var(--accent);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(20px);
    background-color: var(--accent);
}

.backup-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.file-import-label {
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-import-label input {
    display: none;
}

.database-warning-text {
    font-size: 11px;
    color: #EF4444;
    margin-top: 12px;
}

/* Fullscreen Cognitive Focus mode module */
.fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #06090F;
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 5000;
}

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

.close-overlay-btn {
    position: absolute;
    top: 30px;
    right: 40px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-stack);
    font-size: 12px;
    font-weight: 700;
}

.close-overlay-btn:hover {
    color: var(--text-primary);
}

.focus-content-box {
    text-align: center;
    max-width: 480px;
    width: 100%;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

.focus-header-label {
    font-size: 10px;
    font-weight: 800;
    color: var(--accent);
    letter-spacing: 0.25em;
}

.focus-habit-card {
    background-color: #0C121C;
    border: 1px solid #1B2737;
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    box-shadow: 0 0 40px rgba(88,230,178,0.06);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.focus-glyph-container {
    width: 70px;
    height: 70px;
    border-radius: 12px;
    border: 1px solid #1B2737;
    background-color: #111925;
    color: var(--accent);
    display: flex;
    justify-content: center;
    align-items: center;
}

.focus-glyph-container svg {
    width: 38px;
    height: 38px;
    stroke: currentColor;
    stroke-width: 1.7;
    fill: none;
}

.focus-habit-name {
    font-size: 24px;
    font-weight: 800;
    margin: 0;
}

.focus-habit-purpose {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
}

.focus-action-btn {
    background-color: var(--accent);
    color: #06090F;
    border: none;
    border-radius: 12px;
    width: 100%;
    padding: 16px;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    font-family: var(--font-stack);
    transition: all var(--anim-duration) var(--transition-curve);
    box-shadow: 0 0 20px var(--accent-glow);
}

.focus-action-btn:hover {
    background-color: var(--accent-dark);
}

/* Command Palette (Ctrl+K) style */
.palette-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    display: none;
    justify-content: center;
    padding-top: 10vh;
    z-index: 6000;
}

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

.palette-window {
    background-color: var(--panel-color);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    width: 100%;
    max-width: 580px;
    max-height: 380px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 50px rgba(0,0,0,0.6);
}

.palette-search-wrapper {
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding: 16px 20px;
    gap: 12px;
}

.palette-search-icon {
    color: var(--text-muted);
}

.palette-input {
    width: 100%;
    background: none;
    border: none;
    color: var(--text-primary);
    font-family: var(--font-stack);
    font-size: 15px;
    outline: none;
}

.palette-list {
    list-style: none;
    margin: 0;
    padding: 8px 0;
    overflow-y: auto;
    flex-grow: 1;
}

.palette-item {
    padding: 12px 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    transition: background-color 0.2s;
}

.palette-item:hover, .palette-item.selected {
    background-color: var(--panel-sec-color);
    color: var(--accent);
}

.palette-shortcut {
    font-family: monospace;
    font-size: 10px;
    background-color: var(--panel-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 2px 6px;
}

/* Toast Messages stack engine */
#toast-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 10000;
}

.toast {
    background-color: var(--panel-color);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--accent);
    padding: 14px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    gap: 10px;
    transform: translateX(120%);
    animation: toast-slide-in 0.3s var(--transition-curve) forwards;
}

@keyframes toast-slide-in {
    to { transform: translateX(0); }
}

/* Trend analytics graph customized CSS */
.trend-chart-container {
    width: 100%;
    height: 240px;
}

.trend-line {
    stroke: var(--accent);
    stroke-width: 3;
    fill: none;
    stroke-linecap: round;
    filter: drop-shadow(0px 0px 8px var(--accent-glow));
}

.trend-grid-line {
    stroke: var(--border-color);
    stroke-width: 1;
    stroke-dasharray: 4 4;
}

.trend-area {
    fill: url(#trend-area-gradient);
}

.top-ranking-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rank-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.rank-row:last-child {
    border-bottom: none;
}

.rank-index {
    font-size: 11px;
    font-weight: 800;
    color: var(--accent);
}

.rank-name {
    font-size: 13px;
    font-weight: 700;
}

.rank-completions {
    font-size: 11px;
    font-weight: 800;
    color: var(--text-muted);
}

/* Mobile responsive alterations */
.mobile-header {
    display: none;
}

@media (max-width: 991px) {
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .dashboard-split {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: 270px;
        height: 100%;
        transform: translateX(-100%);
        transition: transform 0.3s var(--transition-curve);
        z-index: 2000;
    }
    .sidebar.active {
        transform: translateX(0);
    }
    .mobile-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        background-color: var(--sidebar-color);
        border-bottom: 1px solid var(--border-color);
        padding: 14px 20px;
        height: 60px;
    }
    .menu-toggle {
        background: none;
        border: none;
        color: var(--text-primary);
        cursor: pointer;
    }
    .mobile-title {
        font-size: 12px;
        font-weight: 800;
        letter-spacing: 0.15em;
    }
    .main-workspace {
        padding: 20px;
        height: calc(100% - 60px);
    }
    .system-status-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    .status-right {
        width: 100%;
        justify-content: space-between;
    }
    .hero-card {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }
    .hero-left {
        max-width: 100%;
    }
    .hero-actions-container {
        justify-content: center;
    }
    .settings-grid {
        grid-template-columns: 1fr;
    }
}
