:root[data-theme="light"] {
    --paper-main: #FFFFFF;
    --paper-light: #F8F8F8;
    --paper-warm: #F0F0F0;
    
    --ink-black: #2C2C2C;
    --ink-dark: #3A3A3A;
    --ink-medium: #5A5A5A;
    
    --seal-red: #9C27B0;
    --seal-dark: #7B1FA2;
    
    --success-green: #4CAF50;
    --success-light: rgba(76, 175, 80, 0.1);
    
    --bg-main: #FFFFFF;
    --bg-card: #F8F8F8;
    --bg-sidebar: #F0F0F0;
    --bg-header: linear-gradient(135deg, #E0E0E0 0%, #D0D0D0 100%);
    
    --border-bold: 2px solid var(--ink-black);
    --border-thin: 1px solid rgba(0, 0, 0, 0.15);
    --border-accent: 2px solid var(--seal-red);
    
    --shadow-subtle: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 4px 16px rgba(0, 0, 0, 0.15);
    
    --glow: 0 0 20px rgba(156, 39, 176, 0.2);
}

:root[data-theme="dark"] {
    --paper-main: #0a0a0a;
    --paper-light: #1a1a1a;
    --paper-warm: #2a2a2a;
    
    --ink-black: #f0f0f0;
    --ink-dark: #d0d0d0;
    --ink-medium: #888888;
    
    --seal-red: #bb86fc;
    --seal-dark: #9c27b0;
    
    --success-green: #4caf50;
    --success-light: rgba(76, 175, 80, 0.15);
    
    --bg-main: #000000;
    --bg-card: #1a1a1a;
    --bg-sidebar: #222222;
    --bg-header: linear-gradient(135deg, #222222 0%, #2a2a2a 100%);
    
    --border-bold: 2px solid var(--seal-red);
    --border-thin: 1px solid rgba(255, 255, 255, 0.15);
    --border-accent: 2px solid var(--seal-red);
    
    --shadow-subtle: 0 2px 8px rgba(0, 0, 0, 0.5);
    --shadow-medium: 0 4px 16px rgba(0, 0, 0, 0.6);
    --shadow-deep: 0 8px 24px rgba(0, 0, 0, 0.7);
    
    --glow: 0 0 20px rgba(187, 134, 252, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg-main);
    color: var(--ink-black);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-header {
    background: var(--bg-header);
    border-bottom: var(--border-thin);
    position: relative;
    flex-shrink: 0;
}

.header-content {
    max-width: 1800px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 0 0 auto;
}

.logo-icon {
    font-size: 2.2rem;
}

.logo-title {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.logo-subtitle {
    font-size: 0.85rem;
    color: var(--ink-medium);
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    justify-content: center;
}

.theme-toggle {
    background: transparent;
    border: var(--border-thin);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.theme-toggle:hover {
    border-color: var(--seal-red);
    transform: rotate(15deg);
}

.theme-icon {
    fill: var(--ink-black);
    width: 20px;
    height: 20px;
}

.user-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 0 0 auto;
    margin-left: auto;
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: var(--seal-red);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem;
    color: white;
}

.user-name {
    font-weight: 500;
    font-size: 0.95rem;
}

.btn {
    padding: 0.7rem 1.2rem;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 40px;
}

.btn:hover {
    transform: translateY(-1px);
}

.primary-btn {
    background: var(--seal-red);
    color: white;
    border: none;
}

.primary-btn:hover {
    background: var(--seal-dark);
    box-shadow: var(--shadow-medium);
}

.secondary-btn {
    background: transparent;
    color: var(--ink-black);
    border: var(--border-thin);
}

.secondary-btn:hover {
    border-color: var(--seal-red);
    color: var(--seal-red);
}

.ghost-btn {
    background: transparent;
    color: var(--ink-black);
    border: var(--border-thin);
}

.ghost-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

.back-btn {
    background: transparent;
    color: var(--ink-black);
    border: none;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.back-btn:hover {
    color: var(--seal-red);
}

.app-container {
    max-width: 1800px;
    margin: 1.5rem auto;
    padding: 0 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 180px);
    width: 100%;
}

.workspace {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow-subtle);
    border: var(--border-thin);
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    width: 100%;
}

.workspace-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: var(--border-thin);
    padding-bottom: 0.5rem;
}

.workspace-tab {
    background: transparent;
    border: none;
    padding: 0.8rem 1.5rem;
    color: var(--ink-medium);
    font-weight: 600;
    cursor: pointer;
    border-radius: 6px 6px 0 0;
    transition: all 0.2s ease;
    position: relative;
}

.workspace-tab:hover {
    color: var(--ink-black);
}

.workspace-tab.active {
    color: var(--seal-red);
}

.workspace-tab.active::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--seal-red);
    border-radius: 3px;
}

.view-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.view-content {
    display: none;
    animation: fadeIn 0.3s ease-out;
    flex: 1;
    overflow-y: auto;
    max-height: 100%;
}

.view-content.active {
    display: flex;
    flex-direction: column;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.cards-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: var(--border-thin);
}

.cards-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--ink-black);
}

.cards-stats {
    color: var(--ink-medium);
    font-size: 0.95rem;
}

.cards-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.goal-sort {
    padding: 0.5rem 1rem;
    border: var(--border-thin);
    border-radius: 6px;
    background: var(--bg-card);
    color: var(--ink-black);
    font-size: 0.9rem;
    min-width: 180px;
    cursor: pointer;
}

.goal-sort:focus {
    outline: none;
    border-color: var(--seal-red);
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 2rem;
    margin-top: 1rem;
    flex: 1;
    align-content: flex-start;
    overflow-y: visible;
    width: 100%;
}

.goal-card {
    background: var(--bg-card);
    border: var(--border-thin);
    border-radius: 12px;
    padding: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-height: 280px;
    display: flex;
    flex-direction: column;
}

.goal-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-medium);
    border-color: var(--seal-red);
}

.goal-card.pinned {
    border-color: var(--seal-red);
    background: linear-gradient(135deg, rgba(156, 39, 176, 0.1), var(--bg-card));
}

.goal-card.pinned::after {
    content: '📌';
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 1.2rem;
    z-index: 1;
}

.goal-card.completed {
    border: 2px solid var(--success-green);
    background: var(--success-light);
}

.goal-card.completed::before {
    content: '✓';
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--success-green);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: bold;
    z-index: 2;
}

.goal-card.completed .goal-card-percent {
    background: var(--success-green);
}

.goal-card.completed .goal-card-progress-fill {
    background: linear-gradient(90deg, var(--success-green), #66BB6A);
}

.goal-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.goal-card-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--ink-black);
    flex: 1;
    line-height: 1.3;
    margin-bottom: 0.5rem;
}

.goal-card-percent {
    background: var(--seal-red);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 1rem;
    font-weight: 600;
    margin-left: 0.5rem;
    min-width: 60px;
    text-align: center;
}

.goal-card-desc {
    color: var(--ink-medium);
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.goal-card-progress-section {
    margin: 1.5rem 0;
}

.goal-card-progress-info {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.goal-card-progress-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1rem;
    color: var(--ink-medium);
    margin-bottom: 0.8rem;
}

.goal-card-tasks-count,
.goal-card-completed {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.goal-card-tasks-count::before {
    content: '📋';
    font-size: 0.85rem;
}

.goal-card-completed::before {
    content: '✅';
    font-size: 0.85rem;
}

.goal-card-progress-bar-container {
    width: 100%;
}

.goal-card-progress-track {
    height: 6px;
    background: rgba(156, 39, 176, 0.1);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.goal-card-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--seal-red), #E040FB);
    border-radius: 3px;
    position: relative;
    width: 0%;
    transition: width 0.3s ease;
}

.goal-card-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.8rem;
    margin-top: auto;
    padding-top: 1.5rem;
    border-top: var(--border-thin);
}

.goal-card-btn {
    background: transparent;
    border: var(--border-thin);
    color: var(--ink-medium);
    cursor: pointer;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 1.1rem;
}

.goal-card-btn.pin:hover {
    border-color: var(--seal-red);
    color: var(--seal-red);
    background: rgba(156, 39, 176, 0.05);
}

.goal-card-btn.edit:hover {
    border-color: var(--seal-red);
    color: var(--seal-red);
    background: rgba(156, 39, 176, 0.05);
}

.goal-card-btn.delete:hover {
    border-color: #F44336;
    color: #F44336;
    background: rgba(244, 67, 54, 0.05);
}

.goal-card-date {
    font-size: 0.9rem;
    color: var(--ink-medium);
    margin-top: 1.5rem;
    padding-top: 1.2rem;
    border-top: var(--border-thin);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.goal-card-date::before {
    content: '📅';
    font-size: 0.8rem;
}

.empty-cards {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    color: var(--ink-medium);
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 400px;
}

.detail-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: var(--border-thin);
}

.goal-header-content {
    flex: 1;
}

.current-goal-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--ink-black);
}

.goal-description {
    color: var(--ink-medium);
    font-size: 1.1rem;
    line-height: 1.5;
}

.goal-actions {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.progress-card {
    background: var(--bg-card);
    border: var(--border-thin);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-weight: 600;
    font-size: 1.1rem;
}

.progress-percent {
    color: var(--seal-red);
    font-size: 1.8rem;
    font-weight: 700;
}

.progress-track {
    height: 10px;
    background: var(--bg-sidebar);
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 0.8rem;
    position: relative;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--seal-red), #E040FB);
    border-radius: 5px;
    width: 0;
    transition: width 0.3s ease;
    position: relative;
}

.progress-stats {
    color: var(--ink-medium);
    font-size: 0.95rem;
    text-align: center;
}

.tasks-section {
    background: var(--bg-card);
    border: var(--border-thin);
    border-radius: 10px;
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.tasks-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.8rem;
    border-bottom: var(--border-thin);
}

.section-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--ink-black);
}

.tasks-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.task-sort {
    padding: 0.5rem 1rem;
    border: var(--border-thin);
    border-radius: 6px;
    background: var(--bg-card);
    color: var(--ink-black);
    font-size: 0.9rem;
    min-width: 180px;
    cursor: pointer;
}

.task-sort:focus {
    outline: none;
    border-color: var(--seal-red);
}

.tasks-container {
    flex: 1;
    min-height: 200px;
    max-height: none;
    overflow-y: visible;
}

.task-item {
    background: var(--bg-card);
    border-left: 4px solid var(--ink-medium);
    border-radius: 8px;
    padding: 1.2rem;
    margin-bottom: 1rem;
    transition: all 0.2s ease;
    border: 1px solid rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] .task-item {
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.task-item:hover {
    transform: translateX(2px);
    border-left-color: var(--seal-red);
}

.task-item.completed {
    border-left-color: var(--success-green);
    opacity: 0.9;
}

.task-item.completed .task-title {
    text-decoration: line-through;
    color: var(--success-green);
}

.task-header {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.task-checkbox {
    width: 20px;
    height: 20px;
    margin-right: 1rem;
    cursor: pointer;
    accent-color: var(--seal-red);
    flex-shrink: 0;
}

.task-title {
    font-size: 1.1rem;
    font-weight: 600;
    flex: 1;
    color: var(--ink-black);
}

.task-actions {
    display: flex;
    gap: 0.5rem;
    opacity: 0;
    transition: opacity 0.2s;
}

.task-action-btn {
    background: transparent;
    border: var(--border-thin);
    color: var(--ink-medium);
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.task-action-btn:hover {
    border-color: var(--seal-red);
    color: var(--seal-red);
    background: rgba(156, 39, 176, 0.05);
}

.task-description {
    color: var(--ink-medium);
    margin-left: 2.2rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

.subtasks {
    margin-left: 2rem;
    margin-top: 1rem;
    padding-left: 1rem;
    border-left: 2px solid rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .subtasks {
    border-left: 2px solid rgba(255, 255, 255, 0.1);
}

.task-warning {
    color: var(--seal-red);
    font-size: 0.85rem;
    margin-top: 0.5rem;
    padding-left: 2.2rem;
    animation: fadeIn 0.3s;
}

.task-description {
    color: var(--ink-medium);
    margin-left: 2.2rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

.subtasks {
    margin-left: 2rem;
    margin-top: 1rem;
    padding-left: 1rem;
    border-left: 2px solid rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .subtasks {
    border-left: 2px solid rgba(255, 255, 255, 0.1);
}

.task-warning {
    color: var(--seal-red);
    font-size: 0.85rem;
    margin-top: 0.5rem;
    padding-left: 2.2rem;
    animation: fadeIn 0.3s;
}

#statsView {
    padding: 1rem;
}

.stats-header {
    margin-bottom: 2rem;
}

.stats-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--ink-black);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: var(--bg-card);
    border: var(--border-thin);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: transform 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.stat-value {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--seal-red);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--ink-medium);
    font-size: 0.95rem;
}

.stats-chart {
    background: var(--bg-card);
    border: var(--border-thin);
    border-radius: 12px;
    padding: 1.5rem;
}

.chart-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--ink-black);
}

.chart-bars {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.chart-bar-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.chart-bar-label {
    flex: 1;
    min-width: 150px;
    font-size: 0.95rem;
    color: var(--ink-black);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chart-bar-track {
    flex: 2;
    height: 12px;
    background: var(--bg-sidebar);
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.chart-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--seal-red), #E040FB);
    border-radius: 6px;
    width: 0%;
    transition: width 0.5s ease-out;
    position: relative;
}

.chart-bar-value {
    min-width: 50px;
    text-align: right;
    font-weight: 600;
    color: var(--seal-red);
}

.main-footer {
    text-align: center;
    padding: 2rem;
    color: var(--ink-medium);
    font-size: 0.9rem;
    border-top: var(--border-thin);
    margin-top: 3rem;
    flex-shrink: 0;
}

.footer-note {
    font-size: 0.8rem;
    opacity: 0.7;
    margin-top: 0.5rem;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
    backdrop-filter: blur(3px);
}

.modal {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 2rem;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-medium);
    border: var(--border-thin);
    animation: modalSlide 0.3s ease-out;
}

@keyframes modalSlide {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: var(--border-thin);
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--ink-black);
}

.close-modal {
    background: transparent;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--ink-medium);
    line-height: 1;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.close-modal:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--seal-red);
}

.auth-tabs {
    display: flex;
    margin-bottom: 1.5rem;
    border-bottom: var(--border-thin);
}

.auth-tab {
    padding: 0.8rem 1.5rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-weight: 600;
    color: var(--ink-medium);
    transition: all 0.2s ease;
    font-size: 1rem;
}

.auth-tab.active {
    color: var(--seal-red);
    border-bottom-color: var(--seal-red);
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--ink-black);
    font-size: 0.95rem;
}

.input-group input,
.input-group textarea,
.input-group select {
    width: 100%;
    padding: 0.9rem 1rem;
    border: var(--border-thin);
    border-radius: 8px;
    font-size: 1rem;
    background: var(--bg-card);
    color: var(--ink-black);
    transition: all 0.2s ease;
    font-family: inherit;
}

.input-group input:focus,
.input-group textarea:focus,
.input-group select:focus {
    outline: none;
    border-color: var(--seal-red);
    box-shadow: 0 0 0 3px rgba(156, 39, 176, 0.1);
}

textarea {
    min-height: 100px;
    resize: vertical;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
}

.delete-confirm-content {
    margin: 1.5rem 0;
    padding: 1.2rem;
    background: rgba(244, 67, 54, 0.05);
    border: 1px solid rgba(244, 67, 54, 0.2);
    border-radius: 8px;
}

.danger-btn {
    background: #F44336;
    color: white;
    border: none;
}

.danger-btn:hover {
    background: #D32F2F;
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.3);
}

.delete-warning {
    color: #F44336 !important;
    font-weight: 600;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(244, 67, 54, 0.2);
}

.notification-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
}

.notification {
    background: var(--bg-card);
    border-left: 4px solid var(--seal-red);
    color: var(--ink-black);
    padding: 0.8rem 1.2rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    box-shadow: var(--shadow-subtle);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: slideIn 0.3s ease-out;
    max-width: 300px;
    border: var(--border-thin);
    opacity: 0.95;
}

.notification.success {
    border-left-color: var(--success-green);
}

.notification.error {
    border-left-color: #F44336;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 0.95; }
}

.view-content::-webkit-scrollbar {
    width: 8px;
}

.view-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

.view-content::-webkit-scrollbar-thumb {
    background: var(--seal-red);
    border-radius: 4px;
    opacity: 0.5;
}

.view-content::-webkit-scrollbar-thumb:hover {
    background: var(--seal-dark);
    opacity: 0.7;
}

@media (max-width: 1200px) {
    .cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: row;
        flex-wrap: wrap;
        padding: 0.8rem;
        gap: 0.8rem;
    }
    
    .logo-section {
        order: 1;
        flex: 1;
        min-width: 150px;
    }
    
    .logo-icon {
        font-size: 1.8rem;
    }
    
    .logo-title {
        font-size: 1.2rem;
    }
    
    .logo-subtitle {
        font-size: 0.75rem;
    }
    
    .header-controls {
        order: 2;
        flex: none;
        display: flex;
        gap: 0.5rem;
        margin-left: auto;
    }
    
    .theme-toggle {
        width: 36px;
        height: 36px;
        flex-shrink: 0;
    }
    
    #newGoalBtn {
        padding: 0.5rem 0.8rem;
        font-size: 0.85rem;
        white-space: nowrap;
    }
    
    .user-section {
        order: 3;
        flex: 1 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-top: 0.5rem;
        padding-top: 0.8rem;
        border-top: var(--border-thin);
        width: 100%;
    }
    
    .user-avatar {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
        flex-shrink: 0;
    }
    
    .user-name {
        font-size: 0.9rem;
        flex: 1;
        margin: 0 0.8rem;
        text-align: center;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    #logoutBtn {
        padding: 0.5rem 0.8rem;
        font-size: 0.85rem;
        flex-shrink: 0;
    }
    
    .app-container {
        margin: 0.8rem;
        width: calc(100% - 1.6rem);
    }
    
    .workspace {
        padding: 1.2rem;
    }
    
    .workspace-tabs {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .workspace-tab {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
        flex: 1;
        min-width: 120px;
        text-align: center;
    }
    
    .cards-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .cards-controls {
        flex-direction: column;
        gap: 0.8rem;
        width: 100%;
    }
    
    .goal-sort, .task-sort {
        width: 100%;
    }
    
    .cards-grid {
        gap: 1rem;
    }
    
    .goal-card {
        padding: 1.2rem;
        min-height: 220px;
    }
    
    .goal-card-title {
        font-size: 1.2rem;
    }
    
    .goal-card-desc {
        font-size: 0.9rem;
    }
    
    .goal-card-actions {
        gap: 0.6rem;
    }
    
    .goal-card-btn {
        width: 38px;
        height: 38px;
    }
    
    .detail-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .goal-header-content {
        text-align: center;
    }
    
    .current-goal-title {
        font-size: 1.6rem;
    }
    
    .goal-actions {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    .goal-actions .btn {
        width: 100%;
        justify-content: center;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-icon {
        font-size: 2rem;
    }
    
    .stat-value {
        font-size: 1.8rem;
    }
    
    .modal {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .modal-title {
        font-size: 1.3rem;
    }
    
    .modal-actions {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    .modal-actions .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .logo-section {
        min-width: 130px;
    }
    
    .logo-title {
        font-size: 1.1rem;
    }
    
    #newGoalBtn .btn-text {
        display: none;
    }
    
    #newGoalBtn .btn-icon {
        margin-right: 0;
        font-size: 1.1rem;
    }
    
    .workspace-tab {
        min-width: 100px;
        padding: 0.5rem 0.8rem;
    }
    
    .goal-card {
        padding: 1rem;
        min-height: 200px;
    }
    
    .goal-card-title {
        font-size: 1.1rem;
    }
    
    .goal-card-percent {
        padding: 0.3rem 0.6rem;
        font-size: 0.9rem;
        min-width: 45px;
    }
    
    .goal-card-btn {
        width: 36px;
        height: 36px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .chart-bar-item {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    
    .chart-bar-label {
        min-width: 100%;
        font-size: 0.9rem;
    }
    
    .chart-bar-value {
        text-align: left;
        min-width: auto;
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1200px) {
    .cards-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1400px) {
    .cards-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1600px) {
    .cards-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

