﻿/* ========================================
   CSS Variables
   ======================================== */
:root {
    --editor-bg: #f8f9fa;
    --sidebar-bg: linear-gradient(135deg, #e8f3ff 0%, #d1e8ff 50%, #bbdefb 100%);
    --gradient-card: linear-gradient(135deg, #f0f8ff 0%, #e8f4ff 50%, #e0f0ff 100%);
    --border-color: #d5e3ff;
    --accent-blue: #1976d2;
    --accent-blue-dark: #005a90;
    --accent-blue-light: #64b5f6;
    --text-primary: #005a90;
    --text-secondary: #6c757d;
    --mud-palette-info: #1976d2;
}

/* ========================================
   Modern Scenario Editor Styles
   ======================================== */

.modern-editor {
    display: flex;
    background: #f8f9fa;
    overflow: hidden;
}

/* Sidebar Navigation */
.editor-sidebar {
    width: 300px;
    background: linear-gradient(135deg, #e8f3ff 0%, #d1e8ff 50%, #bbdefb 100%);
    border-right: 2px solid #64b5f6;
    box-shadow: 0 3px 12px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar-header {
    padding: 20px 16px;
    background: rgba(25, 118, 210, 0.1);
    border-bottom: 2px solid #64b5f6;
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #005a90;
    flex: 1;
}

.icon-btn {
    background: transparent;
    border: none;
    color: #1976d2;
    cursor: pointer;
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.icon-btn:hover:not(:disabled) {
    background: rgba(25, 118, 210, 0.1);
    color: #005a90;
    transform: scale(1.15);
}

.icon-btn.primary {
    color: #1976d2;
}

.icon-btn.primary:hover:not(:disabled) {
    background: rgba(25, 118, 210, 0.15);
    transform: scale(1.2);
}

.icon-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Page List */
.pages-container {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    background: white;
}

.page-item {
    background: white;
    border: 1px solid #d5e3ff;
    border-radius: 12px;
    margin-bottom: 12px;
    overflow: hidden;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.page-item:hover {
    box-shadow: 0 4px 12px rgba(25, 118, 210, 0.15);
    transform: translateY(-1px);
    border-color: #64b5f6;
}

.page-item.selected {
    background: white;
    border-color: #1976d2;
    border-left: 4px solid #1976d2;
    box-shadow: 0 4px 12px rgba(25, 118, 210, 0.2);
}

.page-header-bar {
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.page-header-bar:hover {
    background: rgba(25, 118, 210, 0.05);
}

.page-icon {
    color: #1976d2;
    font-size: 18px !important;
    transition: all 0.2s;
    vertical-align: middle;
}

.page-item.selected .page-icon {
    color: #005a90;
}

.page-title {
    flex: 1;
    font-size: 13px;
    font-weight: 600;
    color: #005a90;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.page-item.selected .page-title {
    font-weight: 700;
}

.page-badge {
    background: rgba(25, 118, 210, 0.1);
    border: 1px solid rgba(25, 118, 210, 0.3);
    padding: 4px 10px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 700;
    color: #1976d2;
    min-width: 24px;
    text-align: center;
}

.page-item.selected .page-badge {
    background: #1976d2;
    border-color: #1976d2;
    color: white;
}

.icon-btn-small {
    background: transparent;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0;
    color: #1976d2;
}

.icon-btn-small:hover:not(:disabled) {
    background: rgba(25, 118, 210, 0.1);
    transform: scale(1.1);
}

.icon-btn-small:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Main Editor Area */
.editor-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #f8f9fa;
}

/* Top Bar - matches as-backgroud-gray header */
.editor-topbar {
    height: auto;
    min-height: 60px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    padding: 12px 24px;
    gap: 16px;
}

.topbar-title {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-title h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #005a90;
}

.topbar-title .icon-btn {
    background: white;
    border: 1px solid #d5e3ff;
    color: #1976d2;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

.topbar-title .icon-btn:hover {
    background: #1976d2;
    color: white;
    box-shadow: 0 4px 8px rgba(25, 118, 210, 0.3);
}

.status-badge {
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    height: 30px;
}

.status-badge.unsaved {
    background-color: rgba(255, 152, 0, 0.08);
    color: #e65100;
    border: 1px solid rgba(255, 152, 0, 0.3);
    animation: pulse 2s ease-in-out infinite;
}

.status-badge.saved {
    background-color: rgba(76, 175, 80, 0.08);
    color: #2e7d32;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

/* Action Buttons - MudButton style */
.action-btn {
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid #1976d2;
    background: white;
    color: #1976d2;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    box-shadow: none;
    height: 36px;
}

.action-btn:hover:not(:disabled) {
    background: rgba(25, 118, 210, 0.04);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.action-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.action-btn.success {
    background: #4caf50;
    border-color: #4caf50;
    color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.action-btn.success:hover:not(:disabled) {
    background: #388e3c;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.action-btn.danger {
    background: #f44336;
    border-color: #f44336;
    color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.action-btn.danger:hover:not(:disabled) {
    background: #d32f2f;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Content Area */
.editor-content {
    flex: 1;
    overflow-y: auto;
    background: transparent;
}

/* Steps View */
.steps-view {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    max-width: 500px;
    margin: 0 auto;
}

.empty-state-icon {
    font-size: 64px !important;
    margin-bottom: 16px;
    opacity: 0.6;
    color: #1976d2;
}

.empty-state h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #005a90;
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 0.875rem;
    color: #6c757d;
    margin-bottom: 20px;
    line-height: 1.6;
}

/* Step Card - Matches TestStepDisplayCard */
.step-card {
    background: linear-gradient(135deg, #f0f8ff 0%, #e8f4ff 50%, #e0f0ff 100%);
    border: 2px solid #c8deff;
    border-left: 4px solid #1976d2;
    border-radius: 8px;
    margin-bottom: 12px;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    overflow: hidden;
    padding: 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.step-card:hover {
    box-shadow: 0 4px 12px rgba(25, 118, 210, 0.15);
}

.step-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
}

.step-number-section {
    min-width: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.step-id-chip {
    font-size: 0.6rem;
    padding: 2px 8px;
    border-radius: 10px;
    border: 1px solid rgba(0, 90, 144, 0.3);
    background: rgba(0, 90, 144, 0.05);
    color: #005a90;
    font-weight: 600;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-number {
    font-size: 0.75rem;
    font-weight: 600;
    color: #6c757d;
}

.step-content {
    flex: 1;
    min-width: 0;
}

.step-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #005a90;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    line-height: 1.4;
}

.step-action-type {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-width: 100px;
    height: 28px;
    padding: 0 12px;
    border-radius: 14px;
    font-size: 0.75rem;
    font-weight: 600;
    justify-content: center;
}

.step-created-by {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    background: #4caf50;
    color: white;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    height: 24px;
    gap: 4px;
}

.step-description {
    font-size: 0.75rem;
    color: #6c757d;
    margin-bottom: 2px;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 600px;
}

.step-details {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.75rem;
    margin-top: 8px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(200, 222, 255, 0.6);
    border-radius: 6px;
    backdrop-filter: blur(10px);
}

.step-detail-item {
    display: flex;
    gap: 6px;
    align-items: center;
    max-width: 250px;
    min-width: 0;
}

.step-detail-label {
    color: #6c757d;
    font-weight: 600;
    text-transform: capitalize;
    font-size: 0.7rem;
    letter-spacing: 0.02em;
    white-space: nowrap;
    flex-shrink: 0;
}

.step-detail-value {
    color: #005a90;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.step-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
    align-items: center;
}

/* Add Step Button */
.add-step-btn {
    width: 100%;
    padding: 16px;
    background: white;
    border: 2px dashed #d5e3ff;
    border-radius: 8px;
    color: #1976d2;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
    margin-top: 12px;
}

.add-step-btn:hover {
    background: rgba(25, 118, 210, 0.04);
    border-color: #1976d2;
    border-style: solid;
    color: #005a90;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Bottom Panel */
.editor-bottom-panel {
    height: 220px;
    background: white;
    border-top: 1px solid #e0e0e0;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
}

.panel-tabs {
    display: flex;
    gap: 0;
    padding: 0;
    background: #f8f9fa;
    border-bottom: 1px solid #d5e3ff;
}

.panel-tab {
    padding: 12px 24px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #6c757d;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
    background: transparent;
}

.panel-tab:hover {
    color: #1976d2;
    background: white;
}

.panel-tab.active {
    color: #1976d2;
    border-bottom-color: #1976d2;
    background: white;
    font-weight: 600;
}

.panel-content {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    font-size: 0.875rem;
    line-height: 1.6;
    background: white;
}

/* MudIcon alignment in buttons */
button .mud-icon-root,
.action-btn .mud-icon-root,
.icon-btn .mud-icon-root {
    vertical-align: middle;
    margin-right: 4px;
}

.icon-btn .mud-icon-root {
    margin-right: 0;
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: white;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid #d5e3ff;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.info-item:hover {
    border-color: #1976d2;
    box-shadow: 0 2px 8px rgba(25, 118, 210, 0.15);
}

.info-label {
    font-size: 0.75rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-weight: 600;
}

.info-value {
    font-size: 0.875rem;
    color: #005a90;
    font-weight: 500;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-content {
    text-align: center;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #d5e3ff;
    border-top-color: #1976d2;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========================================
   AeroAutomate Specific Styles
   ======================================== */

/* AeroAutomate Main Page Styles */
.aa-header-custom {
    background: linear-gradient(135deg, var(--mud-palette-primary-lighten) 0%, var(--mud-palette-primary) 100%);
    color: white;
    font-weight: 600;
}

.aa-row-custom:hover {
    background-color: var(--mud-palette-primary-lighten);
}

.aa-status-chip {
    font-weight: 600;
    border-radius: 16px;
}

    .aa-status-chip.running {
        background: linear-gradient(135deg, #e3f2fd, #bbdefb);
        color: #1565c0;
        border: 1px solid #2196f3;
    }

    .aa-status-chip.completed {
        background: linear-gradient(135deg, #e8f5e8, #c8e6c9);
        color: #2e7d32;
        border: 1px solid #4caf50;
    }

    .aa-status-chip.failed {
        background: linear-gradient(135deg, #ffebee, #ffcdd2);
        color: #c62828;
        border: 1px solid #f44336;
    }

    .aa-status-chip.cancelled {
        background: linear-gradient(135deg, #fff3e0, #ffe0b2);
        color: #ef6c00;
        border: 1px solid #ff9800;
    }

    .aa-status-chip.paused {
        background: linear-gradient(135deg, #fff8e1, #ffecb3);
        color: #f9a825;
        border: 1px solid #ffc107;
    }

    .aa-status-chip.new {
        background: linear-gradient(135deg, #f5f5f5, #eeeeee);
        color: #616161;
        border: 1px solid #9e9e9e;
    }

.aa-loading-pulse {
    animation: aa-pulse 1.5s ease-in-out infinite;
}

.aa-sticky-header {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* AttachPageDialog Styles */
.aa-selected-page-item {
    background-color: var(--mud-palette-primary) !important;
    color: white !important;
}

.aa-hover-highlight:hover {
    background-color: var(--mud-palette-action-hover) !important;
}

.aa-text-white {
    color: white !important;
}

.aa-text-white-50 {
    color: rgba(255, 255, 255, 0.7) !important;
}

.aa-text-white-opacity {
    color: rgba(255, 255, 255, 0.8) !important;
}

.aa-selected-page-card {
    background-color: var(--mud-palette-primary) !important;
    color: white !important;
    border-color: var(--mud-palette-primary) !important;
}

.aa-page-attach-card {
    transition: all 0.2s ease-in-out;
    border: 1px solid var(--mud-palette-primary-lighten);
}

    .aa-page-attach-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 16px rgba(25, 118, 210, 0.15);
    }

.aa-opacity-75 {
    opacity: 0.75;
}

.aa-opacity-50 {
    opacity: 0.5;
}

.aa-cursor-pointer {
    cursor: pointer;
}

.transition-all {
    transition: all 0.3s ease;
}

.duration-300 {
    transition-duration: 300ms;
}

/* Enhanced Steps Dialog Styles */
.aa-enhanced-steps-dialog {
    --mud-dialog-max-width: 70vw !important;
    width: 70vw !important;
    height: 85vh !important;
}

    .aa-enhanced-steps-dialog .mud-dialog-content {
        height: 100% !important;
        overflow: hidden !important;
        padding: 0 !important;
        display: flex !important;
        flex-direction: column !important;
    }

.aa-enhanced-step-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    height: 240px;
    background: white;
}

.aa-step-details-box {
    max-height: 80px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #d6eaff transparent;
}

    .aa-step-details-box::-webkit-scrollbar {
        width: 4px;
    }

    .aa-step-details-box::-webkit-scrollbar-track {
        background: transparent;
    }

    .aa-step-details-box::-webkit-scrollbar-thumb {
        background: #d6eaff;
        border-radius: 2px;
    }

        .aa-step-details-box::-webkit-scrollbar-thumb:hover {
            background: #c4e0ff;
        }

.aa-enhanced-step-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-color: var(--mud-palette-primary-lighten);
}

.aa-enhanced-step-card:active {
    transform: translateY(0);
}

.aa-selected-step-card {
    background: linear-gradient(135deg, #4f46e5 0%, #3b82f6 50%, #06b6d4 100%) !important;
    color: white !important;
    border-color: var(--mud-palette-primary) !important;
    transform: scale(1.02);
    box-shadow: 0 12px 30px rgba(79, 70, 229, 0.3);
}

    .aa-selected-step-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        border-radius: inherit;
        padding: 2px;
        background: linear-gradient(135deg, #4f46e5, #3b82f6, #06b6d4);
        mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
        mask-composite: exclude;
        z-index: -1;
    }

.aa-custom-pagination .mud-pagination-item {
    margin: 0 2px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

    .aa-custom-pagination .mud-pagination-item:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    }

.aa-step-text-ellipsis {
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.aa-step-detail-ellipsis {
    max-width: 180px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    margin-bottom: 2px;
}

.aa-step-chip-ellipsis {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ScenarioSelector Styles */
.aa-scenario-card {
    transition: all 0.2s ease-in-out;
    border: 2px solid transparent;
}

    .aa-scenario-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    }

    .aa-scenario-card.aa-selected-scenario {
        border: 2px solid var(--mud-palette-primary);
        background-color: var(--mud-palette-primary);
    }

.aa-selected-text {
    color: white !important;
}

.aa-selected-text-muted {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* AutomateAnalytics Styles */
.aa-heatmap-container {
    display: flex;
    flex-direction: column;
}

.aa-heatmap-row {
    display: flex;
    flex: 1;
}

.aa-heatmap-cell {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s;
}

    .aa-heatmap-cell:hover {
        transform: scale(1.05);
        z-index: 1;
    }

.aa-test-step {
    min-width: 140px;
    height: 100px;
    margin: 0 8px;
    padding: 8px;
    border-radius: 4px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s;
}

    .aa-test-step:hover {
        transform: translateY(-5px);
    }

.aa-has-failures {
    background-color: rgba(244, 67, 54, 0.15);
    border: 1px solid #f44336;
}

.aa-no-failures {
    background-color: rgba(76, 175, 80, 0.15);
    border: 1px solid #4caf50;
}

/* Common AeroAutomate utility classes */
.aa-as-text-blue {
    color: var(--as-steel-blue) !important;
}

.flex-grow-1 {
    flex-grow: 1;
}

/* Additional AutomateAnalytics Styles */
.aa-step-number {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background-color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.aa-step-name {
    font-weight: bold;
    text-align: center;
}

.aa-failure-rate {
    text-align: center;
    font-size: 0.9rem;
    margin-top: 8px;
}

.aa-step-connector {
    position: absolute;
    right: -12px;
    top: 50%;
    width: 16px;
    height: 2px;
    background-color: #9e9e9e;
    z-index: 1;
}

.aa-test-step:last-child .aa-step-connector {
    display: none;
}

/* CreateStepDialog Styles */
.aa-condition-group {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
    background-color: #fafafa;
}

.aa-condition-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

    .aa-condition-row:last-child {
        margin-bottom: 0;
    }

.aa-operator-chip {
    min-width: 40px;
    font-size: 0.7rem;
    font-weight: 600;
}

/* AllScenariosView Styles */
.aa-scenario-expansion-panel .mud-expand-panel {
    border: 1px solid var(--mud-palette-primary-lighten);
    border-radius: 8px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
    transition: all 0.2s ease-in-out;
}

    .aa-scenario-expansion-panel .mud-expand-panel:hover {
        box-shadow: 0 4px 12px rgba(25, 118, 210, 0.15);
        transform: translateY(-1px);
    }

.aa-page-expansion-panel .mud-expand-panel {
    border: 1px solid var(--mud-palette-info-lighten);
    border-radius: 6px;
    background: #fafcff;
}

/* TestErrorDialog Styles */
.aa-error-dialog-overlay {
    backdrop-filter: blur(2px);
}

.aa-error-dialog .mud-button .text-center div {
    line-height: 1.2;
}

.aa-error-dialog .mud-button .mud-typography {
    font-size: 0.75rem;
}

/* ViewAllStepsDialog Styles */
.aa-view-all-steps-dialog {
    width: 60vw !important;
    max-width: 60vw !important;
}

.aa-step-view-card {
    transition: all 0.2s ease-in-out;
    border: 1px solid var(--mud-palette-primary-lighten);
    height: 100%;
}

    .aa-step-view-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 16px rgba(25, 118, 210, 0.15);
    }

    .aa-step-view-card .mud-card-content {
        min-height: 180px;
        display: flex;
        flex-direction: column;
    }

.aa-step-name-ellipsis {
    max-width: 180px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.aa-step-description-ellipsis {
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

/* ScenarioEditor Styles */
.aa-page-panel {
    margin-bottom: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.2s ease-in-out;
}

    .aa-page-panel:hover {
        box-shadow: 0 4px 16px rgba(0,0,0,0.15);
        transform: translateY(-1px);
    }

.aa-step-table {
    margin-top: 1rem;
    background: white;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.06);
}

    .aa-step-table .mud-table-head {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    }

        .aa-step-table .mud-table-head .mud-table-cell {
            color: white !important;
            font-weight: 600;
            font-size: 0.875rem;
            letter-spacing: 0.5px;
            border-bottom: none;
            padding: 16px 12px;
        }

    .aa-step-table .mud-table-body .mud-table-row {
        border-bottom: 1px solid rgba(0,0,0,0.04);
        transition: all 0.3s ease;
    }

    .aa-step-table tbody tr:hover {
        background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%) !important;
        transform: translateX(4px);
        transition: all 0.2s ease-in-out;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    }

    .aa-step-table .mud-table-body .mud-table-cell {
        padding: 14px 12px;
        vertical-align: middle;
        border-bottom: 1px solid rgba(0,0,0,0.04);
    }

    .aa-step-table .mud-table-body .mud-table-row:last-child .mud-table-cell {
        border-bottom: none;
    }

.aa-action-details {
    max-width: 200px;
}

    .aa-action-details .mud-typography {
        display: block;
        margin-bottom: 2px;
        font-size: 0.75rem;
        opacity: 0.8;
    }

.aa-loading-overlay {
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.aa-has-changes {
    border-left: 4px solid var(--mud-palette-warning);
    background-color: rgba(255, 193, 7, 0.1);
}

.aa-mud-chip {
    transition: all 0.2s ease-in-out;
}

    .aa-mud-chip:hover {
        transform: scale(1.05);
    }

/* TestExecutionView Styles */
.aa-page-card {
    border-left: 4px solid var(--mud-palette-primary);
}

.aa-steps-container {
    max-height: 400px;
    overflow-y: auto;
}

.aa-step-card {
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    background-color: #fafafa;
    transition: all 0.2s ease;
}

    .aa-step-card.aa-step-pending {
        border-left: 4px solid #9e9e9e;
    }

    .aa-step-card.aa-step-running {
        border-left: 4px solid #2196f3;
        background-color: #e3f2fd;
    }

    .aa-step-card.aa-step-success {
        border-left: 4px solid #4caf50;
        background-color: #e8f5e8;
    }

    .aa-step-card.aa-step-error {
        border-left: 4px solid #f44336;
        background-color: #ffebee;
    }

    .aa-step-card.aa-step-warning {
        border-left: 4px solid #ff9800;
        background-color: #fff3e0;
    }

.aa-step-indicator {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.aa-step-circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 12px;
}

    .aa-step-circle.aa-pending {
        background-color: #9e9e9e;
        color: white;
    }

    .aa-step-circle.aa-success {
        background-color: #4caf50;
        color: white;
    }

    .aa-step-circle.aa-error {
        background-color: #f44336;
        color: white;
    }

    .aa-step-circle.aa-warning {
        background-color: #ff9800;
        color: white;
    }

.aa-console-panel {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.aa-console-content {
    font-size: 12px;
    line-height: 1.4;
}

.aa-console-line {
    word-break: break-all;
}

.aero-automate-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.aero-automate-loading-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.aero-automate-loading-content {
    position: relative;
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    max-width: 400px;
    min-width: 300px;
    margin: 1rem;
}
/* Pagination Component Styles */
.aa-pagination-container {
    background: linear-gradient(135deg, #f8fbff 0%, #f0f8ff 50%, #e8f4ff 100%);
    border: 1px solid #e0e8ff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

    .aa-pagination-container:hover {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

.aa-pagination-btn {
    min-width: 36px !important;
    height: 36px !important;
    border-radius: 8px !important;
    transition: all 0.2s ease !important;
}

    .aa-pagination-btn:hover {
        transform: translateY(-1px);
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    }

.aa-pagination-btn-active {
    min-width: 36px !important;
    height: 36px !important;
    border-radius: 8px !important;
    background: linear-gradient(135deg, #1976d2 0%, #2196f3 100%) !important;
    box-shadow: 0 2px 8px rgba(25, 118, 210, 0.4) !important;
}

/* Run Cards Styles */
.aa-run-card {
    background: white;
    border: 1px solid #e3f2fd;
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    height: 100%;
}

.aa-run-card-flex {
    display: flex;
    flex-direction: column;
    min-height: 320px;
}

.aa-run-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    border-color: #bbdefb;
}

.min-width-0 {
    min-width: 0;
}

.aa-run-card-header {
    background: linear-gradient(135deg, #f8fbff 0%, #f0f8ff 100%);
    border-bottom: 1px solid #e3f2fd;
    padding: 16px;
}

.aa-run-card-content {
    padding: 16px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.aa-run-card-footer {
    padding: 12px 16px;
    background: #fafbfc;
    border-top: 1px solid #f0f0f0;
}

.aa-status-chip {
    font-weight: 600;
    border-radius: 16px;
    padding: 4px 12px;
    font-size: 0.75rem;
}

.aa-status-success {
    background: linear-gradient(135deg, #e8f5e8 0%, #f1f8e9 100%);
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.aa-status-failed {
    background: linear-gradient(135deg, #ffebee 0%, #fce4ec 100%);
    color: #c62828;
    border: 1px solid #ffcdd2;
}

.aa-status-running {
    background: linear-gradient(135deg, #e3f2fd 0%, #e8f4f8 100%);
    color: #1565c0;
    border: 1px solid #bbdefb;
}

.aa-status-pending {
    background: linear-gradient(135deg, #fff8e1 0%, #fffde7 100%);
    color: #ef6c00;
    border: 1px solid #ffecb3;
}

/* Responsive Card Improvements */
@media (max-width: 768px) {
    .aa-run-card {
        margin-bottom: 16px;
    }

    .aa-run-card-header,
    .aa-run-card-content,
    .aa-run-card-footer {
        padding: 12px;
    }

    .aa-pagination-container {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }

        .aa-pagination-container > div {
            justify-content: center;
        }

    .aa-enhanced-steps-dialog {
        --mud-dialog-max-width: 95vw !important;
        width: 95vw !important;
        height: 90vh !important;
    }
}

/* Card Animation Improvements */
.aa-run-card {
    animation: fadeInUp 0.3s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Enhanced Status Colors */
.aa-status-completed {
    background: linear-gradient(135deg, #e8f5e8 0%, #f1f8e9 100%);
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.aa-status-new {
    background: linear-gradient(135deg, #f3e5f5 0%, #fce4ec 100%);
    color: #7b1fa2;
    border: 1px solid #e1bee7;
}

.aa-status-cancelled {
    background: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
    color: #616161;
    border: 1px solid #e0e0e0;
}

.aa-status-paused {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    color: #f57c00;
    border: 1px solid #ffcc02;
}
/* Test Execution Partial Start Buttons - Left Side Overlay Style */
/* Page Icon and Play Button Overlay */
.page-icon-container {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}

.page-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.15s ease-out;
    will-change: opacity;
    display: flex;
    align-items: center;
    justify-content: center;
}

.aa-page-card:hover .page-play-overlay {
    opacity: 1;
}

.aa-page-card:hover .page-icon {
    opacity: 0;
}

.page-icon {
    transition: opacity 0.15s ease-out;
    will-change: opacity;
}

.page-play-btn {
    color: white !important;
    box-shadow: 0 2px 6px rgba(76, 175, 80, 0.4) !important;
    border-radius: 50% !important;
}

.page-play-btn .mud-icon-root {
    font-size: 1.25rem !important;
}

.page-play-btn .mud-button-root {
    min-width: 36px !important;
    min-height: 36px !important;
}

/* Step Status Icon and Play Button Overlay */
.step-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.15s ease-out;
    will-change: opacity;
}

.aa-step-card:hover .step-play-overlay {
    opacity: 1;
}

.aa-step-card:hover .step-status-icon {
    opacity: 0;
}

.step-status-icon {
    transition: opacity 0.15s ease-out;
    will-change: opacity;
}

.step-play-btn {
    color: white !important;
    box-shadow: 0 2px 4px rgba(76, 175, 80, 0.3) !important;
    border-radius: 50% !important;
}

/* Ensure step play button matches status icon size */
.step-play-btn .mud-icon-root {
    font-size: 1rem !important;
}

/* Hover effects */
.page-play-btn:hover,
.step-play-btn:hover {
    transform: scale(1.05);
    transition: all 0.15s ease-in-out;
}

/* Ensure proper positioning */
.aa-step-indicator {
    position: relative !important;
}

/* Fix icon alignment for automated tests */
.aa-page-card .mud-icon-root {
    vertical-align: middle;
}

/* Ensure proper spacing for chips next to icons */
.aa-step-card .d-flex.align-center.gap-1.ml-3 > .mud-chip {
    margin-left: 4px;
}

/* new all scenarios page styles */
.scenario-list-item {
        transition: all 0.2s ease;
        cursor: pointer;
        border-left: 4px solid transparent;
        background: linear-gradient(135deg, #fafcff 0%, #f5f9ff 50%, #f0f6ff 100%);
    }

    .scenario-list-item:hover {
        background: linear-gradient(135deg, #f0f6ff 0%, #e8f3ff 50%, #e3f2fd 100%) !important;
        border-left-color: var(--mud-palette-primary);
        box-shadow: 0 3px 8px rgba(0,0,0,0.1) !important;
    }

    .scenario-list-item.selected {
        background: linear-gradient(135deg, #e3f2fd 0%, #e8f3ff 50%, #f0f6ff 100%) !important;
        border-left-color: var(--mud-palette-primary);
        border-left-width: 4px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.12) !important;
    }

    .detail-panel {
        position: fixed;
        right: 0;
        top: 0;
        height: 100vh;
        width: 550px;
        background: linear-gradient(135deg, #fafcff 0%, #f5f9ff 100%);
        box-shadow: -8px 0 32px rgba(0,0,0,0.15);
        z-index: 1300;
        transform: translateX(100%);
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        overflow-y: auto;
    }

    .detail-panel.open {
        transform: translateX(0);
    }

    .detail-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.35);
        z-index: 1299;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.35s ease;
    }

    .detail-overlay.open {
        opacity: 1;
        pointer-events: all;
    }

    .page-section {
        background: linear-gradient(135deg, #ffffff 0%, #fafcff 100%);
        border: 1px solid #d5e3ff;
        border-radius: 10px;
        border-left: 3px solid var(--mud-palette-secondary);
        transition: all 0.2s ease;
    }

    .page-section:hover {
        box-shadow: 0 2px 8px rgba(0,0,0,0.08);
        border-left-width: 4px;
    }

    .step-item {
        padding: 12px 14px;
        background: linear-gradient(135deg, #e8f3ff 0%, #f0f6ff 100%);
        border-radius: 8px;
        border-left: 2px solid #90caf9;
        transition: all 0.15s ease;
    }

    .step-item:hover {
        background: linear-gradient(135deg, #d1e8ff 0%, #e3f2fd 100%);
        border-left-color: var(--mud-palette-primary);
        border-left-width: 3px;
        box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    }

    .quick-action-btn {
        opacity: 0;
        transition: opacity 0.2s ease;
    }

    .scenario-list-item:hover .quick-action-btn {
        opacity: 1;
    }

/* Scrollbar Styling */
.pages-container::-webkit-scrollbar,
.editor-content::-webkit-scrollbar,
.panel-content::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.pages-container::-webkit-scrollbar-track,
.editor-content::-webkit-scrollbar-track,
.panel-content::-webkit-scrollbar-track {
    background: transparent;
}

.pages-container::-webkit-scrollbar-thumb,
.editor-content::-webkit-scrollbar-thumb,
.panel-content::-webkit-scrollbar-thumb {
    background: #64b5f6;
    border-radius: 10px;
}

.pages-container::-webkit-scrollbar-thumb:hover,
.editor-content::-webkit-scrollbar-thumb:hover,
.panel-content::-webkit-scrollbar-thumb:hover {
    background: #1976d2;
}

/* ========================================
   Test Execution Improvements - Phase 1
   ======================================== */

/* Device Validation Guard */
.aa-device-validation-alert {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    border: 2px solid #ffb74d;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.2);
    animation: aa-pulse-warning 2s ease-in-out infinite;
}

@keyframes aa-pulse-warning {
    0%, 100% { box-shadow: 0 2px 8px rgba(255, 152, 0, 0.2); }
    50% { box-shadow: 0 4px 16px rgba(255, 152, 0, 0.35); }
}

/* Modern Guided Step Actions */
.aa-guided-step-modern {
    background: #ffffff;
    border-left: 4px solid #64b5f6;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
}

.aa-guided-step-modern:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.aa-step-result-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    border-radius: 8px 8px 0 0;
}

.aa-step-result-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    gap: 12px;
}

.aa-step-result-complete {
    padding: 16px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.aa-result-btn {
    font-weight: 500 !important;
    text-transform: none !important;
    padding: 6px 16px !important;
    transition: all 0.2s ease !important;
}

.aa-result-btn-pass {
    background-color: rgba(76, 175, 80, 0.08) !important;
    color: #4caf50 !important;
    border-color: #4caf50 !important;
}

.aa-result-btn-pass:hover:not(:disabled) {
    background-color: rgba(76, 175, 80, 0.15) !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(76, 175, 80, 0.3) !important;
}

.aa-result-btn-fail {
    background-color: rgba(244, 67, 54, 0.08) !important;
    color: #f44336 !important;
    border-color: #f44336 !important;
}

.aa-result-btn-fail:hover:not(:disabled) {
    background-color: rgba(244, 67, 54, 0.15) !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(244, 67, 54, 0.3) !important;
}

.aa-result-btn-skip {
    background-color: rgba(255, 152, 0, 0.08) !important;
    color: #ff9800 !important;
    border-color: #ff9800 !important;
}

.aa-result-btn-skip:hover:not(:disabled) {
    background-color: rgba(255, 152, 0, 0.15) !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(255, 152, 0, 0.3) !important;
}

.aa-screenshot-btn {
    white-space: nowrap !important;
}

/* Guided Step Actions Grid */
.aa-guided-step-actions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

@media (max-width: 768px) {
    .aa-guided-step-actions-grid {
        grid-template-columns: 1fr;
    }
}

/* Result Action Buttons */
.aa-result-action-btn {
    min-height: 56px;
    font-weight: 600;
    border-radius: 8px !important;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.aa-result-action-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.aa-result-action-btn:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Step Result Selector */
.aa-step-result-selector {
    padding: 16px;
    background: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.aa-result-buttons-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.aa-result-btn {
    min-height: 48px;
    font-weight: 600;
    border-radius: 8px !important;
    transition: all 0.2s ease;
}

.aa-result-btn:hover:not(:disabled) {
    transform: scale(1.02);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Device Connection Status Badge */
.aa-device-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.aa-device-status-badge.connected {
    background: linear-gradient(135deg, #e8f5e9 0%, #f1f8e9 100%);
    color: #2e7d32;
    border: 2px solid #81c784;
    box-shadow: 0 0 12px rgba(76, 175, 80, 0.3);
}

.aa-device-status-badge.disconnected {
    background: linear-gradient(135deg, #ffebee 0%, #fce4ec 100%);
    color: #c62828;
    border: 2px solid #e57373;
    animation: aa-pulse-error 2s ease-in-out infinite;
}

@keyframes aa-pulse-error {
    0%, 100% { box-shadow: 0 0 8px rgba(244, 67, 54, 0.3); }
    50% { box-shadow: 0 0 16px rgba(244, 67, 54, 0.5); }
}

.aa-device-status-badge.warning {
    background: linear-gradient(135deg, #fff8e1 0%, #fffde7 100%);
    color: #f57c00;
    border: 2px solid #ffb74d;
}

/* Test Run Status Auto-Update Indicator */
.aa-status-update-indicator {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 1200;
    padding: 12px 20px;
    background: linear-gradient(135deg, #1976d2 0%, #2196f3 100%);
    color: white;
    border-radius: 24px;
    box-shadow: 0 4px 16px rgba(25, 118, 210, 0.4);
    font-size: 0.875rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: aa-slide-in-right 0.3s ease-out;
}

@keyframes aa-slide-in-right {
    from {
        transform: translateX(120%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Enhanced Status Chips for Test Runs */
.aa-status-chip.queued {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: #1976d2;
    border: 1px solid #64b5f6;
}

.aa-status-chip.stopped {
    background: linear-gradient(135deg, #eceff1 0%, #cfd8dc 100%);
    color: #455a64;
    border: 1px solid #90a4ae;
}

/* Improved Step Cards for Guided Tests */
.aa-step-card.guided {
    border-left-width: 6px;
    border-left-color: #64b5f6;
}

.aa-step-card.automated {
    border-left-width: 6px;
    border-left-color: #7e57c2;
}

/* Test Statistics Summary Cards */
.aa-test-stats-card {
    background: linear-gradient(135deg, #ffffff 0%, #fafcff 100%);
    border: 1px solid #e0e8ff;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.aa-test-stats-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.aa-test-stats-value {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #1976d2 0%, #2196f3 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.aa-test-stats-label {
    font-size: 0.875rem;
    color: #6c757d;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Progress Bar Improvements */
.aa-progress-bar-enhanced {
    height: 12px;
    border-radius: 6px;
    background: #e0e0e0;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.aa-progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #4caf50 0%, #66bb6a 100%);
    transition: width 0.5s ease;
    position: relative;
    overflow: hidden;
}

.aa-progress-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.3) 50%, transparent 100%);
    animation: aa-progress-shimmer 2s infinite;
}

@keyframes aa-progress-shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Test Execution Controls Enhancement */
.aa-test-controls-container {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #fafcff 0%, #f5f9ff 100%);
    border-radius: 12px;
    border: 1px solid #e0e8ff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Page and Step Count Badges */
.aa-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 4px 10px;
    background: linear-gradient(135deg, #1976d2 0%, #2196f3 100%);
    color: white;
    border-radius: 14px;
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(25, 118, 210, 0.3);
}

.aa-count-badge.success {
    background: linear-gradient(135deg, #4caf50 0%, #66bb6a 100%);
    box-shadow: 0 2px 6px rgba(76, 175, 80, 0.3);
}

.aa-count-badge.error {
    background: linear-gradient(135deg, #f44336 0%, #e57373 100%);
    box-shadow: 0 2px 6px rgba(244, 67, 54, 0.3);
}

.aa-count-badge.warning {
    background: linear-gradient(135deg, #ff9800 0%, #ffb74d 100%);
    box-shadow: 0 2px 6px rgba(255, 152, 0, 0.3);
}

/* Empty State Improvements */
.aa-empty-state-modern {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.aa-empty-state-icon {
    font-size: 80px !important;
    color: #90caf9;
    opacity: 0.7;
    margin-bottom: 24px;
    animation: aa-float 3s ease-in-out infinite;
}

@keyframes aa-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.aa-empty-state-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1976d2;
    margin-bottom: 12px;
}

.aa-empty-state-description {
    font-size: 1rem;
    color: #6c757d;
    margin-bottom: 32px;
    max-width: 500px;
    line-height: 1.6;
}

/* Modal/Dialog Improvements */
.aa-dialog-modern {
    border-radius: 16px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12) !important;
}

.aa-dialog-header-modern {
    background: linear-gradient(135deg, #e8f3ff 0%, #d1e8ff 100%);
    border-bottom: 2px solid #64b5f6;
    padding: 24px;
}

.aa-dialog-content-modern {
    padding: 24px;
}

.aa-dialog-footer-modern {
    background: #fafcff;
    border-top: 1px solid #e0e8ff;
    padding: 16px 24px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* Tooltip Improvements */
.aa-tooltip-modern {
    background: linear-gradient(135deg, #424242 0%, #212121 100%) !important;
    color: white !important;
    border-radius: 8px !important;
    padding: 8px 12px !important;
    font-size: 0.813rem !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

/* Loading States */
.aa-skeleton-loader {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: aa-skeleton-loading 1.5s infinite;
    border-radius: 4px;
}

@keyframes aa-skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Accessibility Improvements */
.aa-focus-visible:focus-visible {
    outline: 3px solid #2196f3;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Print Styles */
@media print {
    .aa-device-validation-alert,
    .aa-guided-step-actions-grid,
    .aa-test-controls-container,
    .page-play-overlay,
    .step-play-overlay {
        display: none !important;
    }
    
    .aa-step-card,
    .aa-page-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}

/* Dark Mode Support (Optional - for future) */
@media (prefers-color-scheme: dark) {
    :root {
        --editor-bg: #1e1e1e;
        --sidebar-bg: linear-gradient(135deg, #2d2d30 0%, #252526 50%, #1e1e1e 100%);
        --gradient-card: linear-gradient(135deg, #2d2d30 0%, #252526 50%, #1e1e1e 100%);
        --border-color: #3e3e42;
        --text-primary: #e0e0e0;
        --text-secondary: #a0a0a0;
    }
}

/*End AeroAutomate Styles*/
