/* ============================================
   CORTEX – Design System
   Futuristic, Minimalist, Compact, Optimistic
   1920x1080 optimized, 6 panels visible
   ============================================ */

/* --- CSS Variables (Dark – Optimistic Palette) --- */
:root {
    --bg-primary: #0c1017;
    --bg-secondary: #131923;
    --bg-panel: rgba(19, 25, 35, 0.88);
    --bg-panel-hover: rgba(24, 34, 52, 0.95);
    --bg-input: rgba(30, 41, 59, 0.65);
    --bg-topbar: rgba(12, 16, 23, 0.94);

    --border-color: rgba(56, 189, 248, 0.12);
    --border-active: rgba(56, 189, 248, 0.35);
    --border-panel: rgba(255, 255, 255, 0.06);

    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    /* Optimistic accent palette */
    --accent: #38bdf8;
    /* Sky blue – main accent */
    --accent-dim: rgba(56, 189, 248, 0.1);
    --accent-glow: rgba(56, 189, 248, 0.2);
    --accent-warm: #fbbf24;
    /* Warm amber – secondary accent */
    --accent-warm-dim: rgba(251, 191, 36, 0.1);
    --accent-green: #34d399;
    /* Emerald – success */
    --accent-orange: #fb923c;
    /* Warm orange – warning */
    --accent-red: #f87171;
    /* Soft red – error */
    --accent-purple: #a78bfa;
    /* Lavender – special */

    --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;

    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;

    --shadow-panel: 0 2px 16px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 20px rgba(56, 189, 248, 0.06);

    --topbar-h: 38px;
    --panel-gap: 10px;
    --panel-min-w: 290px;
    --panel-padding: 12px;
    --sidebar-w: 220px;
}

/* --- Light Theme (Optimistic) --- */
[data-theme="light"] {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-panel: rgba(255, 255, 255, 0.95);
    --bg-panel-hover: rgba(248, 250, 252, 1);
    --bg-input: rgba(241, 245, 249, 0.85);
    --bg-topbar: rgba(255, 255, 255, 0.96);

    --border-color: rgba(14, 165, 233, 0.15);
    --border-active: rgba(14, 165, 233, 0.4);
    --border-panel: rgba(0, 0, 0, 0.07);

    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #94a3b8;

    --accent: #0ea5e9;
    --accent-dim: rgba(14, 165, 233, 0.08);
    --accent-glow: rgba(14, 165, 233, 0.12);
    --accent-warm: #d97706;
    --accent-warm-dim: rgba(217, 119, 6, 0.08);
    --accent-green: #059669;
    --accent-orange: #ea580c;
    --accent-red: #dc2626;
    --accent-purple: #7c3aed;

    --shadow-panel: 0 1px 6px rgba(0, 0, 0, 0.06);
    --shadow-glow: none;
}

/* --- Base Reset --- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

html {
    scrollbar-gutter: stable;
    overflow-x: hidden;
    font-size: 13px;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font-ui);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Theme Transition - scoped to key containers only */
body.theme-transition,
body.theme-transition .topbar,
body.theme-transition .sidebar,
body.theme-transition main,
body.theme-transition .panel,
body.theme-transition .panel-card {
    transition: background-color 0.8s ease-in-out, color 0.8s ease-in-out, border-color 0.8s ease-in-out, box-shadow 0.8s ease-in-out !important;
}

/* Pause all animations when Electron window is hidden/minimized */
body.cortex-paused * {
    animation-play-state: paused !important;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: none;
}

/* ═══════════════════════════════════════════════
   SMOOTH TRANSITIONS & INTERACTION
   ═══════════════════════════════════════════════ */
a,
button,
.sp-btn,
.nav-item,
.wh-pill,
.project-panel-mini,
.role-item,
.link-item,
.topbar-btn {
    transition: background 0.3s ease,
        background-color 0.3s ease,
        color 0.3s ease,
        border-color 0.3s ease,
        transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.3s ease,
        opacity 0.3s ease !important;
}

body {
    transition: background-color 0.4s ease, color 0.4s ease;
}

/* ============================================
   TOP BAR
   ============================================ */
.topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    min-height: var(--topbar-h);
    height: auto;
    background: var(--bg-topbar);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-panel);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2px 5px;
    z-index: 1000;
    flex-wrap: wrap;
    overflow: visible;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: 1 1 100%;
    min-width: 0;
    padding-left: 0px;
    padding-right: 380px;
}

#sidebar-toggle {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    padding: 5px;
    margin-right: 0px;
    transition: color 0.2s;
}

#sidebar-toggle:hover {
    color: var(--accent);
}

.topbar-brand {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--accent);
}

.brand-icon {
    width: 18px;
    height: 18px;
}

.brand-name {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

/* ═══════════════════════════════════════════════
   TOP NAV – nový systém
   ═══════════════════════════════════════════════ */
.topbar-nav {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 1px;
    flex-wrap: wrap;
    flex: 1 1 auto;
    min-width: 0;
    padding: 0 2px;
}

.topbar-nav::-webkit-scrollbar {
    display: none;
}

/* ── Základní nav-item (Sjednocený dynamický vzhled) ── */
.nav-item {
    display: inline-flex;
    gap: 4px;
    padding: 4px 7px;
    border-radius: 6px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    text-decoration: none !important;
    border: 1px solid transparent;
    flex-shrink: 0;
    line-height: 1;
    position: relative;
    color: var(--group-color, #ccc) !important;
    margin-top: 2px;
    align-items: center;
    justify-content: center;
}

.nav-item .nav-label {
    font-size: 10px;
    font-weight: 700;
    color: inherit;
    letter-spacing: 0.2px;
    text-transform: uppercase;
}

.nav-item i {
    font-size: 16px;
    width: 16px;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: inherit !important;
    opacity: 0.8;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ── Hover ── */
.nav-item:hover {
    background: color-mix(in srgb, var(--group-color) 12%, var(--bg-secondary));
    border: 1px solid color-mix(in srgb, var(--group-color) 40%, var(--border-color));
    text-decoration: none !important;
    z-index: 10;
    box-shadow: 0 4px 12px color-mix(in srgb, var(--group-color) 15%, transparent);
    transform: translateY(-1px);
}

.nav-item:hover .nav-label {
    color: var(--group-color) !important;
}

.nav-item:hover i {
    color: var(--group-color) !important;
    opacity: 1;
    transform: scale(1.15) translateY(-1px);
}

/* ── Aktivní (Zvýrazněné pozadí v barvě skupiny) ── */
.nav-item.active {
    background: color-mix(in srgb, var(--group-color) 25%, var(--bg-secondary)) !important;
    color: var(--group-color) !important;
    border: 1px solid color-mix(in srgb, var(--group-color) 70%, transparent) !important;
    box-shadow: 0 4px 15px -2px color-mix(in srgb, var(--group-color) 35%, transparent) !important;
}

.nav-item.active i {
    color: inherit !important;
    opacity: 1 !important;
}

/* ── Hover na aktivním (Zjemnění) ── */
.nav-item.active:hover {
    background: color-mix(in srgb, var(--group-color) 30%, var(--bg-secondary)) !important;
    color: var(--group-color) !important;
    border-color: var(--group-color) !important;
    box-shadow: 0 4px 15px color-mix(in srgb, var(--group-color) 45%, transparent) !important;
    transform: translateY(-1px);
}

.nav-item.active:hover i {
    color: var(--group-color) !important;
    opacity: 1 !important;
}

/* ── Nav Dropdown (for items with submenus, e.g. Life) ── */
.nav-dropdown-wrapper {
    position: relative;
    display: inline-flex;
}

.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    min-width: 150px;
    background: var(--bg-panel, #1e293b);
    border: 1px solid color-mix(in srgb, var(--group-color) 35%, transparent);
    border-radius: 10px;
    padding: 5px;
    z-index: 99999;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    flex-direction: column;
    gap: 2px;
    animation: dropdownFadeIn 0.18s ease;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.nav-dropdown-wrapper.open,
.nav-dropdown-wrapper:hover {
    z-index: 99999;
}

.nav-dropdown-wrapper.open .nav-dropdown-menu,
.nav-dropdown-wrapper:hover .nav-dropdown-menu {
    display: flex;
}

.nav-dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border-radius: 7px;
    text-decoration: none !important;
    color: var(--text-secondary, #94a3b8);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    transition: all 0.18s ease;
}

.nav-dropdown-item i {
    font-size: 13px;
    color: var(--group-color, #ccc);
    opacity: 0.8;
    width: 16px;
    text-align: center;
}

.nav-dropdown-item:hover {
    background: color-mix(in srgb, var(--group-color) 15%, transparent);
    color: var(--group-color, #ccc);
}

.nav-dropdown-item:hover i {
    opacity: 1;
}

.nav-dropdown-item.active {
    background: color-mix(in srgb, var(--group-color) 25%, transparent);
    color: var(--group-color, #ccc);
    border: 1px solid color-mix(in srgb, var(--group-color) 40%, transparent);
}

.nav-dropdown-item.active i {
    opacity: 1;
}

/* ═══════════════════════════════════════════════
   LIGHT MODE
   ═══════════════════════════════════════════════ */

[data-theme="light"] .nav-item:hover {
    background: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .nav-item.active {
    background: var(--group-color) !important;
    color: #ffffff !important;
    border-color: transparent !important;
    box-shadow: 0 6px 15px color-mix(in srgb, var(--group-color) 50%, transparent) !important;
}

[data-theme="light"] .nav-item.active i,
[data-theme="light"] .nav-item.active .nav-label {
    color: #ffffff !important;
}

[data-theme="light"] .nav-item.active:hover {
    background: color-mix(in srgb, var(--group-color) 80%, #000) !important;
    color: #ffffff !important;
}

[data-theme="light"] .nav-item:not(.active) {
    color: color-mix(in srgb, var(--group-color) 85%, #000) !important;
}

[data-theme="light"] .nav-item.active:hover i,
[data-theme="light"] .nav-item.active:hover .nav-label {
    color: #ffffff !important;
}

[data-theme="light"] .nav-item.coming-soon {
    color: #9ca3af;
    opacity: 0.65;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
    z-index: 2300;
    position: absolute;
    top: 2px;
    right: 5px;
}

/* Separátor mezi skupinami */
.nav-separator {
    width: 1px;
    height: 16px;
    background: rgba(255, 255, 255, 0.12) !important;
    margin: 0 4px;
    flex-shrink: 0;
    align-self: center;
}

/* Dark theme adjustment logic moved inside media query or globally */

[data-theme="light"] .nav-separator {
    background: rgba(0, 0, 0, 0.12);
}

.topbar-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
}

.topbar-btn:hover {
    color: var(--accent);
    background: var(--accent-dim);
}

/* ── Focus Mode (Strict Antiparty) ── */
/* Dim non-work icons without removing them from layout — prevents position shift */
body.work-mode .nav-item:not([data-group="work"]):not([data-group="resources"]),
body.work-mode .nav-separator:not([data-group="work"]):not([data-group="resources"]) {
    opacity: 0;
}
/* Allow hovering/clicking even in work-mode — items fade in on hover */
body.work-mode .nav-item:not([data-group="work"]):not([data-group="resources"]):hover,
body.work-mode .nav-dropdown-wrapper:not([data-group="work"]):not([data-group="resources"]):hover > .nav-item {
    opacity: 0.6;
}
body.work-mode .nav-dropdown-wrapper:not([data-group="work"]):not([data-group="resources"]).open > .nav-item {
    opacity: 0.6;
}

/* Ensure essential elements stay visible in focus mode */
body.work-mode #header-pomodoro,
body.work-mode .wh-nav-wrapper {
    display: flex !important;
    flex-direction: column;
    margin-top: 0 !important;
    width: 100%;
}

/* Show only essential topbar items — keep left-aligned so icons don't shift */
body.work-mode .topbar-nav {
    justify-content: flex-start;
}

/* Hide labels in Focus Mode — visibility:hidden keeps width intact → no icon shift */
body.work-mode .nav-item .nav-label {
    visibility: hidden !important;
}

body.work-mode .nav-item i {
    font-size: 16px !important;
    margin: 0 !important;
    opacity: 1 !important;
}

/* ── Focus Toggle Button Overlay ── */
#btn-focus-mode {
    position: relative;
    overflow: visible;
    /* Aby ikona zákazu mohla přesahovat */
}

#focus-ban-icon {
    pointer-events: none;
    /* Aby kliknutí fungovalo na tlačítko */
    text-shadow: 0 0 2px rgba(255, 255, 255, 0.8);
    z-index: 10;
}

/* ── Sidebar Slider (Right) ── */
#sp-slider-trigger {
    position: fixed;
    right: 0 !important;
    left: auto !important;
    top: var(--topbar-h);
    bottom: 0;
    width: 15px;
    z-index: 9999;
    transition: all 0.3s ease;
}

#sp-sidebar-slider {
    position: fixed;
    right: 0 !important;
    left: auto !important;
    top: var(--topbar-h);
    bottom: 0;
    width: 300px;
    background: #fff;
    z-index: 10000;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.15) !important;
    transform: translateX(100%);
    /* Start hidden to the right */
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    border-left: 1px solid #e2e8f0;
    border-right: none !important;
}

#sp-sidebar-slider:hover,
#sp-slider-trigger:hover+#sp-sidebar-slider {
    transform: translateX(0);
    /* Slide in */
}



/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
    position: fixed;
    top: var(--topbar-h);
    left: calc(-1 * var(--sidebar-w) - 10px);
    width: var(--sidebar-w);
    height: calc(100vh - var(--topbar-h));
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-panel);
    z-index: 900;
    overflow-y: auto;
    padding: 8px 0;
    transition: left 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}

.sidebar.open {
    left: 0;
}

.sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 899;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.sidebar-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.sidebar-section {
    padding: 4px 10px;
    margin-bottom: 4px;
}

.sidebar-section-title {
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--text-muted);
    padding: 6px 8px 4px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    font-size: 12px;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    transition: all 0.12s ease;
    text-decoration: none;
}

.sidebar-link:hover:not(.disabled) {
    color: var(--text-primary);
    background: var(--accent-dim);
    text-decoration: none;
}

.sidebar-link.active {
    color: var(--accent);
    background: var(--accent-dim);
}

.sidebar-link.disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.sidebar-link svg {
    flex-shrink: 0;
    color: var(--accent);
    opacity: 0.7;
}

.sidebar-link:hover svg {
    opacity: 1;
}

.sidebar-link-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--text-muted);
    flex-shrink: 0;
}

.sidebar-link-dot.live {
    background: var(--accent-green);
    box-shadow: 0 0 6px var(--accent-green);
}

/* Star Toggle on Project Card */
.star-toggle {
    cursor: pointer;
    margin-right: 8px;
    transition: transform 0.2s;
}

.star-toggle:hover {
    transform: scale(1.2);
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
    margin-top: 0 !important;
    padding: 58px 8px 8px 8px;
    min-height: calc(100vh - var(--topbar-h));
}

/* ============================================
   PANEL GRID – 6 columns for 1920px
   ============================================ */
.panel-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--panel-gap);
    align-items: start;
}

@media (min-width: 1200px) {
    .panel-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1800px) {
    .panel-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (min-width: 2400px) {
    .panel-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

/* ============================================
   PANEL CARD
   ============================================ */
.panel {
    background: var(--bg-panel);
    border: 1px solid var(--border-panel);
    border-radius: var(--radius-md);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--shadow-panel);
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.panel:hover {
    border-color: var(--border-color);
    box-shadow: var(--shadow-panel), var(--shadow-glow);
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px var(--panel-padding);
    border-bottom: 1px solid var(--border-panel);
    cursor: grab;
    user-select: none;
}

.panel-header:active {
    cursor: grabbing;
}

.panel-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-secondary);
}

.panel-title svg {
    width: 13px;
    height: 13px;
    color: var(--accent);
    flex-shrink: 0;
}

.panel-actions {
    display: flex;
    align-items: center;
    gap: 2px;
}

.panel-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.15s ease;
}

.panel-action-btn:hover {
    color: var(--accent);
    background: var(--accent-dim);
}

.panel-body {
    padding: var(--panel-padding);
    font-size: 12px;
    line-height: 1.5;
    max-height: 200px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}

.panel-body::-webkit-scrollbar {
    width: 4px;
}

.panel-body::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

/* Sortable ghost */
.panel.sortable-ghost {
    opacity: 0.2;
    border: 1px dashed var(--accent);
}

.panel.sortable-chosen {
    box-shadow: 0 0 30px var(--accent-glow);
}

/* ============================================
   PANEL MANAGER OVERLAY
   ============================================ */
.panel-manager-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.panel-manager {
    background: var(--bg-secondary);
    border: 1px solid var(--border-panel);
    border-radius: var(--radius-lg);
    width: 300px;
    max-height: 70vh;
    overflow: hidden;
}

.panel-manager-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-panel);
}

.panel-manager-header h3 {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
}

.panel-manager-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 16px;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all 0.15s ease;
}

.panel-manager-close:hover {
    color: var(--accent-red);
    background: rgba(248, 113, 113, 0.1);
}

.panel-manager-list {
    padding: 6px;
}

.panel-manager-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 8px;
    border-radius: var(--radius-sm);
    transition: background 0.12s ease;
}

.panel-manager-item:hover {
    background: var(--accent-dim);
}

.panel-manager-item label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-primary);
    cursor: pointer;
    flex: 1;
}

.panel-manager-item input[type="checkbox"] {
    accent-color: var(--accent);
    width: 13px;
    height: 13px;
    cursor: pointer;
}

/* ============================================
   LOGIN PAGE
   ============================================ */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--bg-primary);
}

.login-box {
    background: var(--bg-panel);
    border: 1px solid var(--border-panel);
    border-radius: var(--radius-lg);
    padding: 28px;
    width: 300px;
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow-panel), var(--shadow-glow);
    text-align: center;
}

.login-box .brand-icon {
    width: 32px;
    height: 32px;
    color: var(--accent);
    margin-bottom: 10px;
}

.login-box h1 {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 2px;
}

.login-box .login-subtitle {
    font-size: 10px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.login-input {
    width: 100%;
    padding: 9px 12px;
    font-size: 13px;
    font-family: var(--font-ui);
    background: var(--bg-input);
    border: 1px solid var(--border-panel);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.2s ease;
    margin-bottom: 10px;
}

.login-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-dim);
}

.login-input::placeholder {
    color: var(--text-muted);
}

.login-btn {
    width: 100%;
    padding: 9px;
    font-size: 11px;
    font-weight: 600;
    font-family: var(--font-ui);
    letter-spacing: 1px;
    text-transform: uppercase;
    background: linear-gradient(135deg, var(--accent), #0ea5e9);
    color: var(--bg-primary);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.login-btn:hover {
    filter: brightness(1.12);
    box-shadow: 0 0 20px var(--accent-glow);
}

.login-error {
    color: var(--accent-red);
    font-size: 11px;
    margin-bottom: 10px;
}

/* ============================================
   FORM ELEMENTS (panels)
   ============================================ */
.panel-input {
    width: 100%;
    padding: 5px 7px;
    font-size: 12px;
    font-family: var(--font-ui);
    background: var(--bg-input);
    border: 1px solid var(--border-panel);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.15s ease;
}

.panel-input:focus {
    border-color: var(--accent);
}

.panel-textarea {
    width: 100%;
    min-height: 100px;
    padding: 7px;
    font-size: 12px;
    font-family: var(--font-mono);
    line-height: 1.6;
    background: var(--bg-input);
    border: 1px solid var(--border-panel);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    outline: none;
    resize: vertical;
    transition: border-color 0.15s ease;
}

.panel-textarea:focus {
    border-color: var(--accent);
}

.panel-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    font-size: 11px;
    font-family: var(--font-ui);
    font-weight: 500;
    background: var(--accent-dim);
    color: var(--accent);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.15s ease;
}

.panel-btn:hover {
    background: var(--accent-glow);
    border-color: var(--accent);
}

/* ============================================
   PANEL: TODAY / FOCUS
   ============================================ */
.focus-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.focus-item {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 3px 5px;
    border-radius: var(--radius-sm);
    transition: background 0.1s ease;
}

.focus-item:hover {
    background: var(--accent-dim);
}

.focus-item input[type="checkbox"] {
    accent-color: var(--accent-green);
    width: 13px;
    height: 13px;
    flex-shrink: 0;
}

.focus-item .focus-text {
    flex: 1;
    font-size: 12px;
    color: var(--text-primary);
}

.focus-item.done .focus-text {
    text-decoration: line-through;
    color: var(--text-muted);
}

.focus-item .focus-delete {
    display: none;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 14px;
    padding: 0 2px;
}

.focus-item:hover .focus-delete {
    display: block;
}

.focus-item .focus-delete:hover {
    color: var(--accent-red);
}

.focus-add {
    display: flex;
    gap: 4px;
    margin-top: 6px;
}

.focus-add .panel-input {
    flex: 1;
}

/* ============================================
   PANEL: QUICK LINKS
   ============================================ */
.links-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.link-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 3px 5px;
    border-radius: var(--radius-sm);
    transition: background 0.1s ease;
}

.link-item:hover {
    background: var(--accent-dim);
}

.link-item a {
    flex: 1;
    font-size: 12px;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.link-item a:hover {
    color: var(--accent);
    text-decoration: none;
}

.link-item .link-domain {
    font-size: 10px;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.link-item .link-delete {
    display: none;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 14px;
    padding: 0 2px;
}

.link-item:hover .link-delete {
    display: block;
}

.link-item .link-delete:hover {
    color: var(--accent-red);
}

/* ============================================
   PANEL: KANBOARD
   ============================================ */
.kanboard-project {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 5px;
    border-radius: var(--radius-sm);
    transition: background 0.1s ease;
}

.kanboard-project:hover {
    background: var(--accent-dim);
}

.kanboard-project-name {
    font-size: 12px;
    color: var(--text-primary);
}

.kanboard-project-tasks {
    font-size: 10px;
    font-family: var(--font-mono);
    color: var(--text-muted);
    background: var(--bg-input);
    padding: 1px 6px;
    border-radius: 10px;
}

/* ============================================
   PANEL: RECENT ACTIVITY
   ============================================ */
.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 4px 5px;
    border-radius: var(--radius-sm);
}

.activity-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
    margin-top: 5px;
    flex-shrink: 0;
}

.activity-dot.green {
    background: var(--accent-green);
}

.activity-dot.orange {
    background: var(--accent-orange);
}

.activity-dot.red {
    background: var(--accent-red);
}

.activity-text {
    font-size: 12px;
    color: var(--text-primary);
}

.activity-time {
    font-size: 10px;
    color: var(--text-muted);
    font-family: var(--font-mono);
    margin-top: 1px;
}

/* ============================================
   PLACEHOLDER SECTION
   ============================================ */
.section-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 50vh;
    color: var(--text-muted);
    gap: 10px;
}

.section-placeholder svg {
    width: 40px;
    height: 40px;
    opacity: 0.25;
}

.section-placeholder h2 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-secondary);
}

.section-placeholder p {
    font-size: 12px;
}

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--border-active);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .topbar-nav {
        display: none;
    }

    .panel-grid {
        grid-template-columns: 1fr;
    }

    :root {
        --panel-gap: 8px;
    }
}

@media (max-width: 1200px) {
    .panel-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================
   SIDEBAR (Restored for Cockpit Home)
   ============================================ */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 260px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-panel);
    z-index: 1000;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    padding-top: 60px;
    /* Space for close button if needed, or topbar height */
}

.sidebar.open {
    transform: translateX(0);
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.2);
}

.sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(2px);
}

.sidebar-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.sidebar-section {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-panel);
}

.sidebar-section-title {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-size: 13px;
    margin-bottom: 2px;
}

.sidebar-link:hover {
    background: var(--bg-panel-hover);
    color: var(--text-primary);
}

.sidebar-link svg {
    color: var(--accent);
    opacity: 0.7;
    width: 16px;
    height: 16px;
}


/* ============================================
   LIGHT MODE FIXES (High Contrast)
   ============================================ */
[data-theme="light"] .nav-item:hover {
    background: rgba(0, 0, 0, 0.08) !important;
    border-bottom-color: var(--group-color) !important;
    box-shadow: 0 4px 12px -4px rgba(0, 0, 0, 0.15) !important;
}

[data-theme="light"] .nav-item:hover .nav-label {
    color: #1a202c !important;
    text-shadow: none !important;
    font-weight: 700;
}

[data-theme="light"] .nav-item:hover i {
    color: var(--group-color) !important;
    filter: none !important;
    transform: scale(1.15) rotate(-5deg);
}

[data-theme="light"] .nav-item.active {
    background: var(--group-color) !important;
    color: #fff !important;
}

[data-theme="light"] .nav-item.active .nav-label {
    color: #fff !important;
}

/* ============================================
   MENU ANIMATION (Entrance Slide)
   ============================================ */
@keyframes slideInMenu {
    0% {
        opacity: 0;
        transform: translateX(20px);
    }

    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

.nav-sub-container {
    animation: slideInMenu 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ========================================================= */
/* PROJECT SUBNAV BUTTONS (FILTER BAR) */
/* ========================================================= */

.project-subnav .sp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    /* Center content */
    background: var(--bg-secondary);
    /* Default background */
    color: var(--text-secondary);
    /* Default text */
    border: 1px solid var(--border-panel);
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 600;
    /* Semi-bold */
    transition: all 0.2s ease;
    gap: 6px;
    /* Icon gap */
    text-decoration: none;
    cursor: pointer;
}

.project-subnav .sp-btn i {
    font-size: 14px;
    transition: color 0.2s;
    color: var(--text-muted);
    /* Muted icon by default */
}

.sp-btn {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
}

.sp-btn .btn-text {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.4px;
    color: inherit;
    /* Do not hide, inline behavior */
}

/* Hover & Active States - Unified Logic */

/* Priority (Gold) */
.project-subnav .sp-btn-cat-priority:hover,
.project-subnav .sp-btn-cat-priority.active {
    background: #ecc94b !important;
    border-color: #d69e2e !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(236, 201, 75, 0.3);
}

.project-subnav .sp-btn-cat-priority:hover i,
.project-subnav .sp-btn-cat-priority.active i {
    color: #fff !important;
}

/* Komunita (Blue) */
.project-subnav .sp-btn-cat-komunita:hover,
.project-subnav .sp-btn-cat-komunita.active {
    background: #3182ce !important;
    border-color: #2b6cb0 !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(49, 130, 206, 0.3);
}

.project-subnav .sp-btn-cat-komunita:hover i,
.project-subnav .sp-btn-cat-komunita.active i {
    color: #fff !important;
}

/* Adult (Red) */
.project-subnav .sp-btn-cat-adult:hover,
.project-subnav .sp-btn-cat-adult.active {
    background: #e53e3e !important;
    border-color: #c53030 !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(229, 62, 62, 0.3);
}

.project-subnav .sp-btn-cat-adult:hover i,
.project-subnav .sp-btn-cat-adult.active i {
    color: #fff !important;
}

/* Psilo (Purple) */
.project-subnav .sp-btn-cat-psilo:hover,
.project-subnav .sp-btn-cat-psilo.active {
    background: #805ad5 !important;
    border-color: #6b46c1 !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(128, 90, 213, 0.3);
}

.project-subnav .sp-btn-cat-psilo:hover i,
.project-subnav .sp-btn-cat-psilo.active i {
    color: #fff !important;
}

/* Konopi (Green) */
.project-subnav .sp-btn-cat-konopi:hover,
.project-subnav .sp-btn-cat-konopi.active {
    background: #38a169 !important;
    border-color: #2f855a !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(56, 161, 105, 0.3);
}

.project-subnav .sp-btn-cat-konopi:hover i,
.project-subnav .sp-btn-cat-konopi.active i {
    color: #fff !important;
}

/* Shop (Teal) */
.project-subnav .sp-btn-cat-shop:hover,
.project-subnav .sp-btn-cat-shop.active {
    background: #319795 !important;
    border-color: #2c7a7b !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(49, 151, 149, 0.3);
}

.project-subnav .sp-btn-cat-shop:hover i,
.project-subnav .sp-btn-cat-shop.active i {
    color: #fff !important;
}

/* Food (Orange/Yellow) */
.project-subnav .sp-btn-cat-food:hover,
.project-subnav .sp-btn-cat-food.active {
    background: #ed8936 !important;
    border-color: #dd6b20 !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(237, 137, 54, 0.3);
}

.project-subnav .sp-btn-cat-food:hover i,
.project-subnav .sp-btn-cat-food.active i {
    color: #fff !important;
}

/* Market (Orange) */
.project-subnav .sp-btn-cat-market-place:hover,
.project-subnav .sp-btn-cat-market-place.active {
    background: #dd6b20 !important;
    border-color: #c05621 !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(221, 107, 32, 0.3);
}

.project-subnav .sp-btn-cat-market-place:hover i,
.project-subnav .sp-btn-cat-market-place.active i {
    color: #fff !important;
}

/* Orders (Green Money) */
.project-subnav .sp-btn-cat-orders:hover,
.project-subnav .sp-btn-cat-orders.active {
    background: #48bb78 !important;
    border-color: #38a169 !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(72, 187, 120, 0.3);
}

.project-subnav .sp-btn-cat-orders:hover i,
.project-subnav .sp-btn-cat-orders.active i {
    color: #fff !important;
}

/* Ostatni (Gray) */
.project-subnav .sp-btn-cat-nezaraditelne:hover,
.project-subnav .sp-btn-cat-nezaraditelne.active {
    background: #718096 !important;
    border-color: #4a5568 !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(113, 128, 150, 0.3);
}

.project-subnav .sp-btn-cat-nezaraditelne:hover i,
.project-subnav .sp-btn-cat-nezaraditelne.active i {
    color: #fff !important;
}

/* ============================================
   TASK WIZARD MODAL
   ============================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.task-wizard {
    background: var(--bg-panel);
    border: 1px solid var(--border-panel);
    border-radius: var(--radius-lg);
    width: 450px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), var(--border-active) 0 0 0 1px;
    overflow: hidden;
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .task-wizard {
    transform: translateY(0);
}

.wizard-header {
    padding: 20px;
    background: linear-gradient(to right, var(--bg-secondary), transparent);
    border-bottom: 1px solid var(--border-panel);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wizard-header h2 {
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.wizard-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 20px;
    transition: color 0.2s;
}

.wizard-close:hover {
    color: var(--accent-red);
}

.wizard-body {
    padding: 25px;
}

.wizard-field {
    margin-bottom: 15px;
}

.wizard-field label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

.wizard-input {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-panel);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    padding: 10px 12px;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.wizard-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-glow);
}

.wizard-btn-small {
    background: var(--bg-input);
    border: 1px solid var(--border-panel);
    color: var(--text-secondary);
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 700;
    text-transform: uppercase;
}

.wizard-btn-small:hover {
    background: var(--accent);
    color: #000;
    border-color: var(--accent);
}


.wizard-footer {
    padding: 20px 25px;
    background: rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.wizard-btn {
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.wizard-btn-cancel {
    background: transparent;
    border: 1px solid var(--border-panel);
    color: var(--text-secondary);
}

.wizard-btn-cancel:hover {
    background: rgba(255, 255, 255, 0.05);
}

.wizard-btn-submit {
    background: var(--accent);
    border: 1px solid var(--accent);
    color: #000 !important;
    font-weight: 700;
}

.wizard-btn-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--accent-glow);
}

.wizard-row {
    display: flex;
    gap: 15px;
}

.wizard-row>div {
    flex: 1;
}

/* ============================================
   LIVE STOPWATCH ANIMATION
   ============================================ */
.live-stopwatch {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stopwatch-hand {
    transform-origin: center;
    animation: rotateHand 4s linear infinite;
    stroke: currentColor;
}

@keyframes rotateHand {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.topbar-btn:hover .stopwatch-hand {
    animation-duration: 1s;
}

/* Green indicator for running timer */
.topbar-btn.active-running {
    color: #4ade80 !important;
}

.topbar-btn.active-running svg,
.topbar-btn.active-running i {
    color: #4ade80 !important;
}

/* Centered Pomodoro Overlay */
#header-pomodoro.pomo-centered {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-panel);
    border: 1px solid var(--accent);
    padding: 30px;
    border-radius: 25px;
    z-index: 4000;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5), var(--accent-glow) 0 0 20px;
    flex-direction: column !important;
    gap: 20px !important;
    scale: 1.2;
}

#header-pomodoro.pomo-centered span#hp-time {
    font-size: 48px !important;
}

#header-pomodoro.pomo-centered select,
#header-pomodoro.pomo-centered input {
    width: 250px !important;
    font-size: 14px !important;
    padding: 8px !important;
}


/* ── Badge Support ── */
.nav-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    padding: 2px 5px;
    border-radius: 10px;
    line-height: 1;
    min-width: 14px;
    text-align: center;
    border: 2px solid var(--bg-topbar);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.nav-item.active .nav-badge {
    border-color: var(--group-color);
}

/* ============================================
   NEURO-DESIGN (AuADHD Command Center)
   ============================================ */
:root {
    --neuro-bg: #0f172a;
    --neuro-accent: #38bdf8;
    --neuro-secondary: #c084fc;
    --neuro-success: #4ade80;
    --neuro-danger: #f87171;
    --neuro-warning: #fbbf24;
}

.neuro-container {
    display: grid;
    grid-template-columns: 320px 1fr 320px;
    gap: 30px;
    height: auto;
    min-height: calc(100vh - 120px);
    padding: 30px;
    max-width: 1800px;
    margin: 0 auto;
}

.neuro-card {
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 20px;
    backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.neuro-card-header {
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
}

.neuro-card-body {
    padding: 20px;
    flex: 1;
}

/* Big Rock - ADHD Focus Target */
.big-rock-container {
    text-align: center;
    padding: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.big-rock-input {
    background: transparent;
    border: none;
    border-bottom: 3px solid var(--neuro-accent);
    color: #fff;
    font-size: 48px;
    font-weight: 900;
    text-align: center;
    width: 100%;
    outline: none;
    padding: 10px;
    margin-bottom: 30px;
    transition: all 0.4s ease;
}

.big-rock-input:focus {
    border-bottom-color: var(--neuro-secondary);
    text-shadow: 0 0 20px rgba(192, 132, 252, 0.4);
}

/* Sensory Check List */
.neuro-check-list {
    display: grid;
    gap: 12px;
}

.check-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.check-item i {
    font-size: 18px;
    color: var(--text-muted);
    transition: all 0.3s;
}

.check-item span {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

.check-item:hover {
    background: rgba(255, 255, 255, 0.07);
    transform: translateX(5px);
}

.check-item.active {
    background: rgba(56, 189, 248, 0.1);
    border-color: rgba(56, 189, 248, 0.3);
}

.check-item.active i {
    color: var(--neuro-accent);
    transform: scale(1.1);
}

.check-item.active span {
    color: #fff;
}

/* Brain Dump */
.parking-lot-textarea {
    width: 100%;
    height: 300px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: #e2e8f0;
    padding: 20px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    resize: none;
    border-radius: 12px;
    outline: none;
    line-height: 1.6;
    transition: border-color 0.3s;
}

.parking-lot-textarea:focus {
    border-color: var(--neuro-secondary);
}

/* Visual Timer */
.neuro-timer-wrapper {
    position: relative;
    width: 320px;
    height: 320px;
    margin: 0 auto 40px;
}

.neuro-timer-svg {
    transform: rotate(-90deg);
}

.neuro-timer-display {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.neuro-time-text {
    font-family: 'JetBrains Mono', monospace;
    font-size: 72px;
    font-weight: 800;
    color: #fff;
    line-height: 1;
    display: block;
}

.neuro-time-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    margin-top: 10px;
    display: block;
}

/* Progress Blocks */
.momentum-tracker {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
}

.momentum-block {
    width: 40px;
    height: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    transition: all 0.5s ease;
}

.momentum-block.done {
    background: var(--neuro-success);
    box-shadow: 0 0 15px rgba(74, 222, 128, 0.3);
}

/* Neuro Tips Card */
.neuro-tip {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.neuro-tip i {
    color: var(--neuro-warning);
    font-size: 20px;
}

.neuro-tip-content h4 {
    font-size: 13px;
    margin-bottom: 4px;
    color: #fff;
}

.neuro-tip-content p {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.4;
}

@keyframes pulse-neuro {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    50% {
        transform: scale(1.05);
        opacity: 1;
    }

    100% {
        transform: scale(1);
        opacity: 0.8;
    }
}

.body-doubling-active {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--neuro-success);
    font-size: 10px;
    animation: pulse-neuro 3s infinite ease-in-out;
}

/* ── Focus Zone Buttons ── */
.neuro-btn-focus {
    flex: 1;
    padding: 15px;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.neuro-btn-focus.start {
    background: var(--neuro-accent);
    color: #000;
    box-shadow: 0 4px 15px rgba(56, 189, 248, 0.4);
}

.neuro-btn-focus.stop {
    background: var(--neuro-danger);
    color: #fff;
    box-shadow: 0 4px 15px rgba(248, 113, 113, 0.4);
}

.neuro-btn-focus:hover {
    transform: translateY(-2px) scale(1.02);
}

.neuro-btn-focus:active {
    transform: translateY(0) scale(0.98);
}

/* ── Timer Visuals ── */
.timer-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.05);
    stroke-width: 10;
}

.timer-progress {
    fill: none;
    stroke: var(--neuro-accent);
    stroke-width: 6;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s linear;
    filter: drop-shadow(0 0 8px var(--neuro-accent-glow));
}

/* Bull's Eye Specifics */
.bulls-eye-outer,
.bulls-eye-ring-1,
.bulls-eye-ring-2 {
    transition: all 0.5s ease;
}

.active-running .bulls-eye-ring-1 {
    animation: bulls-eye-pulse 6s infinite ease-in-out;
}

.active-running .bulls-eye-ring-2 {
    animation: bulls-eye-pulse 6s infinite ease-in-out 1.5s;
}

.active-running .bulls-eye-ring-3 {
    animation: bulls-eye-pulse 6s infinite ease-in-out 3s;
}

.active-running .bulls-eye-core {
    animation: core-pulse 3s infinite ease-in-out;
}

.active-running .neuro-time-text {
    animation: text-glow 3s infinite ease-in-out;
}

@keyframes bulls-eye-pulse {

    0%,
    100% {
        opacity: 0.05;
        transform: scale(1);
        transform-origin: center;
    }

    50% {
        opacity: 0.25;
        transform: scale(1.08);
        transform-origin: center;
    }
}

@keyframes core-pulse {

    0%,
    100% {
        fill: rgba(56, 189, 248, 0.01);
        filter: blur(2px);
    }

    50% {
        fill: rgba(56, 189, 248, 0.08);
        filter: blur(5px);
    }
}

@keyframes text-glow {

    0%,
    100% {
        text-shadow: 0 0 20px rgba(56, 189, 248, 0.2);
    }

    50% {
        text-shadow: 0 0 40px rgba(56, 189, 248, 0.5);
    }
}

/* ── Text Readability Fixes ── */
.neuro-container .neuro-card-header span {
    color: #fff;
    opacity: 0.9;
}

.neuro-container p {
    color: var(--text-muted);
    line-height: 1.5;
}

.neuro-container h4 {
    color: #fff;
    margin: 0 0 5px 0;
}

/* Responsive Grid Fix */
@media (max-width: 1200px) {
    .neuro-container {
        grid-template-columns: 1fr;
        height: auto;
    }
}

/* ── Live Stopwatch Icon Styles ── */
.live-stopwatch {
    width: 24px;
    height: 24px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.live-stopwatch svg {
    width: 100%;
    height: 100%;
    stroke: var(--text-secondary);
    transition: all 0.3s ease;
}

/* Inactive State: Subtle Glow */
#btn-timetrack-nav:not(.active-running) .live-stopwatch svg {
    stroke: var(--text-muted);
    opacity: 0.6;
}

#btn-timetrack-nav:not(.active-running):hover .live-stopwatch {
    transform: rotate(15deg) scale(1.15);
}

#btn-timetrack-nav:not(.active-running):hover .live-stopwatch svg {
    stroke: var(--accent);
    opacity: 1;
    filter: drop-shadow(0 0 5px var(--accent-glow));
}

/* Active Running State: Green & Pulse */
.active-running .live-stopwatch {
    transform: scale(1.2);
}

.active-running .live-stopwatch svg {
    stroke: #22c55e !important;
    /* Green */
    filter: drop-shadow(0 0 8px rgba(34, 197, 94, 0.6));
    animation: stopwatch-pulse 2s infinite ease-in-out;
}

.active-running .stopwatch-hand {
    animation: rotate-hand 2s infinite linear;
    transform-origin: center;
}

@keyframes stopwatch-pulse {
    0% {
        transform: scale(1);
        filter: drop-shadow(0 0 4px rgba(34, 197, 94, 0.4));
    }

    50% {
        transform: scale(1.1);
        filter: drop-shadow(0 0 10px rgba(34, 197, 94, 0.7));
    }

    100% {
        transform: scale(1);
        filter: drop-shadow(0 0 4px rgba(34, 197, 94, 0.4));
    }
}

@keyframes rotate-hand {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Antiparty Mode Navigation Fix (3-Row Stacked Design) */
.wh-nav-wrapper {
    position: fixed;
    top: var(--topbar-h);
    left: 0;
    right: 0;
    z-index: 999;
    background: var(--bg-topbar);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-panel);
    display: flex;
    flex-direction: column;
    padding: 2px 0 0 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    animation: fadeInNav 0.3s ease-out;
}

.wh-nav-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
    padding: 3px 10px;
    min-height: 34px;
    height: auto;
    flex-wrap: wrap;
    overflow-x: visible;
}

.wh-nav-row-main {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    justify-content: flex-start;
}

.wh-nav-row-sub {
    background: rgba(255, 255, 255, 0.02);
    gap: 4px;
    padding: 0 20px;
    justify-content: flex-start;
}


/* Category Group (Pills) */
.wh-nav-group {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px;
    border-radius: 8px;
    /* Less rounded, like topbar */
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.wh-nav-group.active {
    background: color-mix(in srgb, var(--item-color) 12%, rgba(255, 255, 255, 0.04));
    border: 1px solid color-mix(in srgb, var(--item-color) 25%, transparent);
    padding: 4px 6px;
}

/* Base Pill Style */
.wh-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    /* Slimmer */
    border-radius: 6px;
    height: 24px;
    /* Fixed height */
    /* Less rounded, like topbar items */
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    text-decoration: none !important;
    white-space: nowrap;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

/* Main Category Pill */
.wh-pill.main {
    color: var(--text-secondary);
    background: transparent;
}

.wh-pill.main i {
    color: var(--item-color);
    font-size: 13px;
    transition: transform 0.3s;
}

.wh-pill.main:hover {
    color: var(--item-color);
    background: color-mix(in srgb, var(--item-color) 14%, rgba(255, 255, 255, 0.04));
    border: 1px solid color-mix(in srgb, var(--item-color) 28%, transparent);
    animation: float-pill 2s ease-in-out infinite;
    transition: background 0.6s ease, color 0.5s ease, border-color 0.5s ease, box-shadow 0.5s ease;
}

.wh-pill.main:hover i {
    animation: float-pill-icon 2s ease-in-out infinite;
}

.wh-pill.main:active {
    animation: none;
    transform: scale(0.97);
}

.wh-pill.main.active {
    background: var(--item-color);
    color: #fff !important;
    box-shadow: 0 4px 12px color-mix(in srgb, var(--item-color) 40%, transparent);
}

.wh-pill.main.active i {
    color: #fff;
}

/* Submenu block */
.wh-sub-block {
    display: flex;
    align-items: center;
    gap: 4px;
    animation: slideInRight 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Submenu unified style – tinted to active section color */
.wh-pill.sub {
    color: color-mix(in srgb, var(--item-color) 65%, var(--text-muted));
    font-size: 11px;
    font-weight: 800;
    padding: 6px 12px;
    background: color-mix(in srgb, var(--item-color) 10%, rgba(255, 255, 255, 0.03));
    border: 1px solid color-mix(in srgb, var(--item-color) 22%, transparent);
}

.wh-pill.sub i {
    font-size: 11px;
    opacity: 0.85;
    transition: all 0.2s;
    color: color-mix(in srgb, var(--item-color) 70%, var(--text-muted));
}

.wh-pill.sub:hover {
    color: var(--item-color);
    background: color-mix(in srgb, var(--item-color) 18%, rgba(255, 255, 255, 0.07));
    border-color: color-mix(in srgb, var(--item-color) 40%, transparent);
    animation: float-pill 2s ease-in-out infinite;
    transition: background 0.6s ease, color 0.5s ease, border-color 0.5s ease, box-shadow 0.5s ease;
}

.wh-pill.sub:hover i {
    animation: float-pill-icon 2s ease-in-out infinite;
    opacity: 1;
}

.wh-pill.sub:active {
    animation: none;
    transform: scale(0.97);
}

/* Active sub pill: solid color + white left accent stripe = "you are here" */
.wh-pill.sub.active {
    background: color-mix(in srgb, var(--item-color) 88%, #000);
    color: #fff !important;
    border: 1px solid color-mix(in srgb, var(--item-color) 70%, #fff);
    border-left: 3px solid rgba(255, 255, 255, 0.80);
    padding-left: 10px;
    box-shadow: 0 3px 14px color-mix(in srgb, var(--item-color) 50%, transparent),
                inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.wh-pill.sub.active i {
    opacity: 1;
    color: rgba(255, 255, 255, 0.92);
}

/* Separator / Divider - restoring logical separation instead of dots */
.wh-nav-divider {
    width: 2px;
    height: 18px;
    background: color-mix(in srgb, var(--item-color) 40%, transparent);
    margin: 0 4px;
    border-radius: 2px;
}

@keyframes float-pill {
    0%, 100% { transform: translateY(-0.5px); }
    50%       { transform: translateY(-2px); }
}

@keyframes float-pill-icon {
    0%, 100% { transform: scale(1.05) translateY(-0.5px); }
    50%       { transform: scale(1.1)  translateY(-1.5px); }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ── Work/Antiparty mode: icon-only pills, left-aligned ── */
body.work-mode .wh-nav-row-main {
    margin-top: 4px;
    justify-content: flex-start;
    min-width: unset;
    width: 100%;
    gap: 2px;
}

/* Icon-only mode: span becomes hover tooltip (no layout shift) */
body.work-mode .wh-pill.main,
body.work-mode .wh-pill.sub {
    position: relative;
}

body.work-mode .wh-pill.main span,
body.work-mode .wh-pill.sub span {
    position: absolute;
    top: calc(100% + 7px);
    left: 50%;
    transform: translateX(-50%) translateY(-4px);
    background: rgba(10, 14, 26, 0.96);
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 5px;
    padding: 3px 8px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
    z-index: 1100;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
}

body.work-mode .wh-pill.sub:hover span,
body.work-mode .wh-pill.main:hover span {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateX(-50%) translateY(0);
}

/* Strip backgrounds and shrink padding */
body.work-mode .wh-pill.main {
    padding: 3px 6px;
    background: transparent;
}

body.work-mode .wh-pill.sub {
    padding: 3px 6px;
    background: transparent;
    border-color: transparent;
    font-size: 12px;
    height: auto;
    letter-spacing: 0;
}

body.work-mode .wh-pill.sub i {
    font-size: 12px;
    opacity: 0.85;
}

/* Keep active pill colored even in work mode */
body.work-mode .wh-pill.main.active {
    background: var(--item-color);
    padding: 3px 7px;
}

body.work-mode .wh-pill.sub.active {
    color: var(--item-color);
    background: transparent;
    border-color: var(--item-color);
}

/* Light Mode Overrides */
[data-theme="light"] .wh-nav-wrapper {
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
}

[data-theme="light"] .wh-nav-row-main {
    border-bottom: 1px solid #e2e8f0;
}

[data-theme="light"] .wh-nav-row-sub {
    background: #f8fafc;
}

@keyframes fadeInNav {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

[data-theme="light"] .wh-nav-group.active {
    background: color-mix(in srgb, var(--item-color) 8%, #f8fafc);
    border-color: color-mix(in srgb, var(--item-color) 15%, #e2e8f0);
}

/* Nav separators between groups */
.wh-nav-sep {
    width: 1px;
    height: 20px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0 4px;
    flex-shrink: 0;
    align-self: center;
}
[data-theme="light"] .wh-nav-sep {
    background: #e2e8f0;
}

/* Highlight pills (zakázky klientů) */
.wh-nav-highlight .wh-pill.main {
    border: 1px dashed color-mix(in srgb, var(--item-color) 50%, transparent);
    background: color-mix(in srgb, var(--item-color) 8%, transparent);
}
.wh-nav-highlight .wh-pill.main:hover {
    border-style: solid;
}

[data-theme="light"] .wh-pill.main.active {
    box-shadow: 0 4px 12px color-mix(in srgb, var(--item-color) 40%, transparent);
}

[data-theme="light"] .wh-pill.main:hover {
    background: color-mix(in srgb, var(--item-color) 10%, #fff);
    border-color: color-mix(in srgb, var(--item-color) 25%, transparent);
    color: var(--item-color);
}

[data-theme="light"] .wh-pill.sub {
    background: color-mix(in srgb, var(--item-color) 8%, #f5f7fa);
    border-color: color-mix(in srgb, var(--item-color) 18%, transparent);
    color: color-mix(in srgb, var(--item-color) 75%, #374151);
}

[data-theme="light"] .wh-pill.sub i {
    color: color-mix(in srgb, var(--item-color) 75%, #374151);
}

[data-theme="light"] .wh-pill.sub:hover {
    background: color-mix(in srgb, var(--item-color) 15%, #fff);
    border-color: color-mix(in srgb, var(--item-color) 35%, transparent);
    color: var(--item-color);
}

[data-theme="light"] .wh-pill.sub.active {
    background: var(--item-color);
    border: 1px solid color-mix(in srgb, var(--item-color) 80%, #000);
    border-left: 3px solid rgba(255, 255, 255, 0.75);
    padding-left: 10px;
    color: #fff !important;
    box-shadow: 0 3px 14px color-mix(in srgb, var(--item-color) 40%, transparent);
}

[data-theme="light"] .wh-pill.sub.active i {
    color: rgba(255, 255, 255, 0.92);
}

/* Page Transition Anti-Flicker */
body {
    animation: bodyFadeIn 0.3s ease-out;
}

@keyframes bodyFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ── FUN THEME TOGGLE ANIMATION (SUN, CLOUD & DOG) ── */
.theme-toggle-btn {
    position: relative;
    width: 36px !important;
    /* Slightly larger */
    height: 36px !important;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.3);
    /* Svetly ramecek */
    border-radius: 8px;
    margin: 0 5px;
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.theme-toggle-btn:hover {
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
    /* Glow on hover */
    background: rgba(255, 255, 255, 0.1);
}

/* Specific Glow for Night Mode */
[data-theme="dark"] .theme-toggle-btn {
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}

/* UFO Animation */
.ufo-container {
    position: absolute;
    top: 50%;
    left: -20px;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
    display: flex;
    align-items: center;
    transform: translateY(-50%);
}

.ufo-icon {
    font-size: 10px;
    color: #fff;
    opacity: 0;
    filter: drop-shadow(0 0 5px #fff);
    animation: ufo-fly 25s linear infinite;
}

@keyframes ufo-fly {
    0% {
        transform: translateX(0) translateY(0) rotate(0deg);
        opacity: 0;
    }

    1% {
        opacity: 1;
    }

    15% {
        transform: translateX(60px) translateY(-5px) rotate(10deg);
        opacity: 1;
    }

    16% {
        opacity: 0;
    }

    100% {
        transform: translateX(60px) translateY(-5px) rotate(10deg);
        opacity: 0;
    }
}

.moon-icon {
    font-size: 16px;
    position: absolute;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.sun-scene {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    pointer-events: none;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(20px);
    overflow: hidden;
    border-radius: 8px;
}

/* State changes based on data-theme */
[data-theme="light"] .moon-icon {
    opacity: 0;
    transform: translateY(-20px) rotate(45deg);
}

[data-theme="light"] .sun-scene {
    opacity: 1;
    transform: translateY(0);
}

.sky-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #38bdf8;
    z-index: 0;
}

/* Green Hills */
.hill {
    position: absolute;
    background: #22c55e;
    border-radius: 50%;
    z-index: 2;
}

.hill-1 {
    width: 44px;
    height: 26px;
    bottom: -15px;
    left: -10px;
}

.hill-2 {
    width: 36px;
    height: 22px;
    bottom: -12px;
    right: -12px;
    background: #16a34a;
}

.sun-core {
    position: absolute;
    top: 45%;
    left: 45%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    background: #fbbf24;
    /* Yellow sun */
    border-radius: 50%;
    box-shadow: 0 0 10px #f59e0b;
    animation: sun-pulse 3s ease-in-out infinite;
    z-index: 1;
}

.sun-rays {
    position: absolute;
    top: 45%;
    left: 45%;
    margin-top: -12px;
    margin-left: -12px;
    width: 24px;
    height: 24px;
    border: 2px dashed #f59e0b;
    border-radius: 50%;
    animation: spin-slow 8s linear infinite;
    opacity: 0.9;
    z-index: 1;
}

.cloud-1 {
    position: absolute;
    top: 2px;
    left: -15px;
    font-size: 11px;
    color: #ffffff;
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    opacity: 0.95;
    animation: float-cloud 10s linear infinite;
    z-index: 3;
}

/* Flying Birds */
.bird {
    position: absolute;
    color: #8b4513;
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 6px;
    z-index: 3;
    opacity: 0;
}

.bird-1 {
    top: 5px;
    animation: bird-fly 12s linear infinite;
    animation-delay: 1s;
}

.bird-2 {
    top: 9px;
    font-size: 5px;
    /* slightly smaller bird */
    animation: bird-fly 15s linear infinite;
    animation-delay: 6s;
}

.dog-wrapper {
    position: absolute;
    bottom: -16px;
    left: 8px;
    animation: dog-peek 15s ease-in-out infinite;
    animation-delay: 2s;
    z-index: 4;
}

.dog-icon {
    color: #ffffff;
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    /* White dog */
    font-size: 13px;
}

/* removed paw wave */

@keyframes sun-pulse {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
        box-shadow: 0 0 8px #f59e0b;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.15);
        box-shadow: 0 0 14px #fbbf24;
    }
}

@keyframes spin-slow {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes float-cloud {
    0% {
        transform: translateX(0);
        opacity: 0;
    }

    10% {
        opacity: 0.9;
    }

    90% {
        opacity: 0.9;
    }

    100% {
        transform: translateX(45px);
        opacity: 0;
    }
}

@keyframes dog-peek {

    0%,
    65%,
    100% {
        transform: translateY(0) translateX(0) scaleX(1);
    }

    70% {
        transform: translateY(-16px) translateX(0) scaleX(1);
        /* Popped up left */
    }

    75% {
        transform: translateY(-16px) translateX(0) scaleX(1);
        /* Still left, waving */
    }

    82% {
        transform: translateY(-16px) translateX(12px) scaleX(1);
        /* Ran to the right */
    }

    87% {
        transform: translateY(-16px) translateX(12px) scaleX(1);
        /* Stopped, waving */
    }

    90% {
        transform: translateY(-16px) translateX(12px) scaleX(-1);
        /* Turned around */
    }

    95% {
        transform: translateY(-16px) translateX(-5px) scaleX(-1);
        /* Ran back */
    }

    98% {
        transform: translateY(0) translateX(-5px) scaleX(-1);
        /* Dived down */
    }
}

@keyframes wave-paw {

    0%,
    69%,
    100% {
        transform: rotate(0deg);
        opacity: 0;
    }

    /* First wave left */
    70% {
        transform: rotate(0deg);
        opacity: 1;
    }

    71% {
        transform: rotate(30deg);
        opacity: 1;
    }

    72% {
        transform: rotate(-10deg);
        opacity: 1;
    }

    73% {
        transform: rotate(20deg);
        opacity: 1;
    }

    74% {
        transform: rotate(0deg);
        opacity: 1;
    }

    75%,
    81% {
        opacity: 0;
    }

    /* Second wave right */
    82% {
        transform: rotate(0deg);
        opacity: 1;
    }

    83% {
        transform: rotate(30deg);
        opacity: 1;
    }

    84% {
        transform: rotate(-10deg);
        opacity: 1;
    }

    85% {
        transform: rotate(20deg);
        opacity: 1;
    }

    86% {
        transform: rotate(0deg);
        opacity: 1;
    }

    87%,
    99% {
        opacity: 0;
    }
}

@keyframes bird-fly {
    0% {
        transform: translateX(30px) translateY(0) scaleX(-1);
        opacity: 0;
    }

    10% {
        opacity: 0.9;
        transform: translateX(20px) translateY(-2px) scaleX(-1);
    }

    90% {
        opacity: 0.9;
        transform: translateX(-15px) translateY(2px) scaleX(-1);
    }

    100% {
        transform: translateX(-25px) translateY(0) scaleX(-1);
        opacity: 0;
    }
}

/* ── Ultrawide — Full labels + button-style nav ── */
@media (min-width: 1921px) {
    /* Hlavní menu: větší buttony s textem */
    .nav-item {
        padding: 7px 14px !important;
        gap: 7px !important;
        border-radius: 8px !important;
        justify-content: flex-start !important;
    }

    .nav-item .nav-label {
        font-size: 12px !important;
        font-weight: 700 !important;
        display: inline !important;
        visibility: visible !important;
        letter-spacing: 0.3px !important;
    }

    .nav-item i {
        font-size: 16px !important;
        width: 16px !important;
        margin: 0 !important;
    }

    .nav-separator {
        height: 22px;
        margin: 0 10px;
    }

    .topbar-nav {
        gap: 4px;
    }

    /* Sub-menu: labely viditelné */
    /* wh-pill a sp-btn labely řízeny přes 1930px media query níže */

    /* Prof-tool ikony vedle kalendáře — přidat label z title atributu */
    .prof-tool {
        padding: 6px 10px !important;
        gap: 5px !important;
    }
}

/* ── Mobile Menu Optimization (Icons Only - Global) ── */
@media (max-width: 768px) {

    /* Hide all labels and badges on mobile */
    .nav-label,
    .nav-badge,
    .wh-nav-group span,
    .wh-pill span,
    .wh-nav-label,
    .sp-cat-label,
    .sp-btn span,
    .filter-buttons span {
        display: none !important;
    }

    /* Aggressively hide specific widgets on mobile */
    #header-pomodoro,
    #header-planner,
    .pomo-clock-container,
    #header-priority-pips,
    .nav-item[data-group="search"],
    #sidebar-toggle,
    .panel[data-panel-id="pomodoro"],
    [id*="header-pomodoro"],
    [id*="header-planner"] {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        width: 0 !important;
        height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        position: absolute !important;
        pointer-events: none !important;
    }

    /* Force horizontal icon rows for all menu structures */
    .topbar-nav,
    .wh-nav-container,
    .wh-sub-block,
    .project-subnav,
    .filter-buttons {
        display: flex !important;
        flex-direction: row !important;
        gap: 2px !important;
        /* Shrunk from 6px */
        overflow-x: auto !important;
        scrollbar-width: none !important;
        justify-content: center !important;
        padding: 4px 0 !important;
        width: 100% !important;
        flex-wrap: nowrap !important;
    }

    .wh-nav-container::-webkit-scrollbar,
    .topbar-nav::-webkit-scrollbar {
        display: none;
    }

    /* Icon button styling - Unified Circular look - SHRUNK */
    .nav-item,
    .wh-pill,
    .sp-btn {
        padding: 0 !important;
        border-radius: 50% !important;
        width: 30px !important;
        /* Shrunk from 38px */
        height: 30px !important;
    }

    .nav-item i,
    .wh-pill i,
    .sp-btn i {
        font-size: 17px !important;
        /* Shrunk from 18px */
        margin: 0 !important;
    }

    /* Remove separators and margins on mobile */
    .nav-separator,
    .wh-group-sep,
    .wh-nav-divider {
        display: none !important;
    }

    /* Force vertical stacking for 3-level menu */
    .topbar {
        flex-direction: column !important;
        height: auto !important;
        padding: 5px 0 !important;
        gap: 0 !important;
    }

    .topbar-right {
        order: 1 !important;
        width: 100% !important;
        justify-content: center !important;
        padding: 4px 0 !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        gap: 2px !important;
    }

    /* Aggressively Shrunk Topbar Buttons */
    .topbar-right .topbar-btn {
        width: 28px !important;
        height: 28px !important;
        padding: 0 !important;
        flex-shrink: 0 !important;
    }

    .topbar-right .topbar-btn i,
    .topbar-right .topbar-btn svg {
        font-size: 13px !important;
        width: 14px !important;
        height: 14px !important;
    }

    .topbar-nav {
        order: 2 !important;
        width: 100% !important;
        justify-content: center !important;
        padding: 5px 0 !important;
        margin: 0 !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    }

    /* Sub-navigation (Level 3) logic */
    .wh-nav-container,
    .project-subnav,
    .filter-buttons {
        order: 3 !important;
        justify-content: center !important;
        padding: 5px 0 !important;
        background: rgba(0, 0, 0, 0.02) !important;
    }

    .topbar-left {
        display: none !important;
    }
}

/* ── Header Priority Pips ── */
.priority-pips .priority-pip {
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s, border-color 0.2s;
    background: transparent;
}

.priority-pips .priority-pip:hover {
    transform: scale(1.25);
    border-color: rgba(255, 255, 255, 0.8);
}

.priority-pips .priority-pip.active {
    background: currentColor !important;
    border-color: #fff !important;
    box-shadow: 0 0 8px currentColor;
}

.priority-pips .priority-pip[data-priority="1"] {
    color: #48bb78;
}

.priority-pips .priority-pip[data-priority="2"] {
    color: #3182ce;
}

.priority-pips .priority-pip[data-priority="3"] {
    color: #f6ad55;
}

.priority-pips .priority-pip[data-priority="4"] {
    color: #ed8936;
}

.priority-pips .priority-pip[data-priority="5"] {
    color: #e53e3e;
}



/* ── TimeTracking Smooth Interaction ── */
#btn-timetrack-nav {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

#btn-timetrack-nav:hover {
    background: var(--accent);
    color: #fff;
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 0 15px var(--accent-glow);
}

.live-stopwatch {
    transition: transform 0.4s ease;
}

#btn-timetrack-nav:hover .live-stopwatch {
    transform: rotate(-5deg);
}

/* ── Today Focus Enhancements ── */
.focus-item {
    position: relative;
    padding-right: 35px !important;
}

.focus-status-area {
    position: relative;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
}

.focus-status-area input[type="checkbox"] {
    z-index: 2;
    cursor: pointer;
}

.play-overlay {
    position: absolute;
    inset: -2px;
    background: var(--bg-panel);
    color: var(--accent-green);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    opacity: 0;
    transition: 0.2s;
    z-index: 3;
    cursor: pointer;
    border-radius: 4px;
    border: 1px solid var(--accent-green);
}

.focus-item:hover .play-overlay {
    opacity: 1;
    transform: scale(1.1);
}

.focus-priority-indicator {
    position: absolute;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    opacity: 0.8;
}

/* ── Priority Pips & Role Badges ── */
.priority-pips .priority-pip,
.panel-priority-pips .priority-pip,
.tt-role-badge {
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.priority-pips .priority-pip,
.panel-priority-pips .priority-pip {
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: transparent;
}

.priority-pips .priority-pip:hover,
.panel-priority-pips .priority-pip:hover,
.tt-role-badge:hover {
    transform: scale(1.15) translateY(-1px);
    border-color: rgba(255, 255, 255, 0.5);
}

.priority-pips .priority-pip.active,
.panel-priority-pips .priority-pip.active,
.tt-role-badge.active,
.tt-user-badge.active {
    background: var(--active-bg, currentColor) !important;
    border-color: #fff !important;
    color: #fff !important;
    box-shadow: 0 0 12px var(--active-bg, currentColor);
}

/* User Badge Specific */
.tt-user-badge {
    font-weight: 900;
    font-size: 10px;
    letter-spacing: 0.5px;
}

.tt-user-badge[data-user-id="1"] {
    --active-bg: #4299e1;
}

.tt-user-badge[data-user-id="2"] {
    --active-bg: #ed64a6;
}

.tt-user-badge[data-user-id="3"] {
    --active-bg: #48bb78;
}

/* ── Wizard Priority Slider ── */
.wizard-priority-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(to right, #48bb78, #f6ad55, #e53e3e);
    outline: none;
    margin: 15px 0;
}

.wizard-priority-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    border: 3px solid var(--neuro-accent);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s;
}

.wizard-priority-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

/* Base Role Badge */
.tt-role-badge {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    color: #ccc;
    font-size: 16px;
}

/* Wizard Layout */
.task-wizard {
    width: 90%;
    max-width: 420px;
    max-height: 90vh;
    border-radius: 24px !important;
    overflow-y: auto;
}

@media (max-width: 768px) {
    .task-wizard {
        width: 95% !important;
        max-height: 95vh !important;
        border-radius: 16px !important;
    }

    .wizard-header {
        padding: 10px 15px !important;
    }

    .wizard-header h2 {
        font-size: 14px !important;
    }

    .wizard-body {
        gap: 8px !important;
        /* Reduced from 15px */
        padding: 10px 10px !important;
        /* Reduced from 20px 15px */
    }

    .wizard-field label {
        margin-bottom: 2px !important;
        /* Reduced from 5px */
        font-size: 9px !important;
        /* Reduced from 11px */
    }

    .wizard-input {
        font-size: 12px !important;
        height: 32px !important;
    }

    #wizard-task-title {
        font-size: 14px !important;
        height: 38px !important;
    }

    .tt-role-badge {
        width: 32px !important;
        height: 32px !important;
        font-size: 13px !important;
    }

    #wizard-energy-container {
        font-size: 16px !important;
        gap: 6px !important;
    }

    .wizard-priority-slider {
        margin: 8px 0 !important;
    }

    #wizard-task-desc {
        height: 45px !important;
    }

    .wizard-btn-small {
        padding: 6px 10px !important;
        font-size: 10px !important;
    }

    .wizard-footer {
        padding: 10px !important;
    }

    .wizard-btn {
        padding: 8px 15px !important;
        font-size: 12px !important;
    }
}

#wizard-role-container {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    min-height: 50px;
    padding: 10px;
}

.wizard-date-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 2px;
    padding: 5px;
}

.wizard-date-buttons::-webkit-scrollbar {
    display: none;
}

.wizard-btn-small {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    padding: 12px 18px !important;
    font-size: 13px !important;
    font-weight: 700;
    background: var(--bg-panel);
    border: 1px solid var(--border-panel);
    color: var(--text-primary);
    border-radius: 10px !important;
    cursor: pointer;
    transition: 0.2s;
    text-align: center;
}

.wizard-btn-small:hover {
    background: var(--bg-hover);
    border-color: var(--accent);
}

.wizard-btn-small.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

@media (max-width: 768px) {
    .wizard-input {
        font-size: 16px !important;
    }

    .task-wizard {
        width: 100%;
        height: 100%;
        max-height: 100vh;
        border-radius: 0 !important;
    }
}

/* ============================================
   NAV LABELS — skryté pod 1920px, jen ikony + tooltip
   ============================================ */
@media (max-width: 1920px) {
    .nav-item .nav-label {
        display: none !important;
    }
    .nav-item {
        padding: 6px 8px !important;
    }
}
.nav-dropdown-item span {
    display: inline !important;
}
.nav-dropdown-item {
    padding: 7px 12px !important;
    gap: 8px !important;
}
.nav-dropdown-menu {
    min-width: 140px !important;
}
/* Pod 1280px: submenu + filtry jen ikony */
@media (max-width: 1279px) {
    .wh-pill span,
    .wh-pill.main span,
    .wh-pill.sub span {
        display: none !important;
    }
    .wh-pill,
    .wh-pill.main,
    .wh-pill.sub {
        padding: 4px 8px !important;
        gap: 0 !important;
    }
    .wh-nav-row-sub .sp-btn .btn-text {
        display: none !important;
    }
}
/* Nad 1280px: submenu s labely (ikony + text) */
@media (min-width: 1280px) {
    .wh-pill span,
    .wh-pill.main span,
    .wh-pill.sub span {
        display: inline !important;
    }
    .wh-pill,
    .wh-pill.main,
    .wh-pill.sub {
        padding: 2px 8px !important;
        gap: 4px !important;
    }
    .wh-nav-row-sub .sp-btn .btn-text {
        display: inline !important;
    }
}

/* ── Performance: reduce GPU compositing from infinite CSS animations ── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
/* Decorative infinite animations — use GPU-friendly will-change */
.ufo-icon, .cloud, .bird, .bird2, .dog-body,
.sun-icon, .flower-icon,
.bulls-eye-ring, .bulls-eye-core, .bulls-eye-text,
.body-doubling-active,
.stopwatch-icon, .sw-hand {
    will-change: transform;
}
