:root {
    /* Premium 2026 Design System - Light Mode (Default) */
    --bg-base: #f8fafc;
    --bg-surface: rgba(255, 255, 255, 0.7);
    --bg-surface-elevated: rgba(255, 255, 255, 0.9);
    --bg-surface-hover: rgba(255, 255, 255, 1);
    --bg-card: #ffffff;

    --glass-border: rgba(0, 0, 0, 0.08);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.05);

    --text-primary: #0f172a;
    /* Slate 900 */
    --text-secondary: #475569;
    /* Slate 600 */
    --text-muted: #94a3b8;
    /* Slate 400 */

    --primary: #6366f1;
    /* Indigo 500 */
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);

    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;

    --glass-border: rgba(148, 163, 184, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(15, 23, 42, 0.04);

    --sidebar-width: 280px;
    --sidebar-collapsed-width: 80px;
    --header-height: 72px;
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;

    --transition-speed: 0.3s;
    --curve: cubic-bezier(0.4, 0, 0.2, 1);

    /* Priority Colors - Lucid Palette */
    --priority-baixa: #0ea5e9;
    --priority-media: #f59e0b;
    --priority-alta: #ef4444;
    --priority-urgente: #be123c;

    /* Status Colors */
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
}

.dark-theme {
    /* Premium Deep Space Zinc */
    --bg-base: #09090b;
    /* Zinc 950 */
    --bg-surface: #18181b;
    /* Zinc 900 */
    --bg-surface-elevated: #27272a;
    /* Zinc 800 */
    --bg-surface-hover: #3f3f46;
    /* Zinc 700 */
    --bg-card: #18181b;

    --text-primary: #fafafa;
    /* Zinc 50 */
    --text-secondary: #a1a1aa;
    /* Zinc 400 */
    --text-muted: #52525b;
    /* Zinc 600 */

    --glass-border: rgba(255, 255, 255, 0.05);
    --glass-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);

    /* Priority Colors for Dark Mode */
    --priority-baixa: #38bdf8;
    --priority-media: #fbbf24;
    --priority-alta: #f97316;
    --priority-urgente: #ef4444;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-base);
    background-image:
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.08) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(168, 85, 247, 0.05) 0px, transparent 50%);
    color: var(--text-primary);
    line-height: 1.6;
    height: 100vh;
    overflow: hidden;
    transition: background-color 0.5s var(--curve), color 0.5s var(--curve);
}

.dark-theme body {
    background-image:
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(168, 85, 247, 0.1) 0px, transparent 50%);
}

/* Sidebar Ultra Modern */
.app-container {
    display: flex;
    height: 100vh;
    width: 100vw;
    background: var(--bg-base);
    overflow: hidden;
}

/* Sidebar Refinement */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-surface);
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1rem;
    z-index: 100;
    transition: width 0.4s var(--curve), background 0.4s var(--curve);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.02);
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2.5rem;
    padding: 0 0.5rem;
    height: 40px;
    min-height: 40px;
    flex-shrink: 0;
}

.sidebar.collapsed .sidebar-header {
    justify-content: center;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    white-space: nowrap;
    opacity: 1;
    transition: opacity 0.3s var(--curve);
}

.sidebar.collapsed .logo-container {
    display: none;
}

.logo-img {
    height: 32px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 8px rgba(99, 102, 241, 0.2));
    transition: transform 0.3s var(--curve);
}

.logo-container:hover .logo-img {
    transform: rotate(-5deg) scale(1.1);
}

.logo-text {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #5a636c;
    /* Gray from logo */
}

.sidebar-toggle {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s var(--curve);
}

.sidebar-toggle:hover {
    color: var(--text-primary);
    border-color: var(--primary);
    transform: scale(1.05);
}

/* Toggle icon rotation is handled by JS */

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    flex-grow: 1;
}

.nav-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 0.85rem 1.1rem;
    border-radius: 12px;
    text-align: left;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s var(--curve);
    display: flex;
    align-items: center;
    gap: 1rem;
    white-space: nowrap;
    position: relative;
}

.sidebar.collapsed .nav-btn {
    padding: 0.85rem;
    justify-content: center;
}

.nav-btn i {
    font-size: 1.2rem;
    min-width: 24px;
    text-align: center;
}

.nav-btn span {
    transition: opacity 0.3s var(--curve);
}

.sidebar.collapsed .nav-btn span {
    display: none;
}

.nav-btn:hover {
    background-color: var(--bg-surface-elevated);
    color: var(--text-primary);
    transform: translateX(4px);
}

.sidebar.collapsed .nav-btn:hover {
    transform: scale(1.1);
}

.nav-btn.active {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.sidebar-footer {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: opacity 0.3s var(--curve);
}

.sidebar.collapsed .sidebar-footer {
    display: none;
}

/* User profile card in sidebar */
.user-profile-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 14px;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--glass-border);
    transition: background 0.2s ease;
}

.user-profile-card:hover {
    background: var(--bg-surface-hover);
}

.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 800;
    color: white;
    flex-shrink: 0;
    text-transform: uppercase;
}

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

.user-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-email {
    font-size: 0.72rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.logout-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.4rem;
    border-radius: 8px;
    transition: color 0.2s, background 0.2s;
    flex-shrink: 0;
    font-size: 0.9rem;
}

.logout-btn:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}


.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--bg-surface);
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--glass-shadow);
}

.action-dropdown {
    position: relative;
    display: inline-flex;
}

.dropdown-arrow-btn {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    padding-left: 0.8rem;
    padding-right: 0.8rem;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
}

#newTaskBtn {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 5px);
    right: 0;
    min-width: 220px;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    padding: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease-in-out;
    z-index: 1000;
}

.dropdown-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    width: 100%;
    text-align: left;
    padding: 0.8rem 1rem;
    border: none;
    background: transparent;
    color: var(--text-primary);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
}

.dropdown-item i {
    color: var(--primary);
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.sidebar-metrics {
    padding: 1.25rem;
    background: var(--bg-surface-elevated);
    border-radius: 16px;
    border: 1px solid var(--glass-border);
}

.metric-item {
    margin-bottom: 0.85rem;
}

.metric-item:last-child {
    margin-bottom: 0;
}

.metric-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.35rem;
    font-weight: 700;
}

.metric-value {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-primary);
}

/* User Level Gamification Premium */
.user-level-card {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(168, 85, 247, 0.15));
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 16px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.level-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.level-badge {
    background: var(--primary-gradient);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.xp-text {
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.xp-bar-container {
    height: 8px;
    background-color: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.xp-bar-fill {
    height: 100%;
    background: var(--primary-gradient);
    border-radius: 4px;
    transition: width 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

/* Main Content Flow */
/* Layout Structure */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start !important;
    height: 100vh;
    position: relative;
    background-color: transparent;
    overflow: hidden;
}

.top-header {
    flex: 0 0 80px;
    height: 80px;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--glass-border);
    background: var(--bg-surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 100;
}

.date-navigation {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--bg-surface-elevated);
    padding: 0.4rem 0.8rem;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
}

.nav-arrow {
    background: transparent;
    color: var(--text-secondary);
    border: none;
    font-size: 0.9rem;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s var(--curve);
}

.nav-arrow:hover {
    background: var(--bg-surface-hover);
    color: var(--primary);
}

.date-display {
    font-size: 1rem;
    font-weight: 700;
    min-width: 160px;
    text-align: center;
}

/* Buttons - Premium 2026 */
.primary-btn,
.secondary-btn {
    padding: 0.6rem 1.25rem;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s var(--curve);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: 1px solid transparent;
}

.primary-btn {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

.secondary-btn {
    background: var(--bg-surface-elevated);
    color: var(--text-primary);
    border-color: var(--glass-border);
}

.secondary-btn:hover {
    background: var(--bg-surface-hover);
}

.action-dropdown {
    display: flex;
    gap: 2px;
    position: relative;
}

.dropdown-arrow-btn {
    padding: 0.6rem 0.8rem;
    border-radius: 0 10px 10px 0;
}

#newTaskBtn {
    border-radius: 10px 0 0 10px;
}


.dropdown-item {
    width: 100%;
    padding: 0.8rem 1.2rem;
    background: transparent;
    border: none;
    color: var(--text-primary);
    text-align: left;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: background 0.2s;
}

.dropdown-item:hover {
    background: var(--primary-gradient);
}

/* Kanban Board Layout */
.view-section {
    flex: 1;
    display: none;
    flex-direction: column;
    padding: 2rem;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
}

.view-section.active {
    display: flex;
}

.kanban-board {
    display: flex;
    gap: 1.5rem;
    padding: 1rem 0;
    height: calc(100% - 2rem);
    width: 100%;
    overflow-x: auto;
    /* Enable horizontal scroll for columns */
    overflow-y: hidden;
    scroll-behavior: smooth;
    scrollbar-width: thin;
}

.kanban-board::-webkit-scrollbar {
    height: 6px;
}

.kanban-column {
    flex: 1;
    min-width: 320px;
    background: var(--bg-surface);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--glass-border);
    transition: all 0.3s var(--curve);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.kanban-column:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-color: rgba(99, 102, 241, 0.2);
}

.column-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-surface-elevated);
    backdrop-filter: blur(10px);
    border-radius: 20px 20px 0 0;
}

.column-header h3 {
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 700;
}

.column-header h3 i {
    color: var(--primary);
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-right: 8px;
}

.task-count {
    background: var(--bg-surface-elevated);
    padding: 0.2rem 0.6rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--text-secondary);
    border: 1px solid var(--glass-border);
}

.task-list {
    padding: 1rem;
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.date-display {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Task Card - Ultra Modern Glass */
.task-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 1.25rem;
    border: 1px solid var(--glass-border);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
    transition: all 0.4s var(--curve);
    position: relative;
    cursor: grab;
    overflow: hidden;
}

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

.task-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    border-color: var(--primary);
    background: var(--bg-surface-hover);
}

.clickable-card:hover {
    cursor: pointer;
    background: var(--bg-surface-hover);
}


.task-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 20%;
    height: 60%;
    width: 4px;
    border-radius: 0 4px 4px 0;
    background: var(--text-muted);
}

.task-card.priority-baixa::before {
    background: var(--priority-baixa);
    box-shadow: 0 0 10px var(--priority-baixa);
}

.task-card.priority-media::before {
    background: var(--priority-media);
    box-shadow: 0 0 10px var(--priority-media);
}

.task-card.priority-alta::before {
    background: var(--priority-alta);
    box-shadow: 0 0 10px var(--priority-alta);
}

.task-card.priority-urgente::before {
    background: var(--priority-urgente);
    box-shadow: 0 0 10px var(--priority-urgente);
}

.task-header {
    margin-bottom: 0.75rem;
}

.task-title {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-primary);
    margin-right: 0.5rem;
}

.badge {
    font-size: 0.65rem;
    text-transform: uppercase;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    font-weight: 800;
    letter-spacing: 0.05em;
    margin-top: 0.5rem;
    display: inline-block;
}

.badge-baixa,
.badge-BAIXA {
    background: rgba(59, 130, 246, 0.1);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.badge-media,
.badge-MEDIA {
    background: rgba(245, 158, 11, 0.1);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.badge-alta,
.badge-ALTA {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.badge-urgente,
.badge-URGENTE {
    background: rgba(220, 38, 38, 0.15);
    color: #fca5a5;
    border: 1px solid rgba(220, 38, 38, 0.3);
}

.task-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
    line-height: 1.5;
}

.task-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--glass-border);
    padding-top: 1rem;
    margin-top: 1rem;
}

.task-timer {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.task-timer i {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.task-timer.running {
    background: linear-gradient(90deg, #10b981, #34d399);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: glow 1.5s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        filter: drop-shadow(0 0 2px #10b981);
    }

    to {
        filter: drop-shadow(0 0 8px #34d399);
    }
}

.task-actions {
    display: flex;
    gap: 0.5rem;
}

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

.icon-btn:hover {
    background-color: var(--bg-surface-elevated);
    color: var(--text-primary);
    transform: scale(1.1);
}

/* Modal Premium Glass */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(2, 6, 23, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-surface);
    width: 100%;
    max-width: 500px;
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
    animation: modalIn 0.4s var(--curve);
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.top-header {
    height: var(--header-height);
    background: var(--bg-base);
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    z-index: 50;
    transition: background 0.4s var(--curve);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.modal-header {
    padding: 1.5rem 2rem;
    background: var(--bg-surface-elevated);
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 1.15rem;
    font-weight: 800;
}

.modal-body {
    padding: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
    color: var(--text-secondary);
}

.form-input {
    width: 100%;
    background: var(--bg-base);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 0.8rem 1rem;
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all 0.3s var(--curve);
    outline: none;
}

.form-input:focus {
    border-color: var(--primary);
    background: var(--bg-surface-elevated);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1rem;
}

/* AI Sparkle Button */
.ai-btn {
    background: var(--primary-gradient);
    border: none;
    padding: 0.35rem 0.85rem;
    border-radius: 8px;
    color: white;
    font-size: 0.75rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(168, 85, 247, 0.4);
    transition: all 0.3s var(--curve);
}

.ai-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(168, 85, 247, 0.6);
}

/* Toast Modern */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    z-index: 2000;
}

.toast {
    background: var(--bg-surface-elevated);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 320px;
    transform: translateX(120%);
    opacity: 0;
    transition: all 0.4s var(--curve);
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast-success {
    border-left: 4px solid var(--success);
}

.toast-error {
    border-left: 4px solid var(--danger);
}

.toast-info {
    border-left: 4px solid var(--primary);
}

/* Settings View - Premium Glass */
.settings-container {
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
    animation: slideUp 0.4s var(--curve);
}

.settings-card {
    background: var(--bg-surface);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 1.5rem;
    box-shadow: var(--glass-shadow);
}

.settings-header {
    margin-bottom: 1rem;
}

.settings-header h2 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.settings-divider {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin: 2rem 0;
}

/* Settings Tabs */
.settings-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: transparent;
    flex-wrap: wrap;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 2rem;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1.25rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s var(--curve);
    white-space: nowrap;
}

.nav-btn i {
    width: 20px;
    font-size: 1.1rem;
    color: var(--text-muted);
}

.nav-btn:hover {
    background: var(--bg-surface-hover);
    color: var(--primary);
    transform: translateX(4px);
}

.nav-btn:hover i {
    color: var(--primary);
}

.nav-btn.active {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.2);
}

.nav-btn.active i {
    color: white;
}

.tab-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    padding: 0.55rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s var(--curve);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.tab-btn.active {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.tab-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

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

.settings-section {
    margin-bottom: 1.25rem;
}

.settings-section h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

/* Toggle Switch Premium */
.toggle-group {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    background: rgba(15, 23, 42, 0.3);
    padding: 1.25rem;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
}

.switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
    flex-shrink: 0;
}

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

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bg-surface-elevated);
    transition: .4s;
    border: 1px solid var(--glass-border);
}

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

input:checked+.slider {
    background: var(--primary-gradient);
    border-color: transparent;
}

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

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

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

.toggle-text {
    display: flex;
    flex-direction: column;
}

.toggle-title {
    font-size: 0.95rem;
    font-weight: 700;
}

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

.settings-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2.5rem;
}

/* Generic Utilities */
.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 10px;
    border: 2px solid var(--bg-base);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* -------------------------------------
 * MOBILE & RESPONSIVE GRID FALLBACKS
 * ------------------------------------- */

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.template-editor-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.preview-pane {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow-y: auto;
    max-height: 400px;
    padding: 10px;
}

/* Task Assignee Styles */
.task-assignee-bubble {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 0.5rem;
}

.user-avatar-small {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: white;
    font-size: 0.65rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--glass-border);
    object-fit: cover;
}

/* User Profile Improvements */
#userProfilePhotoPreview {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
    margin-bottom: 1rem;
}

.status-active {
    background: rgba(16, 185, 129, 0.1) !important;
    color: #10b981 !important;
    border: 1px solid rgba(16, 185, 129, 0.2) !important;
}

.status-pending {
    background: rgba(245, 158, 11, 0.1) !important;
    color: #f59e0b !important;
    border: 1px solid rgba(245, 158, 11, 0.2) !important;
}

/* Responsive Fixes - World-Class standard */
@media (max-width: 1200px) {
    .kanban-column {
        min-width: 300px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 0;
        padding: 0;
        border: none;
        overflow: hidden;
    }

    .sidebar.active {
        width: 100vw;
        padding: 1.5rem 1rem;
    }

    .top-header {
        padding: 0 1rem;
    }

    .header-right {
        display: none;
        /* Hide non-essential info on small mobile */
    }

    .kanban-board {
        padding: 1rem;
        gap: 1rem;
    }

    .kanban-column {
        min-width: 280px;
    }
}

/* --- USER MANAGEMENT & RBAC --- */

/* User Role Badges */
.user-role-badge {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 10px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    display: inline-block;
    margin-top: 6px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.user-role-badge.admin {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.3);
}

.user-role-badge.manager {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border-color: rgba(59, 130, 246, 0.3);
}

.user-role-badge.worker {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
    border-color: rgba(34, 197, 94, 0.3);
}

/* Users Table */
.users-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    overflow: hidden;
}

.users-table th {
    text-align: left;
    padding: 1.25rem 1rem;
    color: var(--text-secondary);
    font-weight: 700;
    background: rgba(30, 41, 59, 0.4);
    border-bottom: 1px solid var(--glass-border);
    font-size: 0.85rem;
}

.users-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--glass-border);
    font-size: 0.9rem;
    color: var(--text-primary);
}

.users-table tr:last-child td {
    border-bottom: none;
}

.status-pill {
    font-size: 0.75rem;
    padding: 4px 12px;
    border-radius: 12px;
    font-weight: 700;
    display: inline-block;
}

.status-pending {
    background: rgba(251, 191, 36, 0.1);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.2);
}

.status-active {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.delete-user-btn {
    background: transparent;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 1rem;
    padding: 5px;
    transition: transform 0.2s;
}

.delete-user-btn:hover {
    transform: scale(1.2);
}

/* RBAC Visibility Controls */
.admin-only,
.manager-only {
    display: none !important;
    /* Hidden by default */
}

/* Apply display rule when role matches */
body.role-admin .admin-only {
    display: block !important;
}

body.role-admin .nav-btn.admin-only,
body.role-admin .tab-btn.admin-only,
body.role-admin button.admin-only {
    display: flex !important;
}

body.role-manager .manager-only {
    display: block !important;
}

/* In a real app, Admin would also see Manager components */
body.role-admin .manager-only {
    display: block !important;
}

/* --- Email & Automation Tab --- */
.automation-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: flex-start;
}

.email-preview-container {
    background: rgba(15, 23, 42, 0.4);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.preview-header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.preview-tabs {
    display: flex;
    background: rgba(0, 0, 0, 0.2);
    padding: 4px;
    border-radius: 10px;
    gap: 4px;
}

.preview-tab {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

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

.preview-tab.active {
    background: var(--bg-surface-elevated);
    color: var(--primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.email-preview-frame {
    background: white;
    border-radius: 8px;
    height: 480px;
    overflow-y: auto;
    border: 4px solid var(--border-color);
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.1);
}

#emailPreview {
    transform: scale(0.85);
    transform-origin: top center;
    padding: 0;
}

.automation-controls {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.settings-sub-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: -0.02em;
}

@media (max-width: 900px) {
    .automation-grid {
        grid-template-columns: 1fr;
    }

    .email-preview-frame {
        height: 350px;
    }
}

/* --- Checklist Feature --- */
.checklist-container {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 220px;
    overflow-y: auto;
}

/* Hide completed items when toggled */
.checklist-container.hide-completed .checklist-item.done {
    display: none;
}

.checklist-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: rgba(255, 255, 255, 0.03);
    padding: 7px 12px;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    transition: background 0.2s;
}

.checklist-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

.checklist-item.done {
    opacity: 0.55;
}

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

.checklist-checkbox {
    margin-top: 3px;
    cursor: pointer;
    width: 15px;
    height: 15px;
    accent-color: var(--primary);
    flex-shrink: 0;
}

.checklist-index {
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--text-muted);
    min-width: 18px;
    margin-top: 3px;
    flex-shrink: 0;
}

.checklist-text {
    flex: 1;
    font-size: 0.85rem;
    color: var(--text-primary);
    word-break: break-word;
    line-height: 1.4;
}

.checklist-delete {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.85rem;
    transition: color 0.2s;
    padding: 0 2px;
    margin-top: 2px;
    flex-shrink: 0;
}

.checklist-delete:hover {
    color: var(--danger);
}

/* Checklist Header in Modal */
.checklist-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.checklist-header-row label {
    margin-bottom: 0 !important;
}

.checklist-hide-btn {
    font-size: 0.72rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    padding: 4px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.checklist-hide-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
}

/* Card Progress Bar */
.task-progress-container {
    margin-bottom: 8px;
    margin-top: 4px;
}

.task-progress-header {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 6px;
}

.task-progress-bar {
    height: 8px;
    background: rgba(30, 41, 59, 0.6);
    border-radius: 4px;
    overflow: hidden;
}

.task-progress-fill {
    height: 100%;
    background: var(--primary-gradient);
    border-radius: 4px;
    transition: width 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* History & Dashboard Tabs */
.history-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 10px;
}

.history-tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
}

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

.history-tab-btn.active {
    color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

.history-tab-content {
    display: none;
}

.history-tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    margin-top: 10px;
}

.dashboard-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.dashboard-card.highlight {
    grid-column: span 1;
}

@media (min-width: 1400px) {
    .dashboard-card.highlight {
        grid-column: span 2;
    }
}

.dashboard-card h3 {
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dashboard-card h3 i {
    color: var(--primary);
}

.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Interaction fixes for task buttons */
.icon-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    padding: 0;
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    transform: scale(1.1);
}

.icon-btn i {
    font-size: 1.1rem;
    pointer-events: none;
    /* Help clicks land on the button itself */
}

/* Specific button colors */
.start-btn:hover {
    color: #10b981 !important;
    background: rgba(16, 185, 129, 0.1) !important;
}

.stop-btn:hover {
    color: #f59e0b !important;
    background: rgba(245, 158, 11, 0.1) !important;
}

.done-btn:hover {
    color: #10b981 !important;
    background: rgba(16, 185, 129, 0.1) !important;
}

.revert-btn:hover {
    color: #f59e0b !important;
    background: rgba(245, 158, 11, 0.1) !important;
}

/* Detailed Timeline Styling */
.timeline-event {
    display: flex;
    gap: 15px;
    margin-bottom: 24px;
    position: relative;
}

.timeline-line {
    position: absolute;
    left: 15px;
    top: 32px;
    bottom: -24px;
    width: 2px;
    background: var(--glass-border);
    opacity: 0.5;
}

.timeline-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    flex-shrink: 0;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

.timeline-content {
    flex: 1;
    padding-top: 4px;
}

.timeline-label {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-primary);
    line-height: 1.2;
}

.timeline-time {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.timeline-details {
    font-size: 0.82rem;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05);
    padding: 8px 12px;
    border-radius: 8px;
    margin-top: 8px;
    border-left: 3px solid var(--primary);
    line-height: 1.4;
}

/* --- JOURNEY CONTROL (PONTO) STYLES --- */
.journey-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.journey-header {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}

.punch-card {
    padding: 2.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.digital-clock {
    font-size: 3.5rem;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: -2px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-top: 0.5rem;
}

.punch-btn {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    border: 8px solid rgba(255, 255, 255, 0.05);
    background: var(--bg-surface-elevated);
    cursor: pointer;
    transition: all 0.4s var(--curve);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.punch-btn:hover {
    border-color: var(--primary);
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.4);
}

.punch-btn:active {
    transform: scale(0.95);
}

.punch-btn-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.punch-btn i {
    font-size: 2.5rem;
    color: var(--primary);
}

.punch-btn span {
    font-weight: 800;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.punch-btn small {
    color: var(--text-muted);
}

.overtime-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem;
}

.ov-icon {
    font-size: 2.5rem;
    color: var(--warning);
}

.ov-value {
    font-size: 2.5rem;
    font-weight: 800;
}

.journey-history {
    padding: 1.5rem;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.journey-table {
    width: 100%;
    border-collapse: collapse;
}

.journey-table th,
.journey-table td {
    padding: 1.25rem;
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
}

.journey-table th {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 800;
}

.journey-table td {
    font-size: 0.9rem;
    font-weight: 600;
}

.journey-table tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.manager-table th,
.manager-table td {
    padding: 0.8rem 1rem;
}

@media (max-width: 1024px) {
    .journey-header {
        grid-template-columns: 1fr;
    }
}

/* --- PRINT STYLES --- */
@media print {

    .sidebar,
    .top-header,
    .icon-btn,
    .primary-btn,
    .floating-actions,
    .checklist-hide-btn,
    .delete-user-btn,
    .user-filter-container {
        display: none !important;
    }

    .main-content {
        margin-left: 0 !important;
        padding: 0 !important;
        background: white !important;
    }

    body {
        background: white !important;
        color: black !important;
    }

    .view-section {
        display: none !important;
    }

    .view-section.active {
        display: block !important;
    }

    .card {
        break-inside: avoid;
        border: 1px solid #ddd !important;
        background: white !important;
        color: black !important;
        box-shadow: none !important;
    }

    .task-title,
    .timeline-label {
        color: black !important;
    }

    .badge {
        border: 1px solid #ccc !important;
    }

    .detailed-timeline {
        padding: 20px;
    }

    .timeline-event {
        break-inside: avoid;
    }
}

/* Teams & Profiles Styling */
.teams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.team-card {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
}

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

.team-members {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.member-tag {
    background: var(--bg-base);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 0.3rem 0.8rem;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.remove-member {
    cursor: pointer;
    color: var(--danger);
    font-weight: bold;
}

.add-member-form {
    display: flex;
    gap: 0.5rem;
}

.add-member-form input {
    flex: 1;
    padding: 0.4rem;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: var(--bg-base);
    color: var(--text-primary);
}

.profile-editor {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

/* Modern Journey Dashboard Styles */
.journey-dashboard {
    margin-top: 1rem;
}

.journey-card {
    background: var(--bg-surface-elevated);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2rem;
    transition: transform 0.3s var(--curve), box-shadow 0.3s var(--curve);
}

.journey-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--glass-shadow);
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-bottom: 1rem;
    transition: all 0.5s ease;
}

#workingTimerDisplay {
    font-family: 'JetBrains Mono', monospace;
    font-size: 3rem;
    font-weight: 800;
    margin: 1.5rem 0;
    color: var(--primary);
    letter-spacing: -1px;
    text-shadow: 0 0 20px rgba(99, 102, 241, 0.2);
}

.punch-action-btn {
    width: 100%;
    height: 64px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 16px;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.vertical-timeline {
    margin-top: 2rem;
}

.timeline-item::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 10px;
    bottom: -10px;
    width: 2px;
    background: var(--border-color);
    z-index: 0;
}

.timeline-item:last-child::after {
    display: none;
}

.t-bullet {
    z-index: 1;
    position: relative;
    border: 2px solid var(--bg-card);
}

.jouney-metrics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 2rem;
}

.j-metric {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.j-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1px;
}

.j-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
}

.journey-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.journey-actions .secondary-btn {
    flex: 1;
    height: 48px;
}

/* Theme adaptation refinements */
.dark-theme .journey-card {
    background: rgba(15, 23, 42, 0.6);
}

.light-theme .journey-card {
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
}

.profile-photo-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.profile-photo-preview {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--bg-base);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    border: 3px solid var(--primary);
    overflow: hidden;
}

.assignee-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 10px;
    right: 40px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
}

.card-assignee {
    position: relative;
    pointer-events: none;
}