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

:root {
    --bg-base: #060913;
    --bg-surface: rgba(13, 20, 38, 0.45);
    --bg-surface-elevated: rgba(22, 32, 59, 0.65);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-color-hover: rgba(255, 255, 255, 0.15);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --primary: #6366f1;
    --primary-glow: rgba(99, 102, 241, 0.15);
    --primary-hover: #4f46e5;
    
    --accent-advisory: #f59e0b; /* Amber */
    --accent-advisory-glow: rgba(245, 158, 11, 0.15);
    
    --accent-lead: #3b82f6; /* Blue */
    --accent-lead-glow: rgba(59, 130, 246, 0.15);
    
    --accent-compliance: #10b981; /* Emerald */
    --accent-compliance-glow: rgba(16, 185, 129, 0.15);

    --accent-danger: #ef4444; /* Rose */
    
    --font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    --glass-blur: 24px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2), 0 1px 2px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.25), 0 2px 4px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.5), 0 8px 16px rgba(0, 0, 0, 0.3);
}

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

body {
    background-color: var(--bg-base);
    background-image: 
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.08) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(59, 130, 246, 0.08) 0px, transparent 50%),
        radial-gradient(at 50% 100%, rgba(16, 185, 129, 0.05) 0px, transparent 50%);
    background-attachment: fixed;
    background-size: 200% 200%;
    animation: gradientMesh 15s ease infinite;
    color: var(--text-primary);
    font-family: var(--font-family);
    font-feature-settings: 'cv11';
    min-height: 100vh;
    display: flex;
    overflow-x: hidden;
}

@keyframes gradientMesh {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

body::after {
    content: '';
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.015;
    pointer-events: none;
    z-index: 9999;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* App Layout */
.app-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

/* Sidebar Styling */
.sidebar {
    background: rgba(6, 9, 19, 0.8);
    backdrop-filter: blur(var(--glass-blur));
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
    border-right: 1px solid var(--border-color);
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    overflow-y: auto;
    position: relative;
}

.sidebar::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.02;
    pointer-events: none;
    border-radius: inherit;
    z-index: -1;
}

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

.brand-logo {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary), #a78bfa);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
}

.brand-name {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    background: linear-gradient(to right, #ffffff, #cbd5e1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.deadline-tracker {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

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

.deadline-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.deadline-time {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
}

.deadline-time.danger {
    color: var(--accent-danger);
}

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

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-header {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.075em;
    font-weight: 700;
    margin-bottom: 0.25rem;
    padding-left: 0.5rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition-fast);
    cursor: pointer;
}

.nav-link:hover, .nav-link.active {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
}

.nav-link.active {
    background: var(--primary-glow);
    border: 1px solid rgba(99, 102, 241, 0.2);
    color: var(--primary);
    position: relative;
}

.nav-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10%;
    height: 80%;
    width: 2px;
    background: var(--primary);
    border-radius: 0 4px 4px 0;
    animation: slideActiveIndicator 0.2s ease-out forwards;
}

@keyframes slideActiveIndicator {
    from { transform: scaleY(0); }
    to { transform: scaleY(1); }
}

.team-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
}

.member-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: white;
}

.member-avatar.advisory { background-color: var(--accent-advisory); }
.member-avatar.lead { background-color: var(--accent-lead); }
.member-avatar.compliance { background-color: var(--accent-compliance); }

.member-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
}

.member-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.member-name {
    font-weight: 600;
    color: var(--text-primary);
}

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

.member-badge {
    padding: 0.15rem 0.4rem;
    font-size: 0.65rem;
    border-radius: 20px;
    font-weight: 600;
}

.member-badge.advisory { background: var(--accent-advisory-glow); color: var(--accent-advisory); }
.member-badge.lead { background: var(--accent-lead-glow); color: var(--accent-lead); }
.member-badge.compliance { background: var(--accent-compliance-glow); color: var(--accent-compliance); }

/* Main Content Area */
.main-content {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

.header {
    height: 80px;
    border-bottom: 1px solid var(--border-color);
    padding: 0 2.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(6, 9, 19, 0.4);
    backdrop-filter: blur(var(--glass-blur));
}

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

.header-title {
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.header-subtitle {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Search and Filter Row */
.filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 2.5rem;
    background: rgba(6, 9, 19, 0.2);
    border-bottom: 1px solid var(--border-color);
}

.filter-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.search-input-wrapper {
    position: relative;
}

.search-input {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.5rem 1rem 0.5rem 2.25rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    width: 240px;
    transition: var(--transition-fast);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.15);
}

.search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.85rem;
}

.btn-filter {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-filter:hover, .btn-filter.active {
    color: var(--text-primary);
    border-color: var(--border-color-hover);
    background: rgba(255, 255, 255, 0.04);
}

.btn-filter.active {
    background: var(--primary-glow);
    border-color: var(--primary);
    color: var(--primary);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    background-size: 200% 200%;
    color: white;
    border: none;
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-position 0.3s ease, transform var(--transition-fast);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary:hover {
    background-position: 100% 100%;
    transform: translateY(-1px);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.04);
}

/* Kanban Board Container */
.board-view {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    padding: 1.5rem 2.5rem;
    overflow-x: auto;
    overflow-y: hidden;
}

.board-column {
    display: flex;
    flex-direction: column;
    background: var(--bg-surface);
    backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md), inset 0 0 0 1px rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    height: 100%;
    overflow: hidden;
    min-width: 250px;
    position: relative;
}

.board-column::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.02;
    pointer-events: none;
    border-radius: inherit;
    z-index: -1;
}

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

.column-title-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.column-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: pulseDot 2.5s infinite ease-in-out;
}
@keyframes pulseDot {
    0%, 100% { opacity: 0.6; transform: scale(0.9); }
    50% { opacity: 1.0; transform: scale(1.1); }
}
.column-dot.backlog { background-color: var(--text-muted); }
.column-dot.todo { background-color: var(--primary); }
.column-dot.in-progress { background-color: var(--accent-advisory); }
.column-dot.done { background-color: var(--accent-compliance); }

.column-title {
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: -0.025em;
    color: var(--text-primary);
}

.column-count {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.15rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: transform var(--transition-fast);
}

.column-count:active {
    transform: scale(1.1);
}

.card-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow-y: auto;
    padding-bottom: 2rem;
    min-height: 100px;
}

/* Card Styling */
.task-card {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    cursor: grab;
    transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    position: relative;
    user-select: none;
    box-shadow: var(--shadow-sm);
    animation: fadeInUp 0.4s ease-out forwards;
    opacity: 0;
}

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

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

.task-card:hover {
    border-color: var(--border-color-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md), inset 0 0 15px rgba(255, 255, 255, 0.05);
}

.task-card.dragging {
    opacity: 0.5;
    transform: scale(0.98);
}

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

.tag-stage {
    padding: 0.2rem 0.5rem;
    font-size: 0.65rem;
    border-radius: 4px;
    font-weight: 700;
    letter-spacing: 0.025em;
    text-transform: uppercase;
}
.tag-stage.compliance { background: var(--accent-compliance-glow); color: var(--accent-compliance); }
.tag-stage.qualitative { background: var(--primary-glow); color: var(--primary); }
.tag-stage.pricing { background: var(--accent-advisory-glow); color: var(--accent-advisory); }
.tag-stage.general { background: rgba(255, 255, 255, 0.05); color: var(--text-secondary); }

.tag-priority {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-muted);
}
.tag-priority.high { color: var(--accent-danger); }
.tag-priority.med { color: var(--accent-advisory); }

.card-title {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-primary);
}

.card-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.25rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.card-due {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.card-assignee {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

/* Timeline View */
.timeline-view {
    flex: 1;
    overflow-y: auto;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.timeline-card {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
}

.timeline-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.timeline-track {
    position: relative;
    padding-left: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.timeline-track::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 5px;
    bottom: 5px;
    width: 2px;
    background: rgba(255, 255, 255, 0.05);
}

.timeline-node {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.timeline-node::before {
    content: '';
    position: absolute;
    left: -29px;
    top: 6px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--bg-base);
    border: 3px solid var(--text-muted);
}

.timeline-node.active::before {
    border-color: var(--primary);
    box-shadow: 0 0 10px var(--primary);
}

.timeline-node.done::before {
    border-color: var(--accent-compliance);
    background-color: var(--accent-compliance);
}

.timeline-node.danger::before {
    border-color: var(--accent-danger);
    box-shadow: 0 0 10px var(--accent-danger);
}

.timeline-date {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
}

.timeline-date.danger { color: var(--accent-danger); }

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

.timeline-node-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Compliance Checklist View */
.compliance-view {
    flex: 1;
    overflow-y: auto;
    padding: 2.5rem;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.checklist-container {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.checklist-title {
    font-size: 1.2rem;
    font-weight: 700;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.checklist-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

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

.checklist-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
}

.checklist-item:hover {
    border-color: var(--border-color-hover);
    background: rgba(255, 255, 255, 0.03);
}

.checklist-checkbox {
    margin-top: 0.2rem;
    cursor: pointer;
    accent-color: var(--primary);
}

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

.checklist-item-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.checklist-item-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.checklist-item.checked {
    opacity: 0.65;
}

.checklist-item.checked .checklist-item-title {
    text-decoration: line-through;
    color: var(--text-secondary);
}

.compliance-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.status-card {
    background: var(--bg-surface-elevated);
    backdrop-filter: blur(var(--glass-blur));
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    position: relative;
}

.status-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.02;
    pointer-events: none;
    border-radius: inherit;
    z-index: -1;
}

.progress-circle {
    position: relative;
    width: 120px;
    height: 120px;
}

.progress-svg {
    transform: rotate(-90deg);
}

.progress-track {
    fill: none;
    stroke: rgba(255, 255, 255, 0.05);
    stroke-width: 8;
}

.progress-bar {
    fill: none;
    stroke: var(--primary);
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset var(--transition-normal);
}

.progress-percentage {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    font-weight: 700;
}

.summary-stats {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
}

.summary-stat-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.summary-stat-val {
    font-weight: 600;
    color: var(--text-primary);
}

/* Modal Windows */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-fast);
}

.modal.open {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: rgba(13, 21, 39, 0.85);
    backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--border-color-hover);
    border-radius: var(--radius-xl);
    width: 90%;
    max-width: 600px;
    padding: 2.25rem;
    box-shadow: var(--shadow-lg), inset 0 0 0 1px rgba(255, 255, 255, 0.03);
    transform: scale(0.95);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: relative;
}

.modal-content::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.02;
    pointer-events: none;
    border-radius: inherit;
    z-index: -1;
}

.modal.open .modal-content {
    transform: scale(1);
    opacity: 1;
}

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

.modal-title {
    font-size: 1.2rem;
    font-weight: 700;
}

.btn-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

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

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-control {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    font-family: var(--font-family);
    transition: var(--transition-fast);
    line-height: 1.5;
}

textarea.form-control {
    min-height: 140px;
    line-height: 1.6;
    font-size: 0.9rem;
    resize: vertical;
    padding: 0.85rem 1rem;
    display: block;
    width: 100%;
    box-sizing: border-box;
}

#comp-qa-summary,
#comp-introduction,
#comp-methodology,
#comp-onesource,
#comp-sustainability,
#comp-contract-mgmt {
    min-height: 180px;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.06);
}

.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-row-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1.25rem;
}

.assigned-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--text-primary);
}
.assigned-pill.marty { border-color: var(--accent-advisory); }
.assigned-pill.karol { border-color: var(--accent-lead); }
.assigned-pill.james { border-color: var(--accent-compliance); }

/* Details modal adjustments */
.detail-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.detail-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.detail-value {
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Toast Message */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.toast {
    background: #0d1527;
    border-left: 4px solid var(--primary);
    border-top: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transform: translateX(120%);
    transition: transform var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.toast.show {
    animation: toastSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes toastSlideIn {
    from { transform: translateX(120%); }
    to { transform: translateX(0); }
}

.toast.show::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; height: 2px; width: 100%;
    background: var(--primary);
    animation: toastDeplete 3s linear forwards;
}

@keyframes toastDeplete {
    from { width: 100%; }
    to { width: 0%; }
}
.toast.success { border-left-color: var(--accent-compliance); }
.toast.danger { border-left-color: var(--accent-danger); }

/* Compiler View Grid */
.compiler-view {
    animation: fadeIn var(--transition-fast) ease-in-out;
}

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

.compiler-section {
    position: relative;
}

/* Printable Document CSS */
@media print {
    /* Hide dashboard UI completely */
    body * {
        visibility: hidden;
    }
    
    #print-overlay, #print-overlay * {
        visibility: visible;
    }
    
    .no-print {
        display: none !important;
    }
    
    #print-overlay {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        height: auto;
        background: white !important;
        padding: 0 !important;
    }
    
    #print-document-content {
        box-shadow: none !important;
        margin: 0 !important;
        padding: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
        border: none !important;
        color: black !important;
        background: white !important;
    }
    
    .print-page {
        page-break-after: always;
        padding: 2.5cm 2cm !important;
        min-height: 100vh;
    }
    
    .print-page:last-child {
        page-break-after: avoid;
    }
    
    h1, h2, h3, h4, th {
        color: black !important;
    }
    
    table {
        border-collapse: collapse;
        width: 100%;
        margin-top: 1rem;
    }
    
    th, td {
        border: 1px solid #475569 !important;
        padding: 8px 12px !important;
        text-align: left;
    }
    
    th {
        background-color: #f1f5f9 !important;
        font-weight: bold;
    }
}

/* Screen Preview Adjustments for Printable Content */
#print-document-content h1, 
#print-document-content h2, 
#print-document-content h3, 
#print-document-content h4 {
    font-family: 'Times New Roman', Times, serif;
    color: #1e293b;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

#print-document-content h1 {
    font-size: 20pt;
    text-align: center;
    border-bottom: 2px solid #000;
    padding-bottom: 0.5rem;
    margin-bottom: 2rem;
}

#print-document-content h2 {
    font-size: 14pt;
    border-bottom: 1px solid #475569;
    padding-bottom: 0.25rem;
    margin-top: 2rem;
}

#print-document-content h3 {
    font-size: 12pt;
    font-style: italic;
}

#print-document-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 10pt;
}

#print-document-content th, 
#print-document-content td {
    border: 1px solid #94a3b8;
    padding: 6px 10px;
    text-align: left;
}

#print-document-content th {
    background: #f8fafc;
    font-weight: 700;
}

#print-document-content p {
    margin-bottom: 1rem;
    text-align: justify;
}

.print-page-break {
    border-top: 1px dashed #cbd5e1;
    margin: 3rem 0;
    position: relative;
    text-align: center;
}

.print-page-break::after {
    content: "PAGE BREAK (PRINTING)";
    background: #080d19;
    color: #64748b;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0 10px;
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
}

@media print {
    .print-page-break {
        display: none;
    }
}

/* Skeleton Loader Styles */
.skeleton {
    background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.03) 75%);
    background-size: 200% 100%;
    animation: shimmerSkeleton 1.5s infinite;
    border-radius: 4px;
}
@keyframes shimmerSkeleton {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
.skeleton-card {
    height: 120px;
    border-radius: var(--radius-md);
    background-color: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
}

/* Empty State Styles */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-align: center;
    gap: 0.5rem;
    opacity: 0.7;
    min-height: 100px;
}

/* Global Progress Bar Shimmer */
#global-progress-bar {
    position: relative;
    overflow: hidden;
}
#global-progress-bar::after {
    content: '';
    position: absolute;
    top: 0; left: -100%; width: 50%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmerBar 2s infinite linear;
}
@keyframes shimmerBar {
    0% { left: -100%; }
    100% { left: 200%; }
}

/* Login Screen Polish */
.login-shake {
    animation: shake 0.4s cubic-bezier(.36,.07,.19,.97) both;
}
@keyframes shake {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
    40%, 60% { transform: translate3d(4px, 0, 0); }
}

.login-typing {
    overflow: hidden;
    white-space: nowrap;
    border-right: 2px solid var(--primary);
    animation: typing 2s steps(40, end), blink-caret 0.75s step-end infinite;
}
@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}
@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: var(--primary) }
}

.login-success-fade {
    transition: opacity 0.5s ease;
    opacity: 0 !important;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .app-container {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
    }
    .sidebar {
        flex-direction: row;
        align-items: center;
        height: auto;
        width: 100%;
        padding: 1rem 1.5rem;
        gap: 1.5rem;
        overflow-x: auto;
        overflow-y: hidden;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    .deadline-tracker, .team-section {
        display: none;
    }
    .nav-menu {
        flex-direction: row;
        gap: 0.5rem;
    }
    .nav-header {
        display: none;
    }
    .nav-link {
        padding: 0.5rem 1rem;
    }
    .board-view {
        grid-template-columns: repeat(2, 1fr);
        overflow-y: auto;
    }
    .compliance-view {
        grid-template-columns: 1fr;
    }
    .compiler-view {
        display: flex;
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .board-view {
        grid-template-columns: 1fr;
    }
    .filter-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        overflow-x: auto;
    }
    .filter-left {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }
    .header {
        flex-direction: column;
        height: auto;
        padding: 1rem 1.5rem;
        gap: 1rem;
        align-items: flex-start;
    }
    .header-right {
        width: 100%;
        justify-content: flex-start;
    }
    .task-card {
        width: 100%;
    }
    .modal-content {
        width: 100%;
        height: 100%;
        max-width: none;
        border-radius: 0;
        transform: translateY(0) scale(1) !important;
        justify-content: center;
    }
    .team-section {
        display: none;
    }
}

@keyframes pulseBorder { 0% { border-color: rgba(16,185,129,0.4); } 50% { border-color: rgba(16,185,129,1); } 100% { border-color: rgba(16,185,129,0.4); } }
.drop-hover { animation: pulseBorder 1.5s infinite; background-color: rgba(255, 255, 255, 0.02); border: 2px dashed var(--primary) !important; }
