/* Google Font */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
    --primary-color: #0F172A;
    --primary-hover: #020617;
    --brand-green: #10B981;
    --brand-green-hover: #059669;
    
    --bg-page: #F8FAFC;
    --card-bg: #FFFFFF;
    --border-color: #E2E8F0;
    
    --text-primary: #0F172A;
    --text-body: #475569;
    --text-secondary: #64748B;
    --text-muted: #94A3B8;
    
    --error-color: #EF4444;
    --success-color: #10B981;
    --radius-btn: 8px;
    --radius-card: 16px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--bg-page);
    color: var(--text-body);
    font-weight: 400;
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
}

/* ==========================================================================
   2-Column Split Auth Layout
   ========================================================================== */
.auth-split-wrapper {
    width: 100vw;
    min-height: 100vh;
    display: flex;
    background: #FFFFFF;
}

/* ==========================================================================
   2-Column Split Auth Layout (70% Showcase / 30% Form)
   ========================================================================== */
.auth-split-wrapper {
    width: 100vw;
    min-height: 100vh;
    display: flex;
    background: #FFFFFF;
    overflow-x: hidden;
}

/* LEFT COLUMN: Poster & Showcase Visual (68% - 70% width) */
.auth-poster-column {
    flex: 0 0 68%;
    width: 68%;
    /* Exact Brand Gradient from logo.svg */
    background: linear-gradient(135deg, #0067FF 0%, #0069FC 28%, #008EF7 55%, #00BDE1 78%, #08D894 100%);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 44px 52px;
    color: #FFFFFF;
}

/* Subtle mesh overlays */
.auth-poster-column::before {
    content: '';
    position: absolute;
    top: -100px;
    left: -100px;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0) 70%);
    pointer-events: none;
    z-index: 1;
}

.auth-poster-column::after {
    content: '';
    position: absolute;
    bottom: -120px;
    right: -80px;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.22) 0%, rgba(0, 0, 0, 0) 70%);
    pointer-events: none;
    z-index: 1;
}

.poster-inner {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    max-width: 680px;
    margin: 0 auto;
    width: 100%;
}

.poster-brand-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* White background button wrapper for logo */
.poster-logo-link {
    display: inline-flex;
    align-items: center;
    background: #FFFFFF;
    padding: 8px 16px;
    border-radius: 10px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.poster-logo-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.16);
}

.poster-logo-img {
    height: 24px;
    width: auto;
    display: block;
}

.poster-badge {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #FFFFFF;
    font-size: 0.74rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 6px;
    letter-spacing: 0.05em;
    backdrop-filter: blur(8px);
}

/* Poster Visual Center Section */
.poster-showcase-visual {
    margin: 28px 0;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.poster-mockup-stack {
    position: relative;
    width: 100%;
    max-width: 480px;
    z-index: 3;
}

.poster-card-floating {
    background: rgba(11, 19, 43, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 14px;
    padding: 18px 22px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.4);
}

.card-front {
    position: relative;
    z-index: 3;
}

.poster-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.avatar-group-sm {
    display: flex;
    align-items: center;
}

.av-mini {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid #0B132B;
    margin-left: -6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
}

.av-mini:first-child {
    margin-left: 0;
}

.status-pill-green {
    background: rgba(16, 185, 129, 0.25);
    color: #A7F3D0;
    border: 1px solid rgba(16, 185, 129, 0.45);
    font-size: 0.68rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 6px;
}

.poster-card-h4 {
    font-size: 0.98rem;
    font-weight: 800;
    color: #FFFFFF;
    line-height: 1.4;
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}

.poster-card-footer {
    display: flex;
    align-items: center;
    gap: 8px;
}

.badge-tag-sm {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #F8FAFC;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 5px;
}

.poster-hero-image-wrap {
    width: 100%;
    max-width: 480px;
    margin-top: -30px;
    position: relative;
    z-index: 2;
    text-align: center;
}

.poster-team-img {
    width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(0 15px 30px rgba(0, 0, 0, 0.35));
}

/* Poster Bottom Quote */
.poster-quote-box {
    background: rgba(11, 19, 43, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    padding: 18px 22px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.poster-stars {
    color: #FBBF24;
    font-size: 0.88rem;
    letter-spacing: 2px;
    margin-bottom: 6px;
}

.poster-quote {
    font-size: 0.86rem;
    color: #F1F5F9;
    line-height: 1.55;
    font-weight: 500;
    margin-bottom: 10px;
}

.poster-author {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-size: 0.82rem;
    font-weight: 800;
    color: #FFFFFF;
}

.author-title {
    font-size: 0.72rem;
    color: #CBD5E1;
}

/* RIGHT COLUMN: Auth Form (30% - 32% width) */
.auth-form-column {
    flex: 0 0 32%;
    width: 32%;
    min-width: 360px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 48px;
    background: #FFFFFF;
    overflow-y: auto;
    box-sizing: border-box;
}

.auth-form-card {
    width: 100%;
    max-width: 380px;
    background: #FFFFFF;
    /* Static card - no hover shadow, no hover transform */
    border: none;
    box-shadow: none;
    padding: 0;
    transition: none;
    margin: 0 auto;
}

.auth-form-card:hover {
    box-shadow: none;
    transform: none;
}

.mobile-brand-logo {
    display: none;
    margin-bottom: 20px;
    text-align: center;
}

.auth-header {
    text-align: left;
    margin-bottom: 20px;
}

.auth-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.03em;
    margin-bottom: 5px;
    line-height: 1.2;
}

.auth-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
    line-height: 1.45;
}

/* Google OAuth Button - Rectangle */
.btn-google-auth {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 11px 16px;
    background: #FFFFFF;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-btn);
    font-size: 0.92rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.15s ease;
    cursor: pointer;
}

.btn-google-auth:hover {
    background: #F8FAFC;
    border-color: #CBD5E1;
}

.btn-google-auth svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    margin: 20px 0;
    gap: 12px;
}

.divider-line {
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.divider-text {
    color: var(--text-muted);
    font-size: 0.76rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* Form Controls */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

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

.form-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.form-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.forgot-link {
    font-size: 0.78rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.15s ease;
}

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

.form-input {
    width: 100%;
    padding: 10px 14px;
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-btn);
    color: var(--text-primary);
    font-size: 0.92rem;
    font-weight: 500;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-input:focus {
    border-color: #0F172A;
    box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.08);
}

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

/* Primary Rectangular Button */
.btn-auth-primary,
.btn-primary {
    width: 100%;
    padding: 12px 20px;
    background: #0F172A;
    color: #FFFFFF;
    border: 1px solid #0F172A;
    border-radius: var(--radius-btn);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
    margin-top: 4px;
    letter-spacing: -0.01em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-family: inherit;
}

.btn-auth-primary:hover,
.btn-primary:hover {
    background: #020617;
    border-color: #020617;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px 20px;
    border-radius: var(--radius-btn);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    border: none;
    transition: all 0.15s ease;
    font-family: inherit;
}

@keyframes btnSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.btn-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: btnSpin 0.65s linear infinite;
    vertical-align: middle;
    flex-shrink: 0;
}

.btn-spinner-dark {
    border: 2px solid rgba(0, 0, 0, 0.2);
    border-top-color: #09090b;
}

/* Standalone Centered Form Box (Create Workspace) */
.auth-container {
    width: 100vw;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background-color: var(--bg-page);
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-card);
    padding: 40px 36px;
    box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05);
    /* Static - no hover transformation */
    transition: none;
}

.auth-card:hover {
    box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05);
    transform: none;
}

/* Footer Link */
.auth-footer-text {
    text-align: center;
    margin-top: 22px;
    font-size: 0.88rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.auth-link-bold {
    color: var(--text-primary);
    font-weight: 700;
    text-decoration: none;
    margin-left: 3px;
    transition: color 0.15s ease;
}

.auth-link-bold:hover {
    text-decoration: underline;
}

/* Error text & Feedback */
.error-text {
    color: var(--error-color);
    font-size: 0.78rem;
    font-weight: 500;
    margin-top: 2px;
}

.is-invalid {
    border-color: var(--error-color) !important;
}

.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12) !important;
}

/* Responsive adjustments */
@media (max-width: 960px) {
    .auth-split-wrapper {
        flex-direction: column;
    }

    .auth-poster-column {
        display: none;
    }

    .auth-form-column {
        padding: 32px 20px;
        min-height: 100vh;
    }

    .mobile-brand-logo {
        display: block;
    }
}

/* Welcome Page Specific */
.welcome-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Dashboard Layout System */
.dashboard-layout {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background-color: var(--bg-dark);
    z-index: 10;
}

/* Sidebar */
.sidebar {
    width: 260px;
    height: 100%;
    background: rgba(255, 255, 255, 0.65);
    border-right: 1px solid var(--border-color);
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    position: relative;
}

/* Sidebar collapsed state */
.sidebar.collapsed {
    width: 70px;
}

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

.sidebar.collapsed .sidebar-header {
    justify-content: center;
    padding: 0;
}

.sidebar-logo {
    font-size: 1.25rem;
    font-weight: 700;
    background: linear-gradient(135deg, #ffffff 0%, #a1a1aa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    white-space: nowrap;
    opacity: 1;
    transition: opacity 0.2s ease;
}

.sidebar.collapsed .app-logo-text {
    display: none;
}

.sidebar-toggle-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.sidebar-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.sidebar-menu {
    list-style: none;
    padding: 20px 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.sidebar-item a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 10px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.sidebar-item.active a, .sidebar-item a:hover {
    background: hsla(calc(var(--base-h) + 137.5), var(--base-s), var(--base-l), 0.08);
    color: var(--text-primary);
}

.sidebar-item a svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.sidebar-item-text {
    font-size: 0.85rem;
    font-weight: 500;
}

.sidebar.collapsed .sidebar-item-text,
.sidebar.collapsed .sidebar-submenu,
.sidebar.collapsed #btn-toggle-projects-submenu {
    display: none !important;
}

.sidebar.collapsed .sidebar-item a {
    justify-content: center;
    padding: 12px 0;
}

/* Main Content Wrapper */
.main-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    height: 100%;
    overflow: hidden;
}

/* Top Bar */
.top-bar {
    height: 70px;
    background: rgba(255, 255, 255, 0.45);
    border-bottom: 1px solid var(--border-color);
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    flex-shrink: 0;
}

.top-bar-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.top-bar-user {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Content Area */
.content-area {
    padding: 30px;
    overflow-y: auto;
    flex-grow: 1;
    position: relative;
}

/* Real workspace details styling */
.workspace-details-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 30px;
    backdrop-filter: blur(16px);
    max-width: 800px;
    width: 100%;
}

.workspace-detail-row {
    display: flex;
    padding: 16px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.workspace-detail-row:last-child {
    border-bottom: none;
}

.workspace-detail-label {
    width: 180px;
    color: var(--text-secondary);
    font-weight: 500;
    flex-shrink: 0;
}

.workspace-detail-value {
    color: var(--text-primary);
    flex-grow: 1;
}

/* Sidebar Profile */
.sidebar-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar.collapsed .sidebar-profile {
    justify-content: center;
    padding: 16px 0;
}

.profile-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.profile-details {
    display: flex;
    flex-direction: column;
}

.sidebar.collapsed .profile-details {
    display: none;
}

.profile-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.profile-role {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.sidebar.collapsed .workspace-selector-container,
.sidebar.collapsed .sidebar-profile-workspace-section {
    display: none !important;
}

.workspace-dropdown-item:hover {
    background-color: #f3f4f6 !important;
}

/* Sidebar Search */
.sidebar-search {
    padding: 12px 16px;
}

.sidebar.collapsed .sidebar-search {
    padding: 12px 0;
    display: flex;
    justify-content: center;
}

.search-wrapper {
    position: relative;
    width: 100%;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--text-secondary);
}

.search-input {
    width: 100%;
    padding: 8px 12px 8px 36px;
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.85rem;
    outline: none;
    transition: all 0.3s ease;
}

.sidebar.collapsed .search-input {
    display: none;
}

.sidebar.collapsed .search-wrapper {
    width: auto;
}

.sidebar.collapsed .search-icon {
    position: static;
    transform: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar.collapsed .search-icon:hover {
    background: rgba(99, 102, 241, 0.08);
    color: var(--text-primary);
}

/* Sidebar Categories */
.sidebar-category {
    margin-top: 16px;
}

.category-title {
    padding: 0 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.sidebar.collapsed .category-title {
    display: none;
}

.category-menu {
    list-style: none;
    padding: 0 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.create-project-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 12px;
    background: transparent;
    border: 1px dashed var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.create-project-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: hsla(var(--base-h), var(--base-s), var(--base-l), 0.05);
}

.sidebar.collapsed .create-project-btn {
    justify-content: center;
    padding: 8px 0;
    border-style: solid;
}

.sidebar.collapsed .create-project-btn span {
    display: none;
}

.sidebar.collapsed #notification-btn {
    display: none;
}

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

.sidebar.collapsed .sidebar-footer {
    padding: 15px 0;
    display: flex;
    justify-content: center;
}

.sidebar-logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px 14px;
    background: #dc2626;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.25);
    transition: all 0.2s ease;
}

.sidebar-logout-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.sidebar-logout-btn:hover {
    background: #b91c1c;
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.4);
    transform: translateY(-1px);
}

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

.sidebar.collapsed .sidebar-logout-btn {
    display: none !important;
}

.sidebar.collapsed .sidebar-item-badge {
    display: none !important;
}

.btn-logout-confirm:hover {
    background: #b91c1c !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(220, 38, 38, 0.4) !important;
}

.sidebar-profile-footer {
    transition: all 0.2s ease;
}

.sidebar.collapsed .sidebar-profile-footer {
    justify-content: center !important;
    padding: 4px 0 !important;
}

.sidebar.collapsed .sidebar-profile-footer .profile-details {
    display: none !important;
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(4px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 100;
    animation: fadeIn 0.2s ease-out;
}

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

.modal-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 36px;
    width: 100%;
    max-width: 460px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    backdrop-filter: none;
    animation: slideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

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

.modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.modal-close-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.modal-close-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-primary);
}

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

.project-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary-color);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.project-card:hover {
    transform: translateY(-2px);
    border-color: rgba(var(--base-h), var(--base-s), var(--base-l), 0.3);
    box-shadow: 0 8px 24px hsla(var(--base-h), var(--base-s), var(--base-l), 0.05);
}

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

.project-card-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
}

.project-card-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    flex-grow: 1;
}

.project-card-meta {
    font-size: 0.75rem;
    color: var(--text-secondary);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 12px;
    margin-top: 4px;
}

/* Empty State */
.empty-state-card {
    background: var(--card-bg);
    border: 1px dashed var(--border-color);
    border-radius: 16px;
    padding: 60px 40px;
    text-align: center;
    max-width: 800px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.empty-state-icon {
    width: 48px;
    height: 48px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

/* Tabs System */
.tabs-navigation {
    display: flex;
    gap: 24px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 24px;
}

.tab-btn {
    background: transparent;
    border: none;
    padding: 12px 4px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    transition: color 0.2s ease;
}

.tab-btn:hover, .tab-btn.active {
    color: var(--primary-color);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-color);
}

/* Sub-tabs System */
.sub-tabs-navigation {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    background: rgba(0, 0, 0, 0.02);
    padding: 6px;
    border-radius: 8px;
    width: fit-content;
    border: 1px solid var(--border-color);
}

.sub-tab-btn {
    background: transparent;
    border: none;
    padding: 6px 16px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.sub-tab-btn.active {
    background: #ffffff;
    color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.invitation-tab-btn {
    background: transparent;
    border: none;
    padding: 6px 16px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.invitation-tab-btn.active {
    background: #ffffff;
    color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.tab-panel {
    display: none;
}

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

/* Kanban Board Layout */
.kanban-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    height: 100%;
    min-height: 450px;
}

.kanban-column {
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 400px;
}

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

.column-title {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
}

.column-count {
    font-size: 0.75rem;
    background: rgba(0, 0, 0, 0.05);
    padding: 2px 8px;
    border-radius: 10px;
    color: var(--text-secondary);
    font-weight: 600;
}

.kanban-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex-grow: 1;
}

.kanban-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 16px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
    cursor: grab;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.kanban-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.card-tag {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.card-title {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-primary);
    margin-bottom: 12px;
    line-height: 1.4;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(0, 0, 0, 0.03);
    padding-top: 12px;
}

/* Priority Badges */
.badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: capitalize;
}

.badge-low {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.badge-medium {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.badge-high {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* Assignee Circle */
.assignee-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.7rem;
}

.assignee-unassigned {
    background: rgba(0, 0, 0, 0.03);
    color: var(--text-secondary);
    border: 1px dashed var(--border-color);
}

/* Backlog styling */
.backlog-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.backlog-item {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s ease;
}

.backlog-item:hover {
    border-color: var(--primary-color);
}

.backlog-item-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-grow: 1;
}

.backlog-item-key {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary);
    min-width: 80px;
}

.backlog-item-title {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-primary);
}

.backlog-item-right {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
}

/* Gantt/Timeline View */
.timeline-wrapper {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    overflow-x: auto;
}

.timeline-header {
    display: grid;
    grid-template-columns: 200px repeat(4, 1fr);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
    margin-bottom: 16px;
}

.timeline-col-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.timeline-row {
    display: grid;
    grid-template-columns: 200px repeat(4, 1fr);
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.02);
}

.timeline-task-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.timeline-bar-container {
    grid-column: 2 / span 4;
    position: relative;
    height: 32px;
    background: rgba(0, 0, 0, 0.01);
    border-radius: 6px;
}

.timeline-bar {
    position: absolute;
    height: 24px;
    top: 4px;
    border-radius: 4px;
    background: var(--primary-color);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    padding-left: 10px;
    box-shadow: 0 2px 6px hsla(var(--base-h), var(--base-s), var(--base-l), 0.2);
}

/* List view table */
.list-view-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}

.list-view-table th {
    text-align: left;
    padding: 14px 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-secondary);
    background: rgba(0, 0, 0, 0.01);
    border-bottom: 1px solid var(--border-color);
}

.list-view-table td {
    padding: 14px 20px;
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-primary);
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.list-view-table tr:last-child td {
    border-bottom: none;
}

/* Pill Dropdowns and Inputs in Modals */
.pill-dropdown-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
}

.pill-select-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.pill-select-icon {
    position: absolute;
    left: 14px;
    pointer-events: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
}

.pill-select {
    appearance: none;
    -webkit-appearance: none;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 8px 16px 8px 34px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
    min-height: 38px;
}

.pill-select:hover {
    background: rgba(0, 0, 0, 0.02);
    border-color: var(--text-secondary);
}

.pill-input-text {
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 8px 16px 8px 34px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    outline: none;
    transition: all 0.2s ease;
    width: 140px;
    background: #ffffff;
    min-height: 38px;
}

.pill-input-text:focus {
    border-color: var(--primary-color);
}

.attachment-btn:hover {
    background: rgba(0, 0, 0, 0.03);
    border-color: var(--text-secondary) !important;
}

/* Side Drawer Styles */
.side-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 580px;
    height: 100vh;
    background: #ffffff;
    z-index: 150;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.08);
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-left: 1px solid var(--border-color);
}

.side-drawer.active {
    transform: translateX(0);
}

.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(2px);
    z-index: 140;
    display: none;
    animation: fadeIn 0.2s ease-out;
}

.drawer-body {
    flex-grow: 1;
    overflow-y: auto;
    padding: 40px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.drawer-footer {
    border-top: 1px solid var(--border-color);
    padding: 20px 40px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: #fafafa;
}

/* Comments section styling */
.comments-section {
    margin-top: 12px;
    border-top: 1px solid var(--border-color);
    padding-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-height: 240px;
    overflow-y: auto;
    padding-right: 4px;
}

.comment-item {
    background: rgba(0, 0, 0, 0.015);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px 16px;
}

.comment-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.comment-content {
    font-size: 0.88rem;
    color: var(--text-primary);
    line-height: 1.4;
}

.comment-input-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Drag over highlights */
.kanban-column.dragover {
    border: 2px dashed var(--primary-color);
    background: rgba(99, 102, 241, 0.03);
}

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

/* Gantt Arrow Overlay & Conflicts styling */
.timeline-wrapper {
    position: relative !important;
}

#gantt-svg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

.timeline-bar.conflict-bar {
    background: repeating-linear-gradient(
        45deg,
        #f87171,
        #f87171 10px,
        #ef4444 10px,
        #ef4444 20px
    ) !important;
}

.kanban-card.dependency-highlight {
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.5) !important;
    border-color: var(--error-color) !important;
    transform: scale(1.02);
    transition: all 0.2s ease;
}

/* Dependency dropdown/selection list style */
.dependency-list-wrapper {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 120px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 10px;
    background: #fafafa;
}

.dependency-item-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    cursor: pointer;
    color: var(--text-primary);
    padding: 4px;
    border-radius: 4px;
}

.dependency-item-checkbox:hover {
    background: rgba(0, 0, 0, 0.03);
}

/* Kanban Task Row Spacer */
.kanban-spacer {
    height: 110px;
    width: 100%;
    flex-shrink: 0;
    pointer-events: none;
}

/* =============================================
   TIMELINE SWIMLANE VIEW
   ============================================= */

.tl-outer {
    width: 100%;
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    background: #fff;
    font-size: 0.85rem;
}

/* The scroll container — full horizontal scroll */
.tl-scroll {
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #d1d5db transparent;
}
.tl-scroll::-webkit-scrollbar { height: 6px; }
.tl-scroll::-webkit-scrollbar-track { background: transparent; }
.tl-scroll::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }

.tl-header {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid var(--border-color);
    background: #f9fafb;
    position: sticky;
    top: 0;
    z-index: 10;
}

.tl-label-col {
    position: sticky;
    left: 0;
    z-index: 12;
    width: 220px;
    min-width: 220px;
    padding: 10px 16px;
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-right: 1px solid var(--border-color);
    background: #f9fafb;
    flex-shrink: 0;
}

.tl-days-header { display: flex; flex: none; }

.tl-day-cell {
    flex: 0 0 50px;
    width: 50px;
    text-align: center;
    padding: 4px 2px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-secondary);
    border-right: 1px solid #f0f0f0;
    user-select: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    box-sizing: border-box;
}

.tl-day-cell.is-today { color: var(--primary-color); font-weight: 800; background: rgba(99,102,241,0.05); }
.tl-day-cell.is-weekend { background: #fafafa; color: #bbb; }

.tl-day-num { font-size: 0.65rem; font-weight: 500; opacity: 0.7; }

.tl-body { position: relative; }

.tl-member-row, .tl-member-grid-row {
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    background: #f4f6fb;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s;
    height: 46px;
    min-height: 46px;
    box-sizing: border-box;
}

.tl-member-row:hover, .tl-member-grid-row:hover { background: #eef0f8; }

.tl-member-label {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    box-sizing: border-box;
}

.tl-member-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
}

.tl-member-name { font-weight: 400; font-size: 1rem; color: var(--text-primary); flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-member-count { font-size: 0.75rem; color: var(--text-secondary); font-weight: 600; }
.tl-member-chevron { font-size: 0.7rem; transition: transform 0.2s; margin-left: 4px; color: var(--text-secondary); }
.tl-member-row.expanded .tl-member-chevron, .tl-member-grid-row.expanded .tl-member-chevron { transform: rotate(90deg); }

.tl-member-bars { flex: none; position: relative; height: 46px; width: 100%; }

.tl-summary-bar { 
    position: absolute; 
    top: 10px; 
    height: 26px; 
    border-radius: 6px; 
    opacity: 0.75; 
    pointer-events: auto; 
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08); 
    transition: transform 0.15s, opacity 0.15s; 
    cursor: pointer;
}

.tl-summary-bar:hover {
    opacity: 0.95;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.tl-member-row.expanded .tl-summary-bar, 
.tl-member-grid-row.expanded .tl-summary-bar { 
    display: none !important; 
}

.tl-task-row, .tl-task-grid-row {
    display: flex;
    align-items: center;
    border-bottom: 1px solid #f0f2f7;
    background: #fff;
    height: 40px;
    min-height: 40px;
    transition: background 0.12s;
    box-sizing: border-box;
}

.tl-task-row:hover, .tl-task-grid-row:hover { background: #f8f9ff; }

.tl-task-label {
    width: 100%;
    padding: 6px 12px 6px 30px;
    font-size: 0.78rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-sizing: border-box;
}

.tl-grid-area { flex: none; position: relative; height: 40px; }

.tl-bar {
    position: absolute;
    top: 5px;
    height: 30px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    padding: 0 10px;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    overflow: hidden;
    transition: filter 0.15s, box-shadow 0.15s, border-color 0.15s;
    background: #ffffff;
    border: 1px solid #e4e4e7;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    min-width: 24px;
    z-index: 2;
}

.tl-bar:hover { 
    border-color: #a1a1aa; 
    box-shadow: 0 3px 10px rgba(0,0,0,0.08); 
}
.tl-bar.dragging-bar { opacity: 0.5; cursor: grabbing; }
.tl-bar.conflict-bar {
    background: #fef2f2 !important;
    border: 1.5px solid #f87171 !important;
}

.tl-bar-title { 
    font-size: 0.82rem; 
    font-weight: 400; 
    color: #09090b; 
    flex: 1; 
    overflow: hidden; 
    text-overflow: ellipsis; 
    pointer-events: none; 
}

.tl-priority-dot { 
    width: 8px; 
    height: 8px; 
    border-radius: 50%; 
    margin-right: 7px; 
    flex-shrink: 0; 
    pointer-events: none; 
    border: 1px solid rgba(0,0,0,0.08); 
}

.tl-connect-handle {
    position: absolute;
    right: -5px;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid var(--primary-color);
    cursor: crosshair;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.15s, transform 0.15s;
    box-shadow: 0 0 4px rgba(0,0,0,0.2);
}

.tl-bar:hover .tl-connect-handle,
.tl-connect-handle.active-handle {
    opacity: 1;
}

.tl-connect-handle:hover {
    transform: translateY(-50%) scale(1.3);
    background: var(--primary-color);
}

.tl-bar.potential-target {
    box-shadow: 0 0 0 2.5px #6366f1, 0 4px 12px rgba(99,102,241,0.3) !important;
}

.tl-status-chip {
    font-size: 0.72rem;
    font-weight: 500;
    padding: 2px 7px;
    border-radius: 5px;
    background: #f4f4f5;
    border: 1px solid #e4e4e7;
    color: #18181b;
    margin-left: 8px;
    flex-shrink: 0;
    pointer-events: all;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
}

.tl-status-chip:hover { 
    background: #e4e4e7; 
}

.tl-bar-resize {
    position: absolute;
    right: 0;
    top: 0;
    width: 8px;
    height: 100%;
    cursor: ew-resize;
    background: transparent;
    border-radius: 0 7px 7px 0;
    z-index: 5;
}

.tl-bar-resize:hover { background: rgba(0,0,0,0.18); }

.tl-today-line {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 0;
    border-left: 2px dashed #09090b;
    opacity: 0.7;
    pointer-events: none;
    z-index: 6;
}

.tl-dep-svg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 4; overflow: visible; }

.tl-member-row.drop-target, .tl-task-row.drop-target {
    background: rgba(99,102,241,0.07) !important;
    outline: 2px dashed var(--primary-color);
    outline-offset: -2px;
}

.tl-context-menu {
    position: fixed;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.14);
    padding: 4px 0;
    z-index: 9999;
    min-width: 150px;
    animation: fadeScaleIn 0.12s ease;
}

.tl-context-menu-item {
    padding: 9px 16px;
    font-size: 0.84rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: var(--text-primary);
    transition: background 0.1s;
}

.tl-context-menu-item:hover { background: #f4f6fb; }
.tl-context-menu-sep { border: none; border-top: 1px solid var(--border-color); margin: 3px 0; }

@keyframes fadeScaleIn {
    from { opacity: 0; transform: scale(0.93); }
    to   { opacity: 1; transform: scale(1); }
}

@keyframes tlShake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}

.shake-anim {
    animation: tlShake 0.4s ease-in-out !important;
    border-color: #ef4444 !important;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.4) !important;
}

.tl-dep-arrow {
    transition: stroke 0.2s, stroke-width 0.2s;
}

.tl-dep-arrow.selected-dep-arrow {
    stroke: #3b82f6 !important;
    stroke-width: 4px !important;
    filter: drop-shadow(0 0 6px rgba(59, 130, 246, 0.8)) !important;
    animation: depPulse 1s infinite alternate;
}

@keyframes depPulse {
    from { opacity: 0.8; }
    to { opacity: 1; }
}

/* Activity Log Feed Styling */
.activity-log-feed {
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
}

.activity-log-feed::before {
    content: '';
    position: absolute;
    top: 14px;
    bottom: 14px;
    left: 17px;
    width: 2px;
    background: var(--border-color);
    z-index: 1;
}

.activity-log-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    position: relative;
    z-index: 2;
}

.activity-log-dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.activity-log-content {
    flex: 1;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px 16px;
    transition: all 0.2s ease;
}

.activity-log-content:hover {
    background: #ffffff;
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.activity-diff-pills {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    flex-wrap: wrap;
}

.diff-pill {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 6px;
    font-family: monospace;
}

.diff-pill.diff-old {
    background: #fee2e2;
    color: #991b1b;
    text-decoration: line-through;
}

.diff-pill.diff-new {
    background: #dcfce7;
    color: #166534;
}
