/* ==========================================================================
   COMMAND CENTER DESIGN SYSTEM & STYLE SHEET (PASTEL LIGHT MODE)
   ========================================================================== */

/* 1. DESIGN TOKENS (VARIABLES) */
:root {
    /* Color Palette (Clean & Warm Off-White Bases) */
    --bg-dark-core: #faf8f6; /* Warm Ivory/Cream */
    --bg-dark-gradient: linear-gradient(135deg, #faf8f6 0%, #f4f1ea 100%);
    --bg-glass: #ffffff; /* Clean Solid White Panels */
    --bg-glass-hover: #fdfdfc;
    --border-glass: #eef0f3; /* Very soft light gray */
    --border-glass-focus: #b4c6d8;
    
    /* Clean Pastel Colors */
    --accent-cyan: #0284c7; /* Sky Blue */
    --accent-pink: #ec4899; /* Pastel Pink */
    --accent-purple: #8b5cf6; /* Pastel Purple */
    --accent-indigo: #4f46e5;
    --accent-teal: #10b981; /* Mint Green */
    --accent-orange: #f97316; /* Peach Orange */
    
    /* Semantic Colors */
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-danger: #ef4444;
    --color-info: #0ea5e9;
    
    /* Text Colors */
    --text-primary: #1e293b; /* Deep Slate (Very Dark Gray for high readability) */
    --text-secondary: #475569; /* Medium Slate */
    --text-muted: #94a3b8; /* Light Gray/Slate */
    --text-dark: #0f172a;
    
    /* Layout & Shadows */
    --sidebar-width: 280px;
    --header-height: 80px;
    --shadow-neon-cyan: 0 4px 12px rgba(2, 132, 199, 0.12);
    --shadow-neon-pink: 0 4px 12px rgba(236, 72, 153, 0.12);
    --shadow-card: 0 4px 20px rgba(18, 14, 30, 0.04); /* Soft subtle drop shadow */
    --shadow-inner: inset 0 1px 2px rgba(0, 0, 0, 0.05);
    --border-radius-lg: 16px;
    --border-radius-md: 10px;
    --border-radius-sm: 6px;
    
    /* Fonts */
    --font-primary: 'Inter', 'Sarabun', sans-serif;
}

/* 2. BASE RESET & SCROLLBAR */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-primary);
}

body {
    background: var(--bg-dark-core);
    background-image: var(--bg-dark-gradient);
    color: var(--text-primary);
    min-height: 100vh;
    overflow: hidden;
    position: relative;
}

/* Very faint pastel background glowing spheres (No sharp neon glow) */
body::before, body::after {
    content: '';
    position: absolute;
    width: 450px;
    height: 450px;
    border-radius: 50%;
    filter: blur(140px);
    z-index: -1;
    opacity: 0.25;
    pointer-events: none;
}

body::before {
    background: #e0f2fe; /* Light Blue Pastel */
    top: 5%;
    left: 15%;
}

body::after {
    background: #fae8ff; /* Light Lavender Pastel */
    bottom: 5%;
    right: 15%;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.02);
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-cyan);
}

/* 3. LAYOUT CONTAINER */
.app-container {
    display: flex;
    width: 100vw;
    height: 100vh;
}

/* 4. SIDEBAR NAVIGATION */
.sidebar {
    width: var(--sidebar-width);
    height: 100%;
    background: #ffffff;
    border-right: 1px solid var(--border-glass);
    display: flex;
    flex-direction: column;
    z-index: 10;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.01);
}

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

.brand-logo {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, #e0f2fe 0%, #fae8ff 100%);
    border: 1px solid #cbd5e1;
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-cyan);
    box-shadow: 0 4px 10px rgba(2, 132, 199, 0.08);
}

.brand-name h1 {
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--text-dark);
    line-height: 1.1;
}

.brand-name span {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 4px;
}

.nav-menu {
    flex-grow: 1;
    padding: 20px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--border-radius-md);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
    position: relative;
}

.nav-item:hover {
    background: #f8fafc;
    color: var(--text-dark);
    padding-left: 20px;
}

.nav-item.active {
    background: #f0f9ff; /* Soft pastel cyan background */
    border: 1px solid #bae6fd;
    color: var(--accent-cyan);
    font-weight: 600;
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: -1px;
    top: 25%;
    height: 50%;
    width: 3px;
    background: var(--accent-cyan);
    border-radius: 0 4px 4px 0;
}

.nav-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.badge {
    margin-left: auto;
    background: #ffe4e6;
    color: var(--color-danger);
    font-size: 0.75rem;
    padding: 2px 7px;
    border-radius: 12px;
    font-weight: bold;
    border: 1px solid #fecdd3;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--border-glass);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sidebar-footer p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.status-indicator {
    font-size: 0.7rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
}

.status-indicator::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-success);
}

/* 5. MAIN CONTENT AREA */
.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    position: relative;
}

.header {
    height: var(--header-height);
    padding: 0 32px;
    border-bottom: 1px solid var(--border-glass);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    z-index: 5;
    flex-shrink: 0;
}

#active-tab-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-dark);
}

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

.system-time-container {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    background: #f8fafc;
    border: 1px solid var(--border-glass);
    padding: 8px 16px;
    border-radius: var(--border-radius-md);
}

#live-time {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-dark);
    font-variant-numeric: tabular-nums;
}

#live-date {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Content Container & Panels */
.content-container {
    flex-grow: 1;
    padding: 32px;
    overflow-y: auto;
}

.tab-panel {
    display: none;
    height: 100%;
    animation: fadeIn 0.3s ease-out forwards;
}

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

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

/* White Clean Panels & Cards */
.glass-panel {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

/* 6. DASHBOARD TAB DESIGN */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.col-span-2 {
    grid-column: span 2;
}

.dashboard-card {
    min-height: 200px;
    padding: 24px;
    border-radius: var(--border-radius-lg);
}

.welcome-card {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #bae6fd;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.welcome-card h3 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: #0369a1;
}

.welcome-card p {
    color: #0c4a6e;
    font-size: 0.9rem;
    margin-bottom: 24px;
}

.quick-stats-bar {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.stat-pill {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    padding: 10px 18px;
    border-radius: var(--border-radius-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 100px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.stat-pill:hover {
    background: #f8fafc;
    transform: translateY(-2px);
    border-color: var(--accent-cyan);
}

.stat-val {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--accent-cyan);
}

.stat-lbl {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-header {
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border-glass);
    padding-bottom: 14px;
    margin-bottom: 16px;
}

.card-header h4 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-dark);
}

.card-body {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

/* Flexbox utility layout classes */
.flex-column { display: flex; flex-direction: column; }
.flex-row { display: flex; flex-direction: row; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.align-center { align-items: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mt-auto { margin-top: auto; }
.py-4 { padding-top: 16px; padding-bottom: 16px; }
.py-12 { padding-top: 48px; padding-bottom: 48px; }
.p-6 { padding: 24px; }
.height-full { height: 100%; }
.width-300 { width: 300px; }
.hidden { display: none !important; }
.border-top { border-top: 1px solid var(--border-glass); }
.border-bottom { border-bottom: 1px solid var(--border-glass); }
.border-glass { border-color: var(--border-glass); }

/* 7. STANDARD INPUTS & FORM DESIGN */
.standard-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

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

.form-row {
    display: flex;
    gap: 16px;
}

.col-6 {
    flex: 0 0 calc(50% - 8px);
}

label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
}

input[type="text"],
input[type="datetime-local"],
select,
textarea {
    width: 100%;
    padding: 12px 16px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: var(--border-radius-md);
    color: var(--text-primary);
    font-size: 0.9rem;
    outline: none;
    transition: all 0.2s ease;
}

input[type="text"]:focus,
input[type="datetime-local"]:focus,
select:focus,
textarea:focus {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

input::placeholder,
textarea::placeholder {
    color: #94a3b8;
}

textarea {
    resize: none;
}

/* Custom Checkbox Toggle (Switch) */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    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: #cbd5e1;
    transition: .3s;
}

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

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

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

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

/* Color Picker Grid */
.color-picker-grid {
    display: flex;
    gap: 12px;
}

.color-option {
    cursor: pointer;
}

.color-option input {
    display: none;
}

.color-circle {
    display: block;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.color-option.card-purple .color-circle { background: #d8b4fe; } /* Soft Pastel colors */
.color-option.card-blue .color-circle { background: #bae6fd; }
.color-option.card-teal .color-circle { background: #a7f3d0; }
.color-option.card-orange .color-circle { background: #ffedd5; }
.color-option.card-pink .color-circle { background: #fecdd3; }

.color-option input:checked + .color-circle {
    transform: scale(1.15);
    border-color: var(--text-secondary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Radio Custom Input */
.radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.radio-custom {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1px solid #cbd5e1;
    display: inline-block;
    position: relative;
    background: #ffffff;
}

.radio-custom::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transform: scale(0);
    transition: transform 0.2s ease;
}

.radio-label input {
    display: none;
}

.radio-label input:checked + .radio-custom.info::after { background: var(--accent-cyan); transform: scale(1); }
.radio-label input:checked + .radio-custom.warning::after { background: var(--color-warning); transform: scale(1); }
.radio-label input:checked + .radio-custom.danger::after { background: var(--color-danger); transform: scale(1); }
.radio-label input:checked + .radio-custom {
    border-color: var(--text-secondary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: var(--border-radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.btn-primary {
    background: #0284c7; /* Slate Blue Primary, like Kiralux style */
    color: #ffffff;
}

.btn-primary:hover {
    background: #0369a1;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.15);
}

.btn-outline {
    background: #ffffff;
    border-color: #cbd5e1;
    color: var(--text-secondary);
}

.btn-outline:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    color: var(--text-dark);
}

.btn-sm {
    padding: 8px 14px;
    font-size: 0.75rem;
    border-radius: var(--border-radius-sm);
}

.btn-block {
    width: 100%;
}

.btn-text-accent {
    color: var(--accent-cyan);
    border-color: #bae6fd;
}

.btn-text-accent:hover {
    background: #f0f9ff;
    border-color: var(--accent-cyan);
}

/* 8. SPLIT SCREEN VIEW LAYOUT (Form + Display Panel) */
.view-layout {
    display: flex;
    gap: 32px;
    height: 100%;
    align-items: flex-start;
}

.form-panel {
    width: 380px;
    padding: 24px;
    flex-shrink: 0;
    background: #ffffff;
}

.form-panel h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-glass);
    padding-bottom: 12px;
    color: var(--text-dark);
}

.display-panel {
    flex-grow: 1;
    height: 100%;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.panel-header-controls {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    flex-shrink: 0;
}

.search-bar-container {
    flex-grow: 1;
    position: relative;
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--text-muted);
}

.search-bar-container input {
    padding-left: 48px;
}

.filter-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
}

.form-select {
    min-width: 140px;
    padding: 10px 14px;
    cursor: pointer;
    background-color: #ffffff;
}

/* 9. IDEAS TAB SHOWCASE */
.ideas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    overflow-y: auto;
    padding-bottom: 24px;
}

.idea-card {
    padding: 20px;
    border-radius: var(--border-radius-lg);
    display: flex;
    flex-direction: column;
    min-height: 220px;
    border: 1px solid var(--border-glass);
    background-color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
    transition: all 0.2s ease;
}

.idea-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.05);
    border-color: #cbd5e1;
}

/* Pastel theme modifications for idea cards */
.idea-card.card-purple { background: #faf5ff; border-top: 4px solid #c084fc; }
.idea-card.card-blue { background: #f0f9ff; border-top: 4px solid #38bdf8; }
.idea-card.card-teal { background: #f0fdf4; border-top: 4px solid #34d399; }
.idea-card.card-orange { background: #fff7ed; border-top: 4px solid #fb923c; }
.idea-card.card-pink { background: #fff1f2; border-top: 4px solid #f472b6; }

.idea-card h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.4;
    color: var(--text-dark);
}

.idea-tags-row {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.tag-badge {
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.02);
    color: var(--text-secondary);
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.65rem;
    font-weight: 600;
}

.idea-body {
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--text-secondary);
    flex-grow: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    margin-bottom: 16px;
}

.card-footer-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    border-top: 1px solid var(--border-glass);
    padding-top: 12px;
}

.action-icon-btn {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: var(--text-secondary);
    width: 28px;
    height: 28px;
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
}

.action-icon-btn svg {
    width: 14px;
    height: 14px;
}

.action-icon-btn:hover {
    color: var(--text-dark);
    background: #edf2f7;
    border-color: #cbd5e1;
}

.action-icon-btn.delete-btn:hover {
    background: #fee2e2;
    border-color: #fca5a5;
    color: var(--color-danger);
}

.action-icon-btn.convert-btn:hover {
    background: #e0f2fe;
    border-color: #bae6fd;
    color: var(--accent-cyan);
}

/* 10. TODO TAB LAYOUT & STYLED LISTS */
.todo-layout {
    display: flex;
    gap: 32px;
    height: 100%;
}

.todo-lists-container {
    flex-grow: 1;
    overflow-y: auto;
    padding-right: 4px;
}

.styled-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.list-item {
    background: #ffffff;
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius-md);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.01);
}

.list-item:hover {
    background: var(--bg-glass-hover);
    border-color: #cbd5e1;
    transform: translateX(2px);
}

.list-item-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-grow: 1;
    overflow: hidden;
}

/* Custom checkbox graphic */
.todo-checkbox-wrapper {
    position: relative;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

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

.todo-checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 20px;
    width: 20px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.todo-checkbox-wrapper input:checked + .todo-checkmark {
    background: var(--accent-cyan);
    border-color: var(--accent-cyan);
}

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

.todo-checkbox-wrapper input:checked + .todo-checkmark::after {
    display: block;
}

.todo-checkbox-wrapper .todo-checkmark::after {
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid #ffffff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.list-item-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-grow: 1;
    overflow: hidden;
}

.list-item-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.list-item-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.priority-badge {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Pastel priority badges */
.priority-badge.high { background: #fee2e2; color: #b91c1c; border: 1px solid #fca5a5; }
.priority-badge.medium { background: #fef3c7; color: #b45309; border: 1px solid #fde047; }
.priority-badge.low { background: #dcfce7; color: #15803d; border: 1px solid #86efac; }

.due-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.category-pill {
    font-size: 0.7rem;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    padding: 1px 8px;
    border-radius: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.list-item-right {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 16px;
}

/* 11. BACKLOG TAB DESIGN */
.backlog-container {
    height: 100%;
}

.backlog-list-wrapper {
    flex-grow: 1;
    overflow-y: auto;
}

/* 12. REMINDERS TAB & TIMER GRID */
.reminders-layout {
    display: flex;
    gap: 32px;
    height: 100%;
}

.reminder-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    overflow-y: auto;
    max-height: calc(100vh - 240px);
}

.reminder-card {
    padding: 20px;
    border-radius: var(--border-radius-lg);
    background: #ffffff;
    border: 1px solid var(--border-glass);
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

/* Muted border indicators for light theme */
.reminder-card.info { border-top: 4px solid var(--accent-cyan); }
.reminder-card.warning { border-top: 4px solid var(--color-warning); }
.reminder-card.danger { border-top: 4px solid var(--color-danger); }

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

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

.reminder-countdown {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 8px 12px;
    border-radius: var(--border-radius-md);
    text-align: center;
}

.countdown-label {
    font-size: 0.6rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.countdown-timer {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--accent-cyan);
    font-variant-numeric: tabular-nums;
}

.reminder-card.danger .countdown-timer {
    color: var(--color-danger);
}

/* 13. EMAIL SUMMARIZER LAYOUT */
.summarizer-layout {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 32px;
    height: 100%;
}

.textarea-resizable {
    resize: none;
    font-family: inherit;
    font-size: 0.85rem;
    line-height: 1.6;
}

.result-placeholder {
    height: 100%;
}

.result-placeholder p {
    font-size: 0.85rem;
}

.max-w-400 {
    max-width: 400px;
}

.opacity-40 {
    opacity: 0.4;
}

/* Summarizer Result Card details */
.summary-body-text {
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--text-secondary);
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 16px;
    border-radius: var(--border-radius-md);
    white-space: pre-line;
}

.summary-section h4 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Checkbox Task List for Summarizer Action Items */
.checkbox-task-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.checkbox-task-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    padding: 10px 14px;
    border-radius: var(--border-radius-md);
    transition: all 0.15s ease;
}

.checkbox-task-item:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.checkbox-task-item label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    flex-grow: 1;
}

/* 14. MODAL BACKDROP & BOX */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.4); /* Slate light overlay backdrop */
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    width: 500px;
    max-width: 90%;
    background: #ffffff;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-dark);
}

.btn-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.6rem;
    cursor: pointer;
    line-height: 1;
}

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

.modal-body {
    padding: 24px;
}

/* 15. TOAST ALERTS & NOTIFICATIONS */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 200;
}

.toast {
    min-width: 320px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: var(--border-radius-lg);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    transform: translateX(120%);
    animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    position: relative;
    overflow: hidden;
}

/* Indicator bars on left for Toast */
.toast::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
}

.toast.toast-info::before { background: var(--accent-cyan); }
.toast.toast-warning::before { background: var(--color-warning); }
.toast.toast-danger::before { background: var(--color-danger); }

@keyframes toastSlideIn {
    to { transform: translateX(0); }
}

.toast.hide {
    animation: toastSlideOut 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes toastSlideOut {
    to { transform: translateX(120%); opacity: 0; }
}

.toast-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-grow: 1;
}

.toast-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-dark);
}

.toast-msg {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.toast-close-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    align-self: flex-start;
}

.toast-close-btn:hover {
    color: var(--text-dark);
}

/* 16. RESPONSIVE MEDIA QUERIES */
@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .welcome-card {
        grid-column: span 2;
    }
    .summarizer-layout {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
        overflow-y: auto;
    }
    .view-layout {
        flex-direction: column;
        align-items: stretch;
    }
    .form-panel {
        width: 100%;
    }
    .todo-layout {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-glass);
    }
    .brand {
        padding: 16px;
    }
    .nav-menu {
        flex-direction: row;
        overflow-x: auto;
        padding: 10px;
    }
    .nav-item {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
    .nav-item.active::before {
        left: 25%;
        top: auto;
        bottom: -1px;
        width: 50%;
        height: 3px;
        border-radius: 4px 4px 0 0;
    }
    .content-container {
        padding: 20px;
    }
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    .welcome-card {
        grid-column: span 1;
    }
    .col-span-2 {
        grid-column: span 1;
    }
    .header {
        padding: 0 20px;
    }
}

/* ==========================================================================
   POST-IT & RECOMMENDATIONS STYLING (PASTEL LIGHT MODE)
   ========================================================================== */

/* Post-it Color Picker in header */
.postit-color-picker {
    display: flex;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: var(--border-radius-sm);
    padding: 2px 6px;
}

.postit-color-option {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px;
}

.postit-color-option input {
    display: none;
}

.postit-color-option .color-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.15);
    display: block;
    transition: transform 0.15s ease;
}

.postit-color-option.note-yellow .color-dot { background-color: #fef08a; }
.postit-color-option.note-green .color-dot { background-color: #bbf7d0; }
.postit-color-option.note-blue .color-dot { background-color: #bae6fd; }
.postit-color-option.note-pink .color-dot { background-color: #fecdd3; }

.postit-color-option input:checked + .color-dot {
    transform: scale(1.3);
    border-color: #475569;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

/* Post-its Grid Layout */
.postits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
    padding: 8px 0;
    max-height: 180px;
    overflow-y: auto;
}

.postit-card {
    min-height: 130px;
    padding: 12px 14px;
    border-radius: var(--border-radius-sm);
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.2s ease;
    position: relative;
}

.postit-card:hover {
    transform: translateY(-2px) rotate(1deg);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
}

/* Custom Post-it colors */
.postit-card.note-yellow { background-color: #fef9c3; border-top: 5px solid #fef08a; color: #713f12; }
.postit-card.note-green { background-color: #dcfce7; border-top: 5px solid #bbf7d0; color: #14532d; }
.postit-card.note-blue { background-color: #e0f2fe; border-top: 5px solid #bae6fd; color: #0c4a6e; }
.postit-card.note-pink { background-color: #ffe4e6; border-top: 5px solid #fecdd3; color: #4c0519; }

.postit-text {
    font-size: 0.8rem;
    line-height: 1.5;
    font-weight: 500;
    word-break: break-word;
    flex-grow: 1;
    overflow-y: auto;
    margin-bottom: 8px;
}

.postit-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding-top: 6px;
}

.postit-time {
    font-size: 0.65rem;
    opacity: 0.6;
}

.postit-actions {
    display: flex;
    gap: 4px;
}

.postit-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    opacity: 0.5;
    transition: opacity 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.postit-btn:hover {
    opacity: 1;
}

/* Recommendations styling */
.recommendation-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    max-height: 220px;
}

.recommendation-card {
    padding: 10px 14px;
    border-radius: var(--border-radius-md);
    background: #f8fafc;
    border-left: 4px solid #cbd5e1;
    font-size: 0.8rem;
    line-height: 1.5;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.recommendation-card.rec-info { border-left-color: #38bdf8; background: #f0f9ff; color: #0369a1; }
.recommendation-card.rec-success { border-left-color: #34d399; background: #f0fdf4; color: #15803d; }
.recommendation-card.rec-warning { border-left-color: #fbbf24; background: #fffbeb; color: #b45309; }
.recommendation-card.rec-danger { border-left-color: #f87171; background: #fff5f5; color: #b91c1c; }

.recommendation-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
    line-height: 1;
}

.recommendation-text {
    flex-grow: 1;
}

.recommendation-action-btn {
    background: transparent;
    border: none;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: underline;
    margin-top: 4px;
    color: inherit;
    display: inline-block;
    padding: 0;
}

.recommendation-action-btn:hover {
    opacity: 0.8;
}

/* ==========================================================================
   KANBAN BOARD, CHARTS, HABITS & MOBILE SYSTEM STYLING
   ========================================================================== */

/* Kanban Board Layout */
.todo-kanban-container {
    width: 100%;
    height: 100%;
}

.kanban-board-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    height: 100%;
    align-items: flex-start;
}

.kanban-column {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: var(--border-radius-lg);
    padding: 16px;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 280px);
    min-height: 250px;
}

.kanban-column-header {
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1.5px dashed #cbd5e1;
}

.kanban-column-header h5 {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0;
}

.kanban-cards-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    flex-grow: 1;
    padding: 4px;
    min-height: 100px;
}

/* Kanban Card */
.kanban-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: var(--border-radius-md);
    padding: 12px 14px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.kanban-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    border-color: #94a3b8;
}

.kanban-card-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
    word-break: break-word;
}

.kanban-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    border-top: 1px solid #f1f5f9;
    padding-top: 8px;
    margin-top: 4px;
}

.kanban-card-actions {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
}

/* Habit Tracker styling */
.habit-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: var(--border-radius-md);
    transition: all 0.2s ease;
}

.habit-item label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0;
    flex-grow: 1;
}

.habit-item.completed {
    background: #f0fdf4;
    border-color: #86efac;
}

.habit-item.completed label {
    color: #15803d;
    text-decoration: line-through;
}

.habit-streak {
    font-size: 0.7rem;
    background: #fef3c7;
    color: #d97706;
    border: 1px solid #fde047;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
}

/* SVG Chart wrapper styling */
.chart-svg-wrapper {
    width: 100%;
    height: 130px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==========================================================================
   MOBILE NATIVE NAVIGATION (BOTTOM BAR) & MEDIA QUERIES
   ========================================================================== */

@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
        overflow: hidden;
    }

    /* Sidebar converts into Bottom Navigation Bar */
    .sidebar {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100vw;
        height: 64px;
        border-right: none;
        border-top: 1px solid var(--border-glass);
        background: #ffffff;
        box-shadow: 0 -3px 12px rgba(0, 0, 0, 0.05);
        flex-direction: row;
        justify-content: space-between;
        padding: 0;
        overflow: hidden;
        z-index: 100;
    }

    .brand {
        display: none !important; /* Hide logo */
    }

    .nav-menu {
        flex-direction: row;
        padding: 0;
        margin: 0;
        width: 100%;
        height: 100%;
        justify-content: space-around;
        align-items: center;
        gap: 0;
        overflow: hidden;
    }

    .nav-item {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        padding: 6px 4px;
        font-size: 0.62rem;
        border-radius: 0;
        height: 100%;
        flex-grow: 1;
        border: none;
        background: transparent;
        text-align: center;
    }

    .nav-item span {
        display: block;
        max-width: 55px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .nav-item:hover {
        padding-left: 4px; /* Disable slide in */
        background: transparent;
    }

    .nav-item.active {
        background: #f0f9ff;
        color: var(--accent-cyan);
        border: none;
        box-shadow: none;
    }

    .nav-item.active::before {
        top: 0;
        left: 25%;
        width: 50%;
        height: 3px;
        border-radius: 0 0 4px 4px;
    }

    .nav-icon {
        width: 18px;
        height: 18px;
    }

    .badge {
        position: absolute;
        top: 4px;
        right: 12px;
        margin-left: 0;
        font-size: 0.6rem;
        padding: 1px 4px;
    }

    .sidebar-footer {
        display: none !important;
    }

    /* Adjust main content for bottom nav */
    .main-content {
        height: calc(100vh - 64px);
        padding-bottom: 0;
    }

    .content-container {
        padding: 16px;
    }

    /* Grids to single column for mobile */
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .col-span-2 {
        grid-column: span 1;
    }

    .view-layout, .todo-layout, .summarizer-layout {
        flex-direction: column;
        gap: 20px;
    }

    .form-panel {
        width: 100%;
        padding: 16px;
    }

    /* Touch targets size enlargements for mobile */
    .action-icon-btn, .postit-btn {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }

    /* Kanban grid layout on mobile */
    .kanban-board-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .kanban-column {
        max-height: 400px;
        min-height: auto;
    }
}
