/* Design System & Variables */
:root, [data-theme="dark"] {
    --bg-base: #0a0813;
    --bg-surface: rgba(20, 16, 38, 0.6);
    --bg-surface-hover: rgba(30, 25, 56, 0.8);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-color-glow: rgba(139, 92, 246, 0.4);
    
    /* Core Accents (Tailored Palette) */
    --primary: #8b5cf6;
    --primary-hover: #7c3aed;
    --primary-glow: rgba(139, 92, 246, 0.35);
    
    --success: #10b981;
    --success-glow: rgba(16, 185, 129, 0.2);
    
    --danger: #ef4444;
    --danger-hover: #dc2626;
    --danger-glow: rgba(239, 68, 68, 0.2);
    
    --warning: #f59e0b;
    
    /* Typography colors */
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --text-inverse: #ffffff;
    
    /* Animation transitions */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* Background Ball Gradients */
    --ball-gradient-1: radial-gradient(circle, rgba(139,92,246,0.3) 0%, rgba(99,102,241,0.05) 70%);
    --ball-gradient-2: radial-gradient(circle, rgba(236,72,153,0.2) 0%, rgba(219,39,119,0.02) 70%);

    /* Dynamic element backgrounds */
    --input-bg: rgba(255, 255, 255, 0.04);
    --input-bg-focus: rgba(255, 255, 255, 0.06);
    --modal-overlay-bg: rgba(5, 4, 9, 0.6);
    --column-bg: rgba(255, 255, 255, 0.02);
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-bg-hover: rgba(255, 255, 255, 0.06);
    --sidebar-item-active-bg: rgba(139, 92, 246, 0.15);
    --sidebar-item-hover-bg: rgba(255, 255, 255, 0.04);
    --header-bg: rgba(10, 8, 19, 0.4);
}

[data-theme="light"] {
    --bg-base: #f1f5f9;
    --bg-surface: rgba(255, 255, 255, 0.85);
    --bg-surface-hover: rgba(241, 245, 249, 0.95);
    --border-color: rgba(15, 23, 42, 0.08);
    --border-color-glow: rgba(139, 92, 246, 0.25);
    
    /* Core Accents */
    --primary: #6d28d9;
    --primary-hover: #5b21b6;
    --primary-glow: rgba(109, 40, 217, 0.2);
    
    --success: #059669;
    --success-glow: rgba(5, 150, 105, 0.1);
    
    --danger: #dc2626;
    --danger-hover: #b91c1c;
    --danger-glow: rgba(220, 38, 38, 0.1);
    
    --warning: #d97706;
    
    /* Typography colors */
    --text-main: #0f172a;
    --text-muted: #475569;
    --text-inverse: #ffffff;

    /* Background Ball Gradients */
    --ball-gradient-1: radial-gradient(circle, rgba(139,92,246,0.12) 0%, rgba(99,102,241,0.02) 70%);
    --ball-gradient-2: radial-gradient(circle, rgba(236,72,153,0.08) 0%, rgba(219,39,119,0.01) 70%);

    /* Dynamic element backgrounds */
    --input-bg: rgba(15, 23, 42, 0.03);
    --input-bg-focus: rgba(15, 23, 42, 0.05);
    --modal-overlay-bg: rgba(15, 23, 42, 0.3);
    --column-bg: rgba(15, 23, 42, 0.02);
    --card-bg: rgba(255, 255, 255, 0.9);
    --card-bg-hover: rgba(255, 255, 255, 1);
    --sidebar-item-active-bg: rgba(139, 92, 246, 0.1);
    --sidebar-item-hover-bg: rgba(15, 23, 42, 0.03);
    --header-bg: rgba(255, 255, 255, 0.45);
}

/* Reset and Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--bg-base);
    color: var(--text-main);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

/* Scrollbar customization */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    transition: var(--transition-fast);
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(139, 92, 246, 0.4);
}

/* Glassmorphism utility */
.glass {
    background: var(--bg-surface);
    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.37);
}

/* Animations */
@keyframes pulseGlow {
    0%, 100% { transform: scale(1) translate(0, 0); opacity: 0.6; }
    50% { transform: scale(1.15) translate(3%, 5%); opacity: 0.8; }
}

@keyframes floatBall {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-20px) scale(1.05); }
}

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

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

/* Glowing Background Balls */
.glow-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.ball {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.6;
}

.ball-1 {
    width: 400px;
    height: 400px;
    background: var(--ball-gradient-1);
    top: 10%;
    left: 15%;
    animation: pulseGlow 12s infinite alternate ease-in-out;
}

.ball-2 {
    width: 500px;
    height: 500px;
    background: var(--ball-gradient-2);
    bottom: 10%;
    right: 15%;
    animation: pulseGlow 16s infinite alternate-reverse ease-in-out;
}

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

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover {
    color: var(--primary-hover);
    text-shadow: 0 0 10px var(--primary-glow);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #6366f1 100%);
    color: var(--text-inverse);
    box-shadow: 0 4px 14px 0 var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 0 var(--primary-glow);
    filter: brightness(1.1);
}

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

.btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

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

.btn-danger {
    background: var(--danger);
    color: var(--text-inverse);
    box-shadow: 0 4px 14px 0 var(--danger-glow);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 0 var(--danger-glow);
    background: var(--danger-hover);
}

.btn-block {
    width: 100%;
}

.btn-icon-sm {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.btn-icon-sm:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.08);
}

.hidden {
    display: none !important;
}

/* Forms & Inputs */
.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 18px;
    width: 100%;
}

.input-group label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.input-group input, .input-group textarea, select {
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    padding: 11px 14px;
    border-radius: 8px;
    color: var(--text-main);
    font-size: 14px;
    transition: all var(--transition-fast);
    outline: none;
    width: 100%;
}

.input-group input:focus, .input-group textarea:focus {
    border-color: var(--primary);
    background: var(--input-bg-focus);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.error-msg {
    color: var(--danger);
    font-size: 12px;
    margin-top: 4px;
    display: none;
    animation: fadeIn 0.2s ease-in-out;
}

/* Checkbox */
.checkbox-container {
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 26px;
    margin-bottom: 12px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-muted);
    user-select: none;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 18px;
    width: 18px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    transition: var(--transition-fast);
}

.checkbox-container:hover input ~ .checkmark {
    background-color: rgba(255, 255, 255, 0.1);
}

.checkbox-container input:checked ~ .checkmark {
    background-color: var(--primary);
    border-color: var(--primary);
}

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

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-container .checkmark:after {
    left: 6px;
    top: 2px;
    width: 4px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Alert Boxes */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    animation: fadeIn 0.3s ease;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

/* ==========================================================================
   AUTHENTICATION PAGE
   ========================================================================== */
.auth-page {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.auth-container {
    width: 100%;
    max-width: 440px;
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-card {
    padding: 40px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

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

.logo-icon {
    font-size: 40px;
    color: var(--primary);
    margin-bottom: 12px;
    filter: drop-shadow(0 0 15px var(--primary-glow));
    animation: floatBall 4s infinite ease-in-out;
}

.brand h1 {
    font-size: 28px;
    color: var(--text-main);
    margin-bottom: 6px;
}

.brand h1 span {
    color: var(--primary);
}

.brand p {
    font-size: 14px;
    color: var(--text-muted);
}

.auth-form h2 {
    font-size: 20px;
    margin-bottom: 24px;
    text-align: center;
    font-weight: 600;
}

.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.auth-switch {
    text-align: center;
    margin-top: 24px;
    font-size: 13px;
    color: var(--text-muted);
}

/* ==========================================================================
   DASHBOARD PAGE & SIDEBAR
   ========================================================================== */
.dashboard-page {
    display: flex;
    height: 100vh;
}

.app-layout {
    display: flex;
    width: 100%;
    height: 100%;
}

.sidebar {
    width: 280px;
    height: 100%;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border-color);
    border-radius: 0;
    box-shadow: none;
    z-index: 10;
}

.sidebar-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-header .logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 800;
    color: var(--text-main);
}

.sidebar-header .logo i {
    color: var(--primary);
    filter: drop-shadow(0 0 8px var(--primary-glow));
}

.sidebar-content {
    flex: 1;
    padding: 24px 16px;
    overflow-y: auto;
}

.section-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px;
}

.boards-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.boards-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.boards-list li i {
    font-size: 14px;
    color: var(--text-muted);
}

.boards-list li.active {
    background: var(--sidebar-item-active-bg);
    color: var(--text-main);
    border-left: 3px solid var(--primary);
}

.boards-list li.active i {
    color: var(--primary);
}

.boards-list li:hover:not(.active) {
    background: var(--sidebar-item-hover-bg);
    color: var(--text-main);
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
}

.user-profile .avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(139, 92, 246, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    border: 1px solid var(--border-color-glow);
    flex-shrink: 0;
}

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

.user-profile .user-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.btn-logout {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 18px;
    padding: 8px;
    border-radius: 8px;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

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

/* Skeleton loader list-items */
.skeleton-list-item {
    height: 36px;
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
    margin-bottom: 6px;
    animation: fadeIn 1s infinite alternate;
}

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

.app-header {
    height: 72px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    background: var(--header-bg);
    backdrop-filter: blur(10px);
}

.board-info-header {
    display: flex;
    align-items: center;
    gap: 16px;
}

.board-info-header h2 {
    font-size: 20px;
    color: var(--text-main);
}

.board-actions {
    display: flex;
    gap: 8px;
}

.btn-icon-header {
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.btn-icon-header:hover {
    color: var(--text-main);
    background: rgba(255,255,255,0.08);
}

.btn-icon-header.btn-danger-header:hover {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
}

/* Workspace Canvas */
.board-workspace {
    flex: 1;
    overflow: hidden;
    position: relative;
    padding: 24px 32px;
}

.welcome-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 80%;
    max-width: 450px;
    margin: 0 auto;
    animation: fadeIn 0.4s ease;
}

.welcome-icon {
    font-size: 60px;
    color: var(--text-muted);
    opacity: 0.3;
    margin-bottom: 20px;
}

.welcome-state h3 {
    font-size: 20px;
    margin-bottom: 8px;
}

.welcome-state p {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 24px;
    line-height: 1.5;
}

.kanban-canvas {
    display: flex;
    gap: 20px;
    height: 100%;
    align-items: flex-start;
    overflow-x: auto;
    padding-bottom: 12px;
}

/* Columns */
.kanban-column {
    width: 290px;
    max-height: 100%;
    background: var(--column-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transition: background-color var(--transition-fast), border-color var(--transition-fast);
}

.kanban-column.drag-over {
    background: rgba(139, 92, 246, 0.05);
    border-color: var(--primary);
}

.column-header {
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.column-title-container {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
    flex: 1;
}

.column-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border: 1px solid transparent;
    background: transparent;
    padding: 2px 6px;
    border-radius: 4px;
    width: 100%;
    outline: none;
    transition: var(--transition-fast);
}

.column-title:focus {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.card-count {
    background: rgba(255, 255, 255, 0.08);
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
    color: var(--text-muted);
}

.column-cards {
    flex: 1;
    overflow-y: auto;
    padding: 8px 12px 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 100px;
}

/* Kanban Cards */
.kanban-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 14px;
    cursor: grab;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast);
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
    user-select: none;
}

.kanban-card:hover {
    background: var(--card-bg-hover);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

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

.kanban-card.dragging {
    opacity: 0.4;
    transform: scale(0.98);
}

.card-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.4;
    word-break: break-word;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.tag-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

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

.due-date-badge.overdue {
    color: #fca5a5;
}

.due-date-badge i {
    font-size: 10px;
}

/* Card Add Button / Inline Form */
.column-footer {
    padding: 12px 16px;
}

.btn-add-card-trigger {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 10px;
    border-radius: 6px;
    transition: var(--transition-fast);
}

.btn-add-card-trigger:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-main);
}

.card-add-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    animation: fadeIn 0.2s ease;
}

.card-add-form textarea {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    padding: 10px;
    border-radius: 6px;
    color: var(--text-main);
    font-size: 13px;
    resize: none;
    height: 60px;
    outline: none;
    transition: var(--transition-fast);
}

.card-add-form textarea:focus {
    border-color: var(--primary);
}

.card-add-actions {
    display: flex;
    gap: 6px;
}

/* Drag State Visuals */
.card-ghost {
    background: rgba(139, 92, 246, 0.1);
    border: 1px dashed var(--primary);
    border-radius: 8px;
    height: 60px;
    pointer-events: none;
}

/* ==========================================================================
   MODALS
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 4, 9, 0.6);
    backdrop-filter: blur(8px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    transition: opacity var(--transition-normal);
}

.modal-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-card {
    width: 100%;
    max-width: 480px;
    border-radius: 16px;
    animation: slideUp var(--transition-normal) cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

.modal-card.modal-lg {
    max-width: 680px;
}

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

.modal-header h3 {
    font-size: 18px;
    color: var(--text-main);
}

.modal-title-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.modal-title-wrapper .title-icon {
    font-size: 18px;
    color: var(--text-muted);
}

.modal-title-editable {
    background: transparent;
    border: 1px solid transparent;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-main);
    padding: 2px 8px;
    border-radius: 6px;
    outline: none;
    flex: 1;
    transition: var(--transition-fast);
}

.modal-title-editable:focus {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.btn-close-modal {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    transition: var(--transition-fast);
}

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

.modal-card form {
    padding: 24px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
}

/* Modal Sidebar Layout (Large Modals) */
.modal-body-layout {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    max-height: 70vh;
}

.modal-body-main {
    flex: 1.6;
    padding: 24px;
    overflow-y: auto;
}

.modal-body-sidebar {
    flex: 1;
    padding: 24px;
    background: rgba(255,255,255,0.01);
    border-left: 1px solid var(--border-color);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.detail-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.detail-section h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-body-main textarea {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 14px;
    border-radius: 8px;
    width: 100%;
    height: 180px;
    resize: none;
    outline: none;
    font-size: 14px;
    line-height: 1.5;
    transition: var(--transition-fast);
}

.modal-body-main textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.sidebar-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sidebar-item .label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sidebar-item input {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 8px 12px;
    color: var(--text-main);
    font-size: 13px;
    outline: none;
    transition: var(--transition-fast);
}

.sidebar-item input:focus {
    border-color: var(--primary);
}

.badge-column {
    background: rgba(139, 92, 246, 0.15);
    color: #c084fc;
    border: 1px solid rgba(139, 92, 246, 0.2);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    align-self: flex-start;
}

.tags-preview-container {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}

.actions-item {
    margin-top: auto;
    padding-top: 20px;
}

/* Members List in Share Modal */
#board-members-list {
    margin-top: 10px;
}

#board-members-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
}

#board-members-list li .member-name-email {
    display: flex;
    flex-direction: column;
}

#board-members-list li .member-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
}

#board-members-list li .member-email {
    font-size: 12px;
    color: var(--text-muted);
}

#board-members-list li .member-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

#board-members-list li .member-role {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(139, 92, 246, 0.1);
    color: #a78bfa;
}

/* Shared Board Badge in Sidebar */
.badge-shared {
    font-size: 10px;
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.2);
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}

/* Theme Toggle Button styles */
.btn-theme-toggle {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 18px;
    padding: 8px;
    border-radius: 8px;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}
.btn-theme-toggle:hover {
    color: var(--primary);
    background: rgba(139, 92, 246, 0.1);
}

.btn-theme-toggle-floating {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--bg-surface);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    cursor: pointer;
    font-size: 18px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 999;
    transition: all var(--transition-fast);
}
.btn-theme-toggle-floating:hover {
    transform: scale(1.05);
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 0 12px var(--primary-glow);
}

/* ==========================================================================
   RESPONSIVENESS (MOBILE SCREENS)
   ========================================================================== */
@media (max-width: 768px) {
    /* Collapsible Sidebar */
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        transform: translateX(-100%);
        transition: transform var(--transition-normal);
        z-index: 999;
        width: 260px;
        height: 100vh;
        border-right: 1px solid var(--border-color);
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.25);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    /* Sliding overlay backdrop */
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.4);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        z-index: 998;
        transition: opacity var(--transition-normal);
        animation: fadeIn var(--transition-fast) ease-in-out;
    }
    
    .sidebar-overlay.hidden {
        opacity: 0;
        pointer-events: none;
    }

    /* Top Header Bar */
    .app-header {
        padding: 0 16px;
        height: 64px;
    }
    
    #btn-toggle-sidebar {
        display: inline-flex !important;
    }

    .board-info-header h2 {
        font-size: 16px;
    }
    
    .board-info-header {
        gap: 8px;
    }

    .board-actions {
        gap: 4px;
    }

    .btn-icon-header {
        width: 28px;
        height: 28px;
        font-size: 13px;
    }
    
    .header-actions {
        gap: 6px;
    }
    
    .header-actions .btn {
        padding: 8px 12px;
        font-size: 12px;
    }

    /* Workspace */
    .board-workspace {
        padding: 16px 12px;
    }

    .kanban-canvas {
        gap: 14px;
        padding-bottom: 8px;
    }

    .kanban-column {
        width: 260px;
    }

    /* Modals */
    .modal-card {
        max-width: 95%;
    }

    .modal-card.modal-lg {
        max-width: 95%;
    }

    .modal-body-layout {
        flex-direction: column;
        max-height: 80vh;
        overflow-y: auto;
    }

    .modal-body-sidebar {
        border-left: none;
        border-top: 1px solid var(--border-color);
        padding: 20px 24px;
        background: rgba(255,255,255,0.02);
    }

    .modal-body-main textarea {
        height: 120px;
    }

    /* Auth Page */
    .auth-container {
        max-width: 100%;
        padding: 10px;
    }

    .auth-card {
        padding: 24px 20px;
        border-radius: 16px;
    }

    .brand {
        margin-bottom: 20px;
    }

    .logo-icon {
        font-size: 32px;
        margin-bottom: 8px;
    }

    .brand h1 {
        font-size: 24px;
    }
}

/* Calendar Styles */
.calendar-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 24px;
    border-radius: 16px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    height: 100%;
    overflow-y: auto;
}
.calendar-header-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin-bottom: 8px;
}
.calendar-header-bar h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-main);
    min-width: 180px;
    text-align: center;
}
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}
.calendar-day-header {
    text-align: center;
    font-weight: 600;
    font-size: 13px;
    color: var(--text-muted);
    padding: 8px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.calendar-cell {
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: background var(--transition-fast);
    min-height: 110px;
}
[data-theme="light"] .calendar-cell {
    background: rgba(15, 23, 42, 0.01);
}
.calendar-cell.other-month {
    opacity: 0.25;
}
.calendar-cell.today {
    border-color: var(--primary);
    background: rgba(139, 92, 246, 0.03);
}
.calendar-cell-num {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    align-self: flex-start;
}
.calendar-cell.today .calendar-cell-num {
    color: var(--primary);
    background: var(--primary-glow);
    padding: 2px 6px;
    border-radius: 50%;
}
.calendar-cell-cards {
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow-y: auto;
    max-height: 80px;
}
.calendar-card-item {
    font-size: 11px;
    font-weight: 500;
    background: var(--primary-glow);
    color: var(--primary);
    padding: 4px 6px;
    border-radius: 4px;
    border: 1px solid rgba(139, 92, 246, 0.2);
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: all var(--transition-fast);
}
.calendar-card-item:hover {
    background: var(--primary);
    color: var(--text-inverse);
}

/* Comments List Styles */
.comment-input-wrapper {
    display: flex;
    flex-direction: column;
}
.comment-input-wrapper textarea {
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    padding: 10px 14px;
    border-radius: 8px;
    color: var(--text-main);
    font-size: 13px;
    resize: none;
    outline: none;
    transition: border-color var(--transition-fast);
}
.comment-input-wrapper textarea:focus {
    border-color: var(--primary);
}
.card-comments-list li {
    display: flex;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}
.card-comments-list li:last-child {
    border-bottom: none;
}
.comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-glow);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}
.comment-body {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.comment-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.comment-user-info {
    display: flex;
    align-items: center;
    gap: 8px;
}
.comment-author {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
}
.comment-time {
    font-size: 11px;
    color: var(--text-muted);
}
.comment-text {
    font-size: 13px;
    color: var(--text-main);
    line-height: 1.4;
    word-break: break-word;
}
.btn-delete-comment {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 12px;
    transition: color var(--transition-fast);
}
.btn-delete-comment:hover {
    color: var(--danger);
}

/* Priority & Assignee Badges on Cards */
.card-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
    margin-bottom: 4px;
}

.priority-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    display: inline-flex;
    align-items: center;
}

.priority-high {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.priority-medium {
    background: rgba(245, 158, 11, 0.15);
    color: #fde047;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.priority-low {
    background: rgba(16, 185, 129, 0.15);
    color: #a7f3d0;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.card-assignee {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.alert-info {
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.2);
    color: #c084fc;
}

/* Sidebar Navigation Items */
.nav-item {
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    color: var(--text-muted);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all var(--transition-fast);
}
.nav-item:hover {
    background: var(--sidebar-item-hover-bg);
    color: var(--text-main);
}
.nav-item.active {
    background: var(--sidebar-item-active-bg);
    color: var(--text-main);
    font-weight: 600;
}
.nav-item.active i {
    color: var(--primary);
}

/* ==========================================================================
   NOTES MODULE (Caso de Uso 07)
   ========================================================================== */
.color-dot {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: inline-block;
    border: 2px solid transparent;
    transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.color-dot:hover {
    transform: scale(1.15);
}

.color-dot.active {
    border-color: #ffffff;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
}

.note-card {
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 180px;
    position: relative;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
    border-left: 4px solid var(--primary);
}

.note-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

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

.note-card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
    word-break: break-word;
}

.note-card-pin-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 14px;
    padding: 4px;
    transition: color var(--transition-fast);
}

.note-card-pin-btn.pinned {
    color: var(--warning);
}

.note-card-pin-btn:hover {
    color: var(--text-main);
}

.note-card-body {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 16px;
    white-space: pre-wrap;
    word-break: break-word;
    flex: 1;
}

.note-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 12px;
    font-size: 11px;
    color: var(--text-muted);
}

.notes-search-wrapper:focus-within {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.category-item:hover:not(.active) {
    background: rgba(255, 255, 255, 0.04) !important;
    color: var(--text-main) !important;
}

.note-tab:hover:not(.active) {
    background: rgba(255, 255, 255, 0.08) !important;
    color: var(--text-main) !important;
}

.note-author-badge {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(139, 92, 246, 0.2);
    color: var(--primary);
    border: 1px solid var(--border-color-glow);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}

.note-card-author-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ==========================================================================
   MY TASKS MODULE (Protótipo Figura 7)
   ========================================================================== */
.tasks-search-wrapper:focus-within {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.task-tab:hover:not(.active) {
    background: rgba(255, 255, 255, 0.08) !important;
    color: var(--text-main) !important;
}

.task-row {
    border-bottom: 1px solid var(--border-color);
    transition: background-color var(--transition-fast);
}

.task-row:hover {
    background: rgba(255, 255, 255, 0.03);
}

.task-row.completed {
    opacity: 0.6;
}

.task-row.completed .task-title-cell {
    text-decoration: line-through;
    color: var(--text-muted);
}

.priority-badge-pill {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    display: inline-block;
    text-align: center;
}

.priority-badge-alta {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.priority-badge-media {
    background: rgba(59, 130, 246, 0.15);
    color: #93c5fd;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.priority-badge-baixa {
    background: rgba(16, 185, 129, 0.15);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.quick-notes-bullet-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.5;
}

.quick-notes-bullet-item::before {
    content: "•";
    color: var(--primary);
    font-size: 16px;
    line-height: 1;
}



