
:root {
    
    --sidebar-width: 260px;
    
    
    --bg-main: #f0f4f8;
    --bg-card: #ffffff;
    --bg-sidebar: #ffffff;
    --border-color: #e2e8f0;
    
    
    --card-blue-bg: #e0f2fe;
    --card-blue-text: #0284c7;
    --card-green-bg: #d1fae5;
    --card-green-text: #059669;
    --card-yellow-bg: #fef3c7;
    --card-yellow-text: #d97706;
    --card-plain-bg: #f8fafc;
    
    
    --chart-blue: #3b82f6;
    --chart-yellow: #f59e0b;
    --chart-muted: #cbd5e1;

    
    --bg-input: #f1f5f9;
        
    
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-inverse: #ffffff;
    
    
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.05);
}


[data-theme="dark"] {
    --bg-main: #050505;
    --bg-card: #141414;
    --bg-sidebar: #0a0a0a;
    --border-color: #262626;
    
    
    --card-blue-bg: #0f172a;
    --card-blue-text: #60a5fa;
    --card-green-bg: #064e3b;
    --card-green-text: #34d399;
    --card-yellow-bg: #451a03;
    --card-yellow-text: #fbbf24;
    --card-plain-bg: #141414;

    
    --chart-muted: #262626;

    
    --bg-input: #000000;

    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-inverse: #0f172a;

    --shadow-sm: 0 1px 2px rgba(0,0,0,0.2);
    --shadow-md: 0 4px 15px rgba(0,0,0,0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    transition: background-color 0.3s, border-color 0.3s; 
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    overflow-x: hidden;
}


.dashboard-layout {
    display: flex;
    height: 100vh;
    width: 100vw;
}


.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 24px;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
}

.logo-icon {
    width: 32px; height: 32px;
    color: var(--card-blue-text);
}

.sidebar-header h2 {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.user-profile-small {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 24px;
}

.user-profile-small img {
    width: 40px; height: 40px;
    border-radius: 50%;
}

.user-info-text .name {
    font-size: 0.95rem;
    font-weight: 600;
}

.user-info-text .role {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s;
}

.nav-item:hover, .nav-item.active {
    background-color: var(--bg-input);
    color: var(--card-blue-text);
}

.nav-item.active {
    background-color: rgba(59, 130, 246, 0.1);
}


.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}


.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 32px;
    background-color: transparent;
}

.search-bar {
    display: flex;
    align-items: center;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 16px;
    width: 300px;
    gap: 8px;
    color: var(--text-muted);
    box-shadow: var(--shadow-sm);
}

.search-bar input {
    border: none;
    background: transparent;
    outline: none;
    width: 100%;
    color: var(--text-main);
    font-size: 0.9rem;
}

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

.icon-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    color: var(--text-muted);
    position: relative;
    box-shadow: var(--shadow-sm);
}

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

.notification-btn .badge {
    position: absolute;
    top: -4px; right: -4px;
    background: #ef4444; color: white;
    font-size: 0.7rem; font-weight: bold;
    border-radius: 50%;
    width: 18px; height: 18px;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid var(--bg-main);
}

.header-profile {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding-left: 12px;
}

.header-profile img {
    width: 32px; height: 32px;
    border-radius: 50%;
}

.header-profile .name {
    font-size: 0.9rem;
    font-weight: 500;
}


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

.content-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
}

.btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
}

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

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
}

.text-sm {
    font-size: 0.85rem;
}

.fw-normal {
    font-weight: 400;
}


.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding: 0 32px;
    margin-bottom: 24px;
}

.stat-card {
    padding: 20px;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

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

.stat-header h3 {
    font-size: 0.9rem;
    font-weight: 500;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.stat-desc, .stat-change {
    font-size: 0.85rem;
    font-weight: 500;
}

.positive { color: var(--card-green-text); }
.warning { color: var(--card-yellow-text); }
.danger { color: #ef4444; }


.blue-card {
    background-color: var(--card-blue-bg);
    border-color: transparent;
}
.blue-card .stat-header h3, .blue-card .stat-value, .blue-card .stat-header svg {
    color: var(--card-blue-text);
}

.green-card {
    background-color: var(--card-green-bg);
    border-color: transparent;
}
.green-card .stat-header h3, .green-card .stat-value, .green-card .stat-header svg {
    color: var(--card-green-text);
}

.yellow-card {
    background-color: var(--card-yellow-bg);
    border-color: transparent;
}
.yellow-card .stat-header h3, .yellow-card .stat-value, .yellow-card .stat-header svg {
    color: var(--card-yellow-text);
}

.plain-card {
    background-color: var(--card-plain-bg);
}
.plain-card .stat-header h3, .plain-card .stat-header svg {
    color: var(--text-muted);
}
.plain-card .stat-value {
    color: var(--text-main);
}


.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    padding: 0 32px 32px;
}

.col-left, .col-right {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow-md);
}

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

.card-header h3 {
    font-size: 1.05rem;
    font-weight: 600;
}

.chart-container {
    width: 100%;
}


.activity-list, .task-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.activity-item, .task-item {
    display: flex;
    align-items: center;
    gap: 16px;
}

.icon-circle {
    width: 36px; height: 36px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}

.bg-blue { background-color: var(--card-blue-bg); color: var(--card-blue-text); }
.bg-blue-light { background-color: var(--bg-input); color: var(--card-blue-text); }
.bg-yellow { background-color: var(--card-yellow-bg); color: var(--card-yellow-text); }
.bg-green { background-color: var(--card-green-bg); color: var(--card-green-text); }

.activity-info h4, .task-info h4 {
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 4px;
}

.activity-info span, .task-info span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.task-item {
    justify-content: space-between;
}

.badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge.gray {
    background-color: var(--bg-input);
    color: var(--text-muted);
}


.checkbox-container {
    position: relative;
    width: 20px; height: 20px;
    cursor: pointer;
}

.checkbox-container input {
    opacity: 0; width: 0; height: 0;
}

.checkmark {
    position: absolute;
    top: 0; left: 0; height: 20px; width: 20px;
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.checkbox-container input:checked ~ .checkmark {
    background-color: var(--card-blue-text);
    border-color: var(--card-blue-text);
}

.checkmark:after {
    content: ""; position: absolute; display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-container .checkmark:after {
    left: 6px; top: 2px; width: 5px; height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.task-info.completed h4 {
    text-decoration: line-through;
    color: var(--text-muted);
}

[data-theme="light"] .sun-icon { display: none; }
[data-theme="light"] .moon-icon { display: block; }
[data-theme="dark"] .sun-icon { display: block; }
[data-theme="dark"] .moon-icon { display: none; }


.settings-container {
    display: flex;
    gap: 32px;
    padding: 0 32px 32px;
    align-items: flex-start;
}

.settings-sidebar {
    width: 240px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    box-shadow: var(--shadow-md);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.settings-tab {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.settings-tab:hover, .settings-tab.active {
    background-color: var(--bg-input);
    color: var(--card-blue-text);
}

.settings-tab.active {
    background-color: rgba(59, 130, 246, 0.1);
}

.settings-content {
    flex: 1;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.settings-panel {
    display: none;
    padding: 32px;
}

.settings-panel.active {
    display: block;
}

.panel-header {
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.panel-header h2 {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.panel-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
}


.settings-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

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

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-main);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-select {
    padding: 10px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--bg-input);
    color: var(--text-main);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
}

.form-group input:focus, .form-select:focus {
    border-color: var(--card-blue-text);
}

.form-group .disabled-input {
    background-color: var(--border-color);
    cursor: not-allowed;
    opacity: 0.7;
}


.avatar-upload {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 16px;
}

.avatar-upload img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
}

.upload-actions {
    display: flex;
    gap: 12px;
}


.toggle-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
}

.list-group .toggle-item {
    border-bottom: 1px solid var(--border-color);
}
.list-group .toggle-item:last-child {
    border-bottom: none;
}

.toggle-info h4 {
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.toggle-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

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

.toggle-switch .slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: var(--border-color);
    transition: .4s;
    border-radius: 34px;
}

.toggle-switch .slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    box-shadow: var(--shadow-sm);
}

.toggle-switch input:checked + .slider {
    background-color: var(--card-blue-text);
}

.toggle-switch input:focus + .slider {
    box-shadow: 0 0 1px var(--card-blue-text);
}

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


.range-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 4px;
    background: var(--border-color);
    outline: none;
    padding: 0;
    margin: 10px 0;
}

.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--card-blue-text);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}


.border-top { border-top: 1px solid var(--border-color); margin-top: 8px; padding-top: 8px; }
.mt-large { margin-top: 24px; }
.pb-border { padding-bottom: 24px; border-bottom: 1px solid var(--border-color); }

.action-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.action-info h4 { font-size: 0.95rem; margin-bottom: 4px; }
.action-info p { font-size: 0.85rem; color: var(--text-muted); }


.danger-zone h3 {
    color: #ef4444;
    font-size: 1.1rem;
    margin-bottom: 16px;
}

.danger-border {
    border: 1px solid #ef4444;
    border-radius: 8px;
    padding: 16px;
    background-color: rgba(239, 68, 68, 0.05);
}

.btn-danger {
    background-color: #ef4444;
    color: white;
    border: none;
}
.btn-danger:hover {
    background-color: #dc2626;
}


.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 16px;
}


.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 9999;
}

.toast {
    min-width: 250px;
    background-color: var(--bg-card);
    border: 1px solid var(--card-green-text);
    border-left: 4px solid var(--card-green-text);
    color: var(--text-main);
    padding: 16px;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateX(120%);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast-icon { color: var(--card-green-text); }
.toast-error { border-color: #ef4444; border-left-color: #ef4444; }
.toast-error .toast-icon { color: #ef4444; }




.m-0 { margin: 0 !important; }
.mt-4  { margin-top: 4px; }
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-0  { margin-bottom: 0 !important; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.p-0   { padding: 0 !important; }
.p-16  { padding: 16px; }
.p-24  { padding: 24px; }
.pb-16 { padding-bottom: 16px; }


.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.85rem; }
.text-main { color: var(--text-main); }
.text-muted { color: var(--text-muted); }
.text-white { color: #ffffff; }
.font-500 { font-weight: 500; }
.font-600 { font-weight: 600; }
.font-blue { color: var(--card-blue-text); }


.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.align-center { align-items: center; }
.justify-center { justify-content: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.flex-grow { flex-grow: 1; }
.flex-shrink-0 { flex-shrink: 0; }


.w-full { width: 100%; }
.block { display: block; }
.border-bottom { border-bottom: 1px solid var(--border-color); }
.border-none { border: none !important; }
.no-underline { text-decoration: none; }

.py-6 { padding-top: 6px; padding-bottom: 6px; }


.bg-blue { background-color: var(--chart-blue) !important; }
.bg-blue-light { background-color: var(--card-blue-bg) !important; color: var(--card-blue-text) !important;}
.bg-green { background-color: var(--card-green-text) !important; color: white !important;}
.bg-green-light { background-color: var(--card-green-bg) !important; color: var(--card-green-text) !important; }
.bg-yellow-light { background-color: var(--card-yellow-bg) !important; color: var(--card-yellow-text) !important;}


.tier-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.tier-badge.expert { background-color: rgba(255,255,255,0.2); color: #fff; }


.dashboard-hero-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 24px;
    padding: 0 32px;
}

.summary-stats-col {
    display: flex;
    flex-direction: column;
    gap: 24px;
}


.score-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.score-body {
    display: flex;
    align-items: center;
    gap: 32px;
    margin-top: 24px;
}

.score-circle {
    width: 120px;
    height: 120px;
}

.circular-chart {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    max-height: 250px;
}

.circle-bg {
    fill: none;
    stroke: rgba(255,255,255,0.1);
    stroke-width: 3.8;
}

.circle {
    fill: none;
    stroke-width: 2.8;
    stroke-linecap: round;
    stroke: #ffffff;
    animation: progress 1s ease-out forwards;
}

@keyframes progress { 0% { stroke-dasharray: 0 100; } }

.score-text {
    fill: #ffffff;
    font-family: inherit;
    font-size: 10px;
    text-anchor: middle;
    font-weight: bold;
}


.progress-bar-bg {
    width: 100%;
    height: 8px;
    background-color: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}


.hover-bg { transition: background-color 0.2s; cursor: pointer; }
.hover-bg:hover { background-color: rgba(59, 130, 246, 0.05); }

.relative { position: relative; }
.z-10 { z-index: 10; }
.h-full { height: 100%; }


.stroke-dasharray { stroke-dasharray: 4; }


.transaction-demo-form {
    display: grid;
    grid-template-columns: 140px 130px 1fr 150px auto;
    gap: 12px;
    align-items: center;
}

.transaction-demo-form input,
.transaction-demo-form select {
    width: 100%;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--bg-input);
    color: var(--text-main);
    padding: 10px 12px;
    font-size: 0.9rem;
    outline: none;
}

.transaction-demo-form input:focus,
.transaction-demo-form select:focus {
    border-color: var(--card-blue-text);
}

.transaction-demo-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.transaction-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--card-plain-bg);
}

.transaction-row-main {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-transform: capitalize;
}

@media (max-width: 1100px) {
    .transaction-demo-form {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 720px) {
    .transaction-demo-form,
    .transaction-row {
        grid-template-columns: 1fr;
    }
}

