/* Reset e Variáveis CSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --accent-blue: #3b82f6;
    --accent-purple: #8b5cf6;
    --accent-green: #10b981;
    --accent-orange: #f59e0b;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --border-color: #475569;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.3);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.4);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.5);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: var(--text-primary);
    min-height: 100vh;
    /* Changed from height to min-height for dashboard scroll */
    overflow-x: hidden;
    /* Changed from overflow: hidden to allow dashboard scroll */
    display: flex;
    flex-direction: column;
}

/* View Management */
.view-section {
    display: none;
    width: 100%;
    height: 100%;
    flex-direction: column;
    flex: 1;
}

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

/* Login View */
#loginView {
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, #1e293b 0%, #0f172a 100%);
}

.login-card {
    background: #19253C;
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    padding: 3rem;
    border-radius: 16px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: var(--shadow-xl);
}

.login-header h1 {
    font-size: 2rem;
    justify-content: center;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: white;
    color: #333;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: transform 0.2s;
}

.google-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.google-btn img {
    width: 24px;
    height: 24px;
}

/* Dashboard View */
.dashboard-header {
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 2rem;
}

.dashboard-header .header-content {
    justify-content: space-between;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--accent-blue);
}

.dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
}

.dashboard-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.boards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.board-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    cursor: pointer;
    user-select: none;
    /* Prevent text selection feeling like a click issue */
    transition: all 0.2s;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.board-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-blue);
    box-shadow: var(--shadow-lg);
}

.board-card:active {
    transform: scale(0.98);
    transition: transform 0.1s;
}

.board-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.board-card p {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.board-meta {
    margin-top: 1rem;
    display: flex;
    gap: -0.5rem;
    align-items: center;
}

header {
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem 2rem;
    flex-shrink: 0;
    /* Não encolhe */
    z-index: 100;
    box-shadow: var(--shadow-md);

}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

h1 {
    font-size: 1.75rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-stats {
    display: flex;
    gap: 2rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stat-number {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.125rem;
}

/* Kanban Board */
.kanban-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
    flex: 1;
    /* Ocupa todo o espaço restante abaixo do header */
    overflow: hidden;
    /* Evita scroll no container principal */
    display: flex;
    flex-direction: column;
    height: 100vh !important;
}

.kanban-board {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    height: 80vh !important;
    /* Força altura total */
}

/* Column Styles */
.kanban-column {
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    height: 100%;
    /* Ocupa toda altura disponível na grid */
    min-height: 0;
    /* Permite encolher se necessário (flexbox fix) */
    transition: all 0.3s ease;
}

.kanban-column:hover {
    border-color: var(--accent-blue);
    box-shadow: var(--shadow-lg);
}

.column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
    flex-shrink: 0;

}

.column-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.125rem;
    font-weight: 600;
}

.column-badge {
    background: rgba(59, 130, 246, 0.2);
    color: var(--accent-blue);
    padding: 0.25rem 0.625rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    min-width: 1.5rem;
    text-align: center;
}

.column-todo .column-badge {
    background: rgba(148, 163, 184, 0.2);
    color: var(--text-secondary);
}

.column-progress .column-badge {
    background: rgba(139, 92, 246, 0.2);
    color: var(--accent-purple);
}

.column-done .column-badge {
    background: rgba(16, 185, 129, 0.2);
    color: var(--accent-green);
}

/* Task List */
.task-list {
    flex: 1;
    /* Ocupa todo o espaço restante na coluna */
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.5rem 0;
    overflow-y: auto;
    /* Scroll apenas aqui */
    min-height: 250px;

    /* Importante para o scroll funcionar dentro de flex */
}

.task-list.drag-over {
    background: rgba(59, 130, 246, 0.1);
    border: 2px dashed var(--accent-blue);
    border-radius: 8px;
}

.task-list:empty::before {
    content: "Arraste tarefas para cá";
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-secondary);
    font-size: 0.875rem;
    opacity: 0.5;
}

/* Task Card */
.task-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    cursor: grab;
    transition: all 0.2s ease;
    animation: slideIn 0.3s ease;
}

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

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

.task-card:hover {
    border-color: var(--accent-blue);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.task-card.dragging {
    opacity: 0.5;
    cursor: grabbing;
    border-color: var(--accent-blue);
    box-shadow: var(--shadow-xl);
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.task-title {
    flex: 1;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.5;
    word-wrap: break-word;
}

.task-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    line-height: 1.5;
}

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

.task-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-size: 1rem;
    width: 1.75rem;
    height: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.task-btn:hover {
    background: rgba(59, 130, 246, 0.2);
    color: var(--accent-blue);
}

.task-btn.delete:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.task-meta {
    display: flex;
    justify-content: space-between;
    /* Ajustado para separar badge e data */
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-color);
}

.task-time {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Priority Badges */
.priority-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.priority-badge {
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.priority-high {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    /* Vermelho */
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.priority-medium {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    /* Amarelo/Laranja */
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.priority-low {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    /* Verde */
    border: 1px solid rgba(16, 185, 129, 0.2);
}

/* Add Task Button */
.add-task-btn {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    margin-top: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: var(--shadow-sm);
}

.add-task-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.add-task-btn:active {
    transform: translateY(0);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.modal-header {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

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

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

.form-input {
    width: 100%;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem;
    color: var(--text-primary);
    font-size: 0.875rem;
    font-family: inherit;
    transition: all 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

textarea.form-input {
    resize: vertical;
    min-height: 100px;
}

.modal-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.btn {
    flex: 1;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--border-color);
}

/* Mobile Menu Elements - Hidden on Desktop */
.menu-toggle-btn,
.menu-overlay,
.side-menu {
    display: none;
    /* !Important para garantir que não apareça no desktop acidentalmente */
}

.side-menu-header {
    width: 100%;
    padding: 15px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

.login-logo {
    width: 100px !important;
    height: 100px !important;
    margin-bottom: 0px;
    border-radius: 16px;
    /* Optional: matches the image's rounded look if needed */
    /* Glow effect matching accent */
}

.header-logo {
    height: 40px;
    width: auto;
    border-radius: 8px;
}

/* Responsive Design - Mobile Side Menu */
@media (max-width: 768px) {
    header {
        display: none;
        /* Esconde header desktop */
    }

    .header-content,
    .header-stats {
        display: none;
    }

    /* Toggle Button - Agora dentro do header */
    .menu-toggle-btn {
        display: flex;
        position: static;
        z-index: 10;
        background: transparent;
        backdrop-filter: none;
        border: none;
        color: var(--text-primary);
        padding: 0.5rem;
        border-radius: 8px;
        font-size: 1.5rem;
        cursor: pointer;
        align-items: center;
        justify-content: center;
        width: auto;
        height: auto;
        box-shadow: none;
        margin-left: auto;
    }

    .menu-toggle-btn:active {
        transform: scale(0.95);
        background: rgba(255, 255, 255, 0.1);
    }

    /* Overlay */
    .menu-overlay {
        display: block;
        /* Controlado via opacity e visibility pelo JS para animar */
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.6);
        backdrop-filter: blur(3px);
        z-index: 1150;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .menu-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    /* Side Menu Container */
    .side-menu {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        left: 0;
        width: 85%;
        max-width: 300px;
        height: 100%;
        background: var(--bg-secondary);
        z-index: 1200;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: var(--shadow-xl);
        border-right: 1px solid var(--border-color);
    }

    .side-menu.active {
        display: flex;
        /* Garante display */
        transform: translateX(0);
    }

    /* Side Menu Content */
    .side-menu-header {
        padding: 2rem 1.5rem;
        background: rgba(15, 23, 42, 0.5);
        border-bottom: 1px solid var(--border-color);
        display: flex;
        flex-direction: row;
        justify-content: space-between;
    }

    .side-menu-header2 {
        padding: 2rem 1.5rem;
        background: rgba(15, 23, 42, 0.5);
        border-bottom: 1px solid var(--border-color);
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }

    .side-menu-header h2 {
        font-size: 1.25rem;
        font-weight: 700;
        margin-bottom: 1.5rem;
        background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
    }

    .side-menu-stats {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
        font-size: 0.875rem;
    }

    .side-menu-stats .stat-item {
        color: var(--text-secondary);
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .side-menu-stats .stat-number {
        font-weight: 600;
        color: var(--text-primary);
        background: rgba(51, 65, 85, 0.5);
        padding: 2px 8px;
        border-radius: 12px;
        font-size: 0.75rem;
    }

    .side-menu-nav {
        padding: 1.5rem;
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        overflow-y: auto;
    }

    .side-nav-btn {
        display: flex;
        align-items: center;
        gap: 1rem;
        padding: 1rem;
        background: transparent;
        border: 1px solid transparent;
        color: var(--text-secondary);
        font-size: 1rem;
        font-weight: 600;
        border-radius: 12px;
        cursor: pointer;
        width: 100%;
        text-align: left;
        transition: all 0.2s;
    }

    .side-nav-btn:hover {
        background: var(--bg-primary);
        color: var(--text-primary);
    }

    .side-nav-btn.active {
        background: rgba(59, 130, 246, 0.1);
        color: var(--accent-blue);
        border-color: rgba(59, 130, 246, 0.2);
    }

    .side-nav-btn .nav-icon {
        font-size: 1.25rem;
        width: 24px;
        text-align: center;
    }

    /* Container Principal Mobile - Fullscreen */
    /* Container Principal Mobile - Fullscreen */
    .kanban-container {
        padding: 0;
        margin: 0;
        width: 100%;
        max-width: 100%;
        height: 100vh;
        overflow: hidden;
        margin-bottom: 0;
    }

    .kanban-board {
        display: block;
        height: 100%;
        width: 100%;
    }

    /* Colunas Mobile */
    .kanban-column {
        display: none;
        height: 100vh !important;
        width: 100%;
        /* Top padding maior para o botão toggle nao tapar conteudo */
        border-radius: 0;
        border: none;
        background: transparent;
        padding: 0px;
        padding-left: 10px;
        padding-right: 10px;
        padding-top: 10px;
    }

    .kanban-column.active {
        display: flex;
        animation: fadeIn 0.3s ease;
    }

    .task-list {
        /* Garante que a lista de tarefas tenha scroll adequado */
        padding-bottom: 4rem;
        padding-top: 5px;
        margin-top: 0px;
    }

    /* Floating Action Button (FAB) for Add Task on Mobile */
    .add-task-btn {
        position: fixed;
        bottom: 6rem;
        right: 2rem;
        width: 3.5rem;
        height: 3.5rem;
        border-radius: 50%;
        padding: 0;
        margin: 0;
        font-size: 0;
        /* Hide text */
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: var(--shadow-lg);
        z-index: 100;
        gap: 0;
    }

    .column-header {
        margin-bottom: 0px;

    }

    .add-task-btn span {
        font-size: 1.5rem;
        margin-right: 0;
    }

    #inviteMemberForm .form-group {
        display: flex;
        flex-direction: column;

    }

    .member-item {
        display: flex;
        flex-direction: column;

        justify-content: space-between;
    }

    .spanOculto {
        display: none;
    }

    #createBoardBtn {
        width: auto !important;
        max-width: 100px !important;
    }

    .task-search-input {
        margin-top: 15px;
    }
}

.btn.btn-secondary {
    min-width: 150px;
}

/* Member Management Styles */
.members-list-container {
    margin-bottom: 2rem;

    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-primary);
    height: 300px;
}

.members-list {
    list-style: none;
}

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

.member-item:last-child {
    border-bottom: none;
}

.member-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.member-details {
    display: flex;
    flex-direction: column;
}

.member-name {
    font-weight: 500;
    color: var(--text-primary);
}

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

.member-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.role-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.role-admin {
    background: rgba(139, 92, 246, 0.2);
    color: var(--accent-purple);
}

.role-viewer {
    background: rgba(148, 163, 184, 0.2);
    color: var(--text-secondary);
}

.invite-section {
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
}

.invite-section h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

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

::-webkit-scrollbar-track {
    background: rgba(30, 41, 59, 0.5);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 4px;
    transition: background 0.2s;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--border-color);
}

/* Member Management Styles */
.members-list-container {
    height: 100%;
    overflow-y: auto;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.5rem;
    height: 300px;
}

.member-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.member-item:last-child {
    border-bottom: none;
}

.member-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.member-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    /* Default size */
}

.member-avatar.pending {
    background: var(--warning);
    color: white;
    font-weight: bold;
    font-size: 16px;
    /* Ensuring ? is visible */
    line-height: 1;
}

.member-name {
    font-weight: 500;
    color: var(--text-primary);
}

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

.member-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.role-select {
    padding: 0.25rem;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    font-size: 0.8rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    padding: 0.2rem;
    opacity: 0.6;
    transition: opacity 0.2s;
}

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

.role-badge {
    background: var(--bg-secondary);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
}

/* Trash Sidebar (Right) */
.side-menu-right {
    position: fixed;
    top: 0;
    right: 0;
    width: 350px;
    max-width: 85vw;
    height: 100vh;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border-color);
    box-shadow: -4px 0 15px rgba(0, 0, 0, 0.5);
    z-index: 1200;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.side-menu-right.active {
    transform: translateX(0);
}

.trash-fab {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    color: white;
    border: none;
    font-size: 1.5rem;
    display: none;
    /* Flex required for toggling via display:none in logic */
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-xl);
    z-index: 1000;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.trash-fab:hover {
    transform: scale(1.1) rotate(-5deg);
}

.trash-fab:active {
    transform: scale(0.95);
}

.trash-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: white;
    color: #ef4444;
    font-size: 0.75rem;
    font-weight: bold;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-primary);
}

.trash-list-container {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.trash-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.trash-item {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
    margin-bottom: 0.5rem;
}

.trash-item:hover {
    border-color: #ef4444;
    transform: translateX(-2px);
    box-shadow: var(--shadow-sm);
}

.trash-info {
    flex: 1;
}

.trash-info strong {
    color: var(--text-primary);
    display: block;
    margin-bottom: 0.2rem;
}



/* Loading Overlay */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg-primary);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.loading-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Task Search */
.column-search {
    padding: 0 1rem 0.5rem;
    width: 170px;
}

.task-search-input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: box-shadow 0.2s;
}

.task-search-input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.task-card.hidden {
    display: none !important;
}