/* Workflow General Styles */
.workflow-hero {
    background-image: linear-gradient(rgba(0, 31, 63, 0.8), rgba(0, 10, 30, 0.9)), url('https://cdn.pixabay.com/photo/2018/03/15/16/11/background-3228704_1280.jpg');
    height: 40vh;
    min-height: 300px;
}

.workflow-section {
    padding: 40px 0 60px;
}

/* Tab Navigation */
.workflow-tabs {
    display: flex;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 30px;
}

.tab {
    padding: 15px 30px;
    font-weight: 500;
    opacity: 0.7;
    cursor: pointer;
    position: relative;
    transition: opacity 0.3s;
}

.tab.active {
    opacity: 1;
}

.tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

.tab-content {
    display: none;
}

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

/* Agentic Flow Styles */
.workflow-description {
    margin-bottom: 30px;
    padding: 25px;
    background: rgba(0, 10, 30, 0.3);
    border-radius: 12px;
}

.workflow-description h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.5rem;
    font-family: var(--font-secondary);
    color: var(--accent-color);
}

.workflow-description p {
    margin-bottom: 20px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
}

/* Agent List */
.agent-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-top: 25px;
}

@media (min-width: 768px) {
    .agent-list {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 992px) {
    .agent-list {
        grid-template-columns: 1fr 1fr 1fr 1fr;
    }
}

.agent-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: transform 0.3s, background-color 0.3s;
}

.agent-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-5px);
}

.agent-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    position: relative;
    flex-shrink: 0;
}

.agent-number {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background-color: white;
    color: var(--accent-color);
    font-size: 0.9rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}

.agent-info h4 {
    margin: 0 0 5px;
    font-size: 1.1rem;
}

.agent-info p {
    margin: 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

/* Step List (Manual Flow) */
.step-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-top: 25px;
}

@media (min-width: 768px) {
    .step-list {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

.step-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: transform 0.3s, background-color 0.3s;
}

.step-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-5px);
}

.step-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    position: relative;
    flex-shrink: 0;
}

.step-number {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background-color: white;
    color: var(--accent-color);
    font-size: 0.9rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-info h4 {
    margin: 0 0 5px;
    font-size: 1.1rem;
}

.step-info p {
    margin: 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

/* Workflow Form */
.workflow-form-container {
    background: rgba(0, 10, 30, 0.3);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

.form-group input[type="text"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: white;
    font-family: var(--font-primary);
    transition: border-color 0.3s;
}

.form-group input[type="text"]:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
}

.primary-btn {
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border: none;
    color: white;
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    font-family: var(--font-primary);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.token-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.token-info i {
    color: #FFD700;
}

/* Checklist Styles */
.checklist-container {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    padding: 15px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

@media (min-width: 768px) {
    .checklist-container {
        grid-template-columns: 1fr 1fr;
    }
}

.checklist-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.checklist-item label {
    margin-bottom: 0;
    cursor: pointer;
}

.custom-item {
    display: flex;
    align-items: center;
    gap: 8px;
    grid-column: 1 / -1;
    margin-top: 10px;
}

.custom-item input[type="text"] {
    flex: 1;
    padding: 8px 12px;
    height: auto;
}

.add-custom-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--accent-color);
    color: white;
    border: none;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* Workflow Results */
.workflow-result {
    background: rgba(0, 10, 30, 0.3);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
}

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

.result-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-family: var(--font-secondary);
}

.result-actions {
    display: flex;
    gap: 10px;
}

.action-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: background-color 0.3s;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

.action-btn i {
    font-size: 0.9rem;
}

/* Progress Tracker */
.progress-tracker {
    display: flex;
    margin-bottom: 30px;
}

.progress-step {
    flex: 1;
    position: relative;
    padding: 0 20px;
}

.progress-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 30px;
    right: 0;
    width: calc(100% - 60px);
    height: 2px;
    background-color: rgba(255, 255, 255, 0.1);
    z-index: 1;
}

.progress-step.active:not(:last-child)::after {
    background: linear-gradient(90deg, var(--accent-color), rgba(255, 255, 255, 0.1));
}

.progress-step.completed:not(:last-child)::after {
    background-color: var(--accent-color);
}

.step-indicator {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.5rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    position: relative;
    z-index: 2;
    transition: all 0.3s;
}

.progress-step.active .step-indicator {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
}

.progress-step.completed .step-indicator {
    background-color: var(--accent-color);
    color: white;
}

.step-label {
    text-align: center;
    font-size: 0.9rem;
    margin-bottom: 10px;
    font-weight: 500;
}

.step-progress {
    padding-top: 10px;
}

.progress-bar {
    height: 6px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 3px;
    transition: width 0.5s ease;
}

/* Version Tabs */
.version-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.version-tab {
    padding: 10px 20px;
    opacity: 0.7;
    cursor: pointer;
    position: relative;
    transition: opacity 0.3s;
}

.version-tab.active {
    opacity: 1;
}

.version-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--accent-color);
}

.version-panel {
    display: none;
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
}

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

.agent-badge {
    display: inline-block;
    padding: 5px 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    font-size: 0.8rem;
    margin-bottom: 15px;
}

.agent-badge i {
    margin-right: 5px;
}

.content-display {
    min-height: 300px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    line-height: 1.6;
}

/* Manual Results */
.manual-results-container {
    margin-top: 20px;
}

.manual-tabs {
    display: flex;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
}

.manual-tab {
    padding: 10px 20px;
    opacity: 0.7;
    cursor: pointer;
    position: relative;
    transition: opacity 0.3s;
}

.manual-tab.active {
    opacity: 1;
}

.manual-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--accent-color);
}

.manual-tab-content {
    display: none;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    padding: 20px;
}

.manual-tab-content.active {
    display: block;
}

/* Analysis Summary */
.analysis-summary {
    margin-bottom: 30px;
}

.analysis-summary h4 {
    margin-top: 0;
    font-family: var(--font-secondary);
    margin-bottom: 20px;
}

.score-chart {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 30px;
}

.score-circle {
    width: 120px;
    margin-bottom: 15px;
}

.circular-chart {
    display: block;
    width: 100%;
}

.circle-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.1);
    stroke-width: 3;
}

.circle {
    fill: none;
    stroke-width: 3;
    stroke: var(--accent-color);
    stroke-linecap: round;
    animation: progress 1s ease-out forwards;
}

@keyframes progress {
    0% {
        stroke-dasharray: 0, 100;
    }
}

.percentage {
    fill: white;
    font-family: var(--font-secondary);
    font-size: 0.5rem;
    text-anchor: middle;
}

.score-label {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

.criteria-scores {
    display: grid;
    gap: 15px;
}

.criteria-item {
    display: grid;
    grid-template-columns: 1fr 3fr 1fr;
    align-items: center;
    gap: 10px;
}

.criteria-name {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

.criteria-bar {
    height: 8px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
}

.criteria-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 4px;
    animation: fillBar 1s ease-out forwards;
}

@keyframes fillBar {
    0% {
        width: 0;
    }
}

.criteria-value {
    font-size: 0.9rem;
    text-align: right;
    color: var(--accent-color);
    font-weight: 500;
}

.detailed-analysis {
    margin-top: 30px;
}

.detailed-analysis h4 {
    margin-top: 0;
    font-family: var(--font-secondary);
    margin-bottom: 20px;
}

.analysis-points {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 20px;
}

/* Comparison View */
.comparison-view {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 992px) {
    .comparison-view {
        grid-template-columns: 1fr 1fr;
    }
}

.comparison-original,
.comparison-refined {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 20px;
}

.comparison-original h4,
.comparison-refined h4 {
    margin-top: 0;
    margin-bottom: 15px;
    font-family: var(--font-secondary);
    color: rgba(255, 255, 255, 0.9);
}

.comparison-text {
    min-height: 300px;
}

/* History Styles */
.history-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 25px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 15px;
}

.search-filter {
    display: flex;
    flex: 1;
}

.search-filter input {
    flex: 1;
    padding: 10px 15px;
    border-radius: 5px 0 0 5px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.search-filter input:focus {
    outline: none;
    border-color: var(--accent-color);
}

.search-btn {
    padding: 0 15px;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
}

.date-filter select,
.type-filter select {
    padding: 10px 15px;
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: white;
    min-width: 150px;
}

.date-filter select:focus,
.type-filter select:focus {
    outline: none;
    border-color: var(--accent-color);
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.history-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 15px 20px;
    display: grid;
    grid-template-columns: 100px 1fr auto;
    gap: 15px;
    align-items: center;
    transition: background-color 0.3s;
}

.history-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.history-meta {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.history-type {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 0.75rem;
    text-align: center;
    font-weight: 500;
}

.history-type.agentic {
    background-color: rgba(33, 150, 243, 0.2);
    color: #2196F3;
}

.history-type.manual {
    background-color: rgba(156, 39, 176, 0.2);
    color: #9C27B0;
}

.history-date {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
}

.history-details h4 {
    margin: 0 0 5px;
    font-size: 1.1rem;
}

.history-details p {
    margin: 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

.history-actions {
    display: flex;
    gap: 10px;
}

.history-actions .action-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.empty-history-message {
    text-align: center;
    padding: 50px 0;
    color: rgba(255, 255, 255, 0.7);
}

.empty-history-message i {
    font-size: 3rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-history-message h3 {
    margin: 0 0 10px;
}

.empty-history-message p {
    margin: 0;
    max-width: 400px;
    margin: 0 auto;
}

/* Workflow Tips */
.workflow-tips {
    margin-top: 40px;
    background: linear-gradient(145deg, rgba(var(--primary-color-rgb), 0.2), rgba(var(--accent-color-rgb), 0.2));
    border-radius: 12px;
    padding: 25px;
    overflow: hidden;
}

.tips-header {
    margin-bottom: 20px;
}

.tips-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-family: var(--font-secondary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.tips-header h3 i {
    color: #FFD700;
}

.tips-carousel {
    position: relative;
    overflow: hidden;
}

.tip-item {
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin-bottom: 20px;
}

.tip-item h4 {
    margin: 0 0 10px;
    font-size: 1.1rem;
    color: var(--accent-color);
}

.tip-item p {
    margin: 0;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
}

.carousel-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.carousel-indicators {
    display: flex;
    gap: 8px;
}

.indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: background-color 0.3s;
}

.indicator.active {
    background-color: var(--accent-color);
}

.prev-btn,
.next-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s;
}

.prev-btn:hover,
.next-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Upgrade Banner */
.upgrade-banner {
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    padding: 50px 0;
    text-align: center;
    color: white;
}

.upgrade-banner h2 {
    margin: 0 0 15px;
    font-family: var(--font-secondary);
    font-size: 2rem;
}

.upgrade-banner p {
    margin: 0 auto 30px;
    max-width: 700px;
    opacity: 0.9;
    font-size: 1.1rem;
}

.plan-features {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
}

.plan-feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.plan-feature i {
    font-size: 2rem;
}

.plan-feature span {
    font-weight: 500;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .workflow-tabs {
        flex-wrap: wrap;
    }
    
    .tab {
        flex: 1;
        text-align: center;
        padding: 10px;
    }
    
    .progress-tracker {
        flex-direction: column;
    }
    
    .progress-step {
        display: flex;
        align-items: center;
        margin-bottom: 15px;
        padding: 0;
    }
    
    .progress-step:not(:last-child)::after {
        display: none;
    }
    
    .step-indicator {
        margin: 0 15px 0 0;
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .plan-features {
        gap: 20px;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 20px;
    }
    
    .token-info {
        align-self: flex-start;
    }
}