/* ============================================
   ВЗЫСКАНИЕ.PRO - UI Components v2.0
   Advanced Components: Pulse, Progress Ring,
   Skeleton, Toast, Kanban, Activity Feed, etc.
   ============================================ */

/* ============================================
   PULSE INDICATOR (Service Status)
   ============================================ */
.pulse-indicator {
    position: relative;
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.pulse-indicator::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: inherit;
    animation: pulse-ring 1.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.pulse-indicator::after {
    content: '';
    position: absolute;
    inset: 2px;
    border-radius: 50%;
    background: inherit;
}

.pulse-indicator.active {
    background: var(--success);
}

.pulse-indicator.syncing {
    background: var(--info);
    animation: pulse-rotate 1s linear infinite;
}

.pulse-indicator.error {
    background: var(--danger);
}

.pulse-indicator.disabled {
    background: var(--text-tertiary);
}

.pulse-indicator.disabled::before {
    animation: none;
}

.pulse-indicator.warning {
    background: var(--warning);
}

@keyframes pulse-ring {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    75%, 100% {
        transform: scale(2);
        opacity: 0;
    }
}

@keyframes pulse-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Status with label */
.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* ============================================
   PROGRESS RING (Quality Score)
   ============================================ */
.progress-ring {
    position: relative;
    width: 80px;
    height: 80px;
}

.progress-ring svg {
    transform: rotate(-90deg);
}

.progress-ring-bg {
    fill: none;
    stroke: var(--border-color);
    stroke-width: 8;
}

.progress-ring-progress {
    fill: none;
    stroke: var(--primary);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 226;
    stroke-dashoffset: 226;
    transition: stroke-dashoffset 1s ease;
}

.progress-ring-progress.success { stroke: var(--success); }
.progress-ring-progress.warning { stroke: var(--warning); }
.progress-ring-progress.danger { stroke: var(--danger); }

.progress-ring-value {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
}

/* Small variant */
.progress-ring.sm {
    width: 48px;
    height: 48px;
}

.progress-ring.sm .progress-ring-bg,
.progress-ring.sm .progress-ring-progress {
    stroke-width: 6;
}

.progress-ring.sm .progress-ring-value {
    font-size: 0.875rem;
}

/* ============================================
   SKELETON LOADING
   ============================================ */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--bg-tertiary) 25%,
        var(--border-color) 50%,
        var(--bg-tertiary) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-md);
}

.skeleton-text {
    height: 16px;
    margin-bottom: 8px;
    border-radius: 4px;
}

.skeleton-text.sm { height: 12px; }
.skeleton-text.lg { height: 24px; }

.skeleton-title {
    height: 32px;
    width: 60%;
    margin-bottom: 16px;
}

.skeleton-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

.skeleton-card {
    height: 160px;
    border-radius: var(--radius-lg);
}

.skeleton-button {
    height: 40px;
    width: 120px;
    border-radius: var(--radius-md);
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: var(--z-toast);
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: 320px;
    max-width: 420px;
    padding: 16px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-xl);
    pointer-events: auto;
    animation: toast-in 0.3s ease forwards;
}

.toast.removing {
    animation: toast-out 0.3s ease forwards;
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes toast-out {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100px);
    }
}

.toast-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.toast-icon svg {
    width: 100%;
    height: 100%;
}

.toast.success .toast-icon { color: var(--success); }
.toast.warning .toast-icon { color: var(--warning); }
.toast.error .toast-icon { color: var(--danger); }
.toast.info .toast-icon { color: var(--info); }

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.toast-message {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.toast-close {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.toast-close:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

/* Toast with sound indicator */
.toast.high-priority {
    border-left: 4px solid var(--danger);
    animation: toast-in 0.3s ease forwards, shake 0.5s ease 0.3s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* ============================================
   KANBAN BOARD
   ============================================ */
.kanban-board {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 20px;
    min-height: 500px;
}

.kanban-column {
    flex: 0 0 320px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
}

.kanban-header {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.kanban-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.kanban-count {
    background: var(--bg-primary);
    padding: 2px 10px;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.kanban-cards {
    flex: 1;
    padding: 12px;
    overflow-y: auto;
    min-height: 200px;
}

.kanban-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px;
    margin-bottom: 10px;
    cursor: grab;
    transition: all var(--transition-fast);
}

.kanban-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.kanban-card:active {
    cursor: grabbing;
}

.kanban-card.dragging {
    opacity: 0.5;
    transform: rotate(3deg);
}

.kanban-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 10px;
}

.kanban-card-id {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.kanban-card-content {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.kanban-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8125rem;
}

.kanban-card-source {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-tertiary);
}

.kanban-card-source svg {
    width: 14px;
    height: 14px;
}

.kanban-card-amount {
    font-weight: 600;
    color: var(--text-primary);
}

/* Drop zone highlight */
.kanban-column.drag-over .kanban-cards {
    background: rgba(99, 102, 241, 0.05);
    border: 2px dashed var(--primary);
    border-radius: var(--radius-md);
}

/* ============================================
   ACTIVITY FEED
   ============================================ */
.activity-feed {
    display: flex;
    flex-direction: column;
}

.activity-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
    transition: background var(--transition-fast);
}

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

.activity-item:hover {
    background: var(--bg-hover);
    margin: 0 -16px;
    padding-left: 16px;
    padding-right: 16px;
}

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

.activity-icon.new-lead { background: rgba(59, 130, 246, 0.1); color: var(--info); }
.activity-icon.qualified { background: rgba(16, 185, 129, 0.1); color: var(--success); }
.activity-icon.sync { background: rgba(139, 92, 246, 0.1); color: var(--secondary); }
.activity-icon.error { background: rgba(239, 68, 68, 0.1); color: var(--danger); }
.activity-icon.contact { background: rgba(245, 158, 11, 0.1); color: var(--warning); }

.activity-icon svg {
    width: 18px;
    height: 18px;
}

.activity-content {
    flex: 1;
    min-width: 0;
}

.activity-title {
    font-size: 0.9375rem;
    margin-bottom: 2px;
}

.activity-title strong {
    font-weight: 600;
}

.activity-meta {
    font-size: 0.8125rem;
    color: var(--text-tertiary);
}

.activity-time {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    white-space: nowrap;
}

/* Activity group by time */
.activity-group {
    margin-bottom: 24px;
}

.activity-group-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-tertiary);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

/* ============================================
   TIMELINE
   ============================================ */
.timeline {
    position: relative;
    padding-left: 32px;
}

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

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

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -32px;
    top: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

.timeline-dot.completed {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

.timeline-dot.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    animation: pulse-ring 2s infinite;
}

.timeline-dot svg {
    width: 12px;
    height: 12px;
}

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

.timeline-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.timeline-time {
    font-size: 0.8125rem;
    color: var(--text-tertiary);
}

/* ============================================
   COMMAND PALETTE
   ============================================ */
.command-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: var(--z-command);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 15vh;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-fast);
}

.command-overlay.active {
    opacity: 1;
    visibility: visible;
}

.command-palette {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 560px;
    box-shadow: var(--shadow-xl);
    transform: scale(0.95) translateY(-20px);
    transition: transform var(--transition-fast);
    overflow: hidden;
}

.command-overlay.active .command-palette {
    transform: scale(1) translateY(0);
}

.command-input-wrapper {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    gap: 12px;
}

.command-input-wrapper svg {
    width: 20px;
    height: 20px;
    color: var(--text-tertiary);
    flex-shrink: 0;
}

.command-input {
    flex: 1;
    font-size: 1.125rem;
    background: none;
    border: none;
    color: var(--text-primary);
    outline: none;
}

.command-input::placeholder {
    color: var(--text-tertiary);
}

.command-shortcut {
    display: flex;
    gap: 4px;
}

.command-shortcut kbd {
    padding: 4px 8px;
    font-size: 0.75rem;
    font-family: inherit;
    background: var(--bg-tertiary);
    border-radius: 4px;
    color: var(--text-tertiary);
}

.command-results {
    max-height: 400px;
    overflow-y: auto;
    padding: 8px;
}

.command-group {
    margin-bottom: 8px;
}

.command-group-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-tertiary);
    padding: 8px 12px;
}

.command-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.command-item:hover,
.command-item.selected {
    background: var(--bg-hover);
}

.command-item-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.command-item-icon svg {
    width: 16px;
    height: 16px;
}

.command-item-content {
    flex: 1;
}

.command-item-title {
    font-weight: 500;
}

.command-item-subtitle {
    font-size: 0.8125rem;
    color: var(--text-tertiary);
}

.command-item-shortcut {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

/* ============================================
   SOURCE CARDS
   ============================================ */
.source-card {
    position: relative;
    overflow: hidden;
}

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

.source-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.source-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.source-icon.government { background: linear-gradient(135deg, #dbeafe, #bfdbfe); }
.source-icon.forum { background: linear-gradient(135deg, #fef3c7, #fde68a); }
.source-icon.social { background: linear-gradient(135deg, #ede9fe, #ddd6fe); }
.source-icon.api { background: linear-gradient(135deg, #d1fae5, #a7f3d0); }

.source-name {
    font-weight: 600;
    margin-bottom: 2px;
}

.source-type {
    font-size: 0.8125rem;
    color: var(--text-tertiary);
}

.source-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 16px;
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
}

.source-stat-label {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin-bottom: 4px;
}

.source-stat-value {
    font-size: 1.25rem;
    font-weight: 700;
}

.source-stat-change {
    font-size: 0.75rem;
    color: var(--success);
}

.source-actions {
    display: flex;
    gap: 8px;
}

/* ============================================
   EMPTY STATES
   ============================================ */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
}

.empty-state-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 24px;
    color: var(--text-tertiary);
    opacity: 0.5;
}

.empty-state-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.empty-state-description {
    color: var(--text-secondary);
    max-width: 360px;
    margin-bottom: 24px;
}

/* ============================================
   CHARTS PLACEHOLDER
   ============================================ */
.chart-container {
    position: relative;
    height: 300px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.chart-container canvas {
    max-width: 100%;
}

/* Funnel Chart */
.funnel-chart {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 20px;
}

.funnel-step {
    display: flex;
    align-items: center;
    gap: 16px;
}

.funnel-bar {
    height: 40px;
    background: var(--gradient-primary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 12px;
    color: white;
    font-weight: 600;
    transition: width 1s ease;
}

.funnel-label {
    min-width: 120px;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* ============================================
   KEYBOARD SHORTCUTS MODAL
   ============================================ */
.shortcuts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.shortcut-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
}

.shortcut-label {
    font-size: 0.9375rem;
}

.shortcut-keys {
    display: flex;
    gap: 4px;
}

.shortcut-keys kbd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    font-size: 0.75rem;
    font-family: inherit;
    font-weight: 600;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    box-shadow: 0 2px 0 var(--border-color);
}

/* ============================================
   ONBOARDING TOUR
   ============================================ */
.tour-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999;
}

.tour-highlight {
    position: fixed;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.7);
    border-radius: var(--radius-md);
    z-index: 1000;
    pointer-events: none;
}

.tour-tooltip {
    position: fixed;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 20px;
    max-width: 320px;
    z-index: 1001;
    box-shadow: var(--shadow-xl);
}

.tour-tooltip::before {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    background: var(--bg-card);
    transform: rotate(45deg);
}

.tour-tooltip.top::before {
    bottom: -6px;
    left: 50%;
    margin-left: -6px;
}

.tour-tooltip.bottom::before {
    top: -6px;
    left: 50%;
    margin-left: -6px;
}

.tour-step {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin-bottom: 8px;
}

.tour-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.tour-description {
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.tour-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tour-progress {
    display: flex;
    gap: 4px;
}

.tour-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border-color);
}

.tour-dot.active {
    background: var(--primary);
}

/* ============================================
   MICROINTERACTIONS & ANIMATIONS
   ============================================ */

/* Ripple Effect for Buttons */
.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.3) 10%, transparent 10%);
    background-repeat: no-repeat;
    background-position: 50%;
    transform: scale(10, 10);
    opacity: 0;
    transition: transform 0.5s, opacity 0.5s;
}

.btn-ripple:active::after {
    transform: scale(0, 0);
    opacity: 1;
    transition: 0s;
}

/* Hover Lift Effect */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px -12px rgba(0, 0, 0, 0.2);
}

/* Hover Scale Effect */
.hover-scale {
    transition: transform 0.2s ease;
}

.hover-scale:hover {
    transform: scale(1.02);
}

/* Hover Glow Effect */
.hover-glow {
    transition: box-shadow 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
}

/* Press Effect */
.press-effect {
    transition: transform 0.1s ease;
}

.press-effect:active {
    transform: scale(0.97);
}

/* Bounce Animation */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

.animate-bounce {
    animation: bounce 1s ease infinite;
}

/* Fade In Animation */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.animate-fade-in {
    animation: fadeIn 0.3s ease forwards;
}

/* Slide Up Animation */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-slide-up {
    animation: slideUp 0.4s ease forwards;
}

/* Slide Down Animation */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-slide-down {
    animation: slideDown 0.4s ease forwards;
}

/* Slide In Left */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-slide-left {
    animation: slideInLeft 0.4s ease forwards;
}

/* Slide In Right */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-slide-right {
    animation: slideInRight 0.4s ease forwards;
}

/* Scale In Animation */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-scale-in {
    animation: scaleIn 0.3s ease forwards;
}

/* Pop Animation */
@keyframes pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.animate-pop {
    animation: pop 0.3s ease;
}

/* Stagger Animation Delays */
.stagger-1 { animation-delay: 0.05s; }
.stagger-2 { animation-delay: 0.1s; }
.stagger-3 { animation-delay: 0.15s; }
.stagger-4 { animation-delay: 0.2s; }
.stagger-5 { animation-delay: 0.25s; }
.stagger-6 { animation-delay: 0.3s; }
.stagger-7 { animation-delay: 0.35s; }
.stagger-8 { animation-delay: 0.4s; }

/* Number Count Animation */
@keyframes countUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.count-animation {
    animation: countUp 0.5s ease forwards;
}

/* Success Check Animation */
@keyframes checkmark {
    0% { stroke-dashoffset: 100; }
    100% { stroke-dashoffset: 0; }
}

.checkmark-animation {
    stroke-dasharray: 100;
    animation: checkmark 0.5s ease forwards;
}

/* Spin Animation */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* Pulse Scale Animation */
@keyframes pulseScale {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.animate-pulse-scale {
    animation: pulseScale 2s ease-in-out infinite;
}

/* Gradient Shift Animation */
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.animate-gradient {
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
}

/* ============================================
   ENHANCED EMPTY STATES
   ============================================ */

/* Empty State with Illustration */
.empty-state-illustration {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
    text-align: center;
    animation: fadeIn 0.5s ease;
}

.empty-state-svg {
    width: 200px;
    height: 200px;
    margin-bottom: 32px;
    opacity: 0.8;
}

.empty-state-svg.animated path,
.empty-state-svg.animated circle {
    animation: drawPath 2s ease forwards;
}

@keyframes drawPath {
    from { stroke-dashoffset: 1000; }
    to { stroke-dashoffset: 0; }
}

/* Empty State - No Data */
.empty-no-data {
    background: var(--bg-secondary);
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-xl);
    padding: 48px;
}

.empty-no-data .empty-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 24px;
    background: var(--bg-tertiary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--text-tertiary);
    animation: pulseScale 2s ease-in-out infinite;
}

.empty-no-data h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.empty-no-data p {
    color: var(--text-secondary);
    max-width: 400px;
    margin: 0 auto 24px;
    line-height: 1.6;
}

/* Empty State - Search */
.empty-search {
    padding: 40px;
    text-align: center;
}

.empty-search-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--primary-alpha), rgba(99, 102, 241, 0.05));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--primary);
}

.empty-search h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.empty-search p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

/* Empty State - Error */
.empty-error {
    padding: 48px;
    text-align: center;
    background: rgba(239, 68, 68, 0.05);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--radius-lg);
}

.empty-error-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--danger);
    animation: shake 0.5s ease;
}

/* Empty State - Loading Placeholder */
.empty-loading {
    padding: 48px;
    text-align: center;
}

.empty-loading-spinner {
    width: 48px;
    height: 48px;
    margin: 0 auto 20px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.empty-loading p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

/* Empty State with Dots Animation */
.loading-dots {
    display: inline-flex;
    gap: 4px;
}

.loading-dots span {
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    animation: loadingDot 1.4s ease-in-out infinite;
}

.loading-dots span:nth-child(1) { animation-delay: 0s; }
.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes loadingDot {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; }
    40% { transform: scale(1); opacity: 1; }
}

/* ============================================
   CARD INTERACTIONS
   ============================================ */

/* Interactive Card */
.card-interactive {
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-interactive:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.15);
}

.card-interactive:active {
    transform: translateY(-2px);
}

/* Card with Border Animation */
.card-border-animated {
    position: relative;
    overflow: hidden;
}

.card-border-animated::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 2px;
    background: linear-gradient(135deg, var(--primary), var(--secondary), var(--primary));
    background-size: 300% 300%;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card-border-animated:hover::before {
    opacity: 1;
    animation: gradientShift 2s ease infinite;
}

/* Card Flip */
.card-flip {
    perspective: 1000px;
}

.card-flip-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.card-flip:hover .card-flip-inner {
    transform: rotateY(180deg);
}

.card-flip-front,
.card-flip-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: var(--radius-lg);
}

.card-flip-back {
    transform: rotateY(180deg);
}

/* ============================================
   BUTTON ANIMATIONS
   ============================================ */

/* Animated Icon Button */
.btn-icon-animated i,
.btn-icon-animated svg {
    transition: transform 0.3s ease;
}

.btn-icon-animated:hover i,
.btn-icon-animated:hover svg {
    transform: scale(1.2);
}

/* Button with Arrow */
.btn-arrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-arrow .arrow {
    transition: transform 0.3s ease;
}

.btn-arrow:hover .arrow {
    transform: translateX(4px);
}

/* Submit Button States */
.btn-submit {
    position: relative;
    overflow: hidden;
}

.btn-submit.loading {
    color: transparent;
    pointer-events: none;
}

.btn-submit.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.btn-submit.success {
    background: var(--success);
}

.btn-submit.success::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 1.25rem;
    animation: scaleIn 0.3s ease;
}

/* ============================================
   FORM INTERACTIONS
   ============================================ */

/* Input Focus Animation */
.input-animated {
    position: relative;
}

.input-animated input,
.input-animated textarea {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.input-animated input:focus,
.input-animated textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-alpha);
}

/* Floating Label */
.input-floating {
    position: relative;
}

.input-floating label {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-tertiary);
    pointer-events: none;
    transition: all 0.2s ease;
    background: var(--bg-primary);
    padding: 0 4px;
}

.input-floating input:focus + label,
.input-floating input:not(:placeholder-shown) + label {
    top: 0;
    font-size: 0.75rem;
    color: var(--primary);
}

/* Checkbox Animation */
.checkbox-animated {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.checkbox-animated input {
    position: absolute;
    opacity: 0;
}

.checkbox-animated .checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    margin-right: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.checkbox-animated input:checked + .checkmark {
    background: var(--primary);
    border-color: var(--primary);
}

.checkbox-animated .checkmark::after {
    content: '✓';
    color: white;
    font-size: 12px;
    opacity: 0;
    transform: scale(0);
    transition: all 0.2s ease;
}

.checkbox-animated input:checked + .checkmark::after {
    opacity: 1;
    transform: scale(1);
}

/* ============================================
   NOTIFICATION BADGE PULSE
   ============================================ */
.badge-pulse {
    position: relative;
}

.badge-pulse::after {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    width: 10px;
    height: 10px;
    background: var(--danger);
    border-radius: 50%;
    border: 2px solid var(--bg-primary);
}

.badge-pulse.animate::after {
    animation: pulse-ring 1.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ============================================
   SCROLL ANIMATIONS (Intersection Observer)
   ============================================ */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.scroll-reveal-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-reveal-left.revealed {
    opacity: 1;
    transform: translateX(0);
}

.scroll-reveal-right {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-reveal-right.revealed {
    opacity: 1;
    transform: translateX(0);
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */
@media (max-width: 768px) {
    .kanban-board {
        flex-direction: column;
    }

    .kanban-column {
        flex: none;
        width: 100%;
    }

    .command-palette {
        max-width: 100%;
        margin: 0 16px;
    }

    .shortcuts-grid {
        grid-template-columns: 1fr;
    }

    .toast-container {
        left: 16px;
        right: 16px;
    }

    .toast {
        min-width: auto;
        max-width: none;
    }
}

/* ============================================
   POOL STATUS COMPONENTS
   Account Pool Planner UI Elements
   ============================================ */

/* Pool Status Cards Container */
.pool-status-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

/* Individual Pool Status Card */
.pool-status-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.pool-status-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

/* Status indicator stripe */
.pool-status-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--border-color);
    transition: background 0.3s ease;
}

.pool-status-card.status-ok::before {
    background: var(--success);
}

.pool-status-card.status-low::before {
    background: var(--warning);
}

.pool-status-card.status-critical::before {
    background: var(--danger);
    animation: pulse-danger 1.5s ease-in-out infinite;
}

.pool-status-card.status-error::before {
    background: var(--text-tertiary);
}

@keyframes pulse-danger {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Pool Card Header */
.pool-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.pool-card-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pool-card-title h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
    color: var(--text-primary);
}

.pool-card-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.pool-card-icon.telegram {
    background: linear-gradient(135deg, #229ED9, #1DA1F2);
    color: white;
}

.pool-card-icon.vk {
    background: linear-gradient(135deg, #4C75A3, #5181B8);
    color: white;
}

.pool-card-icon.forum {
    background: linear-gradient(135deg, #F59E0B, #F97316);
    color: white;
}

/* Pool Status Badge */
.pool-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pool-status-badge.ok {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.pool-status-badge.low {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.pool-status-badge.critical {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.pool-status-badge.error {
    background: var(--bg-tertiary);
    color: var(--text-tertiary);
}

/* Pool Metrics Grid */
.pool-metrics {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.pool-metric {
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    padding: 12px;
}

.pool-metric-label {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.pool-metric-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.pool-metric-value .target {
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--text-tertiary);
}

.pool-metric-value.deficit {
    color: var(--danger);
}

.pool-metric-value.surplus {
    color: var(--success);
}

/* Pool Progress Bar */
.pool-progress-bar {
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-top: 8px;
}

.pool-progress-fill {
    height: 100%;
    border-radius: var(--radius-full);
    transition: width 0.5s ease, background 0.3s ease;
    background: var(--primary);
}

.pool-progress-fill.success {
    background: var(--success);
}

.pool-progress-fill.warning {
    background: var(--warning);
}

.pool-progress-fill.danger {
    background: var(--danger);
}

/* Pool Card Footer */
.pool-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
    margin-top: 16px;
}

.pool-card-footer .pool-loss-info {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.pool-card-footer .pool-loss-value {
    font-weight: 600;
    color: var(--text-primary);
}

/* Pool Action Button */
.pool-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 0.8125rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    background: var(--primary);
    color: white;
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.pool-action-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.pool-action-btn:disabled {
    background: var(--bg-tertiary);
    color: var(--text-tertiary);
    cursor: not-allowed;
    transform: none;
}

.pool-action-btn.secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.pool-action-btn.secondary:hover {
    background: var(--bg-hover);
}

/* ============================================
   POOL SUMMARY SECTION
   ============================================ */

.pool-summary {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 24px;
}

.pool-summary-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.pool-summary-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.pool-summary-stats {
    display: flex;
    gap: 32px;
}

.pool-summary-stat {
    text-align: center;
}

.pool-summary-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.pool-summary-stat-label {
    font-size: 0.8125rem;
    color: var(--text-tertiary);
}

.pool-summary-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pool-summary-status .pulse-indicator {
    width: 10px;
    height: 10px;
}

.pool-summary-status-text {
    font-size: 0.875rem;
    font-weight: 500;
}

.pool-summary-status-text.healthy {
    color: var(--success);
}

.pool-summary-status-text.degraded {
    color: var(--warning);
}

.pool-summary-status-text.critical {
    color: var(--danger);
}

/* ============================================
   POOL ORDERS TABLE
   ============================================ */

.pool-orders-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.pool-orders-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}

.pool-orders-header h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.pool-orders-filters {
    display: flex;
    gap: 12px;
}

.pool-orders-table {
    width: 100%;
}

.pool-orders-table th,
.pool-orders-table td {
    padding: 12px 16px;
    text-align: left;
}

.pool-orders-table th {
    background: var(--bg-tertiary);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-tertiary);
}

.pool-orders-table td {
    border-bottom: 1px solid var(--border-light);
    font-size: 0.875rem;
}

.pool-orders-table tr:last-child td {
    border-bottom: none;
}

.pool-orders-table tr:hover td {
    background: var(--bg-hover);
}

/* Order Status */
.order-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 500;
}

.order-status.pending {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
}

.order-status.in_progress {
    background: rgba(59, 130, 246, 0.1);
    color: var(--info);
}

.order-status.completed {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.order-status.failed {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.order-status.cancelled {
    background: var(--bg-tertiary);
    color: var(--text-tertiary);
}

/* Order Progress */
.order-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 120px;
}

.order-progress-bar {
    flex: 1;
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.order-progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: var(--radius-full);
    transition: width 0.3s ease;
}

.order-progress-text {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 36px;
}

/* Order Platform Icon */
.order-platform {
    display: flex;
    align-items: center;
    gap: 8px;
}

.order-platform-icon {
    width: 24px;
    height: 24px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
}

/* Order Quantity */
.order-quantity {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.order-quantity-received {
    font-weight: 600;
    color: var(--text-primary);
}

.order-quantity-total {
    color: var(--text-tertiary);
    font-size: 0.8125rem;
}

/* ============================================
   DASHBOARD POOL WIDGET
   ============================================ */

.pool-widget {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
}

.pool-widget-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.pool-widget-title {
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pool-widget-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 500;
}

.pool-widget-platforms {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pool-widget-platform {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    transition: background var(--transition-fast);
}

.pool-widget-platform:hover {
    background: var(--bg-hover);
}

.pool-widget-platform-icon {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.pool-widget-platform-info {
    flex: 1;
    min-width: 0;
}

.pool-widget-platform-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.pool-widget-platform-stats {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.pool-widget-platform-ready {
    font-weight: 600;
}

.pool-widget-platform-deficit {
    color: var(--danger);
    font-weight: 600;
}

.pool-widget-platform-deficit.surplus {
    color: var(--success);
}

.pool-widget-platform-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.pool-widget-platform-indicator.ok {
    background: var(--success);
}

.pool-widget-platform-indicator.low {
    background: var(--warning);
}

.pool-widget-platform-indicator.critical {
    background: var(--danger);
    animation: pulse-danger 1.5s ease-in-out infinite;
}

.pool-widget-footer {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pool-widget-orders {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.pool-widget-orders-count {
    font-weight: 600;
    color: var(--text-primary);
}

.pool-widget-link {
    font-size: 0.8125rem;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: color var(--transition-fast);
}

.pool-widget-link:hover {
    color: var(--primary-hover);
}

/* ============================================
   POOL GAUGE / SPEEDOMETER
   ============================================ */

.pool-gauge {
    position: relative;
    width: 120px;
    height: 60px;
    margin: 0 auto;
}

.pool-gauge svg {
    width: 100%;
    height: 100%;
}

.pool-gauge-bg {
    fill: none;
    stroke: var(--bg-tertiary);
    stroke-width: 10;
    stroke-linecap: round;
}

.pool-gauge-fill {
    fill: none;
    stroke: var(--primary);
    stroke-width: 10;
    stroke-linecap: round;
    stroke-dasharray: 157;
    stroke-dashoffset: 157;
    transition: stroke-dashoffset 1s ease, stroke 0.3s ease;
    transform: rotate(-180deg);
    transform-origin: center center;
}

.pool-gauge-fill.success { stroke: var(--success); }
.pool-gauge-fill.warning { stroke: var(--warning); }
.pool-gauge-fill.danger { stroke: var(--danger); }

.pool-gauge-value {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.pool-gauge-label {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    color: var(--text-tertiary);
    white-space: nowrap;
}

/* ============================================
   POOL ALERTS / WARNINGS
   ============================================ */

.pool-alerts {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.pool-alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    border: 1px solid;
}

.pool-alert.warning {
    background: rgba(245, 158, 11, 0.05);
    border-color: rgba(245, 158, 11, 0.2);
}

.pool-alert.critical {
    background: rgba(239, 68, 68, 0.05);
    border-color: rgba(239, 68, 68, 0.2);
}

.pool-alert.info {
    background: rgba(59, 130, 246, 0.05);
    border-color: rgba(59, 130, 246, 0.2);
}

.pool-alert-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.pool-alert.warning .pool-alert-icon { color: var(--warning); }
.pool-alert.critical .pool-alert-icon { color: var(--danger); }
.pool-alert.info .pool-alert-icon { color: var(--info); }

.pool-alert-content {
    flex: 1;
}

.pool-alert-title {
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 4px;
}

.pool-alert.warning .pool-alert-title { color: var(--warning); }
.pool-alert.critical .pool-alert-title { color: var(--danger); }
.pool-alert.info .pool-alert-title { color: var(--info); }

.pool-alert-message {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.pool-alert-action {
    margin-top: 8px;
}

/* ============================================
   POOL HISTORY CHART PLACEHOLDER
   ============================================ */

.pool-history {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-top: 24px;
}

.pool-history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.pool-history-header h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.pool-history-chart {
    height: 200px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
}

/* ============================================
   POOL LOADING SKELETON
   ============================================ */

.pool-status-card.loading .pool-card-header,
.pool-status-card.loading .pool-metrics,
.pool-status-card.loading .pool-card-footer {
    opacity: 0.5;
}

.pool-status-card.loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    animation: shimmer 1.5s infinite;
}

/* ============================================
   POOL RESPONSIVE ADJUSTMENTS
   ============================================ */

@media (max-width: 992px) {
    .pool-status-container {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    }

    .pool-summary-stats {
        gap: 20px;
    }

    .pool-summary-stat-value {
        font-size: 1.25rem;
    }
}

@media (max-width: 768px) {
    .pool-status-container {
        grid-template-columns: 1fr;
    }

    .pool-summary-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .pool-orders-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .pool-orders-table {
        display: block;
        overflow-x: auto;
    }

    .pool-widget-platforms {
        gap: 8px;
    }

    .pool-widget-platform {
        padding: 8px 10px;
    }
}
