* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-gradient: linear-gradient(135deg, #5B7C99 0%, #7A9CC6 100%);
    --success-gradient: linear-gradient(135deg, #6B9AC4 0%, #87CEEB 100%);
    --energy-gradient: linear-gradient(135deg, #7A9CC6 0%, #8BADD3 100%);
    --warm-gradient: linear-gradient(135deg, #B8A084 0%, #D4C4A8 100%);
    --cool-gradient: linear-gradient(135deg, #8BADD3 0%, #5B7C99 100%);
    --vibrant-gradient: linear-gradient(135deg, #A8C5DD 0%, #C4D9E8 100%);
    --shadow-soft: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-medium: 0 6px 16px rgba(0, 0, 0, 0.12);
    --shadow-strong: 0 8px 24px rgba(0, 0, 0, 0.16);
    --glow-primary: 0 0 12px rgba(91, 124, 153, 0.3);
    --glow-energy: 0 0 15px rgba(122, 156, 198, 0.4);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #E8EDF2 0%, #D4DBE3 25%, #C4D9E8 50%, #B8C8D8 75%, #A8BDD0 100%);
    background-size: 200% 200%;
    animation: gradientShift 20s ease infinite;
    color: #2C3E50;
    line-height: 1.6;
    padding-top: 56px;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(122, 156, 198, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(168, 197, 221, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(139, 173, 211, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
    animation: float 25s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
}

/* PIN Gate / Landing Page */
.pin-gate {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    overflow: hidden;
}

.pin-gate.hidden {
    display: none;
}

.pin-gate-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #1A2332 0%, #2C3E50 25%, #34495E 50%, #3D5A73 75%, #2C3E50 100%);
    background-size: 300% 300%;
    animation: pinGateGradient 15s ease infinite;
}

.pin-gate-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: pinGateOrb 15s ease-in-out infinite;
}

.pin-gate-orb-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(122, 156, 198, 0.25) 0%, transparent 70%);
    top: -100px;
    right: -100px;
}

.pin-gate-orb-2 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(91, 124, 153, 0.2) 0%, transparent 70%);
    bottom: -80px;
    left: -80px;
    animation-delay: -5s;
}

.pin-gate-orb-3 {
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(139, 173, 211, 0.18) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -10s;
}

.pin-gate-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
}

@keyframes pinGateGradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes pinGateOrb {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.5; }
    50% { transform: translate(20px, -20px) scale(1.1); opacity: 0.6; }
}

.pin-gate-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 48px;
    max-width: 520px;
    width: 100%;
}

.pin-gate-brand {
    text-align: center;
}

.pin-gate-emoji {
    display: inline-block;
    font-size: 2rem;
    margin-bottom: 16px;
    opacity: 0.9;
    animation: pinGatePulse 2s ease-in-out infinite;
}

@keyframes pinGatePulse {
    0%, 100% { opacity: 0.7; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
}

.pin-gate-heading {
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    font-weight: 800;
    color: white;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-bottom: 16px;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.pin-gate-subheading {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
    margin-bottom: 12px;
    font-weight: 500;
}

.pin-gate-tagline {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 20px;
}

.pin-gate-icons {
    display: flex;
    justify-content: center;
    gap: 16px;
    font-size: 1.5rem;
    opacity: 0.8;
}

.pin-gate-icons span {
    animation: pinGateFloat 3s ease-in-out infinite;
}

.pin-gate-icons span:nth-child(2) { animation-delay: 0.5s; }
.pin-gate-icons span:nth-child(3) { animation-delay: 1s; }

@keyframes pinGateFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.pin-gate-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 36px 40px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    width: 100%;
    max-width: 340px;
    text-align: center;
}

.pin-gate-lock {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.pin-gate-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    margin-bottom: 8px;
}

.pin-gate-hint {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 24px;
    font-size: 0.9rem;
}

.pin-input {
    width: 100%;
    padding: 16px 20px;
    font-size: 1.5rem;
    letter-spacing: 0.5em;
    text-align: center;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 14px;
    margin-bottom: 12px;
    outline: none;
    background: rgba(255, 255, 255, 0.08);
    color: white;
    transition: all 0.25s ease;
}

.pin-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.pin-input:focus {
    border-color: rgba(122, 156, 198, 0.8);
    box-shadow: 0 0 0 4px rgba(122, 156, 198, 0.2);
    background: rgba(255, 255, 255, 0.12);
}

.pin-error {
    color: #ff6b6b;
    font-size: 0.9rem;
    min-height: 1.4em;
    margin-bottom: 8px;
}

.pin-submit {
    width: 100%;
    padding: 14px 24px;
    font-size: 1rem;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, #5B7C99 0%, #7A9CC6 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 20px rgba(91, 124, 153, 0.35);
}

.pin-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(91, 124, 153, 0.45);
}

.pin-submit:active {
    transform: translateY(0);
}

body.app-locked .app-top-bar,
body.app-locked .container {
    visibility: hidden;
}

.container {
    position: relative;
    z-index: 1;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Thin top bar: tabs + theme */
.app-top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 12px 6px 16px;
    min-height: 48px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.app-top-bar .tabs {
    flex: 1;
    min-width: 0;
    margin-bottom: 0;
    padding: 4px 6px;
    background: rgba(0, 0, 0, 0.04);
    border-radius: 10px;
    box-shadow: none;
    gap: 6px;
}

.app-top-bar .tab-btn {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: none;
    border-radius: 8px;
}

.app-top-bar-theme {
    flex-shrink: 0;
    padding: 8px 12px;
    font-size: 18px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.25);
}

body.notes-fullscreen {
    padding-top: 52px;
}

body.notes-fullscreen .container {
    max-width: none;
    width: 100%;
    margin: 0;
    padding: 10px 14px 16px;
    box-sizing: border-box;
}

body.notes-fullscreen #notesTab.tab-content.active {
    display: block;
}

body.notes-fullscreen .notes-section {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 8px 0 12px;
}

body.notes-fullscreen .notes-section::before {
    display: none;
}

body.notes-fullscreen .notes-toolbar {
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 14px;
    flex-shrink: 0;
}

body.notes-fullscreen .notes-board {
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    background: rgba(255, 255, 255, 0.25);
    padding: 8px;
    overflow: visible;
    width: 100%;
    box-sizing: border-box;
}

body.dark-mode .app-top-bar {
    background: rgba(22, 22, 36, 0.92);
    border-bottom-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

body.dark-mode .app-top-bar .tabs {
    background: rgba(255, 255, 255, 0.06);
}

body.dark-mode.notes-fullscreen .notes-toolbar {
    background: rgba(30, 30, 46, 0.75);
    border-color: rgba(255, 255, 255, 0.08);
}

body.dark-mode.notes-fullscreen .notes-board {
    background: rgba(0, 0, 0, 0.15);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 35px;
    padding: 30px 35px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 25px;
    box-shadow: 
        var(--shadow-medium),
        0 0 40px rgba(102, 126, 234, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.5);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

header:hover {
    transform: translateY(-2px);
    box-shadow: 
        var(--shadow-strong),
        0 0 50px rgba(102, 126, 234, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

header h1 {
    font-size: 2.8rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    background-size: 200% 200%;
    animation: textGradient 5s ease infinite;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 900;
    letter-spacing: -2px;
    position: relative;
    filter: drop-shadow(0 2px 4px rgba(102, 126, 234, 0.3));
}

@keyframes textGradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.btn-dark-mode {
    padding: 12px 18px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 22px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transition: all 0.3s ease;
    line-height: 1;
    box-shadow: 0 4px 15px rgba(122, 156, 198, 0.3);
}

.btn-dark-mode:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* Buttons */
.btn-primary, .btn-secondary {
    padding: 14px 28px;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 
        0 6px 20px rgba(0, 0, 0, 0.15),
        0 0 0 0 rgba(79, 172, 254, 0.4);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.6s;
}

.btn-primary:hover::after {
    left: 100%;
}

.btn-primary {
    background: var(--energy-gradient);
    background-size: 200% 200%;
    animation: buttonGradient 3s ease infinite;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

@keyframes buttonGradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.btn-primary:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 
        0 10px 30px rgba(79, 172, 254, 0.5),
        0 0 40px rgba(79, 172, 254, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-primary:active {
    transform: translateY(-1px) scale(0.98);
}

.btn-secondary {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
    color: white;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(149, 165, 166, 0.4);
}

.btn-large {
    padding: 18px 45px;
    font-size: 20px;
    font-weight: 700;
    border-radius: 15px;
    box-shadow: 0 6px 25px rgba(79, 172, 254, 0.4);
}

/* Tabs */
.tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 30px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    box-shadow: var(--shadow-soft);
}

.tab-btn {
    padding: 16px 32px;
    background: transparent;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 17px;
    font-weight: 700;
    color: #7f8c8d;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tab-btn:hover {
    color: #7A9CC6;
    background: rgba(122, 156, 198, 0.1);
}

.tab-btn.active {
    color: white;
    background: var(--primary-gradient);
    box-shadow: 0 4px 15px rgba(122, 156, 198, 0.3);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Quote Section */
.quote-section {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    padding: 40px;
    border-radius: 25px;
    margin-bottom: 30px;
    box-shadow: 
        var(--shadow-medium),
        0 0 40px rgba(250, 112, 154, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.5);
    position: relative;
    overflow: hidden;
}

.quote-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: var(--warm-gradient);
    background-size: 200% 200%;
    animation: gradientShift 4s ease infinite;
}

.quote-section::after {
    content: '💫';
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    opacity: 0.3;
    animation: floatIcon 4s ease-in-out infinite 2s;
    z-index: 0;
}

@keyframes floatIcon {
    0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.3; }
    50% { transform: translateY(-10px) rotate(180deg); opacity: 0.6; }
}

.quote {
    font-style: italic;
    color: #555;
    font-size: 1.5rem;
    text-align: center;
    font-weight: 600;
    line-height: 2;
    position: relative;
    z-index: 1;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Warnings */
.warnings {
    margin-bottom: 25px;
}

.warning-banner {
    background: linear-gradient(135deg, #fff3cd 0%, #ffe69c 100%);
    border-left: 6px solid #ffc107;
    padding: 20px 25px;
    margin-bottom: 15px;
    border-radius: 15px;
    color: #856404;
    font-weight: 700;
    font-size: 15px;
    box-shadow: 
        0 6px 20px rgba(255, 193, 7, 0.4),
        0 0 30px rgba(255, 193, 7, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    animation: slideIn 0.5s ease;
    position: relative;
    overflow: hidden;
}

.warning-banner::before {
    content: '⚠️';
    position: absolute;
    left: 20px;
    font-size: 24px;
    animation: bounce 2s ease-in-out infinite;
}

.warning-banner {
    padding-left: 60px;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

@keyframes slideIn {
    from { transform: translateX(-20px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.warning-banner.severe {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    border-left-color: #dc3545;
    color: #721c24;
    box-shadow: 
        0 6px 20px rgba(220, 53, 69, 0.4),
        0 0 30px rgba(220, 53, 69, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    animation: slideIn 0.5s ease, shake 0.5s ease 0.5s;
}

.warning-banner.severe::before {
    content: '🚨';
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 25px;
    margin-bottom: 35px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    padding: 30px;
    border-radius: 25px;
    box-shadow: 
        var(--shadow-medium),
        0 0 30px rgba(102, 126, 234, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    text-align: center;
    border: 2px solid rgba(255, 255, 255, 0.5);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: var(--energy-gradient);
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.stat-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.stat-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
        var(--shadow-strong),
        0 0 50px rgba(102, 126, 234, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border-color: rgba(102, 126, 234, 0.5);
}

.stat-card:hover::before {
    transform: scaleX(1);
}

.stat-card:hover::after {
    opacity: 1;
}

.stat-card h3 {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}

.stat-value {
    font-size: 3rem;
    font-weight: 900;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    background-size: 200% 200%;
    animation: textGradient 4s ease infinite;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    filter: drop-shadow(0 2px 4px rgba(102, 126, 234, 0.3));
    transition: all 0.3s ease;
}

.stat-card:hover .stat-value {
    transform: scale(1.1);
}

.stat-label {
    font-size: 0.9rem;
    color: #95a5a6;
    font-weight: 600;
}

/* Tracking Section */
.tracking-section-toggle {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
}

.tracking-section {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    padding: 35px;
    border-radius: 25px;
    box-shadow: 
        var(--shadow-medium),
        0 0 40px rgba(102, 126, 234, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    margin-bottom: 40px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.tracking-section::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    height: 6px;
    background: var(--primary-gradient);
    background-size: 200% 200%;
    animation: gradientShift 4s ease infinite;
    border-radius: 25px 25px 0 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 4px solid;
    border-image: linear-gradient(90deg, rgba(102, 126, 234, 0.3), rgba(118, 75, 162, 0.3), rgba(102, 126, 234, 0.3)) 1;
    position: relative;
}

.section-header::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100px;
    height: 4px;
    background: var(--primary-gradient);
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
    border-radius: 2px;
}

.section-header h2 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    background-size: 200% 200%;
    animation: textGradient 4s ease infinite;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 2rem;
    font-weight: 900;
    margin: 0;
    letter-spacing: -0.5px;
    filter: drop-shadow(0 2px 4px rgba(102, 126, 234, 0.2));
}

.date-selector {
    display: flex;
    align-items: center;
    gap: 12px;
}

.date-selector label {
    font-weight: 600;
    color: #555;
}

.date-selector input[type="date"] {
    padding: 10px 15px;
    border: 2px solid rgba(122, 156, 198, 0.3);
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: white;
}

.date-selector input[type="date"]:focus {
    outline: none;
    border-color: #7A9CC6;
    box-shadow: 0 0 0 3px rgba(122, 156, 198, 0.1);
}

.tracking-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 10px;
    font-weight: 600;
    color: #555;
    font-size: 15px;
}

.form-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    cursor: pointer;
    accent-color: #7A9CC6;
}

.form-group label:has(input[type="checkbox"]) {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 15px 18px;
    border-radius: 12px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    background: rgba(102, 126, 234, 0.05);
}

.form-group label:has(input[type="checkbox"]):hover {
    background: rgba(122, 156, 198, 0.15);
    border-color: rgba(102, 126, 234, 0.3);
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(122, 156, 198, 0.2);
}

.form-group label:has(input[type="checkbox"]:checked) {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.2) 100%);
    border-color: rgba(102, 126, 234, 0.5);
    box-shadow: 0 4px 15px rgba(122, 156, 198, 0.3);
}

.form-group input[type="number"] {
    padding: 14px 18px;
    border: 2px solid rgba(122, 156, 198, 0.3);
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: white;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.form-group input[type="number"]:focus {
    outline: none;
    border-color: #7A9CC6;
    box-shadow: 
        0 0 0 4px rgba(102, 126, 234, 0.15),
        inset 0 2px 4px rgba(0, 0, 0, 0.05);
    transform: scale(1.02);
}

.form-group textarea {
    padding: 14px 18px;
    border: 2px solid rgba(122, 156, 198, 0.3);
    border-radius: 12px;
    font-size: 16px;
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
}

.form-group textarea:focus {
    outline: none;
    border-color: #7A9CC6;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
}

.tracking-form .btn-primary {
    grid-column: 1 / -1;
    margin-top: 15px;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.rating-buttons {
    display: flex;
    gap: 12px;
    margin-top: 12px;
}

.rating-btn {
    flex: 1;
    padding: 20px 28px;
    border: 4px solid rgba(255, 255, 255, 0.5);
    border-radius: 15px;
    font-size: 1.6rem;
    font-weight: 900;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: white;
    color: #333;
    box-shadow: 
        0 6px 20px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    position: relative;
    overflow: hidden;
}

.rating-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.rating-btn:hover::before {
    width: 200px;
    height: 200px;
}

.rating-btn:hover {
    transform: translateY(-5px) scale(1.08) rotate(2deg);
    box-shadow: 
        0 12px 35px rgba(0, 0, 0, 0.25),
        0 0 30px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    border-width: 5px;
}

.rating-btn.active {
    border-width: 6px;
    transform: scale(1.12) rotate(-2deg);
    box-shadow: 
        0 15px 40px rgba(0, 0, 0, 0.35),
        0 0 50px currentColor,
        inset 0 2px 0 rgba(255, 255, 255, 0.9);
    animation: ratingPulse 2s ease-in-out infinite;
}

@keyframes ratingPulse {
    0%, 100% { box-shadow: 0 15px 40px rgba(0, 0, 0, 0.35), 0 0 50px currentColor, inset 0 2px 0 rgba(255, 255, 255, 0.9); }
    50% { box-shadow: 0 15px 40px rgba(0, 0, 0, 0.35), 0 0 70px currentColor, inset 0 2px 0 rgba(255, 255, 255, 0.9); }
}

.rating-btn.rating-1 {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    border-color: #c0392b;
}

.rating-btn.rating-1:hover {
    box-shadow: 0 8px 25px rgba(231, 76, 60, 0.5);
}

.rating-btn.rating-1.active {
    box-shadow: 0 0 25px rgba(231, 76, 60, 0.8);
}

.rating-btn.rating-2 {
    background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
    color: white;
    border-color: #d35400;
}

.rating-btn.rating-2:hover {
    box-shadow: 0 8px 25px rgba(230, 126, 34, 0.5);
}

.rating-btn.rating-2.active {
    box-shadow: 0 0 25px rgba(230, 126, 34, 0.8);
}

.rating-btn.rating-3 {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: white;
    border-color: #e67e22;
}

.rating-btn.rating-3:hover {
    box-shadow: 0 8px 25px rgba(243, 156, 18, 0.5);
}

.rating-btn.rating-3.active {
    box-shadow: 0 0 25px rgba(243, 156, 18, 0.8);
}

.rating-btn.rating-4 {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    color: white;
    border-color: #27ae60;
}

.rating-btn.rating-4:hover {
    box-shadow: 0 8px 25px rgba(46, 204, 113, 0.5);
}

.rating-btn.rating-4.active {
    box-shadow: 0 0 25px rgba(46, 204, 113, 0.8);
}

.rating-btn.rating-5 {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    color: white;
    border-color: #229954;
}

.rating-btn.rating-5:hover {
    box-shadow: 0 8px 25px rgba(39, 174, 96, 0.5);
}

.rating-btn.rating-5.active {
    box-shadow: 0 0 25px rgba(39, 174, 96, 0.8);
}

/* Tasks Section */
.tasks-section {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    padding: 35px;
    border-radius: 25px;
    box-shadow: 
        var(--shadow-medium),
        0 0 40px rgba(102, 126, 234, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.5);
    position: relative;
    overflow: hidden;
}

.tasks-section::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    height: 6px;
    background: var(--vibrant-gradient);
    background-size: 200% 200%;
    animation: gradientShift 4s ease infinite;
    border-radius: 25px 25px 0 0;
}

.tasks-container {
    display: flex;
    flex-direction: column;
    gap: 35px;
}

.task-list h2 {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    font-size: 1.6rem;
    font-weight: 800;
}

.tasks-list {
    min-height: 200px;
    margin-bottom: 20px;
}

.tasks-list.tasks-list-drag-over {
    outline: 2px dashed rgba(102, 126, 234, 0.55);
    outline-offset: 4px;
    border-radius: 12px;
}

.task-drag-handle {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    margin-right: 10px;
    cursor: grab;
    user-select: none;
    color: #999;
    font-size: 14px;
    letter-spacing: -2px;
    line-height: 1;
    touch-action: none;
}

.task-drag-handle:active {
    cursor: grabbing;
}

.task-item.task-dragging {
    opacity: 0.55;
}

.task-item.task-drag-over {
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.7), 0 8px 25px rgba(0, 0, 0, 0.12);
}

.task-item {
    display: flex;
    align-items: center;
    padding: 20px;
    margin-bottom: 15px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    border-left: 6px solid #ddd;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    position: relative;
    overflow: hidden;
}

.task-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.2), transparent);
    transition: width 0.3s ease;
}

.task-item:hover {
    background: white;
    transform: translateX(8px) scale(1.01);
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.15),
        0 0 20px rgba(102, 126, 234, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border-left-width: 8px;
}

.task-item:hover::before {
    width: 4px;
}

.task-item.completed {
    opacity: 0.6;
    text-decoration: line-through;
}

.task-item input[type="checkbox"] {
    margin-right: 15px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #7A9CC6;
}

.task-item .task-text {
    flex: 1;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    cursor: text;
    -webkit-touch-callout: none;
    touch-action: manipulation;
    user-select: none;
}

.task-item .task-text-edit {
    flex: 1;
    font-size: 18px;
    font-weight: 600;
    padding: 4px 8px;
    border: 2px solid rgba(102, 126, 234, 0.5);
    border-radius: 8px;
    background: white;
    color: #333;
    outline: none;
}

.task-item .task-due-date-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: 8px;
}

.task-item .task-due-date {
    font-size: 0.9rem;
    color: #7f8c8d;
    font-weight: 500;
}

.task-item .task-due-date-btn {
    padding: 4px 8px;
    font-size: 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    background: rgba(122, 156, 198, 0.15);
    color: #7A9CC6;
    transition: all 0.2s ease;
    line-height: 1;
}

.task-item .task-due-date-btn:hover {
    background: rgba(102, 126, 234, 0.25);
}

.task-item .task-due-date-input {
    padding: 4px 8px;
    font-size: 0.85rem;
    border: 2px solid rgba(122, 156, 198, 0.3);
    border-radius: 6px;
    background: white;
}

.task-item .task-due-date-clear {
    padding: 4px 8px;
    font-size: 0.75rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    background: rgba(231, 76, 60, 0.15);
    color: #e74c3c;
    font-weight: 600;
}

.task-item .task-due-date-clear:hover {
    background: rgba(231, 76, 60, 0.25);
}

.task-item .task-actions {
    display: flex;
    gap: 8px;
}

.task-item .task-actions button,
.task-item .task-actions select {
    padding: 6px 12px;
    font-size: 12px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    background: rgba(122, 156, 198, 0.1);
    color: #7A9CC6;
    font-weight: 600;
    transition: all 0.3s ease;
}

.task-item .task-actions button:hover,
.task-item .task-actions select:hover {
    background: rgba(122, 156, 198, 0.2);
    transform: translateY(-2px);
}

/* Task carryover styling */
.task-item.carryover-0 {
    border-left-color: #ddd;
}

.task-item.carryover-1 {
    border-left-color: #95a5a6;
}

.task-item.carryover-2 {
    border-left-color: #7f8c8d;
}

.task-item.carryover-3 {
    border-left-color: #e74c3c;
    font-weight: 600;
    background: rgba(231, 76, 60, 0.1);
}

.task-item.carryover-4 {
    border-left-color: #c0392b;
    font-weight: 700;
    background: rgba(192, 57, 43, 0.15);
    animation: pulseRed 2s ease-in-out infinite;
}

@keyframes pulseRed {
    0%, 100% { box-shadow: 0 2px 10px rgba(192, 57, 43, 0.2); }
    50% { box-shadow: 0 4px 20px rgba(192, 57, 43, 0.4); }
}

.task-item.urgency-red {
    border-left-color: #e74c3c;
    background: linear-gradient(135deg, #ffe5e5 0%, #ffcccc 100%);
}

.task-item.urgency-orange {
    border-left-color: #f39c12;
    background: linear-gradient(135deg, #fff4e5 0%, #ffe5cc 100%);
}

.task-item.urgency-green {
    border-left-color: #2ecc71;
    background: linear-gradient(135deg, #e5ffe5 0%, #ccffcc 100%);
}

.task-input-group {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    align-items: center;
}

.task-input-group input[type="text"] {
    flex: 1;
    padding: 14px 20px;
    border: 2px solid rgba(122, 156, 198, 0.3);
    border-radius: 14px;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: white;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.task-input-group input[type="text"]:focus {
    outline: none;
    border-color: #7A9CC6;
    box-shadow: 
        0 0 0 4px rgba(102, 126, 234, 0.15),
        inset 0 2px 4px rgba(0, 0, 0, 0.05),
        0 4px 15px rgba(102, 126, 234, 0.2);
    transform: scale(1.02);
}

.task-input-group input[type="date"] {
    padding: 12px 18px;
    border: 2px solid rgba(122, 156, 198, 0.3);
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: white;
}

.task-input-group input[type="date"]:focus {
    outline: none;
    border-color: #7A9CC6;
    box-shadow: 0 0 0 3px rgba(122, 156, 198, 0.1);
}

.urgency-selector {
    padding: 12px 14px;
    border: 2px solid rgba(122, 156, 198, 0.3);
    border-radius: 12px;
    font-size: 30px;
    line-height: 1;
    min-width: 52px;
    height: 54px;
    background: white;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.urgency-selector:focus {
    outline: none;
    border-color: #7A9CC6;
    box-shadow: 0 0 0 3px rgba(122, 156, 198, 0.1);
}

.task-urgency-selector {
    padding: 6px 8px;
    border: 2px solid rgba(122, 156, 198, 0.3);
    border-radius: 8px;
    font-size: 24px;
    line-height: 1;
    min-width: 42px;
    height: 38px;
    background: white;
    cursor: pointer;
    margin-right: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.task-urgency-selector:focus {
    outline: none;
    border-color: #7A9CC6;
}

.completed-tasks-section {
    margin-top: 35px;
    padding-top: 25px;
    border-top: 3px solid rgba(102, 126, 234, 0.2);
}

.completed-tasks-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

.completed-tasks-section-header:hover {
    opacity: 0.9;
}

.completed-tasks-section h3 {
    color: #7f8c8d;
    font-size: 1rem;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}

.completed-tasks-toggle {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    border-radius: 10px;
    background: rgba(122, 156, 198, 0.2);
    color: #7A9CC6;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
}

.completed-tasks-toggle:hover {
    background: rgba(102, 126, 234, 0.35);
    transform: scale(1.05);
}

.completed-tasks-list-wrapper {
    margin-top: 15px;
}

.completed-tasks-section.collapsed .completed-tasks-list-wrapper {
    display: none;
}

.completed-list {
    max-height: 300px;
    overflow-y: auto;
}

.completed-list .task-item.archived {
    opacity: 1;
    text-decoration: none;
    align-items: flex-start;
    gap: 16px;
    border-left-color: #8fd19e;
    background: #fff;
}

.completed-list .task-item.archived .task-text {
    text-decoration: none;
    font-weight: 650;
}

.archived-task-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.archived-task-dates {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.archived-date {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #f4f7f5;
    color: #5c6b7a;
    font-size: 0.78rem;
    font-style: normal;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.archived-date strong {
    color: #243140;
    font-weight: 700;
}

.archived-date-done {
    background: #e8f8ee;
    color: #1b7a43;
}

.archived-date-done strong {
    color: #146336;
}

.archived-delete {
    flex-shrink: 0;
    border: none;
    background: transparent;
    color: #b91c1c;
    font-weight: 700;
    font-size: 0.82rem;
    padding: 6px 8px;
    border-radius: 8px;
    cursor: pointer;
}

.archived-delete:hover {
    background: rgba(185, 28, 28, 0.1);
}

.task-item.archived {
    opacity: 0.5;
    background: rgba(245, 245, 245, 0.8);
}

.task-completed-date {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-right: 12px;
    font-style: italic;
    font-weight: 500;
}

/* Analytics */
.analytics-section {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    padding: 35px;
    border-radius: 25px;
    box-shadow: 
        var(--shadow-medium),
        0 0 40px rgba(102, 126, 234, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.5);
    position: relative;
    overflow: hidden;
}

.analytics-section::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    height: 6px;
    background: var(--cool-gradient);
    background-size: 200% 200%;
    animation: gradientShift 4s ease infinite;
    border-radius: 25px 25px 0 0;
}

/* ============================================ */
/* NOTES (STICKY NOTES)                         */
/* ============================================ */

.notes-section {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    padding: clamp(12px, 2vw, 30px);
    border-radius: 25px;
    box-shadow: var(--shadow-medium), 0 0 40px rgba(102, 126, 234, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.5);
    position: relative;
    overflow: hidden;
    min-width: 0;
}

.notes-section::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    height: 6px;
    background: var(--warm-gradient);
    background-size: 200% 200%;
    animation: gradientShift 4s ease infinite;
    border-radius: 25px 25px 0 0;
}

.notes-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: clamp(8px, 1vw, 14px);
    margin-bottom: clamp(10px, 1.4vw, 18px);
    padding: clamp(8px, 1vw, 12px) clamp(10px, 1.2vw, 16px);
    background: rgba(102, 126, 234, 0.06);
    border-radius: 12px;
    border: 1px solid rgba(102, 126, 234, 0.12);
}

.btn-add-note,
.btn-sort-notes {
    font-size: clamp(12px, 1.35vw, 16px);
    padding: clamp(7px, 0.85vw, 12px) clamp(12px, 1.5vw, 22px);
    border-radius: clamp(8px, 1vw, 12px);
    text-transform: none;
    letter-spacing: 0.02em;
}

.btn-add-note {
    box-shadow: 0 4px 14px rgba(79, 172, 254, 0.28);
}

.notes-color-picker {
    display: flex;
    align-items: center;
    gap: clamp(6px, 0.8vw, 10px);
    flex-wrap: wrap;
}

.color-label {
    font-weight: 700;
    color: #555;
    font-size: clamp(12px, 1.2vw, 15px);
}

.note-color-btn {
    width: clamp(22px, 2.3vw, 34px);
    height: clamp(22px, 2.3vw, 34px);
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

.note-color-btn:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
}

.note-color-btn.active {
    border-color: #333;
    transform: scale(1.2);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.3);
}

.notes-board {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px 10px;
    padding: 12px;
    min-height: 320px;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.35);
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    align-content: start;
    position: relative;
}

.notes-board.is-searching {
    cursor: default;
}

.notes-board.is-searching .sticky-note-drag-handle,
.notes-board.is-searching .sticky-note-size-toggle,
.notes-board.is-searching .sticky-note-size-btn {
    pointer-events: none;
    opacity: 0.35;
}

.note-cell {
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    min-height: 0;
    min-width: 0;
    padding: 0;
    background: transparent;
    border-radius: 4px;
    border: none;
    box-sizing: border-box;
    overflow: hidden;
}

.note-drop-ghost {
    pointer-events: none;
    background: rgba(91, 124, 153, 0.14);
    border: 2px dashed rgba(91, 124, 153, 0.55);
    border-radius: 6px;
    box-sizing: border-box;
    z-index: 1;
}

.note-cell-drag-over {
    background: rgba(102, 126, 234, 0.14);
    border-radius: 6px;
    outline: 1px dashed rgba(102, 126, 234, 0.45);
    outline-offset: -1px;
}

.sticky-note {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    min-width: 0;
    min-height: 0;
    container-type: inline-size;
    box-sizing: border-box;
    padding: 0;
    border-radius: 4px;
    box-shadow:
        2px 3px 8px rgba(0, 0, 0, 0.12),
        1px 1px 0 rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s ease;
    animation: noteAppear 0.35s ease;
    cursor: default;
    overflow: hidden;
    transform: none;
    z-index: 2;
    aspect-ratio: auto;
}

.sticky-note.size-double-h {
    grid-column: span 2;
}

.sticky-note.size-double-v {
    grid-row: span 2;
}

.sticky-note.size-big {
    grid-column: span 2;
    grid-row: span 2;
}

.sticky-note:hover {
    transform: none;
    box-shadow:
        3px 6px 14px rgba(0, 0, 0, 0.14),
        1px 1px 0 rgba(0, 0, 0, 0.05);
}

.sticky-note-dragging {
    z-index: 8;
    cursor: grabbing;
    opacity: 0.42;
    box-shadow: 4px 8px 24px rgba(0, 0, 0, 0.22);
}

.sticky-note-remove {
    animation: noteRemove 0.28s ease forwards;
    pointer-events: none;
}

@keyframes noteAppear {
    from {
        opacity: 0;
        transform: scale(0.96) translateY(6px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes noteRemove {
    to {
        opacity: 0;
        transform: scale(0.6) translateY(20px);
    }
}

.sticky-note-header {
    display: flex;
    align-items: center;
    gap: clamp(2px, 2cqi, 6px);
    padding: clamp(3px, 2cqi, 6px) clamp(4px, 2.5cqi, 8px) clamp(2px, 1.5cqi, 4px);
    flex-shrink: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.07);
}

.sticky-note-drag-handle {
    cursor: grab;
    padding: clamp(2px, 1.5cqi, 6px);
    margin: 0;
    font-size: clamp(10px, 8cqi, 14px);
    line-height: 1;
    color: rgba(0, 0, 0, 0.38);
    user-select: none;
    flex-shrink: 0;
    border-radius: 3px;
    transition: background 0.15s, color 0.15s;
    letter-spacing: -0.05em;
}

.sticky-note-drag-handle:hover {
    background: rgba(0, 0, 0, 0.06);
    color: rgba(0, 0, 0, 0.55);
}

.sticky-note-drag-handle:active {
    cursor: grabbing;
}

.sticky-note-title {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    font-size: clamp(11px, 8cqi, 15px);
    font-weight: 700;
    color: rgba(0, 0, 0, 0.78);
    outline: none;
    font-family: inherit;
}

.sticky-note-title::placeholder {
    color: rgba(0, 0, 0, 0.4);
}

.sticky-note-actions {
    display: flex;
    gap: clamp(2px, 1.2cqi, 4px);
    align-items: center;
    flex-shrink: 0;
}

.sticky-note-color-btn,
.sticky-note-delete-btn,
.sticky-note-size-toggle,
.sticky-note-move-btn,
.sticky-note-expand-btn {
    width: clamp(16px, 14cqi, 26px);
    height: clamp(16px, 14cqi, 26px);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: clamp(10px, 8cqi, 14px);
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.06);
    color: #444;
    transition: background 0.15s ease;
}

.sticky-note-expand-btn svg {
    width: 62%;
    height: 62%;
    display: block;
}

.sticky-note-color-btn:hover,
.sticky-note-delete-btn:hover,
.sticky-note-size-toggle:hover,
.sticky-note-move-btn:hover,
.sticky-note-expand-btn:hover,
.sticky-note-move-btn.open {
    background: rgba(0, 0, 0, 0.12);
}

.sticky-note-delete-btn {
    font-size: 13px;
    color: #b91c1c;
}

.sticky-note-delete-btn:hover {
    background: rgba(185, 28, 28, 0.12);
    color: #991b1b;
}

.sticky-note-text-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    margin: 0 6px 6px;
    position: relative;
}

.sticky-note-text {
    flex: 1;
    min-height: 0;
    padding: 4px 6px 28px 6px;
    border: none;
    border-radius: 0;
    background: transparent;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.45;
    color: rgba(0, 0, 0, 0.82);
    outline: none;
    font-family: inherit;
    overflow-y: auto;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.sticky-note-text:focus {
    background: transparent;
}

.sticky-note-text:empty:before {
    content: attr(placeholder);
    color: rgba(0, 0, 0, 0.35);
    pointer-events: none;
}

.sticky-note-text-container:focus-within .sticky-note-text {
    background: transparent;
}

.sticky-note-font-controls {
    position: absolute;
    bottom: 4px;
    right: 4px;
    display: flex;
    gap: 2px;
    background: rgba(255, 255, 255, 0.65);
    border-radius: 4px;
    padding: 2px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    z-index: 10;
}

.sticky-note-font-increase,
.sticky-note-font-decrease {
    width: 22px;
    height: 22px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.06);
    color: #444;
    transition: background 0.15s ease;
    user-select: none;
}

.sticky-note-font-increase:hover,
.sticky-note-font-decrease:hover {
    background: rgba(0, 0, 0, 0.1);
}

.sticky-note-font-increase:active,
.sticky-note-font-decrease:active {
    transform: scale(0.95);
}

/* Post-it paper colors (flat) */
.sticky-note.note-color-yellow {
    background: #fff9c4;
}

.sticky-note.note-color-pink {
    background: #fce4ec;
}

.sticky-note.note-color-green {
    background: #e8f5e9;
}

.sticky-note.note-color-blue {
    background: #e3f2fd;
}

.sticky-note.note-color-purple {
    background: #f3e5f5;
}

.sticky-note.note-color-orange,
.note-lightbox-sheet.note-color-orange {
    background: #fff3e0;
}

.note-lightbox-sheet.note-color-yellow { background: #fff9c4; }
.note-lightbox-sheet.note-color-pink { background: #fce4ec; }
.note-lightbox-sheet.note-color-green { background: #e8f5e9; }
.note-lightbox-sheet.note-color-blue { background: #e3f2fd; }
.note-lightbox-sheet.note-color-purple { background: #f3e5f5; }

.note-lightbox[hidden] {
    display: none !important;
}

.note-lightbox {
    position: fixed;
    inset: 0;
    z-index: 4000;
    display: flex;
    align-items: stretch;
    justify-content: center;
    padding: clamp(12px, 3vh, 36px) clamp(12px, 3vw, 48px);
}

.note-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(18, 26, 36, 0.58);
    backdrop-filter: blur(8px);
}

.note-lightbox-sheet {
    position: relative;
    z-index: 1;
    width: min(980px, 100%);
    height: 100%;
    max-height: 100%;
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.32);
    overflow: hidden;
}

.note-lightbox-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px 8px;
}

.note-lightbox-hint {
    margin: 0;
    color: rgba(0, 0, 0, 0.45);
    font-size: 0.85rem;
}

.note-lightbox-close {
    border: none;
    background: rgba(0, 0, 0, 0.08);
    color: #243140;
    font-weight: 700;
    border-radius: 999px;
    padding: 8px 14px;
    cursor: pointer;
}

.note-lightbox-close:hover {
    background: rgba(0, 0, 0, 0.14);
}

.note-lightbox-title {
    border: none;
    background: transparent;
    font-size: clamp(22px, 3vw, 34px);
    font-weight: 700;
    color: rgba(0, 0, 0, 0.82);
    padding: 4px 22px 8px;
    outline: none;
    font-family: inherit;
}

.note-lightbox-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 8px 22px 28px;
    outline: none;
    color: rgba(0, 0, 0, 0.84);
    line-height: 1.45;
}

.note-lightbox-body.font-small { font-size: 16px; }
.note-lightbox-body.font-medium { font-size: 20px; }
.note-lightbox-body.font-large { font-size: 26px; }
.note-lightbox-body.font-xlarge { font-size: 34px; }
.note-lightbox-body.font-xxlarge { font-size: 44px; line-height: 1.2; }

.note-lightbox-body:empty:before {
    content: attr(data-placeholder);
    color: rgba(0, 0, 0, 0.35);
}

body.note-lightbox-open {
    overflow: hidden;
}

@media (max-width: 768px) {
    .notes-toolbar {
        flex-wrap: wrap;
        align-items: center;
    }
    .notes-board {
        min-height: 240px;
        overflow-x: hidden;
    }
    .notes-row-controls {
        flex-direction: column;
    }
}

/* Summary Tab */
.summary-section {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    padding: 35px;
    border-radius: 25px;
    box-shadow:
        var(--shadow-medium),
        0 0 40px rgba(102, 126, 234, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.5);
    overflow: hidden;
}

.summary-section::before {
    content: '';
    display: block;
    height: 6px;
    background: var(--vibrant-gradient);
    background-size: 200% 200%;
    animation: gradientShift 4s ease infinite;
    margin: -35px -35px 25px -35px;
}

.summary-header {
    margin-bottom: 25px;
}

.summary-header h2 {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 6px;
}

.summary-subtitle {
    color: #7f8c8d;
    font-size: 1rem;
    font-weight: 500;
}

.summary-table-wrapper {
    overflow-x: auto;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.15);
}

.summary-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.summary-table th {
    padding: 14px 16px;
    text-align: left;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    white-space: nowrap;
}

.summary-table th:first-child {
    border-radius: 16px 0 0 0;
}

.summary-table th:last-child {
    border-radius: 0 16px 0 0;
}

.summary-table td {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(102, 126, 234, 0.1);
}

.summary-table tbody tr {
    background: rgba(255, 255, 255, 0.9);
    transition: background 0.2s ease;
}

.summary-table tbody tr:nth-child(even) {
    background: rgba(102, 126, 234, 0.04);
}

.summary-table tbody tr:hover {
    background: rgba(102, 126, 234, 0.12);
}

.summary-day {
    font-weight: 700;
    color: #7A9CC6;
}

.summary-date {
    font-weight: 600;
    color: #555;
}

.summary-yes,
.summary-yes-good {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 12px;
}

.summary-yes {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    color: white;
}

.summary-yes-good {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    color: white;
}

.summary-no {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 12px;
    background: rgba(149, 165, 166, 0.3);
    color: #7f8c8d;
}

.summary-no-bad {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 12px;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
}

.summary-weight,
.summary-sm,
.summary-tasks {
    font-weight: 600;
    color: #333;
}

.summary-rating-val {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 8px;
    font-weight: 700;
    color: white;
}

.summary-rating-val.rating-1 { background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%); }
.summary-rating-val.rating-2 { background: linear-gradient(135deg, #e67e22 0%, #d35400 100%); }
.summary-rating-val.rating-3 { background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%); }
.summary-rating-val.rating-4 { background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%); }
.summary-rating-val.rating-5 { background: linear-gradient(135deg, #27ae60 0%, #229954 100%); }

.summary-notes {
    max-width: 220px;
    font-size: 13px;
    color: #555;
    line-height: 1.4;
}

.summary-empty {
    text-align: center;
    padding: 40px 20px !important;
    color: #7f8c8d;
    font-style: italic;
}

.summary-editable {
    cursor: pointer;
}

.summary-editable:hover {
    background: rgba(102, 126, 234, 0.15) !important;
}

.summary-edit-modal {
    position: fixed;
    inset: 0;
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.summary-edit-modal.hidden {
    display: none;
}

.summary-edit-modal-backdrop {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.summary-edit-modal-content {
    position: relative;
    z-index: 1;
    background: white;
    border-radius: 20px;
    padding: 28px;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(122, 156, 198, 0.3);
}

.summary-edit-title {
    margin-bottom: 20px;
    font-size: 1.25rem;
    color: #333;
}

.summary-edit-body {
    margin-bottom: 24px;
}

.summary-edit-body input[type="number"],
.summary-edit-body textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid rgba(122, 156, 198, 0.3);
    border-radius: 12px;
    font-size: 16px;
}

.summary-edit-body textarea {
    min-height: 100px;
    resize: vertical;
    font-family: inherit;
}

.summary-edit-yesno {
    display: flex;
    gap: 12px;
}

.summary-edit-btn {
    flex: 1;
    padding: 14px 24px;
    border: 2px solid rgba(122, 156, 198, 0.3);
    border-radius: 12px;
    background: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.summary-edit-btn:hover {
    background: rgba(122, 156, 198, 0.1);
}

.summary-edit-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
}

.summary-edit-rating {
    display: flex;
    gap: 10px;
}

.summary-edit-rating-btn {
    width: 48px;
    height: 48px;
    border: 2px solid rgba(122, 156, 198, 0.3);
    border-radius: 12px;
    background: white;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    color: #666;
    transition: all 0.2s ease;
}

.summary-edit-rating-btn:hover {
    transform: scale(1.05);
}

.summary-edit-rating-btn.rating-1.active { background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%); color: white; border-color: transparent; }
.summary-edit-rating-btn.rating-2.active { background: linear-gradient(135deg, #e67e22 0%, #d35400 100%); color: white; border-color: transparent; }
.summary-edit-rating-btn.rating-3.active { background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%); color: white; border-color: transparent; }
.summary-edit-rating-btn.rating-4.active { background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%); color: white; border-color: transparent; }
.summary-edit-rating-btn.rating-5.active { background: linear-gradient(135deg, #27ae60 0%, #229954 100%); color: white; border-color: transparent; }

.summary-edit-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

@media (max-width: 768px) {
    .summary-table {
        font-size: 12px;
    }
    .summary-table th,
    .summary-table td {
        padding: 10px 12px;
    }
    .summary-notes {
        max-width: 140px;
    }
}

.analytics-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 30px;
    padding: 10px;
    background: rgba(122, 156, 198, 0.1);
    border-radius: 15px;
}

.analytics-tab-btn {
    padding: 14px 28px;
    background: transparent;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: #7f8c8d;
    transition: all 0.3s ease;
}

.analytics-tab-btn:hover {
    color: #7A9CC6;
    background: rgba(122, 156, 198, 0.1);
}

.analytics-tab-btn.active {
    color: white;
    background: var(--primary-gradient);
    box-shadow: 0 4px 15px rgba(122, 156, 198, 0.3);
}

.analytics-subsection {
    display: none;
}

.analytics-subsection.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

.analytics-controls {
    display: flex;
    gap: 12px;
    margin-bottom: 25px;
    flex-wrap: wrap;
    padding: 15px;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 15px;
}

.analytics-btn {
    padding: 12px 24px;
    border: 2px solid rgba(122, 156, 198, 0.3);
    background: white;
    border-radius: 12px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
    color: #555;
}

.analytics-btn:hover {
    background: rgba(122, 156, 198, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(122, 156, 198, 0.2);
}

.analytics-btn.active {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(122, 156, 198, 0.3);
}

.multi-line-chart-controls {
    margin-bottom: 25px;
    padding: 20px;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 15px;
}

.multi-line-chart-controls h3 {
    margin-bottom: 15px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
}

.view-type-controls {
    display: flex;
    gap: 12px;
}

.view-type-btn {
    padding: 10px 24px;
    border: 2px solid rgba(122, 156, 198, 0.3);
    background: white;
    border-radius: 10px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
    color: #555;
}

.view-type-btn:hover {
    background: rgba(122, 156, 198, 0.1);
    transform: translateY(-2px);
}

.view-type-btn.active {
    background: var(--energy-gradient);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.3);
}

.custom-range {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 25px;
    padding: 20px;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 15px;
}

.custom-range label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 600;
    color: #555;
}

.custom-range input[type="date"] {
    padding: 10px 15px;
    border: 2px solid rgba(122, 156, 198, 0.3);
    border-radius: 10px;
    background: white;
    transition: all 0.3s ease;
}

.custom-range input[type="date"]:focus {
    outline: none;
    border-color: #7A9CC6;
    box-shadow: 0 0 0 3px rgba(122, 156, 198, 0.1);
}

.charts-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 30px;
}

.chart-wrapper {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 22px;
    box-shadow: 
        var(--shadow-soft),
        0 0 25px rgba(102, 126, 234, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.4);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.chart-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.chart-wrapper:hover {
    transform: translateY(-5px) scale(1.01);
    box-shadow: 
        var(--shadow-medium),
        0 0 40px rgba(102, 126, 234, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.7);
    border-color: rgba(102, 126, 234, 0.5);
}

.chart-wrapper:hover::before {
    opacity: 1;
}

.chart-wrapper.full-width {
    grid-column: 1 / -1;
}

.chart-wrapper h3 {
    margin-bottom: 20px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.3rem;
    font-weight: 800;
}

.chart-wrapper canvas {
    max-height: 300px;
}

.calendar-controls {
    margin-bottom: 25px;
    padding: 20px;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 15px;
}

.calendar-controls label {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    color: #555;
    font-size: 16px;
}

.calendar-controls input[type="month"] {
    padding: 12px 18px;
    border: 2px solid rgba(122, 156, 198, 0.3);
    border-radius: 12px;
    font-size: 15px;
    background: white;
    transition: all 0.3s ease;
    font-weight: 600;
}

.calendar-controls input[type="month"]:focus {
    outline: none;
    border-color: #7A9CC6;
    box-shadow: 0 0 0 3px rgba(122, 156, 198, 0.1);
}

.calendars-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
}

.calendar-wrapper {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 22px;
    box-shadow: 
        var(--shadow-soft),
        0 0 25px rgba(102, 126, 234, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.4);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.calendar-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: var(--vibrant-gradient);
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.calendar-wrapper:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 
        var(--shadow-medium),
        0 0 40px rgba(102, 126, 234, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.7);
    border-color: rgba(102, 126, 234, 0.5);
}

.calendar-wrapper:hover::before {
    opacity: 1;
}

.calendar-wrapper h3 {
    margin-bottom: 20px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.2rem;
    font-weight: 800;
}

.calendar-heatmap {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    margin-top: 15px;
}

.calendar-day[data-date] {
    cursor: pointer;
}

.calendar-day {
    aspect-ratio: 1;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 3px solid rgba(255, 255, 255, 0.3);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.calendar-day::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
}

.calendar-day:hover {
    transform: scale(1.2) rotate(5deg);
    z-index: 10;
    position: relative;
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.25),
        0 0 30px currentColor,
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    border-width: 4px;
}

.calendar-day:hover::before {
    width: 150%;
    height: 150%;
}

.calendar-day-label {
    font-size: 13px;
    font-weight: 700;
    color: #7f8c8d;
    text-align: center;
    margin-bottom: 8px;
}

.calendar-week {
    display: contents;
}

/* Day Rating Colors */
.calendar-day.rating-1 { background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%); color: white; }
.calendar-day.rating-2 { background: linear-gradient(135deg, #e67e22 0%, #d35400 100%); color: white; }
.calendar-day.rating-3 { background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%); color: white; }
.calendar-day.rating-4 { background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%); color: white; }
.calendar-day.rating-5 { background: linear-gradient(135deg, #27ae60 0%, #229954 100%); color: white; }
.calendar-day.rating-none { background: rgba(236, 240, 241, 0.6); color: #95a5a6; }

/* Boolean metric colors */
.calendar-day.metric-yes { background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%); color: white; }
.calendar-day.metric-no { background: rgba(236, 240, 241, 0.6); color: #95a5a6; }
.calendar-day.metric-no-negative { background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%); color: white; }

/* Responsive */
@media (max-width: 1200px) {
    .charts-container {
        grid-template-columns: 1fr;
    }
}

/* ========== Mobile & Tablet (768px) ========== */
@media (max-width: 768px) {
    body {
        padding-top: 52px;
        -webkit-tap-highlight-color: rgba(102, 126, 234, 0.2);
    }

    .container {
        padding: 12px;
        max-width: 100%;
    }

    .app-top-bar {
        padding: 6px 8px 6px 10px;
        min-height: 46px;
    }

    .app-top-bar .tab-btn {
        min-height: 40px;
        padding: 8px 12px;
        font-size: 12px;
    }

    .app-top-bar-theme {
        min-height: 40px;
        padding: 8px 10px;
        font-size: 17px;
    }

    .app-top-bar .tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 4px;
        padding: 4px 5px;
        scrollbar-width: none;
    }

    .app-top-bar .tabs::-webkit-scrollbar {
        display: none;
    }

    .tab-btn {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .quote-section {
        padding: 20px 16px;
        margin-bottom: 20px;
    }

    .quote {
        font-size: 1.05rem;
        line-height: 1.5;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        margin-bottom: 24px;
    }

    .stat-card {
        padding: 16px 12px;
        border-radius: 16px;
    }

    .stat-card h3 {
        font-size: 0.75rem;
        margin-bottom: 8px;
    }

    .stat-value {
        font-size: 2rem;
        margin-bottom: 4px;
    }

    .stat-label {
        font-size: 0.8rem;
    }

    .tracking-section-toggle {
        margin-bottom: 16px;
        padding: 12px;
    }

    .tracking-section-toggle .btn-primary {
        width: 100%;
        min-height: 48px;
        font-size: 15px;
    }

    .tracking-section {
        padding: 20px 16px;
        margin-bottom: 24px;
        border-radius: 20px;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 20px;
        padding-bottom: 16px;
    }

    .section-header h2 {
        font-size: 1.4rem;
    }

    .date-selector {
        width: 100%;
    }

    .date-selector input[type="date"] {
        width: 100%;
        min-height: 44px;
    }

    .tracking-form {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .form-group label {
        font-size: 1rem;
    }

    .form-group input[type="number"],
    .form-group input[type="date"],
    .form-group input[type="text"] {
        min-height: 44px;
        font-size: 16px;
    }

    .rating-buttons {
        flex-wrap: wrap;
        gap: 10px;
    }

    .rating-btn {
        min-width: 52px;
        min-height: 48px;
        font-size: 1.1rem;
    }

    .tracking-form .btn-primary {
        min-height: 48px;
        width: 100%;
    }

    .tasks-section {
        margin-bottom: 24px;
    }

    .tasks-container {
        gap: 28px;
    }

    .task-list h2 {
        font-size: 1.35rem;
        margin-bottom: 14px;
    }

    .task-input-group {
        flex-wrap: wrap;
        gap: 10px;
        margin-top: 14px;
    }

    .task-input-group input[type="text"] {
        flex: 1 1 100%;
        min-height: 44px;
        padding: 12px 16px;
        font-size: 16px;
    }

    .task-input-group input[type="date"] {
        flex: 1 1 auto;
        min-height: 44px;
        padding: 12px;
    }

    .task-input-group .urgency-selector {
        min-height: 44px;
        font-size: 24px;
        min-width: 56px;
        padding-left: 12px;
        padding-right: 32px;
        -webkit-appearance: none;
        appearance: none;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23667eea' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 10px center;
    }

    .task-input-group .btn-primary {
        flex: 1 1 100%;
        min-height: 48px;
    }

    .task-item {
        flex-wrap: wrap;
        padding: 14px 12px;
        margin-bottom: 12px;
        border-radius: 14px;
        gap: 10px;
    }

    .task-item input[type="checkbox"] {
        width: 24px;
        height: 24px;
        margin-right: 12px;
        flex-shrink: 0;
    }

    .task-item .task-text {
        flex: 1 1 0%;
        min-width: 0;
        font-size: 1rem;
        padding-right: 0;
    }

    .task-item .task-due-date-wrap {
        flex: 1 1 100%;
        margin-right: 0;
    }

    .task-item .task-actions {
        flex: 1 1 100%;
        flex-wrap: nowrap;
        flex-direction: row;
        gap: 8px;
        justify-content: flex-end;
    }

    .task-item .task-actions button,
    .task-item .task-actions select {
        min-height: 40px;
        min-width: 40px;
        padding: 8px;
        font-size: 1.1rem;
        flex: 0 0 40px;
    }

    .task-item .task-actions .task-action-icon,
    .task-item .task-actions .task-archive-btn {
        width: 40px;
        text-align: center;
        line-height: 1;
        font-size: 1.25rem;
    }

    .task-urgency-selector {
        min-height: 38px;
        font-size: 20px;
        min-width: 52px;
        padding-left: 8px;
        padding-right: 28px;
        flex: 0 0 52px;
        -webkit-appearance: none;
        appearance: none;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23667eea' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 8px center;
    }

    .completed-tasks-section-header {
        padding: 14px 0;
    }

    .completed-tasks-section-header h3 {
        font-size: 1rem;
    }

    .completed-tasks-toggle {
        min-width: 44px;
        min-height: 44px;
    }

    .pin-gate-content {
        gap: 32px;
    }

    .pin-gate-heading {
        font-size: 1.5rem;
    }

    .pin-gate-subheading {
        font-size: 0.95rem;
    }

    .pin-gate-card {
        margin: 0;
        padding: 28px 20px;
        border-radius: 20px;
        max-width: none;
    }

    .pin-gate-title {
        font-size: 1.2rem;
    }

    .pin-input {
        min-height: 52px;
        font-size: 1.75rem;
        letter-spacing: 0.4em;
    }

    .pin-submit {
        min-height: 48px;
        font-size: 1rem;
    }

    .analytics-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding: 10px 8px;
        gap: 8px;
    }

    .analytics-tab-btn {
        flex: 0 0 auto;
        min-height: 44px;
        padding: 10px 18px;
        font-size: 14px;
    }

    .analytics-controls {
        flex-wrap: wrap;
        gap: 10px;
    }

    .analytics-btn {
        min-height: 44px;
        padding: 10px 16px;
        font-size: 14px;
    }

    .custom-range {
        flex-direction: column;
        align-items: stretch;
    }

    .custom-range input[type="date"] {
        min-height: 44px;
    }

    .chart-wrapper {
        padding: 16px;
        margin-bottom: 20px;
    }

    .chart-wrapper h3 {
        font-size: 1.1rem;
    }

    .multi-line-chart-controls h3 {
        font-size: 1.1rem;
    }

    .view-type-btn {
        min-height: 44px;
        padding: 10px 14px;
        font-size: 14px;
    }

    .calendars-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .calendar-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .calendar-controls input[type="month"] {
        min-height: 44px;
    }

    .calendar-wrapper h3 {
        font-size: 1.1rem;
    }

    .calendar-day {
        min-height: 36px;
        font-size: 0.75rem;
    }

    .notes-toolbar {
        flex-wrap: wrap;
        padding: 12px;
        gap: 10px;
    }

    .notes-board {
        padding: 8px;
        overflow-x: hidden;
    }

    .note-cell {
        min-width: 0;
    }

    .warning-banner {
        padding: 14px 16px;
        font-size: 0.95rem;
    }
}

/* ========== Small phones (480px) ========== */
@media (max-width: 480px) {
    body {
        padding-top: 50px;
    }

    .container {
        padding: 10px;
    }

    header h1 {
        font-size: 1.3rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .stat-value {
        font-size: 1.75rem;
    }

    .section-header h2 {
        font-size: 1.25rem;
    }

    .task-list h2 {
        font-size: 1.2rem;
    }

    .pin-gate-card {
        padding: 24px 16px;
    }

    .pin-gate-title {
        font-size: 1.35rem;
    }
}

/* Dark Mode Styles */
body.dark-mode {
    background: linear-gradient(135deg, #1A2332 0%, #2C3E50 25%, #34495E 50%, #3D5A73 75%, #2C3E50 100%);
    background-size: 300% 300%;
    animation: gradientShift 20s ease infinite;
    color: #E8EDF2;
}

body.dark-mode .quote {
    color: #f0f0f0;
}

body.dark-mode .task-item .task-text {
    color: #f0f0f0;
}

body.dark-mode header,
body.dark-mode .quote-section,
body.dark-mode .stat-card,
body.dark-mode .tracking-section,
body.dark-mode .tasks-section,
body.dark-mode .analytics-section {
    background: rgba(44, 62, 80, 0.85);
    backdrop-filter: blur(10px);
    border-color: rgba(122, 156, 198, 0.25);
}

body.dark-mode .notes-section {
    background: rgba(44, 62, 80, 0.85);
    border-color: rgba(122, 156, 198, 0.25);
}

body.dark-mode .summary-section {
    background: rgba(30, 30, 46, 0.95);
    border-color: rgba(102, 126, 234, 0.3);
}

body.dark-mode .summary-subtitle {
    color: #b0b0b0;
}

body.dark-mode .summary-table tbody tr {
    background: rgba(40, 40, 60, 0.6);
}

body.dark-mode .summary-table tbody tr:nth-child(even) {
    background: rgba(102, 126, 234, 0.08);
}

body.dark-mode .summary-table tbody tr:hover {
    background: rgba(102, 126, 234, 0.18);
}

body.dark-mode .summary-table td {
    border-bottom-color: rgba(102, 126, 234, 0.2);
}

body.dark-mode .summary-date {
    color: #c8c8c8;
}

body.dark-mode .summary-weight,
body.dark-mode .summary-sm,
body.dark-mode .summary-tasks {
    color: #e0e0e0;
}

body.dark-mode .summary-no {
    background: rgba(149, 165, 166, 0.3);
    color: #95a5a6;
}

body.dark-mode .summary-notes {
    color: #b8b8b8;
}

body.dark-mode .summary-empty {
    color: #95a5a6;
}

body.dark-mode .summary-edit-modal-content {
    background: rgba(30, 30, 46, 0.98);
    border-color: rgba(102, 126, 234, 0.5);
}

body.dark-mode .summary-edit-title {
    color: #e0e0e0;
}

body.dark-mode .summary-edit-body input,
body.dark-mode .summary-edit-body textarea {
    background: rgba(40, 40, 60, 0.9);
    border-color: rgba(122, 156, 198, 0.4);
    color: #e0e0e0;
}

body.dark-mode .summary-edit-btn {
    background: rgba(40, 40, 60, 0.9);
    color: #c8c8c8;
}

body.dark-mode .summary-edit-btn:hover {
    background: rgba(122, 156, 198, 0.2);
}

body.dark-mode .summary-edit-rating-btn {
    background: rgba(40, 40, 60, 0.9);
}

body.dark-mode .notes-toolbar {
    background: rgba(122, 156, 198, 0.1);
    border-color: rgba(102, 126, 234, 0.25);
}

body.dark-mode .color-label {
    color: #c0c0c0;
}

body.dark-mode .notes-board {
    background: rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.08);
}

body.dark-mode .sticky-note-title {
    color: rgba(0, 0, 0, 0.82);
}

body.dark-mode .sticky-note-title::placeholder {
    color: rgba(255, 255, 255, 0.45);
}

body.dark-mode .sticky-note-text {
    background: transparent;
    color: rgba(0, 0, 0, 0.88);
}

body.dark-mode .sticky-note-text::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

body.dark-mode .sticky-note-color-btn,
body.dark-mode .sticky-note-delete-btn {
    background: rgba(255, 255, 255, 0.15);
    color: #e0e0e0;
}

body.dark-mode .sticky-note-header {
    border-bottom-color: rgba(255, 255, 255, 0.12);
}

body.dark-mode .note-cell {
    background: transparent;
}

body.dark-mode .note-cell-drag-over {
    border-color: rgba(102, 126, 234, 0.5);
    background: rgba(122, 156, 198, 0.2);
}

body.dark-mode .sticky-note-drag-handle {
    color: rgba(255, 255, 255, 0.5);
}

body.dark-mode .sticky-note-drag-handle:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
}

body.dark-mode .notes-row-controls {
    border-top-color: rgba(102, 126, 234, 0.25);
}

body.dark-mode header h1 {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

body.dark-mode .btn-dark-mode:hover {
    background: rgba(255, 255, 255, 0.2);
}

body.dark-mode .stat-card h3 {
    color: #d0d0d0;
}

body.dark-mode .stat-value {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

body.dark-mode .stat-label {
    color: #b8b8b8;
}

body.dark-mode .tab-btn {
    color: #c0c0c0;
}

body.dark-mode .tab-btn:hover {
    color: #a8edea;
}

body.dark-mode .tab-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

body.dark-mode .tabs {
    background: rgba(30, 30, 46, 0.95);
    border-color: rgba(102, 126, 234, 0.3);
}

body.dark-mode .section-header h2 {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

body.dark-mode .form-group label {
    color: #d8d8d8;
}

body.dark-mode .form-group input[type="number"],
body.dark-mode .form-group input[type="date"],
body.dark-mode .form-group input[type="text"] {
    background: rgba(20, 20, 30, 0.8);
    border-color: rgba(122, 156, 198, 0.4);
    color: #e0e0e0;
}

body.dark-mode .form-group input[type="number"]:focus,
body.dark-mode .form-group input[type="date"]:focus,
body.dark-mode .form-group input[type="text"]:focus,
body.dark-mode .form-group textarea:focus {
    border-color: #7A9CC6;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

body.dark-mode .form-group textarea {
    background: rgba(20, 20, 30, 0.8);
    border-color: rgba(122, 156, 198, 0.4);
    color: #e0e0e0;
}

body.dark-mode .date-selector input[type="date"] {
    background: rgba(20, 20, 30, 0.8);
    border-color: rgba(122, 156, 198, 0.4);
    color: #e0e0e0;
}

body.dark-mode .task-item {
    background: rgba(20, 20, 30, 0.8);
    border-left-color: rgba(102, 126, 234, 0.4);
}

body.dark-mode .task-item:hover {
    background: rgba(30, 30, 46, 0.9);
}

body.dark-mode .tasks-list.tasks-list-drag-over {
    outline-color: rgba(168, 237, 234, 0.45);
}

body.dark-mode .task-drag-handle {
    color: #888;
}

body.dark-mode .task-item.task-drag-over {
    box-shadow: 0 0 0 2px rgba(168, 237, 234, 0.55), 0 8px 25px rgba(0, 0, 0, 0.35);
}

body.dark-mode .task-item .task-due-date {
    color: #b8b8b8;
}

body.dark-mode .task-item .task-due-date-btn {
    background: rgba(102, 126, 234, 0.25);
    color: #a8edea;
}

body.dark-mode .task-item .task-due-date-btn:hover {
    background: rgba(102, 126, 234, 0.35);
}

body.dark-mode .task-item .task-due-date-input {
    background: rgba(20, 20, 30, 0.8);
    border-color: rgba(122, 156, 198, 0.4);
    color: #e0e0e0;
}

body.dark-mode .task-item .task-due-date-clear {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
}

body.dark-mode .task-item .task-due-date-clear:hover {
    background: rgba(231, 76, 60, 0.3);
}

body.dark-mode .task-item .task-actions button,
body.dark-mode .task-item .task-actions select {
    background: rgba(122, 156, 198, 0.2);
    color: #a8edea;
}

body.dark-mode .task-item .task-actions button:hover,
body.dark-mode .task-item .task-actions select:hover {
    background: rgba(102, 126, 234, 0.3);
}

body.dark-mode .task-item.carryover-4 {
    background: rgba(192, 57, 43, 0.2);
}

body.dark-mode .task-item.urgency-red {
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.2) 0%, rgba(192, 57, 43, 0.2) 100%);
    border-left-color: #e74c3c;
}

body.dark-mode .task-item.urgency-orange {
    background: linear-gradient(135deg, rgba(243, 156, 18, 0.2) 0%, rgba(230, 126, 34, 0.2) 100%);
    border-left-color: #f39c12;
}

body.dark-mode .task-item.urgency-green {
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.2) 0%, rgba(39, 174, 96, 0.2) 100%);
    border-left-color: #2ecc71;
}

body.dark-mode .warning-banner {
    background: linear-gradient(135deg, rgba(255, 243, 205, 0.3) 0%, rgba(255, 230, 156, 0.3) 100%);
    border-left-color: #ffc107;
    color: #ffc107;
}

body.dark-mode .warning-banner.severe {
    background: linear-gradient(135deg, rgba(248, 215, 218, 0.3) 0%, rgba(245, 198, 203, 0.3) 100%);
    border-left-color: #dc3545;
    color: #ff6b6b;
}

body.dark-mode .analytics-controls {
    background: rgba(122, 156, 198, 0.1);
}

body.dark-mode .analytics-btn {
    background: rgba(30, 30, 46, 0.8);
    border-color: rgba(122, 156, 198, 0.4);
    color: #e0e0e0;
}

body.dark-mode .analytics-btn:hover {
    background: rgba(122, 156, 198, 0.2);
}

body.dark-mode .analytics-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

body.dark-mode .custom-range {
    background: rgba(122, 156, 198, 0.1);
}

body.dark-mode .custom-range label {
    color: #d8d8d8;
}

body.dark-mode .custom-range input[type="date"] {
    background: rgba(20, 20, 30, 0.8);
    border-color: rgba(122, 156, 198, 0.4);
    color: #e0e0e0;
}

body.dark-mode .chart-wrapper {
    background: rgba(30, 30, 46, 0.9);
    border-color: rgba(102, 126, 234, 0.3);
}

body.dark-mode .chart-wrapper h3 {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

body.dark-mode .multi-line-chart-controls {
    background: rgba(122, 156, 198, 0.1);
}

body.dark-mode .multi-line-chart-controls h3 {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

body.dark-mode .view-type-btn {
    background: rgba(30, 30, 46, 0.8);
    border-color: rgba(122, 156, 198, 0.4);
    color: #e0e0e0;
}

body.dark-mode .view-type-btn:hover {
    background: rgba(122, 156, 198, 0.2);
}

body.dark-mode .view-type-btn.active {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: #fff;
}

body.dark-mode .analytics-tabs {
    background: rgba(122, 156, 198, 0.1);
}

body.dark-mode .analytics-tab-btn {
    color: #c0c0c0;
}

body.dark-mode .analytics-tab-btn:hover {
    color: #a8edea;
}

body.dark-mode .analytics-tab-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

body.dark-mode .calendar-controls {
    background: rgba(122, 156, 198, 0.1);
}

body.dark-mode .calendar-controls label {
    color: #d8d8d8;
}

body.dark-mode .calendar-controls input[type="month"] {
    background: rgba(20, 20, 30, 0.8);
    border-color: rgba(122, 156, 198, 0.4);
    color: #e0e0e0;
}

body.dark-mode .calendar-wrapper {
    background: rgba(30, 30, 46, 0.9);
    border-color: rgba(102, 126, 234, 0.3);
}

body.dark-mode .calendar-wrapper h3 {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

body.dark-mode .calendar-day.rating-none,
body.dark-mode .calendar-day.metric-no {
    background: rgba(30, 30, 46, 0.6);
    color: #b0b0b0;
    border-color: rgba(102, 126, 234, 0.3);
}

body.dark-mode .calendar-day.metric-no-negative {
    background: linear-gradient(135deg, #c0392b 0%, #a93226 100%);
    color: white;
}

body.dark-mode .calendar-day-label {
    color: #c8c8c8;
}

body.dark-mode .task-list h2 {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

body.dark-mode .completed-tasks-section {
    border-top-color: rgba(102, 126, 234, 0.3);
}

body.dark-mode .completed-tasks-section h3 {
    color: #d0d0d0;
}

body.dark-mode .completed-tasks-toggle {
    background: rgba(102, 126, 234, 0.3);
    color: #a8edea;
}

body.dark-mode .completed-tasks-toggle:hover {
    background: rgba(102, 126, 234, 0.5);
}

body.dark-mode .task-item.archived {
    background: rgba(20, 20, 30, 0.6);
    opacity: 0.5;
}

body.dark-mode .completed-list .task-item.archived {
    opacity: 1;
    background: rgba(36, 42, 56, 0.95);
    border-left-color: #2f9e5a;
}

body.dark-mode .completed-list .task-item.archived .task-text {
    color: #E8EDF2;
}

body.dark-mode .archived-date {
    background: rgba(255, 255, 255, 0.06);
    color: #b7c3d0;
}

body.dark-mode .archived-date strong {
    color: #f2f5f8;
}

body.dark-mode .archived-date-done {
    background: rgba(31, 138, 76, 0.22);
    color: #9be7b4;
}

body.dark-mode .archived-date-done strong {
    color: #d8ffe6;
}

body.dark-mode .task-completed-date {
    color: #b8b8b8;
}

body.dark-mode .urgency-selector,
body.dark-mode .task-urgency-selector {
    background-color: rgba(20, 20, 30, 0.8);
    border-color: rgba(122, 156, 198, 0.4);
    color: #e0e0e0;
}

@media (max-width: 768px) {
    body.dark-mode .task-urgency-selector,
    body.dark-mode .task-input-group .urgency-selector {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23a8edea' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 8px center;
    }
    body.dark-mode .task-input-group .urgency-selector {
        background-position: right 10px center;
    }
}

body.dark-mode .form-group select {
    background: rgba(20, 20, 30, 0.8);
    border-color: rgba(122, 156, 198, 0.4);
    color: #e0e0e0;
}

body.dark-mode .rating-btn {
    background: rgba(30, 30, 46, 0.8);
    border-color: rgba(122, 156, 198, 0.4);
    color: #e0e0e0;
}

body.dark-mode .rating-btn.rating-1 {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    border-color: #c0392b;
}

body.dark-mode .rating-btn.rating-2 {
    background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
    color: white;
    border-color: #d35400;
}

body.dark-mode .rating-btn.rating-3 {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: white;
    border-color: #e67e22;
}

body.dark-mode .rating-btn.rating-4 {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    color: white;
    border-color: #27ae60;
}

body.dark-mode .rating-btn.rating-5 {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    color: white;
    border-color: #229954;
}

/* ============================================
   KANBAN BOARD STYLES
   ============================================ */

.kanban-section {
    margin-top: 20px;
    width: 100%;
}

.kanban-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding: 0 4px;
    flex-wrap: wrap;
}

.kanban-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.kanban-header-actions .btn-primary,
.kanban-header-actions .btn-secondary {
    font-size: 13px;
    padding: 9px 14px;
    text-transform: none;
    letter-spacing: 0.01em;
    border-radius: 10px;
}

.btn-archive-tasks {
    font-size: 13px;
    font-weight: 700;
    padding: 9px 14px;
    border-radius: 10px;
    border: 1.5px solid #b7e4c7;
    background: #fff;
    color: #1b7a43;
    cursor: pointer;
    letter-spacing: 0.01em;
    box-shadow: none;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.btn-archive-tasks.has-ready {
    background: #1f8a4c;
    color: #fff;
    border-color: #187a42;
    box-shadow: 0 6px 16px rgba(31, 138, 76, 0.28);
}

.btn-archive-tasks:disabled {
    opacity: 0.5;
    cursor: default;
}

.btn-archive-tasks:not(:disabled):hover {
    transform: translateY(-1px);
}

.kanban-selection-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 0 4px 16px;
    padding: 10px 14px;
    background: #eef3f8;
    border: 1px solid rgba(91, 124, 153, 0.25);
    border-radius: 10px;
}

.kanban-selection-bar[hidden] {
    display: none;
}

.kanban-selection-bar #kanbanSelectionCount {
    font-weight: 700;
    color: #2C3E50;
}

.kanban-move-label {
    font-size: 0.9rem;
    color: #4b5563;
}

.kanban-selection-bar select {
    min-width: 160px;
    padding: 7px 10px;
    border: 1px solid rgba(91, 124, 153, 0.35);
    border-radius: 8px;
    background: #fff;
    color: #2C3E50;
    font-size: 0.9rem;
}

.kanban-header h2 {
    font-size: 1.5rem;
    color: #2C3E50;
    font-weight: 600;
}

.kanban-board {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding: 4px;
    min-height: 400px;
    align-items: flex-start;
    width: 100%;
}

.kanban-column {
    background: white;
    border-radius: 12px;
    padding: 16px;
    flex: 1;
    min-width: 0;
    box-shadow: var(--shadow-soft);
    transition: box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
    display: flex;
    flex-direction: column;
    border: 3px solid transparent;
}

.kanban-column.drop-target {
    border-color: #5B7C99;
    background: #f4f8fc;
    box-shadow: var(--shadow-medium);
}

.kanban-column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    gap: 8px;
    cursor: grab;
    padding: 4px;
    border-radius: 6px;
    transition: background 0.2s;
    touch-action: none;
}

.kanban-column-grip {
    color: #8aa0b5;
    font-size: 0.85rem;
    letter-spacing: -1px;
    user-select: none;
    line-height: 1;
}

.kanban-column-header:active {
    cursor: grabbing;
}

.kanban-column-header:hover {
    background: rgba(0, 0, 0, 0.03);
}

.kanban-column-title {
    font-size: 1rem;
    font-weight: 600;
    color: #2C3E50;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.kanban-column-title.editing {
    border: 1px solid #5B7C99;
    border-radius: 4px;
    padding: 2px 6px;
    background: white;
    outline: none;
}

.kanban-column-actions {
    display: flex;
    gap: 4px;
}

.kanban-column-btn {
    background: transparent;
    border: none;
    color: #5B7C99;
    cursor: pointer;
    font-size: 0.875rem;
    padding: 4px 6px;
    border-radius: 4px;
    transition: all 0.2s;
}

.kanban-column-btn:hover {
    background: rgba(91, 124, 153, 0.1);
    color: #2C3E50;
}

.kanban-cards {
    flex: 1;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.kanban-card {
    position: relative;
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 12px 48px 12px 12px;
    cursor: grab;
    touch-action: none;
    transition: box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.kanban-card:hover {
    box-shadow: var(--shadow-soft);
}

.kanban-card:active {
    cursor: grabbing;
}

.kanban-card.selected {
    border-color: #5B7C99;
    box-shadow: 0 0 0 2px rgba(91, 124, 153, 0.28);
}

.kanban-card.selected:not([class*="kanban-tint-"]) {
    background: #f3f7fb;
}

.kanban-card.kanban-tint-red { background: #ffd6d6; }
.kanban-card.kanban-tint-orange { background: #ffe8cc; }
.kanban-card.kanban-tint-yellow { background: #fff3bf; }
.kanban-card.kanban-tint-green { background: #d3f9d8; }
.kanban-card.kanban-tint-blue { background: #d0ebff; }
.kanban-card.kanban-tint-purple { background: #e5dbff; }
.kanban-card.kanban-tint-pink { background: #ffd6e7; }

.kanban-card-colors {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 2px 0 6px;
}

.kanban-color-dot {
    width: 16px;
    height: 16px;
    padding: 0;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    flex-shrink: 0;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}

.kanban-color-dot.active {
    border-color: #2C3E50;
    box-shadow: 0 0 0 1px #fff, inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}

.kanban-color-dot.kanban-color-none {
    background:
        linear-gradient(135deg, transparent 42%, #c0392b 42%, #c0392b 58%, transparent 58%),
        #fff;
}

.kanban-color-dot.kanban-tint-red { background: #ffd6d6; }
.kanban-color-dot.kanban-tint-orange { background: #ffe8cc; }
.kanban-color-dot.kanban-tint-yellow { background: #fff3bf; }
.kanban-color-dot.kanban-tint-green { background: #d3f9d8; }
.kanban-color-dot.kanban-tint-blue { background: #d0ebff; }
.kanban-color-dot.kanban-tint-purple { background: #e5dbff; }
.kanban-color-dot.kanban-tint-pink { background: #ffd6e7; }

.kanban-drag-ghost {
    position: fixed;
    left: 0;
    top: 0;
    margin: 0;
    z-index: 10000;
    pointer-events: none;
    box-shadow: 0 18px 40px rgba(28, 41, 56, 0.22);
    opacity: 0.97;
    will-change: transform;
}

.kanban-card-placeholder,
.goal-card-placeholder {
    opacity: 0.4;
    box-shadow: none !important;
    border: 2px dashed #7A9CC6 !important;
    background: rgba(122, 156, 198, 0.14) !important;
    pointer-events: none;
}

.kanban-card-placeholder > *,
.goal-card-placeholder > * {
    visibility: hidden;
}

.kanban-column-placeholder {
    opacity: 0.45;
    border-style: dashed;
    pointer-events: none;
}

body.kanban-is-dragging,
body.kanban-is-dragging * {
    cursor: grabbing !important;
    user-select: none !important;
}

.goals-cards.drop-target {
    background: rgba(122, 156, 198, 0.12);
    border-radius: 10px;
    outline: 2px dashed #5B7C99;
}

.kanban-card.completing {
    pointer-events: none;
    animation: kanbanCompleteOut 0.65s 0.5s ease forwards;
}

.kanban-card-complete {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 26px;
    height: 26px;
    margin: 0;
    cursor: pointer;
    z-index: 2;
}

.kanban-card-complete-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    margin: 0;
    cursor: pointer;
}

.kanban-card-complete-box {
    display: block;
    width: 26px;
    height: 26px;
    border: 2px solid #8aa0b5;
    border-radius: 50%;
    background: #fff;
    box-sizing: border-box;
    box-shadow: 0 1px 3px rgba(28, 41, 56, 0.12);
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.kanban-card-complete-box::after {
    content: '';
    position: absolute;
    left: 9px;
    top: 5px;
    width: 6px;
    height: 11px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: scale(0) rotate(45deg);
    transform-origin: center;
    transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.kanban-card-complete-input:checked + .kanban-card-complete-box,
.kanban-card.completing .kanban-card-complete-box {
    background: #2ecc71;
    border-color: #27ae60;
    transform: scale(1.08);
}

.kanban-card-complete-input:checked + .kanban-card-complete-box::after,
.kanban-card.completing .kanban-card-complete-box::after {
    transform: scale(1) rotate(45deg);
}

.kanban-card-complete:hover .kanban-card-complete-box {
    border-color: #5B7C99;
}

.kanban-card-header {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 8px;
}

.kanban-card-urgency {
    font-size: 0.875rem;
    flex-shrink: 0;
}

.kanban-card-text {
    position: relative;
    flex: 1;
    font-size: 1.013rem;
    font-weight: 700;
    color: #2C3E50;
    line-height: 1.5;
    word-wrap: break-word;
    transition: color 0.2s ease;
}

.kanban-card.is-marked .kanban-card-text {
    color: rgba(44, 62, 80, 0.55);
    text-decoration: line-through;
    text-decoration-thickness: 2px;
    text-decoration-color: rgba(192, 57, 43, 0.8);
}

.kanban-card.completing .kanban-card-text::after {
    content: '';
    position: absolute;
    left: -2%;
    top: 54%;
    width: 104%;
    height: 2.5px;
    border-radius: 2px;
    background: linear-gradient(90deg, #c0392b, #e74c3c);
    transform: scaleX(0) rotate(-1.8deg);
    transform-origin: left center;
    animation: kanbanStrike 0.48s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes kanbanStrike {
    to {
        transform: scaleX(1) rotate(-1.8deg);
    }
}

@keyframes kanbanCompleteOut {
    to {
        opacity: 0;
        transform: translateY(-10px) scale(0.97);
    }
}

.kanban-card-meta {
    display: flex;
    gap: 12px;
    font-size: 0.813rem;
    color: #6B7280;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.kanban-card-due {
    display: flex;
    align-items: center;
    gap: 4px;
}

.kanban-card-due.overdue {
    color: #e74c3c;
    font-weight: 600;
}

.kanban-card-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.kanban-card-actions button {
    padding: 4px 8px;
    font-size: 0.813rem;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.kanban-add-card {
    margin-top: 8px;
    padding: 8px;
    background: transparent;
    border: 2px dashed rgba(91, 124, 153, 0.3);
    border-radius: 8px;
    color: #5B7C99;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s;
    text-align: left;
}

.kanban-add-card:hover {
    background: rgba(122, 156, 198, 0.05);
    border-color: #5B7C99;
}

.kanban-card-form {
    margin-top: 8px;
    padding: 12px;
    background: rgba(122, 156, 198, 0.05);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.kanban-card-form input[type="text"] {
    padding: 8px;
    border: 1px solid rgba(91, 124, 153, 0.3);
    border-radius: 6px;
    font-size: 0.875rem;
}

.kanban-card-form-actions {
    display: flex;
    gap: 8px;
}

.kanban-card-form-actions button {
    flex: 1;
    padding: 6px;
    border-radius: 6px;
    border: none;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
}

/* Goals Section */
.goals-section {
    max-width: 1200px;
    margin: 0 auto;
}

.goals-section > h2 {
    font-size: 1.5rem;
    color: #2C3E50;
    font-weight: 600;
    margin-bottom: 20px;
}

.goals-board {
    display: flex;
    gap: 16px;
    margin-bottom: 32px;
}

.goals-column {
    flex: 1;
    background: white;
    border-radius: 12px;
    padding: 16px;
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    min-height: 400px;
}

.goals-column-urgent {
    border-top: 4px solid #e74c3c;
}

.goals-column-important {
    border-top: 4px solid #f39c12;
}

.goals-column-normal {
    border-top: 4px solid #27ae60;
}

.goals-column-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(0, 0, 0, 0.05);
}

.goals-urgency-icon {
    font-size: 1.25rem;
}

.goals-column-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #2C3E50;
    margin: 0;
}

.goals-cards {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 12px;
}

.goal-card {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 12px;
    cursor: grab;
    touch-action: none;
    transition: box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.goal-card:hover {
    box-shadow: var(--shadow-soft);
}

.goal-card:active {
    cursor: grabbing;
}

.goal-card.dragging {
    opacity: 0.5;
    transform: rotate(3deg);
    box-shadow: var(--shadow-strong);
}

.goal-card.drag-over {
    border-color: #5B7C99;
    background: rgba(122, 156, 198, 0.05);
}

.goal-card-text {
    font-size: 1.013rem;
    font-weight: 700;
    color: #2C3E50;
    line-height: 1.5;
    word-wrap: break-word;
    margin-bottom: 8px;
}

.goal-card-meta {
    display: flex;
    gap: 12px;
    font-size: 0.813rem;
    color: #6B7280;
    padding-top: 8px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.goal-card-due {
    display: flex;
    align-items: center;
    gap: 4px;
}

.goal-card-due.overdue {
    color: #e74c3c;
    font-weight: 600;
}

.goal-card-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.goal-card-actions button {
    padding: 4px 8px;
    font-size: 0.813rem;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-add-goal {
    width: 100%;
    padding: 8px;
    background: transparent;
    border: 2px dashed rgba(91, 124, 153, 0.3);
    border-radius: 8px;
    color: #5B7C99;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.btn-add-goal:hover {
    background: rgba(122, 156, 198, 0.05);
    border-color: #5B7C99;
}

/* Dark Mode - Goals */
body.dark-mode .goals-section > h2,
body.dark-mode .goals-column-header h3 {
    color: #E8EDF2;
}

body.dark-mode .goals-column {
    background: rgba(30, 30, 46, 0.9);
}

body.dark-mode .goal-card {
    background: rgba(40, 40, 60, 0.9);
    border-color: rgba(122, 156, 198, 0.2);
}

body.dark-mode .goal-card:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

body.dark-mode .goal-card-text {
    color: #E8EDF2;
}

body.dark-mode .goal-card-meta {
    color: #9CA3AF;
    border-top-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .btn-add-goal {
    border-color: rgba(122, 156, 198, 0.3);
    color: #7A9CC6;
}

body.dark-mode .btn-add-goal:hover {
    background: rgba(122, 156, 198, 0.1);
    border-color: #7A9CC6;
}

/* Notes Tab Bar */
.notes-search-bar {
    display: flex;
    gap: clamp(8px, 1vw, 12px);
    align-items: center;
    margin-bottom: clamp(10px, 1.2vw, 16px);
    padding: clamp(8px, 1vw, 12px);
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-soft);
}

.notes-search-input {
    flex: 1;
    min-width: 0;
    padding: clamp(8px, 0.8vw, 10px) clamp(10px, 1.2vw, 16px);
    border: 2px solid rgba(91, 124, 153, 0.2);
    border-radius: 8px;
    font-size: clamp(13px, 1.25vw, 15px);
    transition: all 0.2s;
}

.notes-search-input:focus {
    outline: none;
    border-color: #5B7C99;
    box-shadow: 0 0 0 3px rgba(91, 124, 153, 0.1);
}

.notes-tab-bar {
    display: flex;
    gap: clamp(8px, 1vw, 12px);
    align-items: center;
    margin-bottom: clamp(10px, 1.2vw, 16px);
    padding: clamp(8px, 1vw, 12px);
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-soft);
    overflow-x: auto;
}

.notes-tabs {
    display: flex;
    gap: 8px;
    flex: 1;
    overflow-x: auto;
}

.notes-tab {
    padding: clamp(6px, 0.7vw, 8px) clamp(10px, 1.2vw, 16px);
    background: rgba(122, 156, 198, 0.1);
    border: none;
    border-radius: 8px;
    color: #2C3E50;
    cursor: grab;
    font-size: clamp(12px, 1.15vw, 14px);
    font-weight: 500;
    white-space: nowrap;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

.notes-tab:hover {
    background: rgba(122, 156, 198, 0.2);
    transform: translateY(-1px);
}

.notes-tab.active {
    background: var(--primary-gradient);
    color: white;
    box-shadow: var(--shadow-soft);
}

.notes-tab.drag-over {
    background: #5B7C99;
    color: #fff;
    box-shadow: 0 0 0 3px rgba(91, 124, 153, 0.35);
}

.notes-tab.is-dragging {
    opacity: 0.45;
}

.notes-tab.reorder-before {
    box-shadow: inset 3px 0 0 #5B7C99;
}

.notes-tab.reorder-after {
    box-shadow: inset -3px 0 0 #5B7C99;
}

.notes-tab.editing {
    background: white;
    border: 2px solid #5B7C99;
    padding: 6px 14px;
}

.notes-tab-input {
    border: none;
    outline: none;
    background: transparent;
    font: inherit;
    color: inherit;
    width: 100%;
}

.notes-tab-close {
    margin-left: 8px;
    color: inherit;
    opacity: 0.7;
    cursor: pointer;
    font-weight: bold;
}

.notes-tab-close:hover {
    opacity: 1;
}

.notes-section .btn-primary,
.notes-section .btn-secondary {
    font-size: clamp(12px, 1.25vw, 15px);
    padding: clamp(7px, 0.75vw, 10px) clamp(10px, 1.2vw, 16px);
    text-transform: none;
    letter-spacing: 0.01em;
    border-radius: clamp(8px, 0.9vw, 12px);
}

.btn-add-notes-tab {
    flex-shrink: 0;
}

.sticky-note-move-menu {
    position: fixed;
    z-index: 80;
    min-width: 176px;
    max-width: 240px;
    padding: 6px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    box-shadow: 0 10px 28px rgba(28, 40, 54, 0.16);
}

.sticky-note-move-item {
    display: block;
    width: 100%;
    text-align: left;
    border: none;
    background: transparent;
    border-radius: 7px;
    padding: 8px 10px;
    font: inherit;
    font-size: 0.875rem;
    color: #2C3E50;
    cursor: pointer;
}

.sticky-note-move-item:hover:not(:disabled) {
    background: rgba(91, 124, 153, 0.12);
}

.sticky-note-move-item.is-current,
.sticky-note-move-item:disabled {
    opacity: 0.55;
    cursor: default;
}

/* Sticky Note Font Classes */
.sticky-note-controls {
    display: flex;
    gap: clamp(2px, 1.2cqi, 4px);
    margin: 0;
    padding: clamp(2px, 1.2cqi, 4px) clamp(4px, 2cqi, 8px);
    flex-wrap: wrap;
    flex-shrink: 0;
    align-items: center;
}

.sticky-note-size-btn,
.sticky-note-font-btn {
    background: rgba(0, 0, 0, 0.08);
    border: none;
    border-radius: 4px;
    padding: 1px clamp(3px, 1.4cqi, 6px);
    font-size: clamp(8px, 6.5cqi, 11px);
    line-height: 1.35;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
    font-family: inherit;
    font-variant-numeric: tabular-nums;
    color: rgba(0, 0, 0, 0.62);
    min-width: 0;
}

.sticky-note-font-btn.font-small { font-size: clamp(8px, 5.5cqi, 10px); }
.sticky-note-font-btn.font-medium { font-size: clamp(9px, 6.5cqi, 12px); }
.sticky-note-font-btn.font-large { font-size: clamp(10px, 7.5cqi, 14px); }
.sticky-note-font-btn.font-xlarge { font-size: clamp(11px, 8.5cqi, 16px); }
.sticky-note-font-btn.font-xxlarge { font-size: clamp(12px, 9.5cqi, 18px); }

.sticky-note-size-btn:hover,
.sticky-note-font-btn:hover {
    background: rgba(0, 0, 0, 0.16);
}

.sticky-note-size-btn.active {
    background: rgba(44, 62, 80, 0.88);
    color: #fff;
    font-weight: 700;
}

.sticky-note-font-btn.active {
    background: rgba(0, 0, 0, 0.28);
    font-weight: 700;
}

.sticky-note-content {
    flex: 1;
    overflow-y: auto;
    padding: clamp(4px, 2cqi, 8px) clamp(6px, 2.5cqi, 10px) 0;
    min-height: 0;
}

.sticky-note-content.font-small {
    font-size: clamp(11px, 9cqi, 14px);
}

.sticky-note-content.font-medium {
    font-size: clamp(12px, 11cqi, 16px);
}

.sticky-note-content.font-large {
    font-size: clamp(14px, 13cqi, 20px);
}

.sticky-note-content.font-xlarge {
    font-size: clamp(16px, 16cqi, 28px);
    font-weight: 500;
}

.sticky-note-content.font-xxlarge {
    font-size: clamp(18px, 20cqi, 40px);
    font-weight: 600;
    line-height: 1.2;
}

/* Dark Mode - Kanban */
body.dark-mode .kanban-header h2 {
    color: #E8EDF2;
}

body.dark-mode .kanban-column {
    background: rgba(30, 30, 46, 0.9);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

body.dark-mode .kanban-column-header:hover {
    background: rgba(255, 255, 255, 0.05);
}

body.dark-mode .kanban-column-title {
    color: #E8EDF2;
}

body.dark-mode .kanban-column-btn {
    color: #7A9CC6;
}

body.dark-mode .kanban-column-btn:hover {
    background: rgba(122, 156, 198, 0.2);
    color: #A8C5DD;
}

body.dark-mode .kanban-selection-bar {
    background: rgba(40, 40, 60, 0.9);
    border-color: rgba(122, 156, 198, 0.25);
}

body.dark-mode .kanban-selection-bar #kanbanSelectionCount,
body.dark-mode .kanban-move-label {
    color: #E8EDF2;
}

body.dark-mode .kanban-selection-bar select {
    background: rgba(20, 20, 30, 0.8);
    color: #E8EDF2;
    border-color: rgba(122, 156, 198, 0.35);
}

body.dark-mode .kanban-card {
    background: rgba(40, 40, 60, 0.9);
    border-color: rgba(122, 156, 198, 0.2);
}

body.dark-mode .kanban-card.selected {
    border-color: #7A9CC6;
}

body.dark-mode .kanban-card.selected:not([class*="kanban-tint-"]) {
    background: rgba(91, 124, 153, 0.22);
}

body.dark-mode .kanban-card.kanban-tint-red,
body.dark-mode .kanban-card.kanban-tint-orange,
body.dark-mode .kanban-card.kanban-tint-yellow,
body.dark-mode .kanban-card.kanban-tint-green,
body.dark-mode .kanban-card.kanban-tint-blue,
body.dark-mode .kanban-card.kanban-tint-purple,
body.dark-mode .kanban-card.kanban-tint-pink {
    color: #2C3E50;
}

body.dark-mode .kanban-card.kanban-tint-red .kanban-card-text,
body.dark-mode .kanban-card.kanban-tint-orange .kanban-card-text,
body.dark-mode .kanban-card.kanban-tint-yellow .kanban-card-text,
body.dark-mode .kanban-card.kanban-tint-green .kanban-card-text,
body.dark-mode .kanban-card.kanban-tint-blue .kanban-card-text,
body.dark-mode .kanban-card.kanban-tint-purple .kanban-card-text,
body.dark-mode .kanban-card.kanban-tint-pink .kanban-card-text,
body.dark-mode .kanban-card.kanban-tint-red .kanban-card-meta,
body.dark-mode .kanban-card.kanban-tint-orange .kanban-card-meta,
body.dark-mode .kanban-card.kanban-tint-yellow .kanban-card-meta,
body.dark-mode .kanban-card.kanban-tint-green .kanban-card-meta,
body.dark-mode .kanban-card.kanban-tint-blue .kanban-card-meta,
body.dark-mode .kanban-card.kanban-tint-purple .kanban-card-meta,
body.dark-mode .kanban-card.kanban-tint-pink .kanban-card-meta {
    color: #2C3E50;
}

body.dark-mode .kanban-card.kanban-tint-red { background: #ffd6d6; }
body.dark-mode .kanban-card.kanban-tint-orange { background: #ffe8cc; }
body.dark-mode .kanban-card.kanban-tint-yellow { background: #fff3bf; }
body.dark-mode .kanban-card.kanban-tint-green { background: #d3f9d8; }
body.dark-mode .kanban-card.kanban-tint-blue { background: #d0ebff; }
body.dark-mode .kanban-card.kanban-tint-purple { background: #e5dbff; }
body.dark-mode .kanban-card.kanban-tint-pink { background: #ffd6e7; }

body.dark-mode .kanban-column.drop-target,
body.dark-mode .goals-cards.drop-target {
    background: rgba(122, 156, 198, 0.16);
    border-color: #7A9CC6;
}

body.dark-mode .kanban-column-grip {
    color: #7A9CC6;
}

body.dark-mode .kanban-card-complete-box {
    background: rgba(20, 20, 30, 0.8);
    border-color: #7A9CC6;
}

body.dark-mode .kanban-card:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

body.dark-mode .kanban-card-text {
    color: #E8EDF2;
}

body.dark-mode .kanban-card.is-marked:not([class*="kanban-tint-"]) .kanban-card-text {
    color: rgba(232, 237, 242, 0.5);
    text-decoration-color: rgba(255, 150, 140, 0.95);
}

body.dark-mode .btn-archive-tasks {
    background: rgba(20, 28, 36, 0.8);
    color: #8fd19e;
    border-color: rgba(143, 209, 158, 0.45);
}

body.dark-mode .btn-archive-tasks.has-ready {
    background: #1f8a4c;
    color: #fff;
    border-color: #187a42;
}

body.dark-mode .kanban-card-meta {
    color: #9CA3AF;
    border-top-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .kanban-add-card {
    border-color: rgba(122, 156, 198, 0.3);
    color: #7A9CC6;
}

body.dark-mode .kanban-add-card:hover {
    background: rgba(122, 156, 198, 0.1);
    border-color: #7A9CC6;
}

body.dark-mode .kanban-card-form {
    background: rgba(20, 20, 30, 0.5);
}

body.dark-mode .kanban-card-form input {
    background: rgba(40, 40, 60, 0.9);
    border-color: rgba(122, 156, 198, 0.3);
    color: #E8EDF2;
}

/* Dark Mode - Notes Tabs */
body.dark-mode .notes-tab-bar {
    background: rgba(30, 30, 46, 0.9);
}

body.dark-mode .notes-tab {
    background: rgba(50, 50, 70, 0.6);
    color: #E8EDF2;
}

body.dark-mode .notes-tab:hover {
    background: rgba(70, 70, 90, 0.8);
}

body.dark-mode .notes-tab.active {
    background: var(--primary-gradient);
    color: white;
}

body.dark-mode .notes-tab.editing {
    background: rgba(40, 40, 60, 0.9);
    border-color: #7A9CC6;
}

body.dark-mode .sticky-note-move-menu {
    background: #252536;
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4);
}

body.dark-mode .sticky-note-move-item {
    color: #E8EDF2;
}

body.dark-mode .sticky-note-move-item:hover:not(:disabled) {
    background: rgba(122, 156, 198, 0.2);
}

/* Responsive */
@media (max-width: 768px) {
    .kanban-board {
        gap: 12px;
    }
    
    .kanban-column {
        min-width: 260px;
        max-width: 260px;
    }
    
    .notes-tab-bar {
        padding: 8px;
    }
    
    .notes-tab {
        padding: 6px 12px;
        font-size: 0.813rem;
    }
}

