:root {
    /* Light Theme Colors - Firebase Inspired */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #f1f3f4;
    --bg-elevated: #ffffff;
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --bg-gradient-hover: linear-gradient(135deg, #5568d3 0%, #6a3f8f 100%);
    --text-primary: #202124;
    --text-secondary: #5f6368;
    --text-tertiary: #80868b;
    --border-primary: #dadce0;
    --border-secondary: #e8eaed;
    --accent-primary: #1a73e8;
    --accent-primary-hover: #1765cc;
    --accent-primary-light: rgba(26, 115, 232, 0.1);
    --accent-danger: #ea4335;
    --accent-danger-hover: #d33b2c;
    --accent-danger-light: rgba(234, 67, 53, 0.1);
    --accent-success: #34a853;
    --accent-success-hover: #2d9248;
    --accent-success-light: rgba(52, 168, 83, 0.1);
    --accent-warning: #fbbc04;
    --accent-warning-hover: #f9ab00;
    --accent-info: #4285f4;
    --shadow-sm: 0 1px 2px 0 rgba(60, 64, 67, 0.1), 0 1px 3px 1px rgba(60, 64, 67, 0.05);
    --shadow-md: 0 1px 3px 0 rgba(60, 64, 67, 0.15), 0 4px 8px 3px rgba(60, 64, 67, 0.08);
    --shadow-lg: 0 2px 6px 2px rgba(60, 64, 67, 0.15), 0 8px 16px 4px rgba(60, 64, 67, 0.1);
    --shadow-xl: 0 4px 8px 3px rgba(60, 64, 67, 0.15), 0 12px 24px 6px rgba(60, 64, 67, 0.12);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
}

[data-theme="dark"] {
    /* Dark Theme Colors - Firebase Inspired */
    --bg-primary: #1a1a1a;
    --bg-secondary: #242424;
    --bg-tertiary: #2d2d2d;
    --bg-elevated: #1e1e1e;
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --bg-gradient-hover: linear-gradient(135deg, #7c8ff5 0%, #8a5cb5 100%);
    --text-primary: #e8eaed;
    --text-secondary: #9aa0a6;
    --text-tertiary: #80868b;
    --border-primary: #3c4043;
    --border-secondary: #2d2d2d;
    --accent-primary: #8ab4f8;
    --accent-primary-hover: #aecbfa;
    --accent-primary-light: rgba(138, 180, 248, 0.15);
    --accent-danger: #f28b82;
    --accent-danger-hover: #f6aea9;
    --accent-danger-light: rgba(242, 139, 130, 0.15);
    --accent-success: #81c995;
    --accent-success-hover: #a8dab5;
    --accent-success-light: rgba(129, 201, 149, 0.15);
    --accent-warning: #fdd663;
    --accent-warning-hover: #fee389;
    --accent-info: #669df6;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3), 0 1px 3px 1px rgba(0, 0, 0, 0.15);
    --shadow-md: 0 1px 3px 0 rgba(0, 0, 0, 0.4), 0 4px 8px 3px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 2px 6px 2px rgba(0, 0, 0, 0.4), 0 8px 16px 4px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 4px 8px 3px rgba(0, 0, 0, 0.4), 0 12px 24px 6px rgba(0, 0, 0, 0.35);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
}

/* Soft Light Theme - Comfortable, Warm, Easy on Eyes */
:root {
    --brand: #2563eb;
    /* primary brand (blue) */
    
    /* Warm, Soft Backgrounds */
    --bg-primary: #fafaf9;
    /* warm off-white */
    --bg-secondary: #f5f5f4;
    /* stone-100 */
    --bg-tertiary: #e7e5e4;
    /* stone-200 */
    --bg-elevated: #ffffff;
    /* pure white for elevation */

    /* Softer Text Colors */
    --text-primary: #292524;
    /* stone-800 - softer than black */
    --text-secondary: #57534e;
    /* stone-600 */
    --text-tertiary: #78716c;
    /* stone-500 */

    /* Subtle Borders */
    --border-primary: #d6d3d1;
    /* stone-300 */
    --border-secondary: #e7e5e4;
    /* stone-200 */

    /* Brand Colors */
    --accent-primary: var(--brand);
    --accent-primary-hover: #1e40af;
    /* blue-800 */
    --accent-primary-light: rgba(37, 99, 235, 0.10);

    /* Danger Colors - Slightly Muted */
    --accent-danger: #dc2626;
    /* red-600 */
    --accent-danger-hover: #b91c1c;
    /* red-700 */
    --accent-danger-light: rgba(220, 38, 38, 0.10);

    /* Success Colors */
    --accent-success: #16a34a;
    /* green-600 */
    --accent-success-hover: #15803d;
    /* green-700 */
    --accent-success-light: rgba(22, 163, 74, 0.10);

    /* Warning Colors */
    --accent-warning: #ea580c;
    /* orange-600 */
    --accent-warning-hover: #c2410c;
    /* orange-700 */

    /* Softer Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.02);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.05), 0 2px 4px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.06), 0 4px 6px rgba(0, 0, 0, 0.03);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.07), 0 8px 10px rgba(0, 0, 0, 0.04);

    /* Rounded Corners */
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 18px;

    /* Compatibility */
    --bg-gradient: var(--brand);
    --bg-gradient-hover: var(--accent-primary-hover);
}

[data-theme="dark"] {
    --bg-primary: #0b0f19;
    /* deep navy */
    --bg-secondary: #111827;
    /* gray-900 */
    --bg-tertiary: #0f172a;
    /* slate-900 */
    --bg-elevated: #0c1424;

    --text-primary: #e5e7eb;
    /* gray-200 */
    --text-secondary: #9ca3af;
    /* gray-400 */

    --border-primary: #1f2937;
    /* gray-800 */
    --border-secondary: #0f172a;
    /* slate-900 */

    --accent-primary: #3b82f6;
    /* lighter brand for dark bg */
    --accent-primary-hover: #2563eb;
    --accent-primary-light: rgba(59, 130, 246, 0.18);

    --accent-danger: #f87171;
    --accent-danger-hover: #ef4444;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.50);
    --shadow-xl: 0 12px 32px rgba(0, 0, 0, 0.55);
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, 'Helvetica Neue', Arial, 'Noto Sans', 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol' !important;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.5;
    transition: background-color 0.3s, color 0.3s;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Prevent body scroll when sidebar is open on mobile */
body.sidebar-open {
    overflow: hidden;
}

/* Splash Screen */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.splash-screen.fade-out {
    opacity: 0;
    visibility: hidden;
}

.splash-container {
    text-align: center;
    animation: fadeInUp 0.6s ease-out;
}

.splash-logo {
    width: 120px;
    height: auto;
    margin-bottom: 30px;
    animation: pulse 2s ease-in-out infinite;
}

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

.splash-text {
    color: var(--text-secondary);
    font-size: 16px;
    font-weight: 500;
    margin-top: 16px;
    animation: pulse 1.5s ease-in-out infinite;
}

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

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Hide splash on subsequent visits */
body:not(.first-visit) .splash-screen {
    display: none;
}

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

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 10px;
}

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

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
}

/* Auth Screen */
#auth-screen {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: var(--bg-secondary);
}

.auth-container {
    background: var(--bg-primary);
    padding: 48px 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 420px;
    border: 1px solid var(--border-primary);
    position: relative;
    overflow: hidden;
}

.auth-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--bg-gradient);
}

.auth-container h1 {
    margin-bottom: 12px;
    color: var(--text-primary);
    text-align: center;
    font-size: 28px;
    font-weight: 700;
}

.auth-container p {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 32px;
    font-size: 15px;
    line-height: 1.5;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 4px;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-secondary);
    border-radius: var(--radius-sm);
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-family: 'Roboto', sans-serif;
}

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
    border-color: var(--border-primary);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 4px var(--accent-primary-light);
    background: var(--bg-primary);
}

/* modern focus visibility across interactive elements */
.btn,
.theme-toggle,
.form-group input,
.form-group select,
.form-group textarea {
    outline: none;
}

.btn:focus-visible,
.theme-toggle:focus-visible,
.form-group input:focus-visible,
.form-group select:focus-visible,
.form-group textarea:focus-visible {
    box-shadow: 0 0 0 4px var(--accent-primary-light);
    border-color: var(--accent-primary);
}

.btn {
    width: 100%;
    padding: 10px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

/* Modern Button System - Consistent, Accessible, Beautiful */
.btn {
    /* Base Structure */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    
    /* Sizing */
    padding: 12px 24px;
    min-height: 44px; /* Touch-friendly */
    
    /* Typography */
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.01em;
    line-height: 1.5;
    text-decoration: none;
    white-space: nowrap;
    
    /* Visual */
    border-radius: var(--radius-sm);
    border: 2px solid transparent;
    box-shadow: var(--shadow-sm);
    
    /* Interaction */
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    
    /* Reset */
    position: relative;
    overflow: hidden;
}

/* Button States - Hover */
.btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Button States - Active */
.btn:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

/* Button States - Focus (Accessibility) */
.btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px var(--accent-primary-light), var(--shadow-md);
}

/* Button States - Disabled */
.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* Button Loading State */
.btn.loading {
    color: transparent;
    pointer-events: none;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid currentColor;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.6s linear infinite;
    opacity: 0.7;
}

/* Primary Button */
.btn-primary {
    background: var(--accent-primary);
    color: #fff;
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-sm), 0 0 0 0 rgba(37, 99, 235, 0);
}

.btn-primary:hover:not(:disabled) {
    background: var(--accent-primary-hover);
    border-color: var(--accent-primary-hover);
    box-shadow: var(--shadow-md), 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.btn-primary:active:not(:disabled) {
    background: var(--accent-primary-hover);
    box-shadow: var(--shadow-sm), 0 0 0 2px rgba(37, 99, 235, 0.1);
}

/* Secondary Button */
.btn-secondary {
    background: var(--bg-primary);
    color: var(--text-primary);
    border-color: var(--border-primary);
    box-shadow: var(--shadow-sm);
    margin-top: 8px;
}

.btn-secondary:hover:not(:disabled) {
    background: var(--bg-tertiary);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.btn-secondary:active:not(:disabled) {
    background: var(--accent-primary-light);
}

/* Danger Button */
.btn-danger {
    background: var(--accent-danger);
    color: #fff;
    border-color: var(--accent-danger);
}

.btn-danger:hover:not(:disabled) {
    background: var(--accent-danger-hover);
    border-color: var(--accent-danger-hover);
    box-shadow: var(--shadow-md), 0 0 0 4px var(--accent-danger-light);
}

/* Success Button */
.btn-success {
    background: var(--accent-success);
    color: #fff;
    border-color: var(--accent-success);
}

.btn-success:hover:not(:disabled) {
    background: var(--accent-success-hover);
    border-color: var(--accent-success-hover);
    box-shadow: var(--shadow-md), 0 0 0 4px var(--accent-success-light);
}

/* Button Sizes */
.btn-small {
    padding: 8px 16px;
    min-height: 36px;
    font-size: 13px;
    gap: 6px;
    margin: 0 4px;
    width: auto;
}

.btn-large {
    padding: 16px 32px;
    min-height: 52px;
    font-size: 16px;
    gap: 10px;
}

/* Button with Icon */
.btn svg {
    width: 16px;
    height: 16px;
    transition: transform 0.2s ease;
}

.btn:hover svg {
    transform: scale(1.1);
}

/* Ghost Button Variant */
.btn-ghost {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
    color: var(--text-secondary);
}

.btn-ghost:hover:not(:disabled) {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

/* Button Utility Classes */
.btn-block {
    width: 100%;
    display: flex;
}

.btn-icon-only {
    padding: 10px;
    min-width: 44px;
}

.btn-rounded {
    border-radius: 50%;
    aspect-ratio: 1;
    padding: 10px;
}

/* Button Link Style (looks like a button, behaves like a link) */
a.btn {
    text-decoration: none;
    display: inline-flex;
}

/* Button Ripple Effect */
.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

/* Button Loading State - Better Spinner */
@keyframes buttonSpin {
    to { transform: rotate(360deg); }
}

/* Improved Badge on Buttons */
.btn-badge {
    position: relative;
}

.btn-badge::after {
    content: attr(data-badge);
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--accent-danger);
    color: white;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    border: 2px solid var(--bg-primary);
}

/* Main App */
#app-screen {
    display: none;
    height: 100vh;
    overflow: hidden;
}

/* Header */
.app-header {
    background: var(--bg-primary);
    padding: 16px 32px;
    border-bottom: 1px solid var(--border-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
    position: relative;
    z-index: 10;
}

/* Header + badges */
.user-badge {
    background: var(--accent-primary-light);
    color: var(--accent-primary);
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 700;
    border: 2px solid var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.user-badge.admin {
    background: var(--accent-danger);
    color: #fff;
    border-color: var(--accent-danger);
}

.app-branding {
    display: flex;
    align-items: center;
    gap: 12px;
}

.app-logo-container {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    position: relative;
}

.app-logo {
    height: 48px;
    width: auto;
}

.app-logo-text {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding-bottom: 2px;
}

.app-header h1 {
    color: var(--text-primary);
    font-size: 20px;
    font-weight: 600;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Theme Toggle - Modern Design */
.theme-toggle {
    /* Structure */
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    
    /* Visual */
    background: var(--bg-tertiary);
    border: 2px solid var(--border-primary);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    
    /* Interaction */
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
}

.theme-toggle span {
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.theme-toggle:hover {
    background: var(--accent-primary-light);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.theme-toggle:hover span {
    transform: rotate(20deg) scale(1.1);
}

.theme-toggle:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

.theme-toggle:active span {
    transform: rotate(0deg) scale(0.95);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Main Layout */
.app-main {
    display: flex;
    height: calc(100vh - 60px);
}

/* Sidebar */
.sidebar {
    width: 240px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-primary);
    padding: 16px;
    overflow-y: auto;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 100;
}

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

.sidebar-header h2 {
    font-size: 16px;
    color: var(--text-primary);
    font-weight: 600;
    margin: 0;
}

.sidebar-close {
    display: none;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    padding: 0;
    align-items: center;
    justify-content: center;
}

.sidebar-close:hover {
    background: var(--bg-tertiary);
    color: var(--accent-danger);
    transform: scale(1.1);
}

/* Sidebar Toggle Button (Mobile) */
.sidebar-toggle {
    display: none;
    position: fixed;
    top: 76px;
    left: 16px;
    width: 48px;
    height: 48px;
    background: var(--accent-primary);
    border: 2px solid var(--accent-primary);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    z-index: 99;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #fff;
    padding: 0;
}

.sidebar-toggle:hover {
    background: var(--accent-primary-hover);
    border-color: var(--accent-primary-hover);
    box-shadow: var(--shadow-xl), 0 0 0 4px var(--accent-primary-light);
    transform: scale(1.1);
}

.sidebar-toggle:active {
    transform: scale(0.95);
}

.sidebar-toggle svg {
    transition: transform 0.2s ease;
}

.sidebar-toggle:hover svg {
    transform: scale(1.1);
}

/* Sidebar Overlay for Mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
}

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

.project-item {
    padding: 12px 16px;
    margin-bottom: 8px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: transparent;
    border: 2px solid transparent;
}

.project-item:hover {
    background: var(--bg-primary);
    border-color: var(--border-secondary);
    box-shadow: var(--shadow-sm);
    transform: translateX(4px);
}

/* remove gradient active state; use brand solid and high contrast text */
.project-item.active {
    background: var(--accent-primary) !important;
    color: #fff !important;
    border-color: transparent;
    box-shadow: var(--shadow-md);
    transform: translateX(4px);
}

.project-name {
    font-weight: 500;
    margin-bottom: 2px;
}

.project-desc {
    font-size: 12px;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-item.active .project-desc {
    color: rgba(255, 255, 255, 0.92) !important;
}

.add-project-btn {
    margin-top: 12px;
}

/* Button Groups */
.btn-group {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.btn-group .btn {
    flex: 1;
    min-width: fit-content;
}

/* Sidebar Buttons Enhancement */
.sidebar .btn {
    width: 100%;
    justify-content: center;
    font-size: 13px;
    transition: all 0.2s ease;
}

.sidebar .btn:hover {
    transform: translateX(4px);
}

/* Content Action Buttons */
.content-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.content-actions .btn {
    white-space: nowrap;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 32px;
    overflow: auto;
    background: var(--bg-secondary);
}

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

.content-header h2 {
    font-size: 24px;
    color: var(--text-primary);
    font-weight: 600;
}

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

/* Kanban Board */
.kanban-board {
    display: flex;
    gap: 16px;
}

.kanban-column {
    flex: 1;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 16px;
    min-width: 280px;
    border: 2px solid var(--border-secondary);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.kanban-column:hover {
    box-shadow: var(--shadow-md);
}

.column-header {
    font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 3px solid transparent;
    background: linear-gradient(90deg, var(--accent-primary), transparent);
    background-size: 100% 3px;
    background-repeat: no-repeat;
    background-position: bottom;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-primary);
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Column header: replace decorative gradients with a crisp brand underline */
.column-header {
    background: none !important;
    border-bottom: 2px solid var(--border-primary);
    position: relative;
}

.column-header::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 40%;
    height: 2px;
    background: var(--accent-primary);
}

.column-count {
    background: var(--accent-primary-light);
    color: var(--accent-primary);
    border-radius: 16px;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 700;
    min-width: 24px;
    text-align: center;
}

.task-card {
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-md);
    cursor: move;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    user-select: none;
    border: 2px solid var(--border-secondary);
    overflow: hidden;
}

/* Cards */
.task-card {
    border: 1.5px solid var(--border-secondary);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.task-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-primary);
}

/* subtle static accent rail instead of gradient sweep */
.task-card::before {
    background: var(--accent-primary) !important;
    opacity: 0.28;
}

.task-card:hover::before {
    opacity: 0.52 !important;
}

.task-card.dragging {
    opacity: 0.6;
    transform: rotate(2deg);
}

.task-title {
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.task-description {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    line-height: 1.4;
}

.task-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text-secondary);
}

.task-assignee {
    background: var(--accent-primary-light);
    padding: 4px 10px;
    border-radius: 16px;
    font-weight: 600;
    color: var(--accent-primary);
    font-size: 12px;
    border: 1px solid var(--accent-primary);
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.assignee-warning {
    color: var(--accent-danger);
    font-weight: 700;
    font-size: 14px;
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--bg-elevated);
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    animation: pulse-warning 2s ease-in-out infinite;
    box-shadow: 0 0 0 2px var(--bg-elevated);
}

@keyframes pulse-warning {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

.task-deadline {
    color: var(--text-secondary);
    font-weight: 500;
}

.task-deadline.overdue {
    color: var(--accent-danger);
    font-weight: 700;
    background: var(--accent-danger-light);
    padding: 2px 8px;
    border-radius: 12px;
}

.task-estimate {
    background: var(--bg-gradient);
    color: #ffffff;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
    box-shadow: var(--shadow-sm);
}

.task-estimate {
    background: var(--accent-primary) !important;
    color: #fff !important;
}

.task-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 6px;
    align-items: center;
}

.task-action-btn {
    background: var(--bg-primary);
    border: 1px solid var(--border-primary);
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-secondary);
    box-shadow: var(--shadow-sm);
    position: relative;
    padding: 0;
}

.task-action-btn svg {
    transition: all 0.2s ease;
}

.task-action-btn:hover {
    background: var(--accent-primary);
    color: #fff;
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.task-action-btn:hover svg {
    stroke: #fff;
}

.task-action-btn:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

/* Remarks button with content indicator */
.task-action-btn.has-content {
    background: var(--accent-primary-light);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.task-action-btn.has-content svg {
    stroke: var(--accent-primary);
}

.task-action-btn.has-content:hover {
    background: var(--accent-primary);
    color: #fff;
}

.task-action-btn.has-content:hover svg {
    stroke: #fff;
}

/* Remarks indicator (star) */
.remarks-indicator {
    position: absolute;
    top: -4px;
    right: -4px;
    color: var(--accent-primary);
    font-size: 16px;
    font-weight: bold;
    line-height: 1;
    animation: pulse-star 2s ease-in-out infinite;
    text-shadow: 0 0 4px var(--accent-primary);
}

@keyframes pulse-star {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.15);
    }
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 32px;
    max-width: 560px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    border: 2px solid var(--border-primary);
    box-shadow: var(--shadow-xl);
    position: relative;
    animation: modalSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }

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

.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--bg-gradient);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

/* Modals: solid brand accent on top bar */
.modal-content::before {
    background: var(--accent-primary) !important;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border-secondary);
}

.modal-header h3 {
    font-size: 24px;
    color: var(--text-primary);
    font-weight: 700;
}

.close-modal {
    /* Structure */
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    
    /* Visual */
    background: var(--bg-secondary);
    border: 2px solid var(--border-primary);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 24px;
    line-height: 1;
    box-shadow: var(--shadow-sm);
    
    /* Interaction */
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
}

.close-modal:hover {
    background: var(--accent-danger);
    color: #ffffff;
    border-color: var(--accent-danger);
    transform: rotate(90deg) scale(1.05);
    box-shadow: var(--shadow-md), 0 0 0 4px var(--accent-danger-light);
}

.close-modal:active {
    transform: rotate(90deg) scale(0.95);
    box-shadow: var(--shadow-sm);
}

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

.history-item {
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    border-left: 4px solid var(--accent-primary);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.history-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(4px);
}

.history-time {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 8px;
    font-weight: 500;
}

/* Empty state polishing */
.empty-state {
    border: 1.5px dashed var(--border-primary);
    background: var(--bg-primary);
    color: var(--text-secondary);
    text-align: center;
    padding: 80px 32px;
    border-radius: var(--radius-lg);
    margin: 40px;
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 16px;
}

/* Admin Panel Styles */
.admin-table-container {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-primary);
    overflow-x: auto;
    margin-bottom: 32px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.admin-table thead {
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
}

.admin-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-primary);
    white-space: nowrap;
}

.admin-table tbody tr {
    border-bottom: 1px solid var(--border-secondary);
    transition: background 0.2s ease;
}

.admin-table tbody tr:hover {
    background: var(--bg-secondary);
}

.admin-table td {
    padding: 16px;
    color: var(--text-primary);
    vertical-align: middle;
}

.admin-table .role-badge {
    display: inline-flex;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-table .role-badge.role-admin {
    background: var(--accent-danger-light);
    color: var(--accent-danger);
    border: 1px solid var(--accent-danger);
}

.admin-table .role-badge.role-user {
    background: var(--accent-primary-light);
    color: var(--accent-primary);
    border: 1px solid var(--accent-primary);
}

.admin-table .empty-row td {
    padding: 48px;
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
}

.admin-section {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-primary);
    margin-bottom: 24px;
}

.admin-section h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.project-assignment-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 28px;
    background: var(--bg-secondary);
    padding: 24px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-secondary);
}

.project-assignment-grid .form-group {
    margin-bottom: 0;
}

.project-assignment-grid .form-group label {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.project-assignment-grid .form-group label svg {
    flex-shrink: 0;
}

.project-assignment-grid select {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    font-size: 14px;
    background: var(--bg-primary);
    border: 2px solid var(--border-primary);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.project-assignment-grid select:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-sm);
}

.project-assignment-grid select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 4px var(--accent-primary-light);
}

/* User Selection Row with Add Button */
.user-selection-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: end;
}

.user-selection-row select {
    height: 48px;
}

.user-selection-row .btn {
    height: 48px;
    padding: 0 32px;
    min-width: 120px;
    white-space: nowrap;
}

/* Assignment Divider */
.assignment-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, var(--border-primary), transparent);
    margin: 8px 0;
    position: relative;
}

.assignment-divider::after {
    content: '↓';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-secondary);
    color: var(--accent-primary);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    border: 2px solid var(--border-primary);
}

.members-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 32px 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-primary);
}

.members-section-header h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.count-badge {
    background: var(--accent-primary-light);
    color: var(--accent-primary);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid var(--accent-primary);
}

.members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
    margin-top: 20px;
}

.member-card {
    background: var(--bg-primary);
    border: 2px solid var(--border-primary);
    border-radius: var(--radius-md);
    padding: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.member-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    background: var(--bg-elevated);
}

.member-card-info {
    flex: 1;
    min-width: 0; /* Allows text truncation */
}

.member-card-name {
    font-weight: 600;
    font-size: 15px;
    color: var(--text-primary);
    margin-bottom: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.member-card-role {
    display: inline-flex;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--accent-primary-light);
    color: var(--accent-primary);
    border: 1px solid var(--accent-primary);
}

/* Bin View Styles */
.bin-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 2px solid var(--border-primary);
}

.bin-tab {
    padding: 12px 24px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: -2px;
}

.bin-tab:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.bin-tab.active {
    color: var(--accent-primary);
    border-bottom-color: var(--accent-primary);
}

.bin-content {
    display: none;
}

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

.bin-item {
    background: var(--bg-primary);
    border: 2px solid var(--border-primary);
    border-left: 4px solid var(--accent-danger);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 16px;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.bin-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(4px);
    border-color: var(--accent-danger);
}

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

.bin-item-info {
    flex: 1;
    min-width: 0;
}

.bin-item-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.bin-item-description {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    line-height: 1.5;
}

.bin-item-meta {
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    margin-top: 12px;
}

.bin-item-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.bin-item-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.bin-empty-state {
    text-align: center;
    padding: 80px 40px;
    color: var(--text-secondary);
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    border: 2px dashed var(--border-primary);
}

.bin-empty-state svg {
    width: 64px;
    height: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
    stroke: var(--text-tertiary);
}

.bin-empty-state h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.bin-empty-state p {
    font-size: 14px;
}

/* User Management */
.user-list {
    max-height: 240px;
    overflow-y: auto;
}

.user-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    margin-bottom: 10px;
    border: 2px solid var(--border-secondary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
}

.user-item:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-md);
    transform: translateX(4px);
}

.user-item-info {
    flex: 1;
}

.user-item-email {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.user-item-role {
    font-size: 12px;
    color: var(--accent-primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 768px) {
    /* Mobile Sidebar - Slide from Left */
    .sidebar {
        position: fixed;
        left: 0;
        top: 60px; /* Below header */
        bottom: 0;
        width: 280px;
        max-width: 80vw;
        border-right: 1px solid var(--border-primary);
        border-bottom: none;
        box-shadow: var(--shadow-xl);
        transform: translateX(-100%);
        z-index: 101;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .sidebar-close {
        display: flex;
    }
    
    .sidebar-toggle {
        display: flex;
    }
    
    .sidebar.open ~ .sidebar-overlay {
        display: block;
    }

    .app-main {
        flex-direction: column;
        position: relative;
    }
    
    /* Add space for sidebar toggle button */
    .main-content {
        padding: 80px 16px 16px 16px; /* Extra top padding for toggle button */
    }
    
    .empty-state {
        margin: 20px 0;
        padding: 60px 24px;
    }
    
    .content-header {
        margin-top: 0;
    }
    
    .content-header h2 {
        font-size: 20px;
        line-height: 1.3;
        word-wrap: break-word;
    }
    
    .content-header p {
        font-size: 13px;
    }
    
    /* Admin panel spacing on mobile */
    #admin-panel .content-header h2 {
        font-size: 18px;
    }

    .kanban-board {
        flex-direction: column;
        gap: 16px;
    }
    
    .kanban-column {
        min-width: auto;
        width: 100%;
    }

    .app-logo {
        height: 36px;
    }

    .app-logo-text {
        font-size: 11px;
    }

    .app-logo-container {
        gap: 6px;
    }

    .app-header {
        padding: 10px 16px;
        height: 60px;
    }
    
    .header-right {
        gap: 8px;
    }
    
    .user-info {
        gap: 6px;
    }
    
    #user-name {
        display: none; /* Hide user name on mobile to save space */
    }
    
    /* Mobile Button Optimizations */
    .btn {
        padding: 12px 20px;
        font-size: 14px;
        min-height: 48px; /* Larger touch target */
    }
    
    .btn-small {
        padding: 10px 14px;
        font-size: 13px;
        min-height: 40px;
    }
    
    .btn-group {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-group .btn {
        width: 100%;
    }
    
    .content-actions {
        width: 100%;
    }
    
    .content-actions .btn {
        flex: 1;
    }
    
    .theme-toggle {
        width: 40px;
        height: 40px;
    }
    
    /* Adjust task action buttons for touch */
    .task-action-btn {
        width: 36px;
        height: 36px;
    }
    
    /* Admin Table Responsive */
    .admin-table-container {
        padding: 16px;
        margin-bottom: 20px;
    }
    
    .admin-section {
        padding: 16px;
        margin-bottom: 20px;
    }
    
    .admin-table {
        font-size: 13px;
    }
    
    .admin-table th,
    .admin-table td {
        padding: 12px 8px;
    }
    
    /* Stack table on mobile */
    .admin-table thead {
        display: none;
    }
    
    .admin-table tbody tr {
        display: block;
        margin-bottom: 16px;
        border: 1px solid var(--border-primary);
        border-radius: var(--radius-md);
        padding: 12px;
        background: var(--bg-secondary);
    }
    
    .admin-table td {
        display: block;
        text-align: left;
        padding: 8px 0;
        border: none;
    }
    
    .admin-table td::before {
        content: attr(data-label);
        font-weight: 600;
        display: inline-block;
        width: 100px;
        color: var(--text-secondary);
    }
    
    .project-assignment-grid {
        grid-template-columns: 1fr;
        padding: 16px;
    }
    
    .user-selection-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .user-selection-row .btn {
        width: 100%;
    }
    
    .assignment-divider {
        margin: 16px 0;
    }
    
    .members-grid {
        grid-template-columns: 1fr;
    }
    
    .member-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .member-card .btn {
        width: 100%;
    }
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important;
        scroll-behavior: auto !important;
    }
}

/* Sortable styles */
.sortable-ghost {
    opacity: 0.4;
    background: var(--border-secondary) !important;
    border: 1px dashed var(--accent-primary);
}

.sortable-drag {
    opacity: 1;
    box-shadow: var(--shadow-lg) !important;
    cursor: grabbing !important;
}

.task-list {
    min-height: 80px;
    transition: background-color 0.2s;
}

.task-list:empty::after {
    content: 'Drop tasks here';
    display: block;
    text-align: center;
    padding: 24px;
    color: var(--text-secondary);
    font-size: 13px;
}

/* Lazy Loading Skeleton/Animation */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.task-card[style*="visibility: hidden"] {
    background: linear-gradient(
        90deg,
        var(--bg-secondary) 25%,
        var(--bg-tertiary) 50%,
        var(--bg-secondary) 75%
    );
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
    min-height: 120px;
}

/* Performance: Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .task-card[style*="visibility: hidden"] {
        animation: none;
    }
}

