:root {
    /* Brand & Accents */
    --primary: #7c3aed;
    --primary-strong: #5b21b6;
    --primary-hover: #6d28d9;
    --accent: #22d3ee;
    --accent-glow: rgba(124, 58, 237, 0.3);

    /* Backgrounds */
    --bg-body: #0b1220;
    --bg-subtle: #11182a;
    --bg-card: #0f172a;
    --bg-column: rgba(255, 255, 255, 0.03);
    --modal-overlay: rgba(4, 6, 15, 0.7);

    /* Text */
    --text-main: #e2e8f0;
    --text-muted: #94a3b8;
    --text-highlight: #ffffff;

    /* Semantic */
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #38bdf8;

    /* Borders & Effects */
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.18);
    --radius: 14px;
    --radius-sm: 10px;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgb(0 0 0 / 0.18);
    --shadow: 0 10px 30px rgb(0 0 0 / 0.25);
    --shadow-lg: 0 25px 60px rgb(0 0 0 / 0.35);
    --glow: 0 0 28px -6px var(--accent-glow);

    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
}


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

body {
    font-family: var(--font-sans);
    background: radial-gradient(circle at 20% 20%, rgba(124, 58, 237, 0.08), transparent 30%), radial-gradient(circle at 80% 0%, rgba(34, 211, 238, 0.12), transparent 28%), var(--bg-body);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Auth-only mode (pantalla de login dedicada) */
body.auth-only-mode {
    overflow: hidden;
}

body.auth-only-mode .app-header,
body.auth-only-mode main.board-container {
    display: none;
}

/* Auth Container (Full Screen) */
.auth-container {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 50% 10%, #1e1b4b, #020617);
    padding: 1rem;
    transition: opacity 0.3s ease, visibility 0.3s;
}

.auth-container.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.auth-card {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

.auth-header {
    text-align: center;
    margin-bottom: 0.5rem;
}

.auth-logo {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary), var(--primary-strong));
    border-radius: 12px;
    color: white;
    font-weight: 800;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    box-shadow: 0 0 20px rgba(124, 58, 237, 0.4);
}

.auth-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-highlight);
    margin-bottom: 0.25rem;
}

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

/* Auth Google Wrapper */
.auth-google-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    margin: 0.5rem 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* Form Styles Override for Auth */
#auth-form .form-group {
    margin-bottom: 1rem;
}

#auth-form input {
    background: rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.1);
    height: 46px;
    font-size: 1rem;
}

#auth-form input:focus {
    background: rgba(0, 0, 0, 0.4);
    border-color: var(--primary);
}

.btn-block {
    width: 100%;
    height: 46px;
    font-size: 1rem;
    margin-top: 0.5rem;
}

.auth-footer {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.btn-link {
    background: none;
    border: none;
    color: var(--primary);
    /* Accento */
    font-weight: 600;
    cursor: pointer;
    margin-left: 0.25rem;
}

.btn-link:hover {
    text-decoration: underline;
    color: var(--primary-hover);
}

/* Header */
.app-header {
    height: 72px;
    /* Taller header */
    background: rgba(15, 23, 42, 0.6);
    /* Translucent */
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    z-index: 40;
}

.workspace-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: 1rem;
}

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

.workspace-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.workspace-select {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.35rem 0.6rem;
    min-width: 180px;
}

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

.user-menu {
    position: relative;
}

.user-menu-btn {
    padding: 0.55rem 0.85rem;
    gap: 0.6rem;
}

.user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.85rem;
    color: #ddd6fe;
    background: rgba(124, 58, 237, 0.16);
    border: 1px solid rgba(124, 58, 237, 0.35);
    flex: 0 0 auto;
}

.user-identity {
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-caret {
    opacity: 0.8;
}

.user-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    min-width: 220px;
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    padding: 0.35rem;
    z-index: 60;
    backdrop-filter: blur(10px);
}

.user-dropdown.hidden {
    display: none;
}

.dropdown-item {
    width: 100%;
    text-align: left;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-main);
    padding: 0.55rem 0.7rem;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.15s;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--border);
    color: var(--text-highlight);
}

.dropdown-item:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.dropdown-sep {
    height: 1px;
    background: var(--border);
    margin: 0.35rem 0.2rem;
}

.dropdown-danger {
    color: #fecaca;
}

.dropdown-danger:hover {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.35);
    color: #fee2e2;
}

.settings-logout-btn {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.35);
    color: #fee2e2;
}

.settings-logout-btn:hover {
    background: rgba(239, 68, 68, 0.18);
    border-color: rgba(239, 68, 68, 0.5);
}

main.board-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding: 1.75rem 2.25rem 2.25rem;
    overflow-y: auto;
    overflow-x: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    width: 100%;
}

.board-header {
    display: grid;
    gap: 1rem;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.08), rgba(34, 211, 238, 0.05));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.9rem 1rem;
    position: sticky;
    top: 0;
    z-index: 30;
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(10px);
}

.header-spacer {
    height: 100%;
}

.column-header {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.85rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}

.column-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.column-title {
    font-weight: 700;
    letter-spacing: -0.01em;
}

.column-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.column-count {
    font-size: 0.82rem;
    color: var(--text-muted);
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
}

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

.lanes-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-bottom: 1rem;
    width: 100%;
}

.lane-row {
    display: grid;
    gap: 1rem;
    align-items: stretch;
    width: 100%;
}

.lane-info {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    position: relative;
    overflow: hidden;
}

.lane-info::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.1), transparent 45%);
    opacity: 0.5;
    pointer-events: none;
}

.lane-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    position: relative;
    z-index: 1;
}

.lane-title {
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: -0.01em;
}

.lane-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    position: relative;
    z-index: 1;
}

.add-lane-card {
    width: 100%;
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    color: var(--text-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    transition: all 0.2s;
}

.add-lane-plus {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(124, 58, 237, 0.12);
    border: 1px solid rgba(124, 58, 237, 0.35);
    color: #ddd6fe;
    font-size: 1.1rem;
}

.add-lane-card:hover {
    border-color: var(--primary);
    color: var(--text-highlight);
    background: rgba(124, 58, 237, 0.06);
    transform: translateY(-1px);
    box-shadow: 0 8px 16px rgba(124, 58, 237, 0.15);
}

.add-lane-card:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-highlight);
    letter-spacing: -0.025em;
}

.logo-icon {
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: white;
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    box-shadow: 0 0 15px -3px var(--accent-glow);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.6rem 1.25rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
    outline: none;
    letter-spacing: 0.01em;
}

.btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

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

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

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

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--border-hover);
    color: var(--text-highlight);
}

.icon-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.4rem;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-btn:hover {
    color: var(--text-highlight);
    background: rgba(255, 255, 255, 0.08);
    align-items: start;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.lane-info {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    align-items: center;
}

.lane-title {
    font-weight: 600;
    font-size: 1rem;
}

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

/* Kanban Columns & Cards */
.kanban-column {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.02));
    border-radius: var(--radius);
    padding: 1rem;
    min-height: 220px;
    min-width: 260px;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    border: 1px solid var(--border);
    transition: all 0.2s;
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(8px);
}

.kanban-column:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.kanban-column.drag-over {
    border-color: var(--primary-hover);
    background: rgba(124, 58, 237, 0.1);
    box-shadow: inset 0 0 20px rgba(124, 58, 237, 0.12);
}

.task-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.035), rgba(124, 58, 237, 0.04));
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.95rem 1rem;
    cursor: grab;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    isolation: isolate;
}

.task-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--card-color, var(--primary));
    /* Set via inline style */
    opacity: 0.8;
}

.task-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-hover);
    z-index: 5;
}

.task-card:active {
    cursor: grabbing;
    transform: scale(0.98);
}

.task-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.task-chips {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}

.pill-high {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.35);
    color: #fecdd3;
}

.pill-medium {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.35);
    color: #fcd34d;
}

.pill-low {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.35);
    color: #bbf7d0;
}

.pill-muted {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
}

.pill-ghost {
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-main);
    border-color: var(--border);
}

.task-actions-hover {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    opacity: 0;
    transition: opacity 0.2s;
    position: absolute;
    top: 0.55rem;
    right: 0.55rem;
}

.task-card:hover .task-actions-hover {
    opacity: 1;
}

.task-title {
    font-weight: 600;
    font-size: 0.98rem;
    letter-spacing: -0.01em;
    line-height: 1.4;
    color: var(--text-main);
}

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

.add-task-ghost {
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    opacity: 0.7;
    background: rgba(255, 255, 255, 0.02);
}

.add-task-ghost:hover {
    border-color: var(--primary);
    color: var(--primary);
    opacity: 1;
    background: rgba(124, 58, 237, 0.08);
    box-shadow: 0 8px 16px rgba(124, 58, 237, 0.15);
}

/* Color Swatches */
.color-options {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 0.75rem;
}

.color-swatch {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.1s, border-color 0.2s;
}

.color-swatch:hover {
    transform: scale(1.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.color-swatch.selected {
    border-color: #fff !important;
    box-shadow: 0 0 0 3px var(--primary);
    transform: scale(1.1);
}

.task-date {
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--modal-overlay);
    backdrop-filter: blur(8px);
    display: block;
    z-index: 50;
    opacity: 1;
    transition: opacity 0.3s ease;
}

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

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    width: 100%;
    max-width: 480px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    z-index: 51;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    /* Spring-ish */
}

.modal.hidden {
    transform: translate(-50%, -40%) scale(0.95);
    opacity: 0;
    pointer-events: none;
    display: none;
}

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

.modal-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-highlight);
}

.close-modal {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.close-modal:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

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

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

/* Settings Layout */
.settings-layout {
    display: flex;
    gap: 2rem;
    min-height: 400px;
}

.settings-sidebar {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 180px;
    flex-shrink: 0;
    border-right: 1px solid var(--border);
    padding-right: 1.5rem;
}

.settings-tab {
    background: transparent;
    border: none;
    text-align: left;
    padding: 0.6rem 0.8rem;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.settings-tab:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.03);
}

.settings-tab.active {
    color: var(--text-highlight);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 0 1px var(--border);
}

.settings-tab.danger {
    color: #fca5a5;
    margin-top: auto;
}

.settings-tab.danger:hover {
    background: rgba(239, 68, 68, 0.1);
}

.settings-content {
    flex: 1;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.tab-pane {
    display: none;
    animation: fadeIn 0.2s ease-out;
}

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

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

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

.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-highlight);
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.75rem;
    margin-bottom: 1.5rem;
}

.section-subtitle {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Settings Panels */
.panel-section {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1.25rem;
}

.panel-section h4 {
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.invite-row {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.input-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
    height: 36px;
}

.btn-sm {
    padding: 0 1rem;
    height: 36px;
    font-size: 0.85rem;
}

.members-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
}

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

/* Restored Input Styles */
.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    transition: all 0.2s;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(15, 23, 42, 0.8);
    box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.2);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

/* Comments */
.comments-section {
    margin-top: 2rem;
    border-top: 1px solid var(--border);
    padding-top: 1.5rem;
}

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

.settings-section:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

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

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem 0.75rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
    margin-bottom: 0.75rem;
    cursor: pointer;
    user-select: none;
}

.checkbox-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

body.reduce-motion * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
}

body.compact-mode main.board-container {
    padding: 1.1rem 1.25rem 1.25rem;
    gap: 0.95rem;
}

body.compact-mode .lane-info {
    padding: 0.95rem;
}

body.compact-mode .kanban-column {
    padding: 0.75rem;
    gap: 0.55rem;
}

body.compact-mode .task-card {
    padding: 0.75rem 0.85rem;
}

.section-title {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.comments-list {
    max-height: 200px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.comment-item {
    background: rgba(255, 255, 255, 0.03);
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    border: 1px solid transparent;
}

.add-comment-box {
    display: flex;
    gap: 0.75rem;
}

.empty-state {
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    text-align: center;
    color: var(--text-muted);
}

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

.toast {
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    min-width: 220px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.toast-success {
    border-color: rgba(16, 185, 129, 0.5);
}

.toast-error {
    border-color: rgba(239, 68, 68, 0.6);
}

/* Scrollbars */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    border: 2px solid var(--bg-body);
}

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

/* Mobile Responsiveness */
@media (max-width: 1024px) {
    .app-header {
        padding: 0 1.25rem;
    }

    .board-container {
        padding: 1.25rem 1.5rem 1.75rem;
    }

    .workspace-select {
        min-width: 140px;
    }

    .user-identity {
        max-width: 160px;
    }

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

@media (max-width: 900px) {
    .app-header {
        height: auto;
        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "logo logo"
            "workspaceControls headerActions";
        gap: 0.75rem;
        padding: 0.75rem 1rem;
        align-items: center;
    }

    .logo {
        grid-area: logo;
        flex: 0 1 auto;
        font-size: 1.1rem;
        gap: 0.6rem;
    }

    .workspace-controls {
        grid-area: workspaceControls;
        width: auto;
        margin-left: 0;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 0.75rem;
        align-items: end;
    }

    .workspace-display {
        min-width: 0;
    }

    .workspace-select {
        width: 100%;
        min-width: 0;
    }

    .workspace-actions {
        justify-content: flex-end;
        justify-self: end;
        flex-wrap: wrap;
    }

    .header-actions {
        grid-area: headerActions;
        width: auto;
        justify-content: flex-end;
    }

    /* Board: evitar corte horizontal en tablet */
    .board-header {
        display: none;
    }

    .lane-row {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
        align-items: start;
    }

    .lane-info {
        grid-column: 1 / -1;
        align-items: flex-start;
    }

    /* Mostrar título de columna dentro de cada columna (ya que se oculta el header global) */
    .kanban-column::before {
        content: attr(data-title);
        display: block;
        font-weight: 700;
        margin-bottom: 0.5rem;
        color: var(--text-muted);
        text-transform: uppercase;
        font-size: 0.75rem;
        letter-spacing: 0.04em;
    }

    .kanban-column {
        min-width: 0;
    }

    .add-lane-row {
        grid-template-columns: 1fr !important;
    }

    .add-lane-row .add-lane-card {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .app-header {
        padding: 0.75rem 1rem;
    }

    .board-container {
        padding: 1rem;
    }

    /* Stack Board Header (Columns) vertically or hide them and show inside lane? 
       Actually, standard Kanban on mobile usually scrolls horizontally OR stacks.
       Let's clear the grid template to allow stacking if needed, or keeping scroll.
       For this specific layout (Row per lane), mobile is tricky.
       Let's stack columns within each lane row.
    */
    .board-header {
        display: none;
        /* Hide global header on mobile, columns are inside lanes */
    }

    .lane-row {
        grid-template-columns: 1fr !important;
        /* Stack everything */
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .kanban-column {
        min-height: 100px;
        min-width: 220px;
        padding: 0.75rem;
    }

    /* We might want to show column title inside column on mobile since header is gone */
    .kanban-column::before {
        content: attr(data-title);
        display: block;
        font-weight: bold;
        margin-bottom: 0.5rem;
        color: var(--text-muted);
        text-transform: uppercase;
        font-size: 0.75rem;
    }

    .modal {
        width: 95%;
        max-height: 90vh;
        overflow-y: auto;
    }

    .toast-container {
        right: 12px;
        left: 12px;
        top: 72px;
    }

    .toast {
        min-width: 0;
        width: 100%;
    }
}

@media (max-width: 600px) {
    .workspace-controls {
        grid-template-columns: 1fr;
    }

    .workspace-actions {
        width: 100%;
        justify-self: stretch;
        justify-content: flex-end;
    }

    .workspace-label {
        display: none;
    }

    .user-identity {
        display: none;
    }

    .btn {
        padding: 0.5rem 0.9rem;
        font-size: 0.8rem;
    }

    .user-menu-btn {
        padding: 0.5rem 0.7rem;
    }

    .board-container {
        gap: 1rem;
    }

    .task-card {
        padding: 0.8rem 0.85rem;
    }
}