/* ===================================================
   ProMen - Project Management CSS
   Premium Dark Theme with Glassmorphism
   =================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ============ CSS Variables ============ */
:root[data-theme="dark"],
:root {
    --bg-primary: #0f0d1a;
    --bg-secondary: #1a1730;
    --bg-tertiary: #252240;
    --bg-card: rgba(30, 27, 55, 0.85);
    --bg-glass: rgba(255, 255, 255, 0.04);
    --bg-glass-hover: rgba(255, 255, 255, 0.08);
    --bg-input: rgba(255, 255, 255, 0.06);

    --text-primary: #f1f0f7;
    --text-secondary: #a09cb5;
    --text-muted: #6b6780;
    --text-accent: #c4b5fd;

    --accent-primary: #8b5cf6;
    --accent-secondary: #6366f1;
    --accent-gradient: linear-gradient(135deg, #8b5cf6, #6366f1, #ec4899);
    --accent-glow: rgba(139, 92, 246, 0.3);

    --border-color: rgba(255, 255, 255, 0.08);
    --border-color-hover: rgba(139, 92, 246, 0.3);

    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #06b6d4;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 30px rgba(139, 92, 246, 0.15);

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;

    --sidebar-width: 260px;
    --header-height: 64px;
    --bg-list: rgba(30, 27, 55, 0.9);
    --bg-board-header: rgba(0, 0, 0, 0.3);
    --text-board-header: #ffffff;
    --bg-header: rgba(15, 13, 26, 0.8);
}

:root[data-theme="light"] {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f5f9;
    --bg-card: rgba(255, 255, 255, 0.9);
    --bg-glass: rgba(0, 0, 0, 0.04);
    --bg-glass-hover: rgba(0, 0, 0, 0.08);
    --bg-input: #ffffff;

    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --text-accent: #6366f1;

    --border-color: rgba(0, 0, 0, 0.08);
    --border-color-hover: rgba(139, 92, 246, 0.2);

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 20px rgba(139, 92, 246, 0.1);

    --bg-list: rgba(255, 255, 255, 0.85);
    --bg-board-header: rgba(255, 255, 255, 0.5);
    --text-board-header: #1e293b;
    --bg-header: rgba(255, 255, 255, 0.8);
}

/* ============ Reset & Base ============ */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

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

a:hover {
    color: var(--text-accent);
}

img {
    max-width: 100%;
}

/* ============ Scrollbar ============ */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.3);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(139, 92, 246, 0.5);
}

/* ============ Auth Pages ============ */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    position: relative;
    overflow: hidden;
}

.auth-page::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.15), transparent 70%);
    top: -200px;
    right: -200px;
    animation: float 8s ease-in-out infinite;
}

.auth-page::after {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.1), transparent 70%);
    bottom: -200px;
    left: -200px;
    animation: float 10s ease-in-out infinite reverse;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    33% {
        transform: translate(30px, -30px) rotate(5deg);
    }

    66% {
        transform: translate(-20px, 20px) rotate(-5deg);
    }
}

.auth-card {
    width: 100%;
    max-width: 440px;
    padding: 48px;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    position: relative;
    z-index: 1;
    animation: slideUp 0.6s ease;
}

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

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

.auth-logo {
    text-align: center;
    margin-bottom: 36px;
}

.auth-logo h1 {
    font-size: 2rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.auth-logo p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 8px;
}

/* ============ Form Elements ============ */
.form-group {
    margin-bottom: 20px;
}

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

.form-control {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: inherit;
    transition: var(--transition);
    outline: none;
}

.form-control:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-glow);
    background: rgba(255, 255, 255, 0.08);
}

.form-control::placeholder {
    color: var(--text-muted);
}

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

select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23a09cb5' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

select.form-control option {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

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

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 4px 15px var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px var(--accent-glow);
    color: white;
}

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

.btn-secondary:hover {
    background: var(--bg-glass-hover);
    border-color: var(--border-color-hover);
    color: var(--text-primary);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.25);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    padding: 8px 12px;
}

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

.btn-sm {
    padding: 6px 14px;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 1rem;
}

.btn-block {
    width: 100%;
}

.btn-icon {
    padding: 8px;
    border-radius: var(--radius-sm);
}

/* ============ Alerts ============ */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 0.9rem;
    animation: slideDown 0.3s ease;
}

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

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

.alert-success {
    background: rgba(34, 197, 94, 0.12);
    color: var(--success);
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.alert-error {
    background: rgba(239, 68, 68, 0.12);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert-info {
    background: rgba(6, 182, 212, 0.12);
    color: var(--info);
    border: 1px solid rgba(6, 182, 212, 0.2);
}

/* ============ Layout ============ */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    transition: var(--transition);
}

.sidebar-brand {
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-brand .brand-icon {
    width: 40px;
    height: 40px;
    background: var(--accent-gradient);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
    font-weight: 800;
}

.sidebar-brand h2 {
    font-size: 1.2rem;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

.sidebar-section {
    margin-bottom: 24px;
}

.sidebar-section-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    padding: 0 12px;
    margin-bottom: 8px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition-fast);
}

.sidebar-link:hover {
    background: var(--bg-glass-hover);
    color: var(--text-primary);
}

.sidebar-link.active {
    background: rgba(139, 92, 246, 0.12);
    color: var(--accent-primary);
}

.sidebar-link i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
}

.sidebar-link .badge {
    margin-left: auto;
    background: var(--accent-primary);
    color: white;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-weight: 600;
}

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

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-fast);
}

.sidebar-user:hover {
    background: var(--bg-glass-hover);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
}

/* Header */
.top-header {
    height: var(--header-height);
    background: var(--bg-header);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    position: sticky;
    top: 0;
    z-index: 50;
}

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

.header-left h1 {
    font-size: 1.2rem;
    font-weight: 700;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.breadcrumb a {
    color: var(--text-secondary);
}

.breadcrumb a:hover {
    color: var(--text-primary);
}

.breadcrumb .separator {
    color: var(--text-muted);
}

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

.header-icon-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
    position: relative;
}

.header-icon-btn:hover {
    background: var(--bg-glass-hover);
    color: var(--text-primary);
}

.header-user-btn {
    display: flex;
    align-items: center;
    padding: 4px 8px;
    padding-left: 12px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-fast);
    border: 1px solid transparent;
}

.header-user-btn:hover {
    background: var(--bg-glass-hover);
    border-color: var(--border-color);
}

.header-icon-btn .notif-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: var(--danger);
    border-radius: 50%;
    border: 2px solid var(--bg-primary);
}

.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.3rem;
    cursor: pointer;
    padding: 8px;
}

/* ============ Avatar ============ */
.avatar {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
    letter-spacing: 0.5px;
}

.avatar-sm {
    width: 28px;
    height: 28px;
    font-size: 0.65rem;
}

.avatar-lg {
    width: 42px;
    height: 42px;
    font-size: 0.9rem;
}

.avatar-xl {
    width: 56px;
    height: 56px;
    font-size: 1.1rem;
}

.avatar-group {
    display: flex;
}

.avatar-group .avatar {
    margin-left: -8px;
    border: 2px solid var(--bg-secondary);
}

.avatar-group .avatar:first-child {
    margin-left: 0;
}

/* ============ Page Content ============ */
.page-content {
    padding: 28px;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 16px;
}

.page-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
}

/* ============ Stats Cards ============ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-gradient);
    opacity: 0;
    transition: var(--transition);
}

.stat-card:hover {
    border-color: var(--border-color-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-bottom: 16px;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 4px;
}

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

/* ============ Section ============ */
.section {
    margin-bottom: 32px;
}

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

.section-title {
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title i {
    color: var(--accent-primary);
}

/* ============ Project Cards ============ */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.project-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
}

.project-card:hover {
    border-color: var(--border-color-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.project-card-banner {
    height: 8px;
    width: 100%;
}

.project-card-body {
    padding: 20px;
}

.project-card-body h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.project-card-body p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.project-card-meta .meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.project-card-meta .meta-item i {
    font-size: 0.85rem;
}

/* ============ Board Cards ============ */
.boards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.board-card {
    padding: 20px;
    border-radius: var(--radius-md);
    color: white;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    text-decoration: none;
}

.board-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.15);
    transition: var(--transition);
}

.board-card:hover::before {
    background: rgba(0, 0, 0, 0.05);
}

.board-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    color: white;
}

.board-card h4 {
    font-size: 1rem;
    font-weight: 700;
    position: relative;
    z-index: 1;
}

.board-card .board-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.8rem;
    opacity: 0.8;
    position: relative;
    z-index: 1;
}

.board-card .star-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    color: white;
    opacity: 0;
    cursor: pointer;
    font-size: 1rem;
    z-index: 2;
    transition: var(--transition-fast);
}

.board-card:hover .star-btn,
.board-card .star-btn.starred {
    opacity: 1;
}

.board-card .star-btn.starred {
    color: #fbbf24;
}

/* ============ Kanban Board ============ */
.board-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}


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

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

.board-header-left h1 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-board-header);
}

.board-header-left .star-toggle {
    background: none;
    border: none;
    color: var(--text-board-header);
    opacity: 0.6;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 4px;
    transition: var(--transition-fast);
}

.board-header-left .star-toggle:hover,
.board-header-left .star-toggle.active {
    color: #fbbf24;
}

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

.board-container {
    flex: 1;
    padding: 20px;
    overflow-x: auto;
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

/* Lists */
.kanban-list.dragging {
    opacity: 0.5;
    transform: rotate(1deg);
}

.kanban-list {
    min-width: 300px;
    max-width: 300px;
    background: var(--bg-list);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 120px);
    flex-shrink: 0;
}

.list-header {
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: grab;
}

.list-header h3 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
}

.list-header .list-count {
    font-size: 0.75rem;
    color: var(--text-muted);
    background: var(--bg-glass);
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

.list-header .list-menu-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 1rem;
    transition: var(--transition-fast);
}

.list-header .list-menu-btn:hover {
    background: var(--bg-glass-hover);
    color: var(--text-primary);
}

.list-cards {
    padding: 0 8px 8px;
    overflow-y: auto;
    flex: 1;
    min-height: 20px;
}

.list-footer {
    padding: 8px;
}

.add-card-btn {
    width: 100%;
    padding: 10px 12px;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 0.85rem;
    font-family: inherit;
    cursor: pointer;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-fast);
}

.add-card-btn:hover {
    background: var(--bg-glass-hover);
    color: var(--text-primary);
}

.add-card-form {
    display: none;
    padding: 0 8px 8px;
}

.add-card-form textarea {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-family: inherit;
    resize: none;
    outline: none;
    min-height: 54px;
}

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

.add-card-form .form-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

/* Add list */
.add-list-wrapper {
    min-width: 300px;
    flex-shrink: 0;
}

.add-list-btn {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px dashed rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.add-list-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-color: rgba(255, 255, 255, 0.25);
}

.add-list-form {
    display: none;
    background: rgba(30, 27, 55, 0.9);
    border-radius: var(--radius-md);
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ============ Kanban Card ============ */
.kanban-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 12px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: var(--transition-fast);
    position: relative;
}

.kanban-card:hover {
    border-color: var(--border-color-hover);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.kanban-card.dragging {
    opacity: 0.5;
    transform: rotate(2deg);
}

.kanban-card .card-cover {
    height: 6px;
    border-radius: 3px;
    margin-bottom: 10px;
}

.kanban-card .card-labels {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 8px;
}

.kanban-card .card-label {
    height: 18px;
    padding: 0 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    color: white;
    display: flex;
    align-items: center;
    line-height: 1;
    font-weight: 600;
    transition: var(--transition-fast);
}

.kanban-card .card-title {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.4;
    margin-bottom: 8px;
    word-wrap: break-word;
}

.kanban-card .card-badges {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.kanban-card .card-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.kanban-card .card-badge i {
    font-size: 0.8rem;
}

.kanban-card .card-badge.due-overdue {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.12);
    padding: 2px 6px;
    border-radius: 4px;
}

.kanban-card .card-badge.due-soon {
    color: var(--warning);
    background: rgba(245, 158, 11, 0.12);
    padding: 2px 6px;
    border-radius: 4px;
}

.kanban-card .card-badge.due-complete {
    color: var(--success);
    background: rgba(34, 197, 94, 0.12);
    padding: 2px 6px;
    border-radius: 4px;
}

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

.kanban-card .card-priority {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.priority-low {
    background: rgba(34, 197, 94, 0.12);
    color: var(--success);
}

.priority-medium {
    background: rgba(6, 182, 212, 0.12);
    color: var(--info);
}

.priority-high {
    background: rgba(245, 158, 11, 0.12);
    color: var(--warning);
}

.priority-urgent {
    background: rgba(239, 68, 68, 0.12);
    color: var(--danger);
}

/* ============ Card Detail Modal ============ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 50px 20px;
    z-index: 1000;
    overflow-y: auto;
}

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

.modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 760px;
    position: relative;
    animation: modalSlideUp 0.3s ease;
}

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

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

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: var(--bg-glass);
    border: none;
    color: var(--text-secondary);
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
    z-index: 10;
}

.modal-close:hover {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

.modal-body {
    padding: 32px;
    display: grid;
    grid-template-columns: 1fr 220px;
    gap: 28px;
}

.modal-main {
    min-width: 0;
}

.modal-sidebar {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.modal-header-title {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 4px;
}

.modal-header-title i {
    color: var(--text-muted);
    font-size: 1.2rem;
    margin-top: 4px;
}

.modal-header-title h2 {
    font-size: 1.3rem;
    font-weight: 700;
    flex: 1;
}

.modal-header-title input {
    font-size: 1.3rem;
    font-weight: 700;
    background: transparent;
    border: none;
    color: var(--text-primary);
    width: 100%;
    outline: none;
    font-family: inherit;
    padding: 0;
}

.modal-header-title input:focus {
    border-bottom: 2px solid var(--accent-primary);
}

.modal-list-info {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 24px;
    padding-left: 32px;
}

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

.modal-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.modal-section-title i {
    color: var(--text-muted);
    font-size: 1rem;
}

.modal-sidebar-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 4px;
    padding: 0 4px;
}

.modal-sidebar .btn {
    justify-content: flex-start;
    font-size: 0.8rem;
    padding: 8px 12px;
    background: var(--bg-glass);
    border: 1px solid transparent;
    color: var(--text-secondary);
}

.modal-sidebar .btn:hover {
    background: var(--bg-glass-hover);
    color: var(--text-primary);
}

/* Description */
.description-content {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
    padding: 12px;
    background: var(--bg-glass);
    border-radius: var(--radius-sm);
    min-height: 80px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.description-content:hover {
    background: var(--bg-glass-hover);
}

.description-editor {
    display: none;
}

.description-editor textarea {
    width: 100%;
    padding: 12px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    min-height: 120px;
    resize: vertical;
    outline: none;
}

.description-editor textarea:focus {
    border-color: var(--accent-primary);
}

/* Labels in modal */
.modal-labels {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
    padding-left: 32px;
}

.modal-label-badge {
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
}

/* Members in modal */
.modal-members {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
    padding-left: 32px;
}

/* Checklist */
.checklist-group {
    margin-bottom: 20px;
}

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

.checklist-header h4 {
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.checklist-progress {
    width: 100%;
    height: 6px;
    background: var(--bg-glass);
    border-radius: 3px;
    margin-bottom: 12px;
    overflow: hidden;
}

.checklist-progress-bar {
    height: 100%;
    background: var(--accent-gradient);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.checklist-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px;
    border-radius: 4px;
    transition: var(--transition-fast);
}

.checklist-item:hover {
    background: var(--bg-glass);
}

.checklist-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-primary);
    cursor: pointer;
    flex-shrink: 0;
}

.checklist-item span {
    font-size: 0.85rem;
    color: var(--text-primary);
    flex: 1;
}

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

.checklist-item .delete-item {
    opacity: 0;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.8rem;
    padding: 4px;
    transition: var(--transition-fast);
}

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

.checklist-item .delete-item:hover {
    color: var(--danger);
}

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

.add-checklist-item input {
    flex: 1;
    padding: 8px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.85rem;
    font-family: inherit;
    outline: none;
}

.add-checklist-item input:focus {
    border-color: var(--accent-primary);
}

/* Comments */
.comment-form {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 20px;
}

.comment-form textarea {
    flex: 1;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-family: inherit;
    min-height: 42px;
    resize: none;
    outline: none;
}

.comment-form textarea:focus {
    border-color: var(--accent-primary);
    min-height: 80px;
}

.comment-item {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

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

.comment-content {
    flex: 1;
    min-width: 0;
}

.comment-content .comment-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.comment-content .comment-author {
    font-size: 0.85rem;
    font-weight: 600;
}

.comment-content .comment-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.comment-content .comment-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.comment-content .comment-actions {
    margin-top: 4px;
}

.comment-content .comment-actions button {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.75rem;
    cursor: pointer;
    padding: 2px 4px;
    text-decoration: underline;
}

.comment-content .comment-actions button:hover {
    color: var(--danger);
}

/* Due date */
.due-date-display {
    padding-left: 32px;
    margin-bottom: 16px;
}

.due-date-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
}

/* ============ Dropdown ============ */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 8px;
    min-width: 200px;
    box-shadow: var(--shadow-lg);
    display: none;
    z-index: 200;
    animation: fadeIn 0.15s ease;
}

.dropdown-menu.show {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

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

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
}

.dropdown-item:hover {
    background: var(--bg-glass-hover);
    color: var(--text-primary);
}

.dropdown-item.danger:hover {
    background: rgba(239, 68, 68, 0.12);
    color: var(--danger);
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 6px 0;
}

/* Label picker */
.label-picker {
    max-height: 250px;
    overflow-y: auto;
}

.label-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.label-option:hover {
    background: var(--bg-glass);
}

.label-option .label-color {
    width: 100%;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    padding: 0 10px;
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
    position: relative;
}

.label-option .label-color .check-icon {
    margin-left: auto;
}

/* Member picker */
.member-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.member-option:hover {
    background: var(--bg-glass);
}

.member-option .member-info {
    flex: 1;
}

.member-option .member-info .member-name {
    font-size: 0.85rem;
    font-weight: 500;
}

.member-option .member-info .member-email {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.member-option .check-icon {
    color: var(--accent-primary);
    font-size: 0.9rem;
}

/* ============ Color Picker ============ */
.color-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.color-option {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    border: 3px solid transparent;
    transition: var(--transition-fast);
}

.color-option:hover,
.color-option.selected {
    border-color: white;
    transform: scale(1.1);
}

/* ============ My Tasks Table ============ */
.tasks-list {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.task-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition-fast);
    cursor: pointer;
}

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

.task-item:hover {
    background: var(--bg-glass-hover);
}

.task-item .task-priority-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

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

.task-item .task-title {
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.task-item .task-due {
    font-size: 0.8rem;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    white-space: nowrap;
}

/* ============ Empty State ============ */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state i {
    font-size: 3rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

/* ============ Create Card (New Board/Project) ============ */
.create-card {
    background: var(--bg-card);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 120px;
}

.create-card:hover {
    border-color: var(--accent-primary);
    background: rgba(139, 92, 246, 0.05);
}

.create-card i {
    font-size: 2rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.create-card span {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* ============ Popover (Label/Member Picker) ============ */
.popover {
    position: fixed;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    min-width: 280px;
    max-width: 320px;
    box-shadow: var(--shadow-lg);
    z-index: 1100;
    display: none;
}

.popover.show {
    display: block;
}

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

.popover-header h4 {
    font-size: 0.9rem;
    font-weight: 600;
}

.popover-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
}

/* ============ Toast ============ */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    padding: 14px 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.85rem;
    box-shadow: var(--shadow-lg);
    animation: toastIn 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

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

.toast.success {
    border-left: 4px solid var(--success);
}

.toast.error {
    border-left: 4px solid var(--danger);
}

.toast.info {
    border-left: 4px solid var(--info);
}

/* ============ Responsive ============ */
@media (max-width: 1024px) {
    .modal-body {
        grid-template-columns: 1fr;
    }

    .modal-sidebar {
        flex-direction: row;
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .menu-toggle {
        display: block;
    }

    .page-content {
        padding: 20px 16px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .boards-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .auth-card {
        padding: 32px 24px;
    }

    .modal-content {
        margin: 10px;
    }

    .modal-body {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .boards-grid {
        grid-template-columns: 1fr;
    }

    .kanban-list {
        min-width: 280px;
        max-width: 280px;
    }
}

/* ============ Utility ============ */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

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

.text-success {
    color: var(--success);
}

.text-danger {
    color: var(--danger);
}

.text-warning {
    color: var(--warning);
}

.text-primary {
    color: var(--accent-primary);
}

.mt-1 {
    margin-top: 8px;
}

.mt-2 {
    margin-top: 16px;
}

.mt-3 {
    margin-top: 24px;
}

.mb-1 {
    margin-bottom: 8px;
}

.mb-2 {
    margin-bottom: 16px;
}

.mb-3 {
    margin-bottom: 24px;
}

.d-flex {
    display: flex;
}

.align-center {
    align-items: center;
}

.gap-1 {
    gap: 8px;
}

.gap-2 {
    gap: 16px;
}

.flex-1 {
    flex: 1;
}

.fw-bold {
    font-weight: 700;
}

.hidden {
    display: none !important;
}