/* Dashboard specific styles */
.dashboard-header {
    margin-bottom: 2rem;
    text-align: center;
}

.dashboard-header .title-with-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.dashboard-logo {
    font-size: 2rem;
    color: #10b981;
}

.dashboard-header h1 {
    margin: 0;
    color: #e6e6e6;
    font-size: 2.5rem;
}

.dashboard-header .subtitle {
    color: #9ca3af;
    font-size: 1.1rem;
    margin: 0;
}

.dashboard-section {
    margin-bottom: 3rem;
}

.dashboard-section h2 {
    color: #e6e6e6;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    border-bottom: 2px solid #374151;
    padding-bottom: 0.5rem;
}

/* Status Overview Grid */
.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.status-card {
    background: linear-gradient(135deg, #374151 0%, #1f2937 100%);
    border: 1px solid #4b5563;
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.status-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #10b981, #059669);
}

.status-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.15);
    border-color: #10b981;
}

.status-card h3 {
    color: #9ca3af;
    font-size: 0.9rem;
    font-weight: 500;
    margin: 0 0 0.5rem 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-value {
    color: #e6e6e6;
    font-size: 2rem;
    font-weight: bold;
    margin: 0.5rem 0;
    font-family: 'Courier New', monospace;
}

.status-card small {
    color: #6b7280;
    font-size: 0.8rem;
    display: block;
    margin-top: 0.5rem;
}

/* My Farms Table */
.my-farms-container {
    background: #1f2937;
    border-radius: 1rem;
    border: 1px solid #374151;
    overflow: hidden;
}

.farms-table-container {
    overflow-x: auto;
}

.farms-table {
    width: 100%;
    border-collapse: collapse;
    background: transparent;
}

.farms-table th {
    background: #374151;
    color: #e6e6e6;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #4b5563;
}

.farms-table td {
    padding: 1rem;
    border-bottom: 1px solid #374151;
    color: #d1d5db;
    vertical-align: middle;
}

.farms-table tbody tr:hover {
    background: rgba(16, 185, 129, 0.05);
}

.farms-table tbody tr:last-child td {
    border-bottom: none;
}

/* Farm tokens display */
.farm-tokens {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.token-pair {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.token-symbol {
    font-weight: 600;
    color: #10b981;
}

.arrow {
    color: #6b7280;
    font-size: 0.8rem;
}

/* Farm status badges */
.farm-status {
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.farm-status.active {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border: 1px solid #10b981;
}

.farm-status.inactive {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid #ef4444;
}

.farm-status.ended {
    background: rgba(156, 163, 175, 0.2);
    color: #9ca3af;
    border: 1px solid #9ca3af;
}

/* Mini badges */
.mini-badge {
    display: inline-block;
    padding: 0.125rem 0.375rem;
    border-radius: 0.5rem;
    font-size: 0.7rem;
    font-weight: 600;
    margin-left: 0.5rem;
}

.mini-badge.verified {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.mini-badge.suspicious {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

/* Farm actions */
.farm-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.farm-actions .btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
    border-radius: 0.5rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    transition: all 0.2s ease;
}

.farm-actions .btn-primary {
    background: #10b981;
    color: white;
    border: 1px solid #10b981;
}

.farm-actions .btn-primary:hover {
    background: #059669;
    border-color: #059669;
}

.farm-actions .btn-secondary {
    background: transparent;
    color: #9ca3af;
    border: 1px solid #4b5563;
}

.farm-actions .btn-secondary:hover {
    background: #374151;
    color: #e6e6e6;
    border-color: #6b7280;
}

/* Loading Indicator */
.loading-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(18, 24, 38, 0.95);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

.loading-indicator.hidden {
    opacity: 0;
    visibility: hidden;
}

.loading-indicator-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    text-align: center;
    background: #1f2937;
    padding: 3rem;
    border-radius: 1.5rem;
    border: 1px solid #374151;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.loading-spinner-ring {
    position: relative;
    width: 80px;
    height: 80px;
}

.spinner-ring-1,
.spinner-ring-2,
.spinner-ring-3 {
    position: absolute;
    border: 3px solid transparent;
    border-radius: 50%;
    animation: spinRing 2s linear infinite;
}

.spinner-ring-1 {
    width: 80px;
    height: 80px;
    border-top: 3px solid #10b981;
    border-right: 3px solid #10b981;
    animation-duration: 1.5s;
}

.spinner-ring-2 {
    width: 60px;
    height: 60px;
    top: 10px;
    left: 10px;
    border-top: 3px solid #059669;
    border-left: 3px solid #059669;
    animation-duration: 2s;
    animation-direction: reverse;
}

.spinner-ring-3 {
    width: 40px;
    height: 40px;
    top: 20px;
    left: 20px;
    border-top: 3px solid #34d399;
    border-bottom: 3px solid #34d399;
    animation-duration: 2.5s;
}

.loading-text-content h3 {
    color: #e6e6e6;
    font-size: 1.5rem;
    margin: 0 0 0.5rem 0;
    font-weight: 600;
}

.loading-text-content p {
    color: #9ca3af;
    font-size: 1rem;
    margin: 0 0 1rem 0;
}

.loading-dots {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.loading-dots span {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    animation: loadingDots 1.4s ease-in-out infinite both;
}

.loading-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.loading-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes spinRing {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes loadingDots {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1.2);
        opacity: 1;
    }
}

/* Professional Loading States */

/* Professional Loading Skeleton */
.skeleton-row {
    animation: skeletonPulse 1.5s ease-in-out infinite;
}

.skeleton-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.skeleton-text {
    background: linear-gradient(90deg, #374151 25%, #4b5563 50%, #374151 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 2s infinite;
    border-radius: 0.25rem;
    height: 1rem;
}

.skeleton-farm-id {
    width: 80px;
    height: 1.2rem;
}

.skeleton-token {
    width: 60px;
    height: 1rem;
}

.skeleton-token-small {
    width: 40px;
    height: 0.8rem;
}

.skeleton-amount {
    width: 70px;
    height: 1.2rem;
}

.skeleton-apr {
    width: 50px;
    height: 1rem;
}

.skeleton-badge {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(90deg, #374151 25%, #4b5563 50%, #374151 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 2s infinite;
}

.skeleton-status {
    width: 60px;
    height: 1.5rem;
    border-radius: 1rem;
}

.skeleton-actions {
    display: flex;
    gap: 0.5rem;
}

.skeleton-button {
    width: 60px;
    height: 2rem;
    border-radius: 0.5rem;
    background: linear-gradient(90deg, #374151 25%, #4b5563 50%, #374151 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 2s infinite;
}



/* Status Card Skeleton Loading */
.skeleton-loading {
    animation: statusCardPulse 1.5s ease-in-out infinite;
}

.skeleton-status-value {
    width: 80px;
    height: 2rem;
    background: linear-gradient(90deg, #374151 25%, #4b5563 50%, #374151 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 2s infinite;
    border-radius: 0.25rem;
    margin: 0 auto;
}

/* Animations */
@keyframes skeletonShimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

@keyframes skeletonPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}



@keyframes statusCardPulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(0.98);
    }
}

/* Message containers */
.no-connection-message,
.no-wallet-message,
.no-farms-message {
    background: #1f2937;
    border: 1px solid #374151;
    border-radius: 1rem;
    padding: 3rem;
    text-align: center;
    margin: 2rem 0;
}

.no-connection-content,
.no-wallet-content,
.no-farms-content {
    max-width: 400px;
    margin: 0 auto;
}

.no-connection-content i,
.no-wallet-content i,
.no-farms-content i {
    font-size: 3rem;
    color: #6b7280;
    margin-bottom: 1rem;
}

.no-connection-content h3,
.no-wallet-content h3,
.no-farms-content h3 {
    color: #e6e6e6;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.no-connection-content p,
.no-wallet-content p,
.no-farms-content p {
    color: #9ca3af;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.no-connection-content .btn,
.no-wallet-content .btn,
.no-farms-content .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

/* Responsive design */
@media (max-width: 768px) {
    /* Show the first status tiles 2 per row on mobile */
    .status-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1rem;
    }
    
    .dashboard-header h1 {
        font-size: 2rem;
    }
    
    .farms-table {
        font-size: 0.9rem;
    }
    
    .farms-table th,
    .farms-table td {
        padding: 0.75rem 0.5rem;
    }
    
    .farm-actions {
        flex-direction: column;
    }
    
    .farm-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .dashboard-header .title-with-logo {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .status-card {
        padding: 1rem;
    }
    
    .status-value {
        font-size: 1.5rem;
    }
}

/* Hidden utility class */
.hidden {
    display: none !important;
}

/* Animation for status cards */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.status-card {
    animation: fadeInUp 0.6s ease-out;
}

.status-card:nth-child(2) {
    animation-delay: 0.1s;
}

.status-card:nth-child(3) {
    animation-delay: 0.2s;
}

.status-card:nth-child(4) {
    animation-delay: 0.3s;
}

/* Dashboard Farm Detail View */
/* Ensure this stays below the sticky header (header z-index = 100 in main.css) */
.dashboard-farm-detail-view {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
    min-height: calc(100vh - 200px);
    position: relative;
    z-index: 1;
}

.dashboard-farm-detail-view.hidden {
    display: none;
}

.dashboard-farm-detail-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #374151;
}

.dashboard-farm-detail-header .token-icons {
    display: flex;
    align-items: center;
}

.dashboard-farm-detail-header .token-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fcd34d, #f59e0b);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    color: #1f2937;
    margin-right: -10px;
    border: 3px solid #1f2937;
}

.dashboard-farm-detail-header .token-icon:first-child {
    z-index: 2;
}

.dashboard-farm-detail-header .token-icon:last-child {
    z-index: 1;
}

.dashboard-farm-detail-header .farm-info h2 {
    color: #4ade80;
    font-size: 1.8rem;
    margin: 0;
}

.dashboard-farm-detail-header .farm-id {
    color: #9ca3af;
    margin: 0.5rem 0;
}

.dashboard-farm-detail-header .farm-badges {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.dashboard-farm-detail-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (min-width: 1200px) {
    .dashboard-farm-detail-stats {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .dashboard-farm-detail-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

.dashboard-stat-card {
    background: linear-gradient(145deg, #374151, #4b5563);
    border-radius: 0.75rem;
    padding: 1.5rem;
    text-align: center;
    border: 1px solid #6b7280;
}

.dashboard-stat-card.large h3 {
    font-size: 1.8rem;
    color: #f3f4f6;
    margin: 0.5rem 0;
}

.dashboard-stat-card p {
    color: #9ca3af;
    margin: 0;
    font-size: 0.9rem;
}

.dashboard-stat-card.rewards-card {
    background: linear-gradient(145deg, #1e3a8a, #1e40af);
    border: 1px solid #3b82f6;
}

.dashboard-stat-card.rewards-card.xwt-rewards {
    background: linear-gradient(145deg, #7c2d12, #ea580c);
    border: 1px solid #f97316;
}

.dashboard-stat-card.rewards-card h3 {
    color: #fbbf24;
    font-weight: bold;
}

.dashboard-stat-card.rewards-card.xwt-rewards h3 {
    color: #fcd34d;
}

.dashboard-stat-card.rewards-card small {
    display: block;
    margin-top: 0.5rem;
    color: #d1d5db;
    font-size: 0.75rem;
    opacity: 0.8;
}

.dashboard-farm-detail-actions {
    background: linear-gradient(145deg, #1f2937, #111827);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.dashboard-action-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.dashboard-action-header h3 {
    color: #4ade80;
    margin: 0;
}

.dashboard-approval-info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid #3b82f6;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
}

.dashboard-approval-info .info-text {
    color: #93c5fd;
    margin: 0;
    font-size: 0.9rem;
}

.dashboard-approval-info .info-icon {
    margin-right: 0.5rem;
}

.dashboard-stake-input {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.dashboard-stake-input input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #4b5563;
    border-radius: 0.5rem;
    background: #374151;
    color: #f3f4f6;
    font-size: 1rem;
}

.dashboard-stake-input input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.dashboard-stake-input button {
    padding: 0.75rem 1rem;
    background: #6b7280;
    color: #f3f4f6;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: bold;
}

.dashboard-stake-input button:hover {
    background: #4b5563;
}

.dashboard-action-buttons {
    display: flex;
    gap: 1rem;
}

.dashboard-action-buttons .btn {
    flex: 1;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dashboard-action-buttons .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.dashboard-action-buttons .btn-secondary {
    background: #6b7280;
    color: #f3f4f6;
}

.dashboard-action-buttons .btn-secondary:hover:not(:disabled) {
    background: #4b5563;
}

.dashboard-action-buttons .btn-primary {
    background: #3b82f6;
    color: #ffffff;
}

.dashboard-action-buttons .btn-primary:hover:not(:disabled) {
    background: #2563eb;
}

.dashboard-detail-section {
    background: linear-gradient(145deg, #374151, #4b5563);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.dashboard-detail-section h3 {
    color: #4ade80;
    margin: 0 0 1rem 0;
}

.dashboard-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.dashboard-detail-item p {
    color: #9ca3af;
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
}

.dashboard-detail-item h4 {
    color: #f3f4f6;
    margin: 0;
    font-size: 1rem;
    word-break: break-all;
}

.dashboard-back-button {
    background: #6b7280;
    color: #f3f4f6;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    cursor: pointer;
    margin-bottom: 2rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.dashboard-back-button:hover {
    background: #4b5563;
}/* Pr
ogressive Loading Animation */
.dashboard-farm-detail-view .loading-component {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease-out;
}

.dashboard-farm-detail-view .loading-component.loaded {
    opacity: 1;
    transform: translateY(0);
}

.dashboard-farm-detail-view .loading-skeleton {
    background: linear-gradient(90deg, #374151 25%, #4b5563 50%, #374151 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 0.5rem;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.dashboard-farm-detail-view .skeleton-header {
    height: 80px;
    margin-bottom: 2rem;
}

.dashboard-farm-detail-view .skeleton-stats {
    height: 120px;
    margin-bottom: 1.5rem;
}

.dashboard-farm-detail-view .skeleton-actions {
    height: 200px;
    margin-bottom: 2rem;
}

.dashboard-farm-detail-view .skeleton-info {
    height: 150px;
}

/* Staggered animation delays */
.dashboard-farm-detail-view .loading-component:nth-child(1) { transition-delay: 0.1s; }
.dashboard-farm-detail-view .loading-component:nth-child(2) { transition-delay: 0.2s; }
.dashboard-farm-detail-view .loading-component:nth-child(3) { transition-delay: 0.3s; }
.dashboard-farm-detail-view .loading-component:nth-child(4) { transition-delay: 0.4s; }
.dashboard-farm-detail-view .loading-component:nth-child(5) { transition-delay: 0.5s; }