@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    /* Color Palette - Dark Mode (Default) */
    --bg-main: #0a0b10;
    --bg-sidebar: rgba(10, 11, 16, 0.95);
    --bg-header: rgba(10, 11, 16, 0.8);
    --bg-card: rgba(18, 20, 27, 0.8);
    --bg-card-hover: rgba(25, 28, 38, 0.9);
    --border-color: rgba(255, 255, 255, 0.1);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --accent-primary: #6366f1; /* Indigo */
    --accent-secondary: #a855f7; /* Purple */
    --accent-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    
    /* Effects */
    --glass-blur: blur(16px);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.8);
    --transition-standard: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Spacing */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;
}

/* Light Mode Overrides */
body.light-mode {
    --bg-main: #f8fafc;
    --bg-sidebar: rgba(255, 255, 255, 0.95);
    --bg-header: rgba(255, 255, 255, 0.8);
    --bg-card: rgba(255, 255, 255, 0.8);
    --bg-card-hover: rgba(255, 255, 255, 0.95);
    --border-color: rgba(0, 0, 0, 0.1);
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    
    --glass-shadow: 0 8px 32px 0 rgba(15, 23, 42, 0.08);
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box !important;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Glassmorphism utility */
.glass {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    box-shadow: var(--glass-shadow);
}

.glass-card {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: var(--transition-standard);
}

.glass-card:hover {
    background: var(--bg-card-hover);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Typography */
h1, h2, h3, h4 {
    font-weight: 600;
    letter-spacing: -0.02em;
}

.text-gradient {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Global Layout Containers */
#app {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    height: 100vh;
    position: sticky;
    top: 0;
    z-index: 100;
    border-right: 1px solid var(--border-color);
    transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--bg-sidebar);
    backdrop-filter: var(--glass-blur);
}

.sidebar.collapsed {
    width: 80px;
}

.sidebar-header {
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar.collapsed .logo-text,
.sidebar.collapsed .nav-text {
    display: none;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: var(--accent-gradient);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.sidebar-nav {
    flex: 1;
    padding: 20px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition-standard);
}

.nav-item i {
    width: 20px;
    height: 20px;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.nav-item.active {
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent-primary);
    font-weight: 500;
}

.main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.top-header {
    height: 80px;
    padding: 0 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-header);
    backdrop-filter: var(--glass-blur);
    position: sticky;
    top: 0;
    z-index: 90;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 20px;
}

.notifications-btn {
    position: relative;
    cursor: pointer;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: var(--transition-standard);
}

.notifications-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

/* Notifications Dropdown */
.notifications-btn {
    position: relative;
    cursor: pointer;
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444;
    color: white;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 2px solid var(--bg-primary);
    box-shadow: 0 0 0 1px rgba(0,0,0,0.1);
}

.notifications-dropdown {
    position: absolute;
    top: calc(100% + 15px);
    right: 0;
    width: 320px;
    background: #12141b;
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    display: none;
    flex-direction: column;
    z-index: 1000;
    animation: fadeInScale 0.2s ease-out;
}

.notifications-dropdown.active {
    display: flex;
}

.notifications-header {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notifications-header span {
    font-weight: 600;
    font-size: 0.9rem;
}

.notifications-header .btn-text {
    font-size: 0.75rem;
    color: var(--accent-primary);
    background: none;
    border: none;
    cursor: pointer;
}

.notifications-list {
    max-height: 400px;
    overflow-y: auto;
}

.notification-item {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition-standard);
    cursor: default;
}

.notification-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

.notification-item.unread {
    background: rgba(99, 102, 241, 0.05);
}

.notification-item-title {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.notification-item-msg {
    font-size: 0.8rem;
    color: var(--text-primary);
    opacity: 0.9;
    line-height: 1.4;
}

.notification-item-time {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 8px;
}

/* Status Tags */
.status-tag {
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-pending { background: rgba(255, 193, 7, 0.1); color: #ffc107; border: 1px solid rgba(255, 193, 7, 0.2); }
.status-confirmed { background: rgba(22, 163, 74, 0.1); color: #16a34a; border: 1px solid rgba(22, 163, 74, 0.2); }
.status-failed { background: rgba(220, 38, 38, 0.1); color: #dc2626; border: 1px solid rgba(220, 38, 38, 0.2); }
.status-watching { background: rgba(37, 99, 235, 0.1); color: #2563eb; border: 1px solid rgba(37, 99, 235, 0.2); }

.park-res-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.empty-notifications {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: var(--radius-md);
    transition: var(--transition-standard);
}

.user-profile:hover {
    background: rgba(255, 255, 255, 0.05);
}

.avatar {
    width: 32px;
    height: 32px;
    background: var(--accent-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.8rem;
    color: white;
}

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

.user-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
}

.user-email {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.dropdown-icon {
    width: 14px;
    color: var(--text-muted);
}

.logout-btn i {
    width: 18px;
    color: var(--danger);
}

.main-content {
    flex: 1;
    padding: 60px 80px;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-main);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-standard);
    border: 1px solid transparent;
    font-size: 0.95rem;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    border: none;
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

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

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Authentication Screens */
.auth-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    background: radial-gradient(circle at top left, rgba(99, 102, 241, 0.05) 0%, transparent 40%),
                radial-gradient(circle at bottom right, rgba(168, 85, 247, 0.05) 0%, transparent 40%);
}

.auth-card {
    width: 100%;
    max-width: 440px;
    padding: 40px;
    animation: fadeInScale 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-header h2 {
    font-size: 1.875rem;
    margin-bottom: 8px;
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper i,
.input-wrapper svg {
    position: absolute;
    left: 16px;
    color: var(--text-muted);
    width: 18px;
    height: 18px;
    pointer-events: none;
}

.form-control {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 16px 12px 48px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition-standard);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.auth-footer a {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-standard);
}

.auth-footer a:hover {
    text-decoration: underline;
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 24px 0;
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}

.divider:not(:empty)::before { margin-right: 1rem; }
.divider:not(:empty)::after { margin-left: 1rem; }

/* Enhanced Hero & Features */
.hero-section {
    padding: 80px 20px;
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 60px;
    align-items: center;
    min-height: 90vh;
}

.hero-text {
    text-align: left;
}

.hero-title {
    font-size: 5rem;
    line-height: 1.1;
    margin-bottom: 24px;
    font-weight: 700;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 480px;
}

.mockup-container {
    perspective: 1000px;
}

.mockup-img {
    width: 100%;
    border-radius: var(--radius-lg);
    box-shadow: 0 50px 100px -20px rgba(0, 0, 0, 0.5), 0 30px 60px -30px rgba(0, 0, 0, 0.5);
    transform: rotateY(-10deg) rotateX(5deg);
    transition: var(--transition-standard);
}

.mockup-img:hover {
    transform: rotateY(0deg) rotateX(0deg);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-top: 60px;
    grid-column: 1 / -1;
}

.feature-card {
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent-primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Dynamic Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(168, 85, 247, 0.05) 0%, transparent 40%);
    z-index: -1;
    pointer-events: none;
}

@media (max-width: 1024px) {
    .hero-section {
        grid-template-columns: 1fr;
        text-align: center;
        padding-top: 40px;
    }
    
    .hero-text {
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .hero-title { font-size: 3.5rem; }
    
.features-grid {
        grid-template-columns: 1fr;
    }
}

/* Notes Module Split View */
.notes-container {
    display: flex;
    height: calc(100vh - 80px); /* Fill remaining height minus header */
    background: var(--bg-main);
    overflow: hidden;
}

/* Sidebar for Folders (Leftmost) */
.notes-folders {
    width: 220px;
    border-right: 1px solid var(--border-color);
    padding: 24px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.folder-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition-standard);
}

.folder-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.folder-item.active {
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent-primary);
    font-weight: 500;
}

/* Notes List (Center) */
.notes-list-pane {
    width: 350px;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.01);
}

.notes-list-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
}

.notes-list-scroll {
    flex: 1;
    overflow-y: auto;
}

.note-section-title {
    padding: 16px 24px 8px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    font-weight: 600;
}

.note-item {
    padding: 16px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: var(--transition-standard);
}

.note-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

.note-item.active {
    background: rgba(99, 102, 241, 0.08);
}

.note-item-title {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.note-item-meta {
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.note-item-snippet {
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

/* Editor Pane (Right) */
.notes-editor-pane {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-main);
}

.editor-toolbar {
    height: 60px;
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
}

.toolbar-group {
    display: flex;
    gap: 4px;
}

.tool-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    border: none;
    background: transparent;
    cursor: pointer;
    transition: var(--transition-standard);
}

.tool-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.editor-content {
    flex: 1;
    padding: 60px 80px;
    overflow-y: auto;
}

.note-title-input {
    width: 100%;
    background: transparent;
    border: none;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 24px;
    outline: none;
}

.note-body-textarea {
    width: 100%;
    height: 100%;
    background: transparent;
    border: none;
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--text-secondary);
    resize: none;
    outline: none;
    font-family: inherit;
}

/* Todo Module */
.todo-container {
    max-width: 800px;
    margin: 0 auto;
}

.todo-header {
    margin-bottom: 32px;
}

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

.todo-item {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.todo-checkbox {
    width: 24px;
    height: 24px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-standard);
    color: transparent;
}

.todo-item.completed .todo-checkbox {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

.todo-item.completed .todo-text {
    text-decoration: line-through;
    color: var(--text-muted);
}

.todo-text {
    flex: 1;
    font-size: 1rem;
}

.priority-tag {
    font-size: 0.7rem;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-weight: 600;
    text-transform: uppercase;
}

.priority-high { background: rgba(239, 68, 68, 0.1); color: var(--danger); }
.priority-mid { background: rgba(245, 158, 11, 0.1); color: var(--warning); }
.priority-low { background: rgba(16, 185, 129, 0.1); color: var(--success); }

/* Kanban / Projects Module */
.kanban-board {
    display: flex;
    gap: 24px;
    height: calc(100vh - 180px);
    overflow-x: auto;
    padding-bottom: 20px;
}

.kanban-column {
    flex: 0 0 350px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-lg);
    padding: 20px;
    border: 1px solid var(--border-color);
}

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

.column-title {
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.column-count {
    font-size: 0.8rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

.kanban-cards {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
}

.kanban-card {
    padding: 16px;
    cursor: grab;
}

.kanban-card:active {
    cursor: grabbing;
}

.kanban-card h4 {
    font-size: 0.95rem;
    margin-bottom: 12px;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-tags {
    display: flex;
    gap: 6px;
}

.card-tag {
    font-size: 0.7rem;
    padding: 2px 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
}

/* Calendar Module */
.calendar-container {
    height: calc(100vh - 180px);
    display: flex;
    flex-direction: column;
}

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

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

/* Month Grid View */
.calendar-grid-view {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.calendar-grid-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    text-align: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.calendar-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-auto-rows: 1fr;
    border-left: 1px solid var(--border-color);
    border-top: 1px solid var(--border-color);
}

.calendar-day {
    padding: 12px;
    border-right: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    min-height: 100px;
    transition: var(--transition-standard);
    position: relative;
}

.calendar-day:hover {
    background: rgba(255, 255, 255, 0.02);
}

.calendar-day.today {
    background: rgba(99, 102, 241, 0.05);
}

.calendar-day.today .day-number {
    background: var(--accent-primary);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-day.other-month {
    opacity: 0.3;
}

.day-number {
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 8px;
}

.calendar-events {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.event-item {
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: rgba(99, 102, 241, 0.2);
    border-left: 3px solid var(--accent-primary);
    color: var(--text-primary);
}

.event-todo {
    background: rgba(16, 185, 129, 0.1);
    border-left: 3px solid var(--success);
    color: var(--text-secondary);
}

.calendar-day.todo-hidden .event-todo {
    display: none;
}

/* Agenda View */
.calendar-agenda-view {
    display: none;
    flex: 1;
    overflow-y: auto;
}

.calendar-agenda-view.active {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.agenda-day-group {
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.agenda-date {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.agenda-event {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.02);
}

.agenda-time {
    font-size: 0.85rem;
    color: var(--text-muted);
    width: 60px;
}

/* Link Aggregator Module */
.links-container {
    display: flex;
    height: calc(100vh - 80px);
    overflow: hidden;
}

.links-list-view {
    flex: 1;
    padding: 32px 40px;
    overflow-y: auto;
}

.links-list-view.active {
    display: block;
}

.links-compact-row {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 8px;
    transition: var(--transition-standard);
    text-decoration: none;
    color: inherit;
}

.links-compact-row:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateX(4px);
}

.link-favicon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.link-title {
    font-weight: 500;
    font-size: 0.95rem;
    flex: 1;
}

.link-url {
    font-size: 0.8rem;
    color: var(--text-muted);
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Visual Grid View */
.links-grid-view {
    display: none;
    flex: 1;
    padding: 32px 40px;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    overflow-y: auto;
}

.links-grid-view.active {
    display: grid;
}

.link-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

.link-thumbnail {
    width: 100%;
    aspect-ratio: 16/9;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    overflow: hidden;
    position: relative;
}

.link-thumbnail i {
    color: var(--text-muted);
    width: 40px;
    height: 40px;
}

.link-card:hover .link-thumbnail {
    border-color: var(--accent-primary);
}

.link-card h4 {
    font-size: 1rem;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.link-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.link-tag {
    font-size: 0.7rem;
    padding: 2px 8px;
    background: rgba(99, 102, 241, 0.08);
    color: var(--accent-primary);
    border-radius: 4px;
}

/* --- Phase 9: Final Polish & Animations --- */

/* Module Transitions */
.module-view {
    animation: fadeInSlide 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInSlide {
    0% { opacity: 0; transform: translateY(10px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Enhanced Hover Effects for Cards */
.glass-card, .note-item, .kanban-card, .links-compact-row {
    transition: var(--transition-standard);
}

.glass-card:hover, .kanban-card:hover {
    transform: translateY(-4px) scale(1.01);
    background: var(--bg-card-hover);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.2);
}

/* User Interaction Feedback */
.btn-primary:active {
    transform: scale(0.96);
}

.nav-item:active {
    transform: translateX(4px);
}

/* Sidebar Pulse for Active State */
.nav-item.active i {
    animation: pulseIcon 2s infinite;
}

@keyframes pulseIcon {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); filter: drop-shadow(0 0 5px var(--accent-primary)); }
    100% { transform: scale(1); }
}

/* Layout Consistency Fixes */
.main-content {
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Custom Focus Ring */
input:focus, textarea:focus {
    box-shadow: 0 0 0 2px var(--bg-main), 0 0 0 4px rgba(99, 102, 241, 0.3) !important;
}

/* Dashboard Enhancements */
.dashboard-banner {
    background: var(--accent-gradient);
    padding: 40px 60px;
    border-radius: var(--radius-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.2);
}

.dashboard-banner .text-gradient {
    background: white;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.dashboard-banner p {
    opacity: 0.9;
    font-size: 1.1rem;
}

/* Shortcuts Grid */
.shortcuts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 20px;
}

.shortcut-item {
    padding: 24px;
    text-align: center;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.shortcut-icon {
    width: 48px;
    height: 48px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent-primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-standard);
}

.shortcut-item:hover .shortcut-icon {
    background: var(--accent-primary);
    color: white;
    transform: scale(1.1);
}

.shortcut-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
}

.dashboard-list-item {
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--accent-primary);
    transition: var(--transition-standard);
}

.dashboard-list-item:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateX(4px);
}

.btn-link {
    color: var(--accent-primary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
}

.btn-link:hover {
    text-decoration: underline;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.alert {
    padding: 16px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    border: 1px solid transparent;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.2);
}

#app {
    overflow-x: hidden;
    width: 100%;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.quick-access-section {
    margin-top: 40px;
}

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

.header-search .input-wrapper {
    width: 320px;
}



/* --- Responsive Styles --- */

/* Sidebar Overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 95;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

@media (max-width: 1024px) {
    .sidebar {
        position: fixed;
        left: -300px;
        width: 280px;
        z-index: 1000;
        box-shadow: 20px 0 50px rgba(0, 0, 0, 0.5);
        transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        display: none;
    }
    
    .sidebar.mobile-open {
        display: flex;
        transform: translateX(300px);
    }
    
    .sidebar.collapsed {
        width: 280px;
    }
    
    .sidebar.collapsed .logo-text,
    .sidebar.collapsed .nav-text {
        display: block;
    }

    .top-header {
        padding: 0 16px;
        height: 70px;
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        justify-content: space-between !important;
    }

    #mobile-sidebar-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        margin-right: 12px;
    }

    .header-search {
        flex: 1;
        display: flex;
        justify-content: center;
        max-width: none;
    }

    .header-search .input-wrapper {
        width: 100%;
        max-width: 280px;
    }

    .main-content {
        padding: 40px 20px;
    }

    .dashboard-banner {
        padding: 30px 20px;
        flex-direction: column !important;
        text-align: left !important;
        align-items: flex-start !important;
        gap: 20px;
    }

    .header-user {
        gap: 20px;
        flex-shrink: 0;
    }

    .header-user .user-info,
    .user-profile .dropdown-icon {
        display: none;
    }

    .user-profile {
        padding: 4px;
    }

    .mobile-search-toggle {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
        width: 100% !important;
    }
    
    .shortcuts-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }

    .shortcut-item {
        padding: 16px !important;
    }

    .shortcut-icon {
        width: 40px !important;
        height: 40px !important;
    }

    .header-search {
        display: none !important;
    }

    .mobile-search-toggle {
        display: flex !important;
    }

    .header-user {
        gap: 24px; /* Increased for premium feeling */
    }

    .notifications-btn, .logout-btn {
        padding: 10px;
    }

    .notification-badge {
        top: 2px;
        right: 2px;
        border: 2px solid var(--bg-header);
    }

    .notes-container {
        flex-direction: column;
    }

    .notes-folders, .notes-list-pane {
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }

    .hero-title {
        font-size: 2.5rem;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 24px 16px;
    }

    .shortcut-item {
        padding: 16px;
    }

    .dashboard-banner {
        padding: 24px 16px;
    }

    .top-header {
        padding: 0 10px;
        height: 64px;
    }

    .header-user {
        gap: 16px;
    }
}

/* Toggle Switch Component */
.switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
}

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

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background: var(--accent-gradient);
}

input:checked + .slider:before {
    transform: translateX(24px);
}
