/**
 * Alert Panel Styles - Modern Dark Theme for Axum Trading Platform
 * Inspired by advanced trading platform UI/UX design
 */

/* =============================================================================
   ALERT PANEL CONTAINER
   ============================================================================= */

.alert-panel {
    background: #171717;
    border: 1px solid #404040;
    border-radius: 12px;
    padding: 0;
    margin: 1rem 0;
    color: #f5f5f5;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    min-height: 400px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

/* Alert Panel Header */
.alert-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #404040;
    background: linear-gradient(135deg, #171717 0%, #262626 100%);
    border-radius: 12px 12px 0 0;
}

.alert-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    justify-content: space-between;
}

/* Tab Styles */
.alert-tabs {
    display: flex;
    gap: 0.5rem;
    width: 100%;
    border-bottom: 1px solid #404040;
    padding-bottom: 0.5rem;
}

.tab-button {
    background: transparent;
    border: 1px solid #404040;
    color: #a3a3a3;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.tab-button:hover {
    background: #262626;
    color: #f5f5f5;
    border-color: #525252;
}

.tab-button.active {
    background: #0ea5e9;
    color: white;
    border-color: #0ea5e9;
}

.tab-content {
    padding: 1rem;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/* =============================================================================
   HYBRID ALERT STYLES
   ============================================================================= */

.hybrid-alert-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.hybrid-card {
    background: #1a1a1a;
    border: 1px solid #404040;
    border-radius: 12px;
    overflow: hidden;
}

.hybrid-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #404040;
    background: linear-gradient(135deg, #262626 0%, #1a1a1a 100%);
}

.hybrid-card-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #f5f5f5;
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.hybrid-card-content {
    padding: 1.5rem;
}

/* Daily Breakdown Styles */
.daily-breakdown {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.daily-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: #262626;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.daily-item:hover {
    background: #2a2a2a;
}

.daily-date {
    color: #a3a3a3;
    font-size: 0.875rem;
    font-weight: 500;
    min-width: 60px;
}

.daily-pnl-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.daily-bar {
    height: 8px;
    border-radius: 4px;
    min-width: 8px;
    transition: width 0.3s ease;
}

.daily-bar.positive {
    background: linear-gradient(90deg, #10b981, #059669);
}

.daily-bar.negative {
    background: linear-gradient(90deg, #ef4444, #dc2626);
}

.daily-amount {
    font-size: 0.875rem;
    font-weight: 600;
    min-width: 80px;
    text-align: right;
}

.daily-amount.positive {
    color: #10b981;
}

.daily-amount.negative {
    color: #ef4444;
}

.performance-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    padding: 1rem;
    background: #0a0a0a;
    border-radius: 8px;
    border: 1px solid #333;
}

.summary-stat {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    text-align: center;
}

.stat-label {
    color: #a3a3a3;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    color: #f5f5f5;
    font-size: 1rem;
    font-weight: 700;
}

.stat-value.positive {
    color: #10b981;
}

/* Rule Violations Styles */
.violation-count {
    display: flex;
    align-items: center;
}

.count-badge {
    background: #ef4444;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.violations-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.violation-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: #262626;
    border-radius: 8px;
    border-left: 4px solid #ef4444;
}

.violation-indicator {
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    margin-top: 6px;
    flex-shrink: 0;
}

.violation-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.violation-text {
    color: #f5f5f5;
    font-size: 0.875rem;
    line-height: 1.5;
}

.violation-actions {
    display: flex;
    gap: 0.5rem;
}

/* AI Insights Styles */
.ai-status .status-badge {
    background: #0ea5e9;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.ai-insights {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.insight-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: #262626;
    border-radius: 8px;
}

.insight-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.insight-icon.positive {
    background: #10b981;
    color: white;
}

.insight-icon.warning {
    background: #f59e0b;
    color: white;
}

.insight-icon.info {
    background: #0ea5e9;
    color: white;
}

.insight-text {
    color: #f5f5f5;
    font-size: 0.875rem;
    line-height: 1.5;
}

.ai-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Button Styles */
.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

.btn-sm.btn-outline {
    background: transparent;
    border: 1px solid #525252;
    color: #a3a3a3;
}

.btn-sm.btn-outline:hover {
    background: #525252;
    color: #f5f5f5;
}

.btn-sm.btn-primary {
    background: #0ea5e9;
    color: white;
}

.btn-sm.btn-primary:hover {
    background: #0284c7;
}

.alert-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-title h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #f5f5f5;
}

.alert-icon {
    font-size: 1.2rem;
}

.alert-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #6b7280;
}

.status-indicator.connected {
    background: #10b981;
    animation: pulse 2s infinite;
}

.status-indicator.disconnected {
    background: #ef4444;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.status-text {
    color: #a3a3a3;
    font-weight: 500;
}

.alert-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* Notification Badge */
.notification-badge {
    background: #ef4444;
    color: white;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-left: 0.25rem;
    min-width: 16px;
    text-align: center;
    line-height: 1.2;
}

/* =============================================================================
   ALERT FORM
   ============================================================================= */

.alert-form-container {
    border-bottom: 1px solid #404040;
    background: #1a1a1a;
}

.alert-form {
    padding: 1.5rem;
}

.form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.form-header h4 {
    margin: 0;
    color: #f5f5f5;
    font-size: 1rem;
    font-weight: 600;
}

.alert-creation-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #d1d5db;
}

.form-input,
.form-select,
.form-textarea {
    background: #262626;
    border: 1px solid #404040;
    border-radius: 6px;
    padding: 0.625rem;
    color: #f5f5f5;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.form-input.invalid {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 60px;
}

.symbol-input {
    text-transform: uppercase;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
}

.value-input {
    font-family: 'JetBrains Mono', monospace;
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #404040;
}

/* =============================================================================
   ALERT CONTROLS
   ============================================================================= */

.alert-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #404040;
    background: #1a1a1a;
}

.alert-stats {
    display: flex;
    gap: 1.5rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.stat-label {
    color: #a3a3a3;
}

.stat-value {
    font-weight: 600;
    color: #f5f5f5;
}

.stat-value.active {
    color: #10b981;
}

.stat-value.triggered {
    color: #f59e0b;
}

.alert-filters {
    display: flex;
    gap: 0.75rem;
}

.filter-select {
    background: #262626;
    border: 1px solid #404040;
    border-radius: 6px;
    padding: 0.5rem;
    color: #f5f5f5;
    font-size: 0.8rem;
    min-width: 120px;
}

/* =============================================================================
   ALERT LIST
   ============================================================================= */

.alert-list {
    padding: 1rem 1.5rem;
    max-height: 600px;
    overflow-y: auto;
}

.alert-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.alert-item {
    background: #1a1a1a;
    border: 1px solid #404040;
    border-radius: 8px;
    padding: 1rem;
    transition: all 0.2s ease;
    position: relative;
}

.alert-item:hover {
    border-color: #525252;
    background: #1e1e1e;
}

.alert-item.triggered {
    border-color: #f59e0b;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d1b0a 100%);
}

.alert-item.paused {
    opacity: 0.7;
    border-color: #6b7280;
}

.alert-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.alert-symbol-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-symbol {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 0.9rem;
    color: #f5f5f5;
    background: #262626;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    border: 1px solid #404040;
}

.alert-type-badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.new-badge {
    background: #10b981;
    color: white;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 0.15rem 0.4rem;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    animation: glow 2s infinite;
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 5px rgba(16, 185, 129, 0.5); }
    50% { box-shadow: 0 0 10px rgba(16, 185, 129, 0.8); }
}

.alert-status-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-status {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.alert-actions-menu {
    position: relative;
}

.alert-menu-toggle {
    background: none;
    border: none;
    color: #a3a3a3;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.alert-menu-toggle:hover {
    background: #262626;
    color: #f5f5f5;
}

.alert-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: #262626;
    border: 1px solid #404040;
    border-radius: 6px;
    padding: 0.5rem 0;
    min-width: 140px;
    z-index: 1000;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.5rem 0.75rem;
    background: none;
    border: none;
    color: #d1d5db;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
    text-align: left;
}

.menu-item:hover {
    background: #404040;
    color: #f5f5f5;
}

.menu-item.delete {
    color: #ef4444;
}

.menu-item.delete:hover {
    background: #7f1d1d;
    color: #fca5a5;
}

/* Alert Condition */
.alert-condition {
    margin-bottom: 0.75rem;
    padding: 0.75rem;
    background: #262626;
    border-radius: 6px;
    border-left: 3px solid #10b981;
}

.condition-text {
    display: block;
    font-size: 0.875rem;
    color: #d1d5db;
    margin-bottom: 0.5rem;
}

.current-value {
    font-size: 0.8rem;
    color: #a3a3a3;
    font-family: 'JetBrains Mono', monospace;
}

.distance {
    font-weight: 600;
}

.distance.close {
    color: #f59e0b;
}

.distance.medium {
    color: #3b82f6;
}

.distance.far {
    color: #6b7280;
}

/* Alert Description */
.alert-description {
    font-size: 0.8rem;
    color: #a3a3a3;
    margin-bottom: 0.75rem;
    padding: 0.5rem;
    background: #1a1a1a;
    border-radius: 4px;
    border-left: 2px solid #525252;
    font-style: italic;
}

/* Alert Meta */
.alert-meta {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    font-size: 0.75rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #404040;
}

.alert-timestamps {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    color: #6b7280;
}

.created-time,
.triggered-time,
.expires-time {
    font-family: 'JetBrains Mono', monospace;
}

.triggered-time {
    color: #f59e0b;
}

.expires-time {
    color: #ef4444;
}

.priority-badge {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* =============================================================================
   NOTIFICATIONS PANEL
   ============================================================================= */

.notifications-panel {
    position: absolute;
    top: 100%;
    right: 0;
    width: 400px;
    max-width: 90vw;
    background: #171717;
    border: 1px solid #404040;
    border-radius: 8px;
    box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.5);
    z-index: 2000;
    max-height: 500px;
    overflow: hidden;
}

.notifications-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.notifications-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #404040;
    background: #1a1a1a;
}

.notifications-header h4 {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: #f5f5f5;
}

.notification-actions {
    display: flex;
    gap: 0.5rem;
}

.notifications-content {
    flex: 1;
    overflow-y: auto;
    max-height: 400px;
}

.notification-section {
    padding: 0.75rem 0;
    border-bottom: 1px solid #404040;
}

.notification-section:last-child {
    border-bottom: none;
}

.section-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: #a3a3a3;
    margin: 0 0 0.75rem 0;
    padding: 0 1rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.notification-list {
    display: flex;
    flex-direction: column;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    transition: background-color 0.2s ease;
    border-left: 3px solid transparent;
}

.notification-item:hover {
    background: #1a1a1a;
}

.notification-item.unread {
    background: #1e1e1e;
    border-left-color: #10b981;
}

.notification-item.read {
    opacity: 0.7;
}

.notification-icon {
    font-size: 1.1rem;
    line-height: 1;
    margin-top: 0.1rem;
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: #f5f5f5;
    margin-bottom: 0.25rem;
}

.notification-message {
    font-size: 0.75rem;
    color: #a3a3a3;
    line-height: 1.4;
    margin-bottom: 0.25rem;
}

.notification-time {
    font-size: 0.7rem;
    color: #6b7280;
    font-family: 'JetBrains Mono', monospace;
}

.notification-actions {
    display: flex;
    gap: 0.25rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.notification-item:hover .notification-actions {
    opacity: 1;
}

.empty-notifications {
    padding: 2rem 1rem;
    text-align: center;
}

.empty-notifications .empty-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    opacity: 0.5;
}

.empty-notifications p {
    margin: 0.5rem 0;
    color: #a3a3a3;
    font-size: 0.875rem;
}

.empty-subtitle {
    font-size: 0.75rem !important;
    color: #6b7280 !important;
}

/* =============================================================================
   EMPTY STATE
   ============================================================================= */

.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: #6b7280;
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h4 {
    margin: 0 0 0.5rem 0;
    color: #a3a3a3;
    font-size: 1.1rem;
    font-weight: 600;
}

.empty-state p {
    margin: 0 0 1.5rem 0;
    color: #6b7280;
    font-size: 0.875rem;
    line-height: 1.5;
}

/* =============================================================================
   BUTTONS
   ============================================================================= */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 6px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: #10b981;
    color: white;
    border-color: #10b981;
}

.btn-primary:hover:not(:disabled) {
    background: #059669;
    border-color: #059669;
}

.btn-secondary {
    background: #374151;
    color: #d1d5db;
    border-color: #4b5563;
}

.btn-secondary:hover:not(:disabled) {
    background: #4b5563;
    border-color: #6b7280;
    color: #f9fafb;
}

.btn-text {
    background: transparent;
    color: #a3a3a3;
    border: none;
    padding: 0.25rem 0.5rem;
}

.btn-text:hover:not(:disabled) {
    color: #f5f5f5;
    background: #262626;
}

.btn-icon {
    padding: 0.25rem;
    background: transparent;
    border: none;
    color: #a3a3a3;
    font-size: 0.875rem;
    border-radius: 4px;
}

.btn-icon:hover:not(:disabled) {
    background: #262626;
    color: #f5f5f5;
}

.icon {
    display: inline-block;
    line-height: 1;
}

/* =============================================================================
   TOAST NOTIFICATIONS
   ============================================================================= */

.toast-notification {
    position: fixed;
    top: 1rem;
    right: 1rem;
    background: #262626;
    border: 1px solid #404040;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    color: #f5f5f5;
    font-size: 0.875rem;
    box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.5);
    z-index: 9999;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
    max-width: 300px;
}

.toast-notification.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-notification.success {
    border-left: 4px solid #10b981;
}

.toast-notification.error {
    border-left: 4px solid #ef4444;
}

.toast-notification.warning {
    border-left: 4px solid #f59e0b;
}

.toast-notification.info {
    border-left: 4px solid #3b82f6;
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.toast-icon {
    font-size: 1rem;
    line-height: 1;
}

.toast-message {
    flex: 1;
    line-height: 1.4;
}

/* =============================================================================
   RESPONSIVE DESIGN
   ============================================================================= */

@media (max-width: 768px) {
    .alert-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .alert-controls {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .alert-stats {
        justify-content: space-between;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .alert-item-header {
        flex-direction: column;
        gap: 0.75rem;
        align-items: stretch;
    }

    .alert-symbol-info {
        flex-wrap: wrap;
    }

    .notifications-panel {
        width: 100%;
        max-width: calc(100vw - 2rem);
        left: 1rem;
        right: 1rem;
    }

    .toast-notification {
        left: 1rem;
        right: 1rem;
        max-width: none;
    }
}

/* =============================================================================
   SCROLLBAR STYLING
   ============================================================================= */

.alert-list::-webkit-scrollbar,
.notifications-content::-webkit-scrollbar {
    width: 6px;
}

.alert-list::-webkit-scrollbar-track,
.notifications-content::-webkit-scrollbar-track {
    background: #1a1a1a;
}

.alert-list::-webkit-scrollbar-thumb,
.notifications-content::-webkit-scrollbar-thumb {
    background: #404040;
    border-radius: 3px;
}

.alert-list::-webkit-scrollbar-thumb:hover,
.notifications-content::-webkit-scrollbar-thumb:hover {
    background: #525252;
}

/* =============================================================================
   ACCESSIBILITY IMPROVEMENTS
   ============================================================================= */

.btn:focus,
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: 2px solid #10b981;
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .alert-panel {
        border-color: #ffffff;
    }
    
    .alert-item {
        border-color: #ffffff;
    }
    
    .form-input,
    .form-select,
    .form-textarea {
        border-color: #ffffff;
    }
}

/* =============================================================================
   GPT ANALYSIS STYLES
   ============================================================================= */

.gpt-analysis-content {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.gpt-card {
    background: #1a1a1a;
    border: 1px solid #404040;
    border-radius: 8px;
    overflow: hidden;
}

.gpt-card-header {
    background: linear-gradient(135deg, #262626 0%, #1a1a1a 100%);
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #404040;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gpt-card-title {
    margin: 0;
    color: #f5f5f5;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.gpt-card-content {
    padding: 1.5rem;
}

.analysis-options,
.insight-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.option-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.option-group label {
    color: #a3a3a3;
    font-size: 0.875rem;
    font-weight: 500;
}

.strategy-input {
    margin-bottom: 1.5rem;
}

.strategy-input label {
    display: block;
    color: #a3a3a3;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.upload-section {
    display: flex;
    gap: 1rem;
    align-items: end;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.upload-section input[type="file"] {
    flex: 1;
    min-width: 200px;
}

.analysis-results {
    min-height: 100px;
    border-radius: 6px;
    background: #0f0f0f;
    border: 1px solid #333333;
}

.analysis-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
    color: #737373;
}

.analysis-placeholder .icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    opacity: 0.5;
}

.analysis-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
    color: #10b981;
}

.analysis-loading .icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    animation: pulse 2s infinite;
}

.loading-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid #333333;
    border-top: 2px solid #10b981;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-top: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.analysis-result {
    padding: 1.5rem;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #333333;
}

.result-header h4 {
    margin: 0;
    color: #f5f5f5;
    font-size: 1rem;
    font-weight: 600;
}

.trade-count,
.symbols-analyzed,
.file-info {
    color: #a3a3a3;
    font-size: 0.875rem;
    background: #262626;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.result-content {
    margin-bottom: 1rem;
}

.analysis-text {
    color: #e5e5e5;
    line-height: 1.6;
    font-size: 0.875rem;
}

.analysis-text p {
    margin-bottom: 1rem;
}

.analysis-text strong {
    color: #10b981;
    font-weight: 600;
}

.analysis-text .bullet {
    color: #10b981;
    margin-right: 0.5rem;
}

.result-footer {
    padding-top: 0.5rem;
    border-top: 1px solid #333333;
    color: #737373;
    font-size: 0.75rem;
}

.analysis-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
    color: #ef4444;
}

.analysis-error .icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.analysis-error small {
    color: #a3a3a3;
    margin-top: 0.5rem;
}

@media (max-width: 900px) {
    .alert-header {
        padding: 1rem;
    }

    .alert-title {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .alert-tabs {
        flex-wrap: wrap;
    }

    .hybrid-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .daily-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .daily-pnl-container {
        width: 100%;
        justify-content: space-between;
    }

    .performance-summary {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .tab-content {
        padding: 0.75rem;
    }

    .violation-item {
        flex-direction: column;
    }

    .violation-actions,
    .ai-actions {
        width: 100%;
        flex-direction: column;
    }

    .violation-actions .btn-sm,
    .ai-actions .btn-sm {
        width: 100%;
        justify-content: center;
    }

    .result-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}