/* ========================================
   DASHBOARD STYLES
   Stats, Timeline, Projects, AI Insights
   ======================================== */

/* Dashboard Styling - Valerin Style */
.dashboard-header {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    padding: 40px;
    border-radius: 16px;
    margin-bottom: 40px;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dashboard-title h1 {
    color: white;
    font-size: 3rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-transform: none;
    letter-spacing: -0.025em;
}

.dashboard-subtitle {
    color: var(--valerin-text-light);
    opacity: 0.9;
    font-size: 1.3rem;
    margin: 8px 0 0 0;
    font-weight: 400;
}

.dashboard-actions {
    display: flex;
    gap: 16px;
    align-items: center;
}

.pdf-upload-form {
    display: flex;
    gap: 12px;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 12px 16px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.form-input, .file-input {
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--text);
    font-size: 0.9rem;
}

.icon {
    font-size: 1.1rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    box-shadow: 0 2px 8px var(--valerin-shadow);
    transition: all 0.3s ease;
    cursor: pointer;
}

.stat-card:hover {
    box-shadow: 0 4px 16px var(--valerin-shadow);
    transform: translateY(-2px);
    border-color: var(--valerin-primary-light);
}

.stats-grid .stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--valerin-primary);
    margin-bottom: 4px;
}

.stat-label {
    color: var(--muted);
    font-weight: 500;
    text-transform: none;
    letter-spacing: -0.025em;
}

/* Quick stats enhancements */
.stats-grid .stat-number {
    font-size: 1.8rem;
    font-weight: 800;
}

.stats-grid .stat-label {
    font-size: 0.9rem;
}

.stats-grid .stat-icon {
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
    margin-bottom: 8px;
}

/* Dashboard Content */
.dashboard-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 32px;
    margin-bottom: 32px;
}

.dashboard-left, .dashboard-right {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.dashboard-card {
    background: var(--card);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: all 0.3s ease;
}

.dashboard-card:hover {
    box-shadow: 0 8px 24px var(--valerin-shadow);
    transform: translateY(-2px);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}

.card-header h2 {
    color: var(--valerin-primary);
    font-weight: 700;
    font-size: 1.5rem;
    margin: 0;
    text-transform: none;
    letter-spacing: -0.025em;
}

.timeline-controls {
    display: flex;
    gap: 8px;
}

/* Timeline */
.timeline-container {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 16px var(--valerin-shadow);
    max-height: 500px;
    overflow-y: auto;
}

.timeline {
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border);
}

.timeline-item {
    position: relative;
    margin-bottom: 24px;
    padding-left: 60px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 12px;
    top: 8px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary);
    border: 3px solid var(--card);
    z-index: 1;
}

.timeline-item.milestone::before {
    background: var(--success);
}

.timeline-item.event::before {
    background: var(--warning);
}

.timeline-date {
    font-size: 0.8rem;
    color: var(--muted);
    font-weight: 500;
    margin-bottom: 4px;
}

.timeline-content {
    background: var(--bg);
    padding: 16px;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.timeline-title {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

.timeline-meta {
    display: flex;
    gap: 12px;
    font-size: 0.8rem;
}

.timeline-project {
    color: var(--primary);
    font-weight: 500;
}

.timeline-status {
    color: var(--muted);
}

.timeline-dot {
    background: var(--valerin-primary);
    border: 3px solid var(--valerin-text-light);
    box-shadow: 0 0 0 2px var(--valerin-primary);
}

.timeline-dot:hover {
    background: var(--valerin-primary-hover);
    transform: scale(1.2);
    box-shadow: 0 0 0 4px var(--valerin-primary-light);
}

/* AI Insights */
.ai-insights {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.ai-insights .card-header h2 {
    color: white;
}

.ai-content {
    padding: 24px;
}

.insight-section {
    margin-bottom: 20px;
}

.insight-section:last-child {
    margin-bottom: 0;
}

.insight-section h4 {
    margin: 0 0 8px 0;
    font-size: 1rem;
    font-weight: 600;
}

.insight-section p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
    opacity: 0.9;
}

/* Events List */
.events-list {
    padding: 24px;
}

.event-item {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}

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

.event-date {
    font-size: 0.8rem;
    color: var(--muted);
    font-weight: 500;
    min-width: 80px;
}

.event-content {
    flex: 1;
}

.event-title {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.event-location {
    font-size: 0.8rem;
    color: var(--muted);
}

/* Collapsible Events Styling */
.collapsible-event {
    transition: all 0.3s ease;
    border: 1px solid var(--border);
}

.collapsible-event:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.1);
}

.event-header {
    transition: all 0.3s ease;
    user-select: none;
}

.event-header:hover {
    background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%) !important;
}

.event-toggle-icon {
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.event-toggle-icon:hover {
    background: var(--primary-hover) !important;
    transform: scale(1.1);
}

.event-content {
    border-top: 1px solid var(--border);
    background: #ffffff;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

/* Event card states */
.collapsible-event.expanded {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: var(--primary);
}

.collapsible-event.collapsed {
    box-shadow: none;
}

/* Chart Container */
.chart-container {
    padding: 24px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Project Grid */
.dashboard-section {
    margin-top: 32px;
}

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

.section-header h2 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text);
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
}

.project-card {
    background: var(--card);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    position: relative;
    display: block;
    text-decoration: none;
    color: inherit;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
}

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

.project-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.project-header h3 a {
    color: var(--text);
    text-decoration: none;
}

.project-header h3 a:hover {
    color: var(--primary);
}

.project-meta {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 12px;
}

.budget {
    font-weight: 600;
    color: var(--success);
    font-size: 0.9rem;
}

.project-org {
    color: var(--muted);
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.project-dates {
    display: flex;
    gap: 16px;
    font-size: 0.8rem;
    color: var(--muted);
}

.date {
    display: flex;
    align-items: center;
    gap: 4px;
}

.project-card .pc-title {
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 1.25rem;
    color: var(--text);
    letter-spacing: -0.025em;
}

.project-card .pc-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 0.875rem;
    margin-bottom: 12px;
}

.project-card p {
    color: #64748b;
    margin-bottom: 16px;
    line-height: 1.5;
    font-size: 0.95rem;
}

.project-card .pc-budget {
    margin-top: 12px;
    color: #1f2937;
    font-weight: 600;
    font-size: 0.95rem;
}

.project-card-container {
    position: relative;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #9ca3af;
    font-style: italic;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    border: 2px dashed #e2e8f0;
    margin: 20px 0;
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.empty-state h3 {
    margin: 0 0 8px 0;
    font-size: 1.25rem;
    color: var(--text);
}

.empty-state p {
    margin: 0;
    font-size: 0.9rem;
}

.empty-state::before {
    content: "📋";
    display: block;
    font-size: 2rem;
    margin-bottom: 12px;
    opacity: 0.5;
}

/* Loading Spinner */
.loading-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    color: var(--muted);
    font-style: italic;
}

/* PROFESSIONAL PROJECT HERO SECTION */
.project-hero {
	position: relative;
	background: linear-gradient(135deg, #1e40af 0%, #3b82f6 50%, #60a5fa 100%);
	border-radius: 16px;
	padding: 2.5rem;
	margin-bottom: 2rem;
	box-shadow: 0 10px 30px rgba(30, 64, 175, 0.15);
}

.hero-background {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	overflow: hidden;
}

.hero-pattern {
	position: absolute;
	top: -20%;
	right: -20%;
	width: 40%;
	height: 40%;
	background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
}

.hero-content {
	position: relative;
	z-index: 2;
}

.project-title-area {
	text-align: center;
}

.project-main-title {
	font-size: 2.5rem;
	font-weight: 700;
	color: white;
	margin: 0 0 0.5rem 0;
	text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.project-subtitle {
	font-size: 1.2rem;
	color: rgba(255,255,255,0.8);
	font-weight: 500;
	margin-bottom: 2rem;
}

/* CREATIVE STATS DASHBOARD */
.stats-dashboard {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 1.5rem;
	margin-bottom: 2rem;
}

.stat-organization .stat-icon {
	background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
	color: white;
}

.stat-status .stat-icon {
	background: linear-gradient(135deg, #10b981 0%, #059669 100%);
	color: white;
}

.stat-budget .stat-icon {
	background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
	color: white;
}

.stat-id .stat-icon {
	background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
	color: white;
}

.stat-card:hover .stat-icon {
	transform: scale(1.05);
}

.stat-content {
	flex: 1;
}

.stat-icon {
	width: 48px;
	height: 48px;
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	transition: all 0.2s ease;
}

/* CREATIVE INFORMATION LAYOUT */
.creative-layout {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 2rem;
}

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

.info-card {
	background: white;
	border-radius: 12px;
	box-shadow: 0 4px 12px rgba(0,0,0,0.08);
	border: 1px solid #e2e8f0;
	overflow: hidden;
	transition: all 0.2s ease;
}

.info-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.card-icon {
	width: 36px;
	height: 36px;
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.project-info-card .card-icon {
	background: #3b82f6;
	color: white;
}

.contact-card .card-icon {
	background: #10b981;
	color: white;
}

.timeline-card .card-icon {
	background: #f59e0b;
	color: white;
}

.card-header h3 {
	margin: 0;
	font-size: 1.2rem;
	font-weight: 700;
	color: #1e293b;
}

.card-content {
	padding: 1.5rem;
}

.info-row {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	padding: 1rem 0;
	border-bottom: 1px solid #f1f5f9;
	transition: all 0.3s ease;
}

.info-row:hover {
	background: rgba(59, 130, 246, 0.02);
	padding-left: 0.5rem;
	margin-left: -0.5rem;
	margin-right: -0.5rem;
	border-radius: 6px;
}

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

.info-label {
	font-weight: 600;
	color: #64748b;
	font-size: 0.9rem;
	flex: 0 0 40%;
	padding-right: 1rem;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.info-value {
	color: #1e293b;
	font-size: 1rem;
	flex: 1;
	word-break: break-word;
	font-weight: 500;
}

.info-value a {
	color: #667eea;
	text-decoration: none;
	font-weight: 600;
	transition: all 0.3s ease;
	position: relative;
}

.info-value a::after {
	content: '';
	position: absolute;
	bottom: -2px;
	left: 0;
	width: 0;
	height: 2px;
	background: linear-gradient(90deg, #667eea, #764ba2);
	transition: width 0.3s ease;
    pointer-events: none;
}

.info-value a:hover::after {
	width: 100%;
}

.info-value a:hover {
	color: #764ba2;
}

.description-row {
	flex-direction: column;
	align-items: flex-start;
}

.description-row .info-label {
	flex: none;
	margin-bottom: 0.5rem;
}

.description-row .info-value {
	flex: none;
	line-height: 1.6;
}

/* FLASHY Details Grid */
.details-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
	gap: 2rem;
}

.detail-section {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	border-radius: 20px;
	overflow: hidden;
	box-shadow: 0 15px 35px rgba(102, 126, 234, 0.3);
	transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
	position: relative;
}

.detail-section::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: linear-gradient(45deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
	backdrop-filter: blur(10px);
	pointer-events: none;
}

.detail-section:hover {
	transform: translateY(-10px) scale(1.02);
	box-shadow: 0 25px 50px rgba(102, 126, 234, 0.4);
}

.section-title {
	font-size: 1.2rem;
	font-weight: 700;
	color: white;
	margin: 0;
	padding: 1.5rem;
	background: rgba(255,255,255,0.1);
	border-bottom: 1px solid rgba(255,255,255,0.2);
	text-shadow: 0 2px 4px rgba(0,0,0,0.3);
	position: relative;
	z-index: 2;
}

.detail-fields {
	padding: 2rem;
	position: relative;
	z-index: 2;
}

.detail-field {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	padding: 1rem 0;
	border-bottom: 1px solid rgba(255,255,255,0.1);
	transition: all 0.3s ease;
	position: relative;
}

.detail-field::before {
	content: '';
	position: absolute;
	left: 0;
	top: 0;
	width: 0;
	height: 100%;
	background: linear-gradient(90deg, rgba(255,255,255,0.1), rgba(255,255,255,0.2));
	transition: width 0.3s ease;
    pointer-events: none;
}

.detail-field:hover::before {
	width: 100%;
}

.detail-field:hover {
	transform: translateX(10px);
	padding-left: 1rem;
}

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

.detail-field label {
	font-weight: 600;
	color: rgba(255,255,255,0.8);
	font-size: 0.9rem;
	flex: 0 0 40%;
	padding-right: 1rem;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.detail-field span {
	color: white;
	font-size: 1rem;
	flex: 1;
	word-break: break-word;
	font-weight: 500;
	text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.detail-field a {
	color: #ffd700;
	text-decoration: none;
	font-weight: 600;
	transition: all 0.3s ease;
	position: relative;
}

.detail-field a::after {
	content: '';
	position: absolute;
	bottom: -2px;
	left: 0;
	width: 0;
	height: 2px;
	background: linear-gradient(90deg, #ffd700, #ffed4e);
	transition: width 0.3s ease;
}

.detail-field a:hover::after {
	width: 100%;
}

.detail-field a:hover {
	color: #ffed4e;
	text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.description-field {
	flex-direction: column;
	align-items: flex-start;
}

.description-field label {
	flex: none;
	margin-bottom: 0.5rem;
}

.description-field span {
	flex: none;
	line-height: 1.6;
}

/* Project Deliverable Styles */
.deliverable-item {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.2s ease;
}

.deliverable-item:hover {
    box-shadow: 0 4px 12px var(--valerin-shadow);
    border-color: var(--primary);
}

.deliverable-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.deliverable-title-area {
    flex: 1;
}

.deliverable-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
    align-items: center;
}

.deliverable-type {
    background: var(--valerin-accent);
    color: var(--primary);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

.priority-badge {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    border-left: 3px solid var(--valerin-red);
}

.priority-low {
    background: #f3f4f6;
    color: #6b7280;
}

.priority-medium {
    background: #fef3c7;
    color: #d97706;
}

.priority-high {
    background: #fed7aa;
    color: #ea580c;
}

.priority-critical {
    background: #fee2e2;
    color: var(--primary);
}

.due-date {
    color: var(--muted);
    font-size: 0.8rem;
}

.assigned-to {
    color: var(--muted);
    font-size: 0.8rem;
}

.deliverable-notes {
    margin-top: 12px;
    padding: 12px;
    background: #f9fafb;
    border-radius: 8px;
    border-left: 3px solid var(--primary);
    font-size: 0.9rem;
    color: var(--text);
}

/* Document Thumbnail Styling */
.documents-thumbnail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.document-thumbnail {
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid var(--border);
    overflow: hidden;
}

.document-thumbnail:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: var(--primary);
}

.document-thumbnail:hover .document-actions-overlay {
    opacity: 1;
}

.document-preview {
    height: 120px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-bottom: 1px solid var(--border);
}

.document-actions-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(220, 38, 38, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.document-actions-overlay button {
    background: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.document-actions-overlay button:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* File type specific colors */
.document-thumbnail[data-file-type="pdf"] .document-preview {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
}

.document-thumbnail[data-file-type="doc"] .document-preview,
.document-thumbnail[data-file-type="docx"] .document-preview {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
}

.document-thumbnail[data-file-type="xls"] .document-preview,
.document-thumbnail[data-file-type="xlsx"] .document-preview {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
}

.document-thumbnail[data-file-type="ppt"] .document-preview,
.document-thumbnail[data-file-type="pptx"] .document-preview {
    background: linear-gradient(135deg, #fed7aa 0%, #fdba74 100%);
}

/* FAQ list alignment */
.faq-item {
    padding: 20px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.faq-row {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 16px;
}

.faq-row .action-buttons {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
