:root {
  --worker-bg: #1F2229;
  --worker-border: #2C303B;
  --worker-hover: rgba(255,255,255,0.03);
  --worker-text: #E6E6E6;
  --worker-text-secondary: #7B8990;
  --worker-status-size: 100%;
  --worker-padding: 12px;
  --worker-border-radius: 4px;
  --worker-shadow: 0 2px 4px rgba(0,0,0,0.2);
  
  --status-success-text: #0fac1e;
  --status-success-bg: rgba(15, 172, 30, 0.1);
  --status-error-text: #ff4d4d;
  --status-error-bg: rgba(255, 77, 77, 0.1);
  --status-running-text: #ffbe00;
  --status-running-bg: rgba(255, 190, 0, 0.1);
  --status-info-text: #0F8DCB;
  --status-info-bg: rgba(15, 141, 203, 0.1);
}

.cron-workers {
  .worker-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }

  .worker-card {
    background: var(--worker-bg);
    border-radius: var(--worker-border-radius);
    padding: var(--worker-padding);
    position: relative;
    transition: all 0.2s ease;
    box-shadow: var(--worker-shadow);
    color: var(--worker-text);
    cursor: pointer;
    overflow: hidden;

    &:hover {
      transform: translateY(-1px);
      box-shadow: 0 3px 6px rgba(0,0,0,0.3);
      background: #252933;
    }

    &.status-completed {
      border-left: 3px solid var(--status-success-text);
    }

    &.status-error {
      border-left: 3px solid var(--status-error-text);
    }

    &.status-running {
      border-left: 3px solid var(--status-running-text);
    }

    .worker-header {
      display: flex;
      gap: 8px;

      .header-main {
        display: flex;
        align-items: center;
        gap: 10px;
        width: 100%;

        .worker-icon {
          flex-shrink: 0;
          width: 32px;
          height: 32px;
          background: var(--worker-border);
          border-radius: 6px;
          display: flex;
          align-items: center;
          justify-content: center;
          
          i {
            font-size: 18px;
            
            &.completed { 
              color: var(--status-success-text);
              text-shadow: 0 0 10px rgba(15, 172, 30, 0.3);
            }
            &.error { 
              color: var(--status-error-text);
              text-shadow: 0 0 10px rgba(255, 77, 77, 0.3);
            }
            &.running { 
              color: var(--status-running-text);
              text-shadow: 0 0 10px rgba(255, 190, 0, 0.3);
            }
          }
        }

        .worker-info {
          flex: 1;
          min-width: 0;

          .worker-name {
            font-weight: 600;
            font-size: 14px;
            color: var(--worker-text);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
          }

          .worker-time {
            color: var(--worker-text-secondary);
            font-size: 12px;
            display: flex;
            align-items: center;
            gap: 4px;
            
            i {
              font-size: 14px;
              opacity: 0.7;
            }
          }
        }
      }

      .worker-status {
        position: absolute;
        top: 32px;
        right: 5px;
        padding: 1px 3px;
        font-size: 11px;
        font-weight: 500;
        border-radius: 3px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        
        &.completed {
          color: var(--status-success-text);
          background: var(--status-success-bg);
          border: 1px solid rgba(15, 172, 30, 0.2);
        }
        
        &.error {
          color: var(--status-error-text);
          background: var(--status-error-bg);
          border: 1px solid rgba(255, 77, 77, 0.2);
        }
        
        &.running {
          color: var(--status-running-text);
          background: var(--status-running-bg);
          border: 1px solid rgba(255, 190, 0, 0.2);
        }
      }
    }

    .worker-details {
      display: none;
    }
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .cron-workers {
    .worker-grid {
      grid-template-columns: 1fr;
    }
  }
}

.cron-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 37px;
  padding: 0 12px;
  background: var(--worker-bg);
  border-bottom: 1px solid var(--worker-border);
  margin-bottom: 15px;

  .left {
    h3 {
      display: flex;
      align-items: center;
      gap: 8px;
      margin: 0;
      color: var(--worker-text);
      font-size: 16px;
      font-weight: 500;

      i {
        font-size: 18px;
        color: var(--status-info-text);
      }
    }
  }

  .right {
    .status-counts {
      display: flex;
      gap: 10px;

      .count {
        display: flex;
        align-items: center;
        gap: 6px;
        font-size: 13px;
        font-weight: 500;
        padding: 4px 8px;
        border-radius: 4px;
        background: var(--worker-border);

        i {
          font-size: 16px;
        }

        &.completed {
          color: var(--status-success-text);
          background: rgba(15, 172, 30, 0.1);
          border: 1px solid rgba(15, 172, 30, 0.2);
        }

        &.running {
          color: var(--status-running-text);
          background: rgba(255, 190, 0, 0.1);
          border: 1px solid rgba(255, 190, 0, 0.2);
        }

        &.error {
          color: var(--status-error-text);
          background: rgba(255, 77, 77, 0.1);
          border: 1px solid rgba(255, 77, 77, 0.2);
        }
      }
    }
  }
}

.content-row .r {
  margin-top: 0;
} 