/* Diffusion Vision UI Styles */

/* Modal Sizing */
.dv-modal-lg {
    max-width: 1000px;
    width: 95%;
    height: 90vh;
    display: flex;
    flex-direction: column;
}

.dv-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    display: flex;
    flex-direction: column;
    background-color: #f8fafc;
}

/* Section A: Header Bar */
.dv-header-bar {
    background: #ffffff;
    padding: 16px 24px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dv-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dv-task-title {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dv-status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.dv-status-pending { background: #f1f5f9; color: #64748b; }
.dv-status-running { background: #dbeafe; color: #2563eb; }
.dv-status-completed { background: #dcfce7; color: #166534; }
.dv-status-failed { background: #fee2e2; color: #dc2626; }
.dv-status-cancelled { background: #ffedd5; color: #c2410c; }

.dv-header-stats {
    display: flex;
    gap: 20px;
    font-size: 13px;
    color: #64748b;
    align-items: center;
}

.dv-stat-pill {
    background: #f1f5f9;
    padding: 4px 10px;
    border-radius: 6px;
    display: flex;
    gap: 6px;
    align-items: center;
}

.dv-progress-container {
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 4px;
}

.dv-progress-bar {
    height: 100%;
    background: #3b82f6;
    width: 0%;
    transition: width 0.3s ease;
}

.dv-phase-text {
    font-size: 12px;
    color: #3b82f6;
    font-weight: 500;
    margin-top: 4px;
}

/* Section B: Live Log Feed */
.dv-log-panel {
    background: #1e293b;
    color: #f1f5f9;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    padding: 16px;
    height: 250px;
    overflow-y: auto;
    border-bottom: 1px solid #334155;
}

.dv-log-entry {
    margin-bottom: 6px;
    line-height: 1.4;
    display: flex;
    gap: 10px;
}

.dv-log-time {
    color: #64748b;
    min-width: 70px;
}

.dv-log-phase {
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    min-width: 90px;
    text-align: center;
    height: fit-content;
}

.phase-gray { background: #475569; color: #fff; }
.phase-purple { background: #7c3aed; color: #fff; }
.phase-blue { background: #2563eb; color: #fff; }
.phase-orange { background: #ea580c; color: #fff; }
.phase-teal { background: #0d9488; color: #fff; }
.phase-green { background: #16a34a; color: #fff; }
.phase-red { background: #dc2626; color: #fff; }

.dv-log-message {
    flex: 1;
    word-break: break-word;
}

/* Section C: Stats Dashboard */
.dv-dashboard {
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.dv-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
}

.dv-card-title {
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.dv-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.dv-big-number {
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
}

.dv-sub-text {
    font-size: 12px;
    color: #64748b;
    margin-top: 4px;
}

.dv-chart-container {
    height: 100px;
    position: relative;
}

/* Section D: Timeline */
.dv-timeline-section {
    padding: 0 20px 20px;
}

.dv-timeline-container {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    overflow-x: auto;
}

.dv-timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
    padding-left: 20px;
    min-width: auto;
}

.dv-timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 34px;
    width: 2px;
    background: #e2e8f0;
    z-index: 1;
}

.dv-snapshot {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 12px 0;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}

.dv-snapshot-dot {
    width: 30px;
    height: 30px;
    min-width: 30px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    transition: all 0.2s;
}

.dv-snapshot:hover .dv-snapshot-dot {
    border-color: #3b82f6;
    color: #3b82f6;
    transform: scale(1.1);
}

.dv-snapshot.active .dv-snapshot-dot {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #ffffff;
}

.dv-snapshot-info {
    flex: 1;
    min-width: 0;
}

.dv-snapshot-label {
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    line-height: 1.3;
    margin-bottom: 4px;
}

.dv-snapshot-message {
    font-size: 13px;
    color: #475569;
    line-height: 1.4;
}

.dv-snapshot-message b {
    color: #1e293b;
}

.dv-snapshot-objects {
    font-size: 12px;
    color: #64748b;
    margin-top: 2px;
}

.dv-snapshot-popup {
    display: none;
}

/* Form Styles */
.dv-form-group {
    margin-bottom: 16px;
}

.dv-form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #334155;
}

.dv-form-select, .dv-form-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
}

.dv-info-box {
    background: #eff6ff;
    border: 1px solid #dbeafe;
    border-radius: 6px;
    padding: 12px;
    font-size: 13px;
    color: #1e40af;
    margin-top: 10px;
}

.dv-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-right: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
/* DV Task List Styles */
.dv-tasks-list-container {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    margin: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.dv-list-header {
    padding: 15px 20px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    font-weight: 600;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dv-list-header i {
    color: #3b82f6;
}

.dv-table-responsive {
    overflow-x: auto;
}

.dv-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.dv-table th {
    text-align: left;
    padding: 12px 20px;
    background: #ffffff;
    color: #64748b;
    font-weight: 600;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
}

.dv-table td {
    padding: 12px 20px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    vertical-align: middle;
}

.dv-task-row:hover {
    background-color: #f8fafc;
    cursor: pointer;
}

.dv-task-name {
    font-weight: 600;
    color: #1e293b;
}

.dv-task-phase {
    font-size: 11px;
    color: #64748b;
    margin-top: 2px;
}

.dv-mini-progress {
    width: 60px;
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    overflow: hidden;
    margin: 0 auto 2px;
}

.dv-mini-bar {
    height: 100%;
    background: #3b82f6;
}