/* ==========================================================================
   Antigravity CSS Design System - Glassmorphic Dark Theme
   ========================================================================== */

:root {
    /* Color Palette */
    --bg-main: #0a0712;
    --bg-card: rgba(22, 17, 39, 0.65);
    --bg-card-hover: rgba(33, 26, 59, 0.8);
    --bg-sidebar: rgba(13, 10, 24, 0.85);
    --border-color: rgba(255, 255, 255, 0.07);
    --border-color-glow: rgba(139, 92, 246, 0.25);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    /* Accents (HSL Tailored) */
    --primary: #8b5cf6;
    --primary-hover: #a78bfa;
    --primary-glow: rgba(139, 92, 246, 0.4);
    --gradient-primary: linear-gradient(135deg, #8b5cf6 0%, #d946ef 100%);
    --gradient-glow: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(217, 70, 239, 0.15) 100%);
    
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #0ea5e9;
    
    /* Layout Configurations */
    --sidebar-width: 280px;
    --navbar-height: 70px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Basics */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    line-height: 1.5;
}

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

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.1);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

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

/* --- Screens Configuration --- */
.screen {
    display: none;
    height: 100vh;
    width: 100vw;
    position: relative;
}

.screen.active {
    display: block;
}

/* --- Login Screen --- */
#login-screen {
    display: none;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at top right, #1e1145, #080511 60%);
}

#login-screen.active {
    display: flex;
}

.login-glow {
    position: absolute;
    width: 400px;
    height: 400px;
    background: var(--primary);
    filter: blur(150px);
    opacity: 0.15;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.login-card {
    width: 100%;
    max-width: 450px;
    padding: 40px;
    border-radius: var(--radius-lg);
    background: rgba(20, 15, 38, 0.7);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    animation: fadeIn 0.5s ease;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 15px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-icon {
    font-size: 1.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: initial;
    -webkit-text-fill-color: initial;
    color: #fff;
    padding: 8px;
    border-radius: var(--radius-sm);
}

.login-header h2 {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

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

/* Form elements */
.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.input-group label i {
    margin-right: 5px;
}

.form-input, .form-select, .form-textarea, input[type="text"], input[type="email"], input[type="password"], input[type="date"], input[type="datetime-local"], select, textarea {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition);
}

select option {
    background-color: #1e1e2f !important;
    color: #ffffff !important;
}

.form-input:focus, .form-select:focus, input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.07);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: var(--gradient-primary);
    color: #fff;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.btn-primary:hover {
    opacity: 0.95;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.5);
    transform: translateY(-1px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--border-color);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}

.btn-danger:hover {
    opacity: 0.9;
}

.btn-primary-outline {
    background: transparent;
    border-color: var(--primary);
    color: var(--primary-hover);
}

.btn-primary-outline:hover {
    background: var(--primary-glow);
}

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

.btn-secondary-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.btn-block {
    display: flex;
    width: 100%;
}

.btn-xs {
    padding: 5px 10px;
    font-size: 0.75rem;
    border-radius: 4px;
}

.btn-icon-only {
    padding: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.btn-icon-only:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 3px 8px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
}

.badge-primary { background: var(--primary-glow); color: var(--primary-hover); }
.badge-success { background: rgba(16, 185, 129, 0.15); color: var(--success); }
.badge-warning { background: rgba(245, 158, 11, 0.15); color: var(--warning); }
.badge-danger { background: rgba(239, 68, 68, 0.15); color: var(--danger); }

/* --- App Screen Layout --- */
#app-screen {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.navbar {
    height: var(--navbar-height);
    background: var(--bg-sidebar);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 10;
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.navbar-left .logo {
    margin-bottom: 0 !important;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Telegram badge button */
.telegram-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.telegram-badge.unlinked {
    background: rgba(14, 165, 233, 0.1);
    border: 1px solid rgba(14, 165, 233, 0.3);
    color: var(--info);
}

.telegram-badge.unlinked:hover {
    background: rgba(14, 165, 233, 0.2);
    box-shadow: 0 0 10px rgba(14, 165, 233, 0.2);
}

.telegram-badge.linked {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--success);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.user-profile i {
    font-size: 1.1rem;
    color: var(--primary-hover);
}

.app-layout {
    display: flex;
    flex: 1;
    overflow: hidden;
    height: calc(100vh - var(--navbar-height));
}

/* --- Sidebar --- */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 20px 15px;
    flex-shrink: 0;
}

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

.sidebar-header h3 {
    font-size: 0.9rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 700;
    letter-spacing: 0.05em;
}

.search-box {
    position: relative;
    margin-bottom: 15px;
}

.search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.85rem;
}

.search-box input {
    padding-left: 32px;
    font-size: 0.85rem;
    height: 36px;
    padding-top: 0;
    padding-bottom: 0;
}

.project-list-container {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 15px;
}

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

.nav-list li {
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: var(--transition);
    margin-bottom: 4px;
}

.nav-list li:hover {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
}

.nav-list li.active {
    background: var(--primary-glow);
    color: var(--text-primary);
    font-weight: 500;
    border-left: 3px solid var(--primary);
    padding-left: 9px;
}

.sidebar-footer {
    border-top: 1px solid var(--border-color);
    padding-top: 15px;
}

.sidebar-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.sidebar-menu-item:hover {
    background: rgba(255, 255, 255, 0.03);
    color: #fff;
}

.sidebar-menu-item.active {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-weight: 500;
}

/* --- Main Work Area --- */
.main-content {
    flex: 1;
    overflow-y: auto;
    background: radial-gradient(circle at bottom left, #0e0a24, #05030b 70%);
    padding: 30px;
    position: relative;
}

.view-panel {
    display: none;
    animation: fadeIn 0.4s ease;
}

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

.project-view-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 25px;
}

.project-info h1 {
    font-size: 1.85rem;
    margin-bottom: 8px;
    background: linear-gradient(to right, #fff, var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.project-info p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 12px;
    max-width: 800px;
}

.project-meta-row {
    display: flex;
    align-items: center;
    gap: 15px;
}

.meta-item {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.project-actions {
    display: flex;
    gap: 10px;
}

/* Sprint bar */
.sprint-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 25px;
}

.sprint-selector-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sprint-selector-group label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.sprint-selector-group select {
    width: 250px;
    height: 38px;
    padding-top: 0;
    padding-bottom: 0;
}

.sprint-dates {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* --- Kanban Board Grid --- */
.kanban-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    align-items: start;
}

.kanban-column {
    background: rgba(20, 15, 38, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-md);
    padding: 15px;
    min-height: 500px;
    display: flex;
    flex-direction: column;
}

.column-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.column-header h3 {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-secondary);
}

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

.column-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
    min-height: 400px;
}

/* Task Card */
.task-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 16px;
    cursor: pointer;
    position: relative;
    transition: var(--transition);
    user-select: none;
}

.task-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-color-glow);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.1);
    transform: translateY(-2px);
}

.task-card.stagnant {
    border-left: 3px solid var(--warning);
}

.task-card.overdue {
    border-left: 3px solid var(--danger);
}

.task-title {
    font-size: 0.925rem;
    font-weight: 500;
    margin-bottom: 10px;
    color: var(--text-primary);
    line-height: 1.4;
}

.task-desc-excerpt {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.task-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255,255,255,0.04);
    padding-top: 10px;
    font-size: 0.75rem;
}

.task-assignee {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--text-secondary);
}

.task-assignee i {
    color: var(--text-muted);
}

.task-meta-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-stagnant-indicator {
    color: var(--warning);
    font-size: 0.75rem;
}

/* Handover Grid */
.handover-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-top: 25px;
}

.panel-card {
    border-radius: var(--radius-md);
    padding: 25px;
}

.panel-card.danger-border {
    border-color: rgba(239, 68, 68, 0.2);
}

.card-header {
    margin-bottom: 20px;
}

.card-header h2 {
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-layout {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

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

.form-group label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

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

.form-row .col {
    flex: 1;
}

.form-row.col-7 { width: 58.33%; }
.form-row.col-3 { width: 25%; }
.form-row.col-2 { width: 16.66%; }

.mt-3 { margin-top: 30px; }
.mt-1 { margin-top: 10px; }
.mb-2 { margin-bottom: 20px; }

/* Tables styling */
.table-container {
    overflow-x: auto;
    width: 100%;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.875rem;
}

.data-table th, .data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    font-weight: 600;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.01);
}

.data-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* Modal Backdrops */
.modal-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(3, 2, 7, 0.7);
    backdrop-filter: blur(8px);
    z-index: 100;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal-backdrop.active {
    display: flex;
}

.modal-content {
    width: 100%;
    max-width: 650px;
    border-radius: var(--radius-lg);
    padding: 30px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

.modal-close-btn:hover {
    color: #fff;
}

.modal-body h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.modal-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 25px;
    background: rgba(255,255,255,0.01);
    padding: 15px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.meta-item-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.meta-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.form-select-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: #fff;
    cursor: pointer;
}

.modal-section {
    margin-bottom: 20px;
}

.modal-section h3 {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.form-textarea {
    resize: vertical;
}

.modal-divider {
    border: 0;
    border-top: 1px solid var(--border-color);
    margin: 20px 0;
}

/* Blocker/Issue components in Modal */
.section-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.collapsed {
    display: none !important;
}

.issues-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 15px;
}

.issue-item {
    background: rgba(239, 68, 68, 0.03);
    border: 1px solid rgba(239, 68, 68, 0.15);
    border-radius: var(--radius-sm);
    padding: 15px;
}

.issue-item.resolved {
    background: rgba(16, 185, 129, 0.03);
    border: 1px solid rgba(16, 185, 129, 0.15);
}

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

.issue-item-header h4 {
    font-size: 0.9rem;
    color: var(--text-primary);
}

.issue-item-body {
    font-size: 0.825rem;
    color: var(--text-secondary);
}

.issue-item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid rgba(255,255,255,0.03);
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Telegram integration in modal */
.telegram-logo-large {
    font-size: 4rem;
    color: var(--info);
    margin-bottom: 15px;
    text-shadow: 0 0 20px rgba(14, 165, 233, 0.3);
}

.telegram-instructions {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border-color);
    padding: 15px 20px;
    border-radius: var(--radius-sm);
    margin: 20px 0;
}

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

.telegram-instructions ol {
    margin-left: 20px;
}

.telegram-instructions li {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

/* Toast System */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: rgba(20, 15, 38, 0.9);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    border-left: 4px solid var(--primary);
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    font-size: 0.85rem;
    animation: slideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 250px;
    max-width: 400px;
}

.toast.success { border-left-color: var(--success); }
.toast.warning { border-left-color: var(--warning); }
.toast.danger { border-left-color: var(--danger); }

/* --- Developer Test Trigger Widget --- */
.test-triggers-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 90;
    background: rgba(13, 10, 24, 0.95);
    border: 1px solid var(--border-color-glow);
    border-radius: var(--radius-md);
    width: 230px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    overflow: hidden;
}

.widget-header {
    background: var(--bg-card);
    padding: 8px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}

.widget-body {
    padding: 12px;
    display: flex;
    flex-direction: column;
}

/* Role restriction styling utility */
.pm-only, .pm-lead-only {
    display: none !important;
}

body.role-pm .pm-only {
    display: flex !important;
}
body.role-pm select.pm-only, body.role-pm button.pm-only {
    display: inline-block !important;
}
body.role-pm tr.pm-only {
    display: table-row !important;
}

body.role-pm .pm-lead-only, body.role-lead .pm-lead-only, body.role-tech_lead .pm-lead-only {
    display: flex !important;
}
body.role-pm button.pm-lead-only, body.role-lead button.pm-lead-only, body.role-tech_lead button.pm-lead-only {
    display: inline-block !important;
}

/* Form inputs restriction logic */
body.role-staff .pm-lead-only-field {
    pointer-events: none !important;
    opacity: 0.6;
}
body.global-admin .pm-lead-only-field {
    pointer-events: auto !important;
    opacity: 1 !important;
}

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

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

@keyframes slideIn {
    from { transform: translateX(100px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* --- Workspace Feature UI Styles --- */
#workspace-screen {
    display: none;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at top right, #1e1145, #080511 60%);
}

#workspace-screen.active {
    display: flex;
}

.workspace-list-container {
    max-height: 250px;
    overflow-y: auto;
    margin: 20px 0;
    padding-right: 5px;
}

.workspace-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.workspace-card:hover {
    background: rgba(108, 92, 231, 0.1);
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(108, 92, 231, 0.2);
    transform: translateY(-2px);
}

.workspace-card-info h3 {
    margin: 0 0 5px 0;
    font-size: 1.1rem;
    color: #fff;
}

.workspace-card-info p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.workspace-card-role {
    font-size: 0.75rem;
    padding: 3px 8px;
    background: rgba(108, 92, 231, 0.2);
    border: 1px solid var(--primary-light);
    color: var(--primary-light);
    border-radius: 12px;
    font-weight: bold;
}

/* Navbar Switcher Dropdown */
.workspace-switcher-container {
    margin-left: 20px;
    padding-left: 20px;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
}

.navbar-workspace-select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    border-radius: 6px;
    padding: 5px 30px 5px 10px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 14px;
    min-width: 180px;
}

.navbar-workspace-select:hover, .navbar-workspace-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(108, 92, 231, 0.2);
    background-color: rgba(255, 255, 255, 0.08);
    outline: none;
}

.navbar-workspace-select option {
    background: #0f0a28;
    color: #fff;
}

.navbar-workspace-label {
    color: rgba(255, 255, 255, 0.6);
    margin-right: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Fixed Header & Footer Modal Layout for Task Details */
#task-modal .modal-content {
    display: flex !important;
    flex-direction: column !important;
    max-height: 85vh !important;
    overflow: hidden !important;
    padding: 0 !important;
}

#task-modal .modal-header {
    flex-shrink: 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

#task-modal .modal-body {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px;
}

#task-modal .modal-footer {
    flex-shrink: 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 12px 20px;
    background: rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* System Admin User Management Styles */
.global-admin-only {
    display: none !important;
}
body.global-admin .global-admin-only {
    display: flex !important;
}

.badge-success {
    background: rgba(46, 213, 115, 0.15);
    color: #2ed573;
    border: 1px solid rgba(46, 213, 115, 0.3);
}

.badge-danger {
    background: rgba(255, 71, 87, 0.15);
    color: #ff4757;
    border: 1px solid rgba(255, 71, 87, 0.3);
}

.btn-danger-outline {
    background: transparent;
    border: 1px solid #ff4757;
    color: #ff4757;
    transition: var(--transition);
}
.btn-danger-outline:hover {
    background: #ff4757;
    color: #fff;
}

/* ==========================================================================
   Task Attachments — Media Grid (Images + Videos)
   ========================================================================== */

.task-attachments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 10px;
    margin-top: 4px;
}

.task-attachment-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    group: true;
}

.task-attachment-item:hover {
    transform: scale(1.04);
    box-shadow: 0 6px 24px rgba(108, 92, 231, 0.35);
    border-color: var(--accent-primary);
}

/* Image thumbnail */
.task-attachment-item img.attach-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.2s;
}

.task-attachment-item:hover img.attach-thumb {
    opacity: 0.7;
}

/* Video thumbnail wrapper */
.task-attachment-item .attach-video-wrap {
    width: 100%;
    height: 100%;
    position: relative;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.task-attachment-item .attach-video-wrap video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.task-attachment-item .attach-video-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.45);
    gap: 4px;
}

.task-attachment-item .attach-video-overlay i {
    font-size: 1.8rem;
    color: rgba(255, 255, 255, 0.9);
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.7));
}

.task-attachment-item .attach-video-overlay span {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.6);
    max-width: 90%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* File type badge overlay */
.task-attachment-item .attach-type-badge {
    position: absolute;
    top: 4px;
    left: 4px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 0.6rem;
    padding: 2px 5px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

/* Delete button — appears on hover */
.task-attachment-item .attach-delete-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 71, 87, 0.85);
    color: #fff;
    font-size: 0.65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s ease, transform 0.15s ease;
    z-index: 5;
    line-height: 1;
}

.task-attachment-item:hover .attach-delete-btn {
    opacity: 1;
    transform: scale(1.1);
}

.task-attachment-item .attach-delete-btn:hover {
    background: #ff2d3b;
}

/* Empty attachments placeholder */
.attachments-empty {
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.82rem;
    text-align: center;
    padding: 16px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

/* Drag-over highlight */
.task-attachments-grid.drag-over {
    background: rgba(108, 92, 231, 0.08);
    border: 2px dashed var(--accent-primary);
    border-radius: 8px;
    padding: 10px;
}

/* ==========================================================================
   Create Task — Drop Zone & Staging Grid
   ========================================================================== */

.ct-dropzone {
    border: 2px dashed rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.025);
    padding: 18px 16px;
    transition: border-color 0.2s ease, background 0.2s ease;
    cursor: default;
}

.ct-dropzone.drag-over,
.ct-dropzone.paste-flash {
    border-color: var(--accent-primary);
    background: rgba(108, 92, 231, 0.08);
    animation: pasteFlash 0.35s ease;
}

@keyframes pasteFlash {
    0%   { box-shadow: 0 0 0 0 rgba(108, 92, 231, 0); }
    50%  { box-shadow: 0 0 0 6px rgba(108, 92, 231, 0.25); }
    100% { box-shadow: 0 0 0 0 rgba(108, 92, 231, 0); }
}

.ct-dropzone-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    pointer-events: none; /* let the dropzone capture events */
}

.ct-dropzone-inner label {
    pointer-events: all; /* but let the label be clickable */
}

/* Staging preview grid */
.ct-staged-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 8px;
    margin-top: 10px;
}

.ct-staged-item {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 7px;
    overflow: hidden;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
}

.ct-staged-item img,
.ct-staged-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ct-staged-item .ct-staged-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.45);
    gap: 3px;
    opacity: 0;
    transition: opacity 0.15s;
}

.ct-staged-item:hover .ct-staged-overlay {
    opacity: 1;
}

.ct-staged-item .ct-staged-overlay i {
    font-size: 1.3rem;
    color: rgba(255,255,255,0.9);
}

.ct-staged-item .ct-staged-overlay span {
    font-size: 0.6rem;
    color: rgba(255,255,255,0.6);
    max-width: 90%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ct-staged-remove {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 71, 87, 0.9);
    color: #fff;
    font-size: 0.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s;
    z-index: 5;
    line-height: 1;
}

.ct-staged-item:hover .ct-staged-remove {
    opacity: 1;
}

/* Paste hint badge — pops up briefly */
.paste-badge {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(108, 92, 231, 0.92);
    color: #fff;
    padding: 7px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 99999;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

.paste-badge.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ==========================================================================
   Document Management Styles
   ========================================================================== */

/* Tabs switching inside project view */
.project-tab-btn {
    opacity: 0.6;
    background: transparent;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: #fff;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.project-tab-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    opacity: 0.9;
}

.project-tab-btn.active {
    background: rgba(108, 92, 231, 0.2);
    color: var(--accent-primary) !important;
    font-weight: 600;
    opacity: 1;
}

/* Folder Tree Sidebar List */
.folder-tree-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.folder-tree-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    transition: background 0.15s, color 0.15s;
    user-select: none;
}

.folder-tree-item:hover {
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
}

.folder-tree-item.active {
    background: rgba(108, 92, 231, 0.15);
    color: #fff;
    font-weight: 500;
    border-left: 3px solid var(--accent-primary);
}

.folder-tree-item .folder-name-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.folder-tree-item .folder-actions {
    opacity: 0;
    transition: opacity 0.15s;
}

.folder-tree-item:hover .folder-actions {
    opacity: 1;
}

.folder-tree-item .folder-actions button {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    padding: 2px 4px;
    font-size: 0.75rem;
    transition: color 0.12s;
}

.folder-tree-item .folder-actions button:hover {
    color: #ff4757;
}

/* Document cards grid view */
.doc-card {
    background: rgba(22, 17, 39, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    position: relative;
    cursor: pointer;
    backdrop-filter: blur(8px);
}

.doc-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(108, 92, 231, 0.15);
    border-color: rgba(108, 92, 231, 0.4);
    background: rgba(22, 17, 39, 0.6);
}

.doc-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.doc-icon-wrap {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.doc-icon-wrap.file-pdf { background: rgba(231, 76, 60, 0.15); color: #e74c3c; }
.doc-icon-wrap.file-image { background: rgba(46, 204, 113, 0.15); color: #2ecc71; }
.doc-icon-wrap.file-video { background: rgba(52, 152, 219, 0.15); color: #3498db; }
.doc-icon-wrap.file-office { background: rgba(241, 196, 15, 0.15); color: #f1c40f; }
.doc-icon-wrap.file-archive { background: rgba(155, 89, 182, 0.15); color: #9b59b6; }
.doc-icon-wrap.file-other { background: rgba(149, 165, 166, 0.15); color: #95a5a6; }
.doc-icon-wrap.doc-link { background: rgba(108, 92, 231, 0.15); color: #a29bfe; }

.doc-delete-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.35);
    cursor: pointer;
    font-size: 0.85rem;
    padding: 4px;
    transition: color 0.15s;
    border-radius: 4px;
    opacity: 0;
}

.doc-card:hover .doc-delete-btn {
    opacity: 1;
}

.doc-delete-btn:hover {
    color: #ff4757;
    background: rgba(255, 71, 87, 0.1);
}

.doc-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    margin: 6px 0 4px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.3;
}

.doc-desc {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.45);
    margin-bottom: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.35;
}

.doc-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.35);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 8px;
    margin-top: auto;
}

.doc-meta-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.doc-meta-right {
    display: flex;
    align-items: center;
    gap: 5px;
}

.doc-badge-link {
    background: rgba(108, 92, 231, 0.15);
    color: #a29bfe;
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 500;
    text-transform: uppercase;
}

.doc-badge-file {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255,255,255,0.7);
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 500;
    text-transform: uppercase;
}

/* Empty documents style */
.docs-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.9rem;
    border: 2px dashed rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.docs-empty i {
    font-size: 2.2rem;
    color: rgba(255, 255, 255, 0.15);
}

/* Tag filter button */
.tag-filter-chip {
    padding: 3px 8px;
    font-size: 0.72rem;
    border-radius: 4px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.15s;
    user-select: none;
}

.tag-filter-chip:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.tag-filter-chip.active {
    background: var(--tag-color, #00b4d8);
    color: #000;
    font-weight: 600;
    border-color: transparent;
}

/* Media Object Card & Project Accordion tree */
#doc-cards-grid, #ws-doc-cards-grid, .doc-cards-grid-media {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.doc-card-media {
    display: flex;
    background: rgba(22, 17, 39, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 12px;
    gap: 15px;
    align-items: center;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    cursor: pointer;
    backdrop-filter: blur(8px);
    position: relative;
}

.doc-card-media:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.15);
    border-color: rgba(108, 92, 231, 0.4);
    background: rgba(22, 17, 39, 0.6);
}

.doc-card-media-thumb {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.doc-card-media-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.doc-card-media-thumb i {
    font-size: 1.8rem;
}

.doc-card-media-details {
    flex-grow: 1;
    min-width: 0; /* truncate child text */
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.doc-card-media-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.doc-card-media-title {
    font-size: 0.92rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.doc-card-media-desc {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.doc-card-media-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.35);
    margin-top: 4px;
}

.doc-card-media-meta-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.doc-card-media-meta-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Accordion Project Tree List in Workspace Docs sidebar */
.tree-node-project {
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 6px;
}

.tree-node-project-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    transition: background 0.15s, color 0.15s;
}

.tree-node-project-header:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.tree-node-project-header.active {
    background: rgba(108, 92, 231, 0.15);
    border-color: rgba(108, 92, 231, 0.3);
    color: #fff;
}

.tree-node-project-children {
    display: none;
    padding-left: 15px;
    margin-top: 4px;
    flex-direction: column;
    gap: 3px;
}

.tree-node-project-children.open {
    display: flex;
}

.tree-node-project-toggle-icon {
    font-size: 0.75rem;
    transition: transform 0.2s;
    color: rgba(255, 255, 255, 0.4);
}

.tree-node-project-children.open + .tree-node-project-toggle-icon,
.tree-node-project-toggle-icon.open {
    transform: rotate(90deg);
}

/* ==========================================================================
   Task Checklist Section Styles
   ========================================================================== */
.checklist-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.checklist-item:hover {
    background: rgba(108, 92, 231, 0.05);
    border-color: rgba(108, 92, 231, 0.2);
}

.checklist-item.done {
    background: rgba(255, 255, 255, 0.01);
}

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

.checklist-drag-handle {
    cursor: grab;
    color: var(--text-muted);
    opacity: 0.3;
    padding: 2px 4px;
    transition: opacity 0.2s;
}

.checklist-item:hover .checklist-drag-handle {
    opacity: 0.8;
}

.checklist-drag-handle:active {
    cursor: grabbing;
}

.checklist-toggle-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.75rem;
    padding: 4px;
    transition: transform 0.2s, color 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.checklist-toggle-btn:hover {
    color: var(--text-primary);
}

.checklist-toggle-btn.open {
    transform: rotate(90deg);
}

.checklist-item-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.checklist-item-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checklist-title-span {
    font-size: 0.875rem;
    color: var(--text-primary);
    word-break: break-word;
    user-select: none;
}

.checklist-desc-div {
    font-size: 0.8rem;
    color: var(--text-secondary);
    padding-left: 2px;
    margin-top: 4px;
    display: none;
    border-left: 2px solid rgba(108, 92, 231, 0.3);
    padding-left: 8px;
}

.checklist-desc-div.open {
    display: block;
}

.checklist-item-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.2s;
}

.checklist-item:hover .checklist-item-actions {
    opacity: 1;
}

.checklist-action-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.8rem;
    padding: 4px;
    border-radius: 4px;
    transition: var(--transition);
}

.checklist-action-btn.edit {
    color: var(--text-secondary);
}

.checklist-action-btn.edit:hover {
    color: var(--info);
    background: rgba(14, 165, 233, 0.1);
}

.checklist-action-btn.delete {
    color: var(--text-muted);
}

.checklist-action-btn.delete:hover {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
}

.checklist-inline-edit-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
}

.checklist-inline-input {
    flex: 1;
    padding: 4px 8px;
    font-size: 0.85rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(108, 92, 231, 0.5);
    border-radius: 4px;
    color: var(--text-primary);
}

.checklist-inline-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-glow);
}

.checklist-add-row {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 10px;
}

/* Kanban Card Checklist Badge */
.checklist-card-badge {
    background: rgba(108, 92, 231, 0.15);
    border: 1px solid rgba(108, 92, 231, 0.25);
    color: #a29bfe;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}




